2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-05-22 03:32:04 +00:00

Revert "new index.html for home page"

This commit is contained in:
zet809 2018-12-17 17:08:05 +08:00 committed by GitHub
parent 5f312b4baa
commit 607afe776f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
35 changed files with 0 additions and 1930 deletions

File diff suppressed because it is too large Load Diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 816 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 432 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 402 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 489 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 118 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 124 B

View File

@ -1 +0,0 @@
gwd-iframe{display:inline-block}gwd-iframe>div.intermediate-element{width:100%;height:100%}gwd-iframe>div.intermediate-element>iframe{display:block;width:100%;height:100%}

View File

@ -1 +0,0 @@
gwd-image.scaled-proportionally>div.intermediate-element>img{background-repeat:no-repeat;background-position:center}gwd-image{display:inline-block}gwd-image>div.intermediate-element{width:100%;height:100%}gwd-image>div.intermediate-element>img{display:block;width:100%;height:100%}

View File

@ -1 +0,0 @@
.gwd-inactive{visibility:hidden}gwd-page{display:block}

View File

@ -1 +0,0 @@
.gwd-pagedeck{position:relative;display:block}.gwd-pagedeck>.gwd-page.transparent{opacity:0}.gwd-pagedeck>.gwd-page{position:absolute;top:0;left:0;-webkit-transition-property:-webkit-transform,opacity;-moz-transition-property:transform,opacity;transition-property:transform,opacity}.gwd-pagedeck>.gwd-page.linear{transition-timing-function:linear}.gwd-pagedeck>.gwd-page.ease-in{transition-timing-function:ease-in}.gwd-pagedeck>.gwd-page.ease-out{transition-timing-function:ease-out}.gwd-pagedeck>.gwd-page.ease{transition-timing-function:ease}.gwd-pagedeck>.gwd-page.ease-in-out{transition-timing-function:ease-in-out}.linear *,.ease-in *,.ease-out *,.ease *,.ease-in-out *{-webkit-transform:translateZ(0);transform:translateZ(0)}

View File

@ -1 +0,0 @@
.has-fullscreen-gwd-video{width:100%!important;height:100%!important;top:0!important;left:0!important;margin:0!important;padding:0!important;border:none!important}gwd-video{display:inline-block}gwd-video>div.intermediate-element{width:100%;height:100%}gwd-video>div.intermediate-element>video{display:block;width:100%;height:100%}

View File

@ -1 +0,0 @@
(function(){(window.goog=window.goog||{}).inherits=function(a,d){function b(){}b.prototype=d.prototype;a.b=d.prototype;a.prototype=new b;a.prototype.constructor=a;a.a=function(a,b,f){for(var e=Array(arguments.length-2),c=2;c<arguments.length;c++)e[c-2]=arguments[c];return d.prototype[b].apply(a,e)}};}).call(this);

File diff suppressed because one or more lines are too long

View File

@ -1,6 +0,0 @@
(function(){'use strict';var b,f=function(a){return"gwd-page"==a.tagName.toLowerCase()||"gwd-page"==a.getAttribute("is")},g=function(a){if(f(a))return a;for(;a&&9!=a.nodeType;)if((a=a.parentElement)&&f(a))return a;return null},h=function(a,c,d){var e=e||c;a.hasAttribute(c)?(a=a.getAttribute(c),d.setAttribute(e,a)):d.removeAttribute(e)};var k=["allowFullscreen","name","scrolling"];var l=function(a,c){var d=document.createEvent("Event");d.initEvent(a,!0,!0);c.dispatchEvent(d)};var m=function(){};goog.inherits(m,HTMLElement);b=m.prototype;
b.createdCallback=function(){for(var a;a=this.firstChild;)this.removeChild(a);this.a=document.createElement("iframe");this.c=this.getAttribute("source");this.f=this.g.bind(this);this.b=!1;this.a.setAttribute("allowtransparency",!0);this.a.setAttribute("border",0);this.a.setAttribute("frameborder",0);this.a.setAttribute("sandbox","allow-same-origin allow-forms allow-scripts");this.a.setAttribute("seamless","seamless");for(a=0;a<k.length;a++)h(this,k[a],this.a);a=document.createElement("div");a.classList.add("intermediate-element");
a.appendChild(this.a);this.appendChild(a);Object.defineProperty(this,"nativeElement",{enumerable:!0,get:function(){return this.a}});Object.defineProperty(this,"src",{enumerable:!0,get:function(){return this.a.src},set:function(a){this.a.src=a}});Object.defineProperty(this,"srcdoc",{enumerable:!0,get:function(){return this.a.srcdoc},set:function(a){this.a.srcdoc=a}});Object.defineProperty(this,"scrolling",{enumerable:!0,get:function(){return this.a.scrolling},set:function(a){this.a.scrolling=a}});
Object.defineProperty(this,"allowFullscreen",{enumerable:!0,get:function(){return this.a.allowFullscreen},set:function(a){a?this.setAttribute("allowFullscreen",""):this.removeAttribute("allowFullscreen")}});Object.defineProperty(this,"name",{enumerable:!0,get:function(){return this.a.name},set:function(a){this.a.name=a}})};
b.attachedCallback=function(){setTimeout(function(){if("function"==typeof this.gwdLoad&&"function"==typeof this.gwdIsLoaded&&!this.gwdIsLoaded()){var a=g(this),c=a&&"function"==typeof a.gwdIsLoaded;(!a||c&&a.gwdIsLoaded())&&this.gwdLoad()}}.bind(this),0)};b.setUrl=function(a){a!=this.c&&(this.b=!1,this.c=a);this.gwdLoad()};b.gwdLoad=function(){this.b||(this.a.addEventListener("load",this.f,!1),this.setAttribute("src",this.c))};b.gwdIsLoaded=function(){return this.b};
b.g=function(){this.b=!0;this.a.removeEventListener("load",this.f,!1);l("iframeload",this);l("ready",this)};b.attributeChangedCallback=function(a){h(this,a,this.a)};document.registerElement("gwd-iframe",{prototype:m.prototype});}).call(this);

View File

@ -1,8 +0,0 @@
(function(){'use strict';var c=function(a){return"gwd-page"==a.tagName.toLowerCase()||"gwd-page"==a.getAttribute("is")},f=function(a){if(c(a))return a;for(;a&&9!=a.nodeType;)if((a=a.parentElement)&&c(a))return a;return null},g=function(a,b,d){var e=e||b;a.hasAttribute(b)?(a=a.getAttribute(b),d.setAttribute(e,a)):d.removeAttribute(e)};var h=["height","width","alt"];var k=function(){};goog.inherits(k,HTMLElement);
k.prototype.createdCallback=function(){for(var a;a=this.firstChild;)this.removeChild(a);this.a=document.createElement("img");this.g=this.h.bind(this);this.b=0;this.c=this.f=-1;Object.defineProperty(this,"nativeElement",{enumerable:!0,get:function(){return this.a}});Object.defineProperty(this,"assetWidth",{enumerable:!0,get:function(){return this.f}});Object.defineProperty(this,"assetHeight",{enumerable:!0,get:function(){return this.c}});Object.defineProperty(this,"naturalWidth",{enumerable:!0,get:function(){return this.a.naturalWidth}});
Object.defineProperty(this,"naturalHeight",{enumerable:!0,get:function(){return this.a.naturalHeight}});Object.defineProperty(this,"height",{enumerable:!0,get:function(){return this.a.height},set:function(a){this.a.height=a}});Object.defineProperty(this,"width",{enumerable:!0,get:function(){return this.a.width},set:function(a){this.a.width=a}});Object.defineProperty(this,"alt",{enumerable:!0,get:function(){return this.a.alt},set:function(a){this.a.alt=a}});Object.defineProperty(this,"src",{enumerable:!0,
get:function(){return this.a.src}});a=document.createElement("div");a.classList.add("intermediate-element");a.appendChild(this.a);this.appendChild(a);if(a=this.getAttribute("src"))this.setAttribute("source",a),this.removeAttribute("src");this.a.addEventListener("load",this.g,!1);this.a.addEventListener("error",this.g,!1);for(a=0;a<h.length;a++)g(this,h[a],this.a)};
k.prototype.attachedCallback=function(){if("function"==typeof this.gwdLoad&&"function"==typeof this.gwdIsLoaded&&!this.gwdIsLoaded()){var a=f(this),b=a&&"function"==typeof a.gwdIsLoaded;(!a||b&&a.gwdIsLoaded())&&this.gwdLoad()}};k.prototype.gwdIsLoaded=function(){return 2==this.b||3==this.b};k.prototype.gwdLoad=function(){this.b=1;this.c=this.f=-1;var a=this.getAttribute("source")||"data:image/gif;base64,R0lGODlhAQABAPAAAAAAAAAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==";this.a.setAttribute("src",a)};
k.prototype.h=function(a){2!=this.b&&(a&&"error"==a.type?(this.b=3,this.c=this.f=-1,this.a.style.backgroundImage=""):(-1!=this.f&&-1!=this.c||!this.getAttribute("source")||(this.f=this.naturalWidth,this.c=this.naturalHeight),this.b=2),l(this),m(this),a=document.createEvent("Event"),a.initEvent("ready",!0,!0),this.dispatchEvent(a))};
var m=function(a){if(2==a.b){var b=a.getAttribute("source"),d=a.getAttribute("scaling")||"stretch";"stretch"==d?(a.classList.remove("scaled-proportionally"),a.a.style.backgroundImage="",a=a.a,b=b||"data:image/gif;base64,R0lGODlhAQABAPAAAAAAAAAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==",b!=a.getAttribute("src")&&a.setAttribute("src",b)):(a.classList.add("scaled-proportionally"),a.a.style.backgroundImage=b?"url("+JSON.stringify(b)+")":"",a.a.style.backgroundSize="none"!=d?d:"auto",b=a.a,"data:image/gif;base64,R0lGODlhAQABAPAAAAAAAAAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw=="!=
b.getAttribute("src")&&b.setAttribute("src","data:image/gif;base64,R0lGODlhAQABAPAAAAAAAAAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw=="))}},l=function(a){var b=a.getAttribute("alignment")||"center";a.a.style.backgroundPosition=b};k.prototype.attributeChangedCallback=function(a){"source"==a?0!==this.b&&this.gwdLoad():"scaling"==a?m(this):"alignment"==a?l(this):"alt"==a&&g(this,a,this.a)};document.registerElement("gwd-image",{prototype:k.prototype});}).call(this);

View File

@ -1,6 +0,0 @@
(function(){'use strict';var c;var d=function(a,f){var b=document.createEvent("Event");b.initEvent(a,!0,!0);f.dispatchEvent(b)};var e=function(){};goog.inherits(e,HTMLElement);c=e.prototype;c.createdCallback=function(){this.h=this.i.bind(this);this.a=[];this.g=this.b=this.f=!1;var a=parseInt(this.getAttribute("data-gwd-width"),10)||this.clientWidth;this.j=(parseInt(this.getAttribute("data-gwd-height"),10)||this.clientHeight)>=a;this.c=!1};
c.attachedCallback=function(){this.addEventListener("ready",this.h,!1);setTimeout(function(){this.a=Array.prototype.slice.call(this.querySelectorAll("*")).filter(function(a){return"function"!=typeof a.gwdLoad||"function"!=typeof a.gwdIsLoaded||a.gwdIsLoaded()?!1:!0},this);this.g=!0;0<this.a.length?(this.style.visibility="hidden",this.f=!1):g(this);this.b=!0;d("attached",this)}.bind(this),0)};
c.detachedCallback=function(){this.removeEventListener("ready",this.h,!1);this.classList.remove("gwd-play-animation");d("detached",this)};c.gwdActivate=function(){this.classList.remove("gwd-inactive");Array.prototype.slice.call(this.querySelectorAll("*")).forEach(function(a){"function"==typeof a.gwdActivate&&"function"==typeof a.gwdIsActive&&0==a.gwdIsActive()&&a.gwdActivate()});this.c=!0;this.b?this.b=!1:d("attached",this);d("pageactivated",this)};
c.gwdDeactivate=function(){this.classList.add("gwd-inactive");this.classList.remove("gwd-play-animation");var a=Array.prototype.slice.call(this.querySelectorAll("*"));a.push(this);for(var f=0;f<a.length;f++){var b=a[f];if(b.classList&&(b.classList.remove("gwd-pause-animation"),b.hasAttribute("data-gwd-current-label"))){var h=b.getAttribute("data-gwd-current-label");b.classList.remove(h);b.removeAttribute("data-gwd-current-label")}delete b.gwdGotoCounters;b!=this&&"function"==typeof b.gwdDeactivate&&
"function"==typeof b.gwdIsActive&&1==b.gwdIsActive()&&b.gwdDeactivate()}this.c=!1;d("pagedeactivated",this);d("detached",this)};c.gwdIsActive=function(){return this.c};c.gwdIsLoaded=function(){return this.g&&0==this.a.length};c.gwdLoad=function(){if(this.gwdIsLoaded())g(this);else for(var a=this.a.length-1;0<=a;a--)this.a[a].gwdLoad()};c.i=function(a){a=this.a.indexOf(a.target);0<=a&&(this.a.splice(a,1),0==this.a.length&&g(this))};
var g=function(a){a.style.visibility="";a.f||(d("ready",a),d("pageload",a));a.f=!0};e.prototype.gwdPresent=function(){d("pagepresenting",this);this.classList.add("gwd-play-animation")};e.prototype.isPortrait=function(){return this.j};e.prototype.attributeChangedCallback=function(){};document.registerElement("gwd-page",{prototype:e.prototype});}).call(this);

View File

@ -1,12 +0,0 @@
(function(){'use strict';var g;var l=["-ms-","-moz-","-webkit-",""],m=function(a,c){for(var b,d,e=0;e<l.length;++e)b=l[e]+"transition-duration",d=""+c,a.style.setProperty(b,d)};function n(a,c,b,d,e,h,f){this.j=a;this.f=c;this.w=b;a=d||"none";this.l=e="none"===a?0:e||1E3;this.g=h||"linear";this.i=[];if(e){h=f||"top";if(f=this.j){f.classList.add("gwd-page");f.classList.add("center");f="center";if("push"==a)switch(h){case "top":f="top";break;case "bottom":f="bottom";break;case "left":f="left";break;case "right":f="right"}this.i.push(f);"fade"==a&&this.i.push("transparent")}f=this.f;e="center";if("none"!=a&&"fade"!=a)switch(h){case "top":e="bottom";break;case "bottom":e="top";
break;case "left":e="right";break;case "right":e="left"}f.classList.add(e);f.classList.add("gwd-page");"fade"==a&&f.classList.add("transparent")}}n.prototype.start=function(){if(this.l){var a=this.j,c=this.f;p(c,this.J.bind(this));a&&(m(a,this.l+"ms"),a.classList.add(this.g));m(c,this.l+"ms");c.classList.add(this.g);c.setAttribute("gwd-reflow",c.offsetWidth);if(a)for(var b=0;b<this.i.length;++b)a.classList.add(this.i[b]);q(c)}else this.w()};
var r=function(a,c,b,d){b="transform: matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,"+b+","+d+",0,1);";return a+"."+c+"{-webkit-"+b+"-moz-"+b+"-ms-"+b+b+"}"},t="center top bottom left right transparent".split(" "),q=function(a){t.forEach(function(c){a.classList.remove(c)})},p=function(a,c){var b=function(){a.removeEventListener("webkitTransitionEnd",b);a.removeEventListener("transitionend",b);c()};a.addEventListener("webkitTransitionEnd",b);a.addEventListener("transitionend",b)};
n.prototype.J=function(){var a=this.j;a&&(q(a),m(a,0),a.classList.remove(this.g));m(this.f,0);this.f.classList.remove(this.g);this.w()};var u=function(a,c,b){if(b){var d=document.createEvent("CustomEvent");d.initCustomEvent(a,!0,!0,b)}else d=document.createEvent("Event"),d.initEvent(a,!0,!0);c.dispatchEvent(d)},w=function(a,c){var b=function(d){a.removeEventListener("attached",b);c(d)};a.addEventListener("attached",b)};var x=function(){};goog.inherits(x,HTMLElement);x.prototype.createdCallback=function(){window.addEventListener("WebComponentsReady",this.I.bind(this),!1);this.u=this.h.bind(this,"shake");this.v=this.h.bind(this,"tilt");this.s=this.h.bind(this,"rotatetoportrait");this.o=this.h.bind(this,"rotatetolandscape");this.a=[];this.A=this.H.bind(this);this.D=this.F.bind(this);this.c=this.B=null;this.b=-1;this.m=!1;this.classList.add("gwd-pagedeck");Object.defineProperty(this,"currentIndex",{enumerable:!0,get:this.G.bind(this)})};
x.prototype.I=function(){this.a=Array.prototype.slice.call(this.querySelectorAll("gwd-page"));this.a.forEach(function(a){a.classList.add("gwd-page")});for(u("beforepagesdetached",this,{pages:this.a.slice()});this.firstChild;)this.removeChild(this.firstChild);-1==this.b&&void 0!==this.C&&this.goToPage(this.C)};
x.prototype.attachedCallback=function(){if(!this.B){var a=this.id;var c=this.offsetWidth;var b=this.offsetHeight;a=(a&&"#")+a+".gwd-pagedeck > .gwd-page";c=r(a,"center",0,0)+r(a,"top",0,b)+r(a,"bottom",0,-b)+r(a,"left",c,0)+r(a,"right",-c,0);b=document.createElement("style");void 0!==b.cssText?b.cssText=c:(b.type="text/css",b.innerText=c);document.head.appendChild(b);this.B=b}this.addEventListener("pageload",this.A,!1);document.body.addEventListener("shake",this.u,!0);document.body.addEventListener("tilt",
this.v,!0);document.body.addEventListener("rotatetoportrait",this.s,!0);document.body.addEventListener("rotatetolandscape",this.o,!0)};x.prototype.detachedCallback=function(){this.removeEventListener("pageload",this.A,!1);document.body&&(document.body.removeEventListener("shake",this.u,!0),document.body.removeEventListener("tilt",this.v,!0),document.body.removeEventListener("rotatetoportrait",this.s,!0),document.body.removeEventListener("rotatetolandscape",this.o,!0))};
var z=function(a,c,b,d,e,h){if(!(a.b==c||0>c||c>a.a.length-1||a.c)){var f=a.a[a.b],k=a.a[c];a.b=c;a.c=new n(f,k,a.D,b,d,e,h);var v=k.gwdLoad&&!k.gwdIsLoaded();a.m=v;w(k,function(){k.gwdActivate();v?k.gwdLoad():y(this)}.bind(a));a.appendChild(k)}};x.prototype.H=function(a){this.m&&a.target.parentNode==this&&(y(this),this.m=!1)};var y=function(a){u("pagetransitionstart",a);a.c.start()};g=x.prototype;
g.F=function(){if(this.c){var a=this.c.j,c=this.c.f;this.c=null;u("pagetransitionend",this,{outgoingPage:a?a:null,incomingPage:c});a&&a.gwdDeactivate();c.gwdPresent()}};g.findPageIndexByAttributeValue=function(a,c){for(var b=this.a.length,d,e=0;e<b;e++)if(d=this.a[e],"boolean"==typeof c){if(d.hasAttribute(a))return e}else if(d.getAttribute(a)==c)return e;return-1};g.goToNextPage=function(a,c,b,d,e){var h=this.b,f=h+1;f>=this.a.length&&(f=a?0:h);z(this,f,c,b,d,e)};
g.goToPreviousPage=function(a,c,b,d,e){var h=this.b,f=this.a.length,k=h-1;0>k&&(k=a?f-1:h);z(this,k,c,b,d,e)};g.goToPage=function(a,c,b,d,e){this.a.length?(a="number"==typeof a?a:this.findPageIndexByAttributeValue("id",a),0<=a&&z(this,a,c,b,d,e)):this.C=a};g.G=function(){return 0<=this.b?this.b:void 0};g.getPages=function(){return this.a};g.getPage=function(a){if("number"!=typeof a){if(!a)return null;a=this.findPageIndexByAttributeValue("id",a)}return 0>a||a>this.a.length-1?null:this.a[a]};
g.getCurrentPage=function(){return this.getPage(this.b)};g.getDefaultPage=function(){var a=this.getAttribute("default-page");return a?this.getPage(this.findPageIndexByAttributeValue("id",a)):this.getPage(0)};g.getOrientationSpecificPage=function(a,c){c=this.getPage(c);var b=c.getAttribute("alt-orientation-page");if(!b)return c;var d=c.isPortrait();a=1==a;b=this.getPage(b);return a==d?c:b};g.h=function(a,c){if(c.target==document.body){var b=this.getPage(this.b);u(a,b,c.detail)}};
g.getElementById=function(a){for(var c=this.a.length,b=0;b<c;b++){var d=this.a[b].querySelector("#"+a);if(d)return d}return null};g.getElementsBySelector=function(a){for(var c=this.a.length,b=[],d=0;d<c;d++){var e=this.a[d].querySelectorAll(a);e&&(b=b.concat(Array.prototype.slice.call(e)))}return b};g.attributeChangedCallback=function(){};document.registerElement("gwd-pagedeck",{prototype:x.prototype});}).call(this);

View File

@ -1,14 +0,0 @@
(function(){'use strict';var e,k=function(a){if("function"==typeof a.gwdLoad&&"function"==typeof a.gwdIsLoaded&&!a.gwdIsLoaded()){var b=h(a),c=b&&"function"==typeof b.gwdIsLoaded;(!b||c&&b.gwdIsLoaded())&&a.gwdLoad()}},l=function(a){if(null==a.gwdActivate||"function"==typeof a.gwdActivate)if(null==a.gwdIsActive||!a.gwdIsActive()){var b=h(a),c=b&&null!=b.gwdIsActive&&"function"==typeof b.gwdIsActive;null==b&&a.gwdActivate();c&&b.gwdIsActive()&&a.gwdActivate()}},m=function(a){return"gwd-page"==a.tagName.toLowerCase()||
"gwd-page"==a.getAttribute("is")},h=function(a){if(m(a))return a;for(;a&&9!=a.nodeType;)if((a=a.parentElement)&&m(a))return a;return null},n=function(a){for(var b=[];a;a=a.parentNode)b.unshift(a);return b},p=function(a,b,c){var d=d||b;a.hasAttribute(b)?(a=a.getAttribute(b),c.setAttribute(d,a)):c.removeAttribute(d)};var q=function(a,b){setTimeout(a,b)};var r=function(a,b,c){if(c){var d=document.createEvent("CustomEvent");d.initCustomEvent(a,!0,!0,c)}else d=document.createEvent("Event"),d.initEvent(a,!0,!0);b.dispatchEvent(d)},t=function(a,b){var c=function(d){a.removeEventListener("playing",c);b(d)};a.addEventListener("playing",c)};var u={v:"fullscreenchange",A:"webkitfullscreenchange",w:"mozfullscreenchange"},v={v:"fullscreenElement",A:"webkitFullscreenElement",w:"mozFullScreenElement"},w=function(a){var b;for(b in v){var c=a[v[b]];if(void 0!==c)break}return c||null},x=function(a){var b=document;this.g="has-fullscreen-gwd-video";this.b=b;this.c=a;this.o=this.C.bind(this)};
x.prototype.C=function(){var a=w(this.b);if(a)if(this.c==a){var b=this.b;for(a=this.c;a&&a!=b;a=a.parentNode)a.classList.add(this.g)}else if(a.classList.contains(this.g)){b=n(this.c);a=n(a);for(var c=0,d=b[0],g=a[0],f=null;d&&g&&d==g;)f=d,c++,d=b[c],g=a[c];y(this,f)}else y(this);else y(this)};x.prototype.install=function(){for(var a in u)this.b.addEventListener(u[a],this.o)};var y=function(a,b){b=b||a.b;for(var c=a.c;c&&c!=b;c=c.parentNode)c.classList.remove(a.g)};var z="abort canplay canplaythrough durationchange emptied ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),A="autoplay loop muted sources controls poster".split(" "),B={".avi":1,".m4v":1,".mp4":1,".mpeg":1,".mpg":1,".ogg":1,".ogv":1,".qt":1,".webm":1,".wmv":1},C=function(){};goog.inherits(C,HTMLElement);e=C.prototype;
e.createdCallback=function(){for(var a;a=this.firstChild;)this.removeChild(a);this.a=document.createElement("video");this.u=this.B.bind(this);this.m=function(a){r(a.type,this,a.detail)}.bind(this);this.s=new x(this.a);this.h=this.i=!1;for(a=0;a<A.length;a++)p(this,A[a],this.a);this.a.setAttribute("webkit-playsinline","");this.a.setAttribute("playsinline","");this.a.setAttribute("x-webkit-airplay","allow");this.l=1;this.j=!1;a=document.createElement("div");a.classList.add("intermediate-element");a.appendChild(this.a);
this.appendChild(a);Object.defineProperty(this,"nativeElement",{enumerable:!0,get:function(){return this.a}});Object.defineProperty(this,"autoplay",{enumerable:!0,get:function(){return this.a.autoplay},set:function(a){a?this.setAttribute("autoplay",""):this.removeAttribute("autoplay")}});Object.defineProperty(this,"loop",{enumerable:!0,get:function(){return this.a.loop},set:function(a){a?this.setAttribute("loop",""):this.removeAttribute("loop")}});Object.defineProperty(this,"muted",{enumerable:!0,
get:function(){return this.hasAttribute("muted")},set:function(a){a?this.setAttribute("muted",""):this.removeAttribute("muted")}});this.a.muted=this.muted;Object.defineProperty(this,"controls",{enumerable:!0,get:function(){return this.a.controls},set:function(a){a?this.setAttribute("controls",""):this.removeAttribute("controls")}});Object.defineProperty(this,"poster",{enumerable:!0,get:function(){return this.a.poster},set:function(a){a?this.setAttribute("poster",a):this.removeAttribute("poster")}});
Object.defineProperty(this,"paused",{enumerable:!0,get:function(){return this.a.paused}});Object.defineProperty(this,"volume",{enumerable:!0,get:function(){return this.a.volume},set:function(a){this.a.volume=a}});Object.defineProperty(this,"currentTime",{enumerable:!0,get:function(){return this.a.currentTime},set:function(a){this.a.currentTime=a}});Object.defineProperty(this,"duration",{enumerable:!0,get:function(){return this.a.duration}});Object.defineProperty(this,"width",{enumerable:!0,get:function(){return this.a.width},
set:function(a){a&&(this.a.width=a)}});Object.defineProperty(this,"height",{enumerable:!0,get:function(){return this.a.height},set:function(a){a&&(this.a.height=a)}});Object.defineProperty(this,"videoWidth",{enumerable:!0,get:function(){return this.a.videoWidth}});Object.defineProperty(this,"videoHeight",{enumerable:!0,get:function(){return this.a.videoHeight}});this.f=this.muted&&-1!=(window.navigator.userAgent||"").indexOf("Android")};
e.attachedCallback=function(){k(this);l(this);this.f&&t(this.a,function(){this.f&&(this.a.volume=0)}.bind(this));this.a.addEventListener("volumechange",this.u,!1);for(var a=0;a<z.length;a++)this.a.addEventListener(z[a],this.m,!1);this.s.install()};e.detachedCallback=function(){var a=this.s,b;for(b in u)a.b.removeEventListener(u[b],a.o);a.c==w(a.b)&&y(a);this.f&&(this.a.volume=1);this.a.removeEventListener("volumechange",this.u,!1);for(a=0;a<z.length;a++)this.a.removeEventListener(z[a],this.m,!1)};
e.attributeChangedCallback=function(a){if("sources"==a){if(this.i){var b=this.a.paused,c=this.muted;D(this);this.a.load();q(function(){this.muted=c;b?this.pause():this.play()}.bind(this),0)}}else"muted"==a&&(this.a.muted=this.muted);"class"!=a&&p(this,a,this.a)};e.gwdActivate=function(){this.autoplay&&this.a.paused&&q(function(){this.play()}.bind(this),200);this.h=!0};e.gwdDeactivate=function(){this.hasAttribute("resumable")||this.seek(0);this.pause();this.h=!1};e.gwdIsActive=function(){return this.h};
e.gwdLoad=function(){D(this);this.i=!0;r("ready",this)};e.gwdIsLoaded=function(){return this.i};e.mute=function(){this.f&&(this.a.volume=1);this.f=!1;this.muted=!this.muted};e.replay=function(){this.seek(0);this.play()};e.seek=function(a){this.currentTime!=a&&(this.currentTime=a)};e.B=function(){!1===this.j&&!0===this.muted&&0===this.l&&(this.a.volume=1,this.muted=!1);this.l=this.a.volume;this.j=this.muted};
e.setVolume=function(a){this.muted=0<a?!1:!0;this.a.volume=a/100;this.l=this.a.volume;this.j=this.muted};e.setSources=function(a){this.setAttribute("sources",a)};e.play=function(){this.a.play()};e.pause=function(){this.a.pause()};
var D=function(a){var b=a.getAttribute("sources");b=E(b);for(var c;c=a.a.firstChild;)a.a.removeChild(c);for(c=0;c<b.length;++c){var d=document.createElement("source"),g=d;var f=b[c];f=f.trim();f=window.Enabler?Enabler.getUrl(f):f;g.src=f;a.a.appendChild(d)}},E=function(a){var b=[];if(!a)return b;a=a.split(",").map(function(a){return a.trim()});for(var c="",d=0;d<a.length;d++){var g=a[d];c+=g;var f=g.lastIndexOf(".");-1!=f?B[g.substring(f).toLowerCase()]?(b.push(c),c=""):c+=",":c+=","}c&&b.push(c.substring(0,
c.length-1));return b};document.registerElement("gwd-video",{prototype:C.prototype});}).call(this);

File diff suppressed because one or more lines are too long