123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- (function(){/*
- Copyright (c) 2016 The Polymer Project Authors. All rights reserved.
- This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
- The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
- The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
- Code distributed by Google as part of the polymer project is also
- subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
- */
- 'use strict';(function(h){function y(a,b){if("function"===typeof window.CustomEvent)return new CustomEvent(a,b);var c=document.createEvent("CustomEvent");c.initCustomEvent(a,!!b.bubbles,!!b.cancelable,b.detail);return c}function m(a){if(u)return a.ownerDocument!==document?a.ownerDocument:null;var b=a.__importDoc;if(!b&&a.parentNode){b=a.parentNode;if("function"===typeof b.closest)b=b.closest("link[rel=import]");else for(;!p(b)&&(b=b.parentNode););a.__importDoc=b}return b}function I(a){var b=document.querySelectorAll("link[rel=import]:not([import-dependency])"),
- c=b.length;c?k(b,function(b){return q(b,function(){0===--c&&a()})}):a()}function z(a){function b(){"loading"!==document.readyState&&document.body&&(document.removeEventListener("readystatechange",b),a())}document.addEventListener("readystatechange",b);b()}function A(a){z(function(){return I(function(){return a&&a()})})}function q(a,b){if(a.__loaded)b&&b();else if("script"===a.localName&&!a.src||"style"===a.localName&&!a.firstChild)a.__loaded=!0,b&&b();else{var c=function(d){a.removeEventListener(d.type,
- c);a.__loaded=!0;b&&b()};a.addEventListener("load",c);v&&"style"===a.localName||a.addEventListener("error",c)}}function p(a){return a.nodeType===Node.ELEMENT_NODE&&"link"===a.localName&&"import"===a.rel}function e(){var a=this;this.a={};this.b=0;this.h=new MutationObserver(function(b){return a.B(b)});this.h.observe(document.head,{childList:!0,subtree:!0});this.c(document)}function k(a,b,c){var d=a?a.length:0,f=c?-1:1;for(c=c?d-1:0;c<d&&0<=c;c+=f)b(a[c],c)}var u="import"in document.createElement("link"),
- w=null;!1==="currentScript"in document&&Object.defineProperty(document,"currentScript",{get:function(){return w||("complete"!==document.readyState?document.scripts[document.scripts.length-1]:null)},configurable:!0});var J=/(url\()([^)]*)(\))/g,K=/(@import[\s]+(?!url\())([^;]*)(;)/g,L=/(<link[^>]*)(rel=['|"]?stylesheet['|"]?[^>]*>)/g,g={w:function(a,b){a.href&&a.setAttribute("href",g.f(a.getAttribute("href"),b));a.src&&a.setAttribute("src",g.f(a.getAttribute("src"),b));if("style"===a.localName){var c=
- g.s(a.textContent,b,J);a.textContent=g.s(c,b,K)}},s:function(a,b,c){return a.replace(c,function(a,c,l,e){a=l.replace(/["']/g,"");b&&(a=g.f(a,b));return c+"'"+a+"'"+e})},f:function(a,b){if(void 0===g.g){g.g=!1;try{var c=new URL("b","http://a");c.pathname="c%20d";g.g="http://a/c%20d"===c.href}catch(d){}}if(g.g)return(new URL(a,b)).href;c=g.u;c||(c=document.implementation.createHTMLDocument("temp"),g.u=c,c.j=c.createElement("base"),c.head.appendChild(c.j),c.i=c.createElement("a"));c.j.href=b;c.i.href=
- a;return c.i.href||a}},B={async:!0,load:function(a,b,c){if(a)if(a.match(/^data:/)){a=a.split(",");var d=a[1];d=-1<a[0].indexOf(";base64")?atob(d):decodeURIComponent(d);b(d)}else{var f=new XMLHttpRequest;f.open("GET",a,B.async);f.onload=function(){var a=f.responseURL||f.getResponseHeader("Location");a&&0===a.indexOf("/")&&(a=(location.origin||location.protocol+"//"+location.host)+a);var d=f.response||f.responseText;304===f.status||0===f.status||200<=f.status&&300>f.status?b(d,a):c(d)};f.send()}else c("error: href must be specified")}},
- v=/Trident/.test(navigator.userAgent)||/Edge\/\d./i.test(navigator.userAgent);e.prototype.c=function(a){var b=this;k(a.querySelectorAll("link[rel=import]"),function(a){return b.m(a)})};e.prototype.m=function(a){var b=this,c=a.href;if(void 0!==this.a[c]){var d=this.a[c];d&&d.__loaded&&(a.import=d,this.l(a))}else this.b++,this.a[c]="pending",B.load(c,function(a,d){a=b.C(a,d||c);b.a[c]=a;b.b--;b.c(a);b.o()},function(){b.a[c]=null;b.b--;b.o()})};e.prototype.C=function(a,b){if(!a)return document.createDocumentFragment();
- v&&(a=a.replace(L,function(a,b,c){return-1===a.indexOf("type=")?b+" type=import-disable "+c:a}));var c=document.createElement("template");c.innerHTML=a;if(c.content)a=c.content;else for(a=document.createDocumentFragment();c.firstChild;)a.appendChild(c.firstChild);if(c=a.querySelector("base"))b=g.f(c.getAttribute("href"),b),c.removeAttribute("href");var d=0;k(a.querySelectorAll('link[rel=import], link[rel=stylesheet][href][type=import-disable],\n style:not([type]), link[rel=stylesheet][href]:not([type]),\n script:not([type]), script[type="application/javascript"],\n script[type="text/javascript"]'),
- function(a){q(a);g.w(a,b);a.setAttribute("import-dependency","");"script"===a.localName&&!a.src&&a.textContent&&(a.setAttribute("src","data:text/javascript;charset=utf-8,"+encodeURIComponent(a.textContent+("\n//# sourceURL="+b+(d?"-"+d:"")+".js\n"))),a.textContent="",d++)});return a};e.prototype.o=function(){var a=this;if(!this.b){this.h.disconnect();this.flatten(document);var b=!1,c=!1,d=function(){c&&b&&(a.c(document),a.b||(a.h.observe(document.head,{childList:!0,subtree:!0}),a.A()))};this.F(function(){c=
- !0;d()});this.D(function(){b=!0;d()})}};e.prototype.flatten=function(a){var b=this;k(a.querySelectorAll("link[rel=import]"),function(a){var c=b.a[a.href];(a.import=c)&&c.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&(b.a[a.href]=a,a.readyState="loading",a.import=a,b.flatten(c),a.appendChild(c))})};e.prototype.D=function(a){function b(f){if(f<d){var l=c[f],e=document.createElement("script");l.removeAttribute("import-dependency");k(l.attributes,function(a){return e.setAttribute(a.name,a.value)});w=e;l.parentNode.replaceChild(e,
- l);q(e,function(){w=null;b(f+1)})}else a()}var c=document.querySelectorAll("script[import-dependency]"),d=c.length;b(0)};e.prototype.F=function(a){var b=document.querySelectorAll("style[import-dependency],\n link[rel=stylesheet][import-dependency]"),c=b.length;if(c){var d=v&&!!document.querySelector("link[rel=stylesheet][href][type=import-disable]");k(b,function(b){q(b,function(){b.removeAttribute("import-dependency");0===--c&&a()});if(d&&b.parentNode!==document.head){var e=document.createElement(b.localName);
- e.__appliedElement=b;e.setAttribute("type","import-placeholder");b.parentNode.insertBefore(e,b.nextSibling);for(e=m(b);e&&m(e);)e=m(e);e.parentNode!==document.head&&(e=null);document.head.insertBefore(b,e);b.removeAttribute("type")}})}else a()};e.prototype.A=function(){var a=this;k(document.querySelectorAll("link[rel=import]"),function(b){return a.l(b)},!0)};e.prototype.l=function(a){a.__loaded||(a.__loaded=!0,a.import&&(a.import.readyState="complete"),a.dispatchEvent(y(a.import?"load":"error",{bubbles:!1,
- cancelable:!1,detail:void 0})))};e.prototype.B=function(a){var b=this;k(a,function(a){return k(a.addedNodes,function(a){a&&a.nodeType===Node.ELEMENT_NODE&&(p(a)?b.m(a):b.c(a))})})};if(u){k(document.querySelectorAll("link[rel=import]"),function(a){a.import&&"loading"===a.import.readyState||(a.__loaded=!0)});var C=function(a){a=a.target;p(a)&&(a.__loaded=!0)};document.addEventListener("load",C,!0);document.addEventListener("error",C,!0)}else{var n=Object.getOwnPropertyDescriptor(Node.prototype,"baseURI");
- Object.defineProperty((!n||n.configurable?Node:Element).prototype,"baseURI",{get:function(){var a=p(this)?this:m(this);return a?a.href:n&&n.get?n.get.call(this):(document.querySelector("base")||window.location).href},configurable:!0,enumerable:!0});z(function(){return new e})}A(function(){return document.dispatchEvent(y("HTMLImportsLoaded",{cancelable:!0,bubbles:!0,detail:void 0}))});h.useNative=u;h.whenReady=A;h.importForElement=m})(window.HTMLImports=window.HTMLImports||{});/*
- Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
- This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
- The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
- The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
- Code distributed by Google as part of the polymer project is also
- subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
- */
- var r=window.customElements,t=window.HTMLImports,x=window.HTMLTemplateElement;window.WebComponents=window.WebComponents||{};if(r&&r.polyfillWrapFlushCallback){var D,E=function(){if(D){x.v&&x.v(window.document);var h=D;D=null;h();return!0}},F=t.whenReady;r.polyfillWrapFlushCallback(function(h){D=h;F(E)});t.whenReady=function(h){F(function(){E()?t.whenReady(h):h()})}}
- t.whenReady(function(){requestAnimationFrame(function(){window.WebComponents.ready=!0;document.dispatchEvent(new CustomEvent("WebComponentsReady",{bubbles:!0}))})});var G=document.createElement("style");G.textContent="body {transition: opacity ease-in 0.2s; } \nbody[unresolved] {opacity: 0; display: block; overflow: hidden; position: relative; } \n";var H=document.querySelector("head");H.insertBefore(G,H.firstChild);/*
- Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
- This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
- The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
- The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
- Code distributed by Google as part of the polymer project is also
- subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
- */
- }).call(this);
- //# sourceMappingURL=webcomponents-hi.js.map
|