mirror of
https://github.com/jlengrand/webcomponentsjs.git
synced 2026-03-10 08:51:22 +00:00
215 lines
92 KiB
JavaScript
215 lines
92 KiB
JavaScript
(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
|
|
|
|
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
|
|
|
|
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
|
|
|
|
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
|
|
*/
|
|
'use strict';var ka={scope:{},getGlobal:function(k){return"undefined"!=typeof window&&window===k?k:"undefined"!=typeof global&&null!=global?global:k}};ka.global=ka.getGlobal(this);
|
|
(function(){function k(){var a=this;this._scopeCounter={};this._documentOwner=document.documentElement;var b=new ya;b.rules=[];this._documentOwnerStyleInfo=u.set(this._documentOwner,new u(b));this._elementsHaveApplied=!1;this._customStyleInterface=this._applyShim=null;ob(function(){a._ensure()})}function z(){this.customStyles=[];this.enqueued=!1}function pb(){}function la(a){this.cache={};this.typeMax=void 0===a?100:a}function n(){}function u(a,b,c,d,e,f){this.styleRules=a||null;this.placeholder=
|
|
b||null;this.ownStylePropertyNames=c||[];this.overrideStyleProperties=null;this.elementName=d||"";this.cssBuild=f||"";this.typeExtension=e||"";this.customStyle=this.scopeSelector=this.styleProperties=null}function v(){}function ya(){this.end=this.start=0;this.rules=this.parent=this.previous=null;this.cssText=this.parsedCssText="";this.atRule=!1;this.type=0;this.parsedSelector=this.selector=this.keyframesName=""}function Rc(a){function b(b,c){Object.defineProperty(b,"innerHTML",{enumerable:c.enumerable,
|
|
configurable:!0,get:c.get,set:function(b){var d=this,e=void 0;m(this)&&(e=[],Q(this,function(a){a!==d&&e.push(a)}));c.set.call(this,b);if(e)for(var f=0;f<e.length;f++){var g=e[f];1===g.__CE_state&&a.disconnectedCallback(g)}this.ownerDocument.__CE_hasRegistry?a.patchAndUpgradeTree(this):a.patchTree(this);return b}})}function c(b,c){B(b,"insertAdjacentElement",function(b,d){var e=m(d);b=c.call(this,b,d);e&&a.disconnectTree(d);m(b)&&a.connectTree(d);return b})}qb?B(Element.prototype,"attachShadow",function(a){return this.__CE_shadowRoot=
|
|
a=qb.call(this,a)}):console.warn("Custom Elements: `Element#attachShadow` was not patched.");if(za&&za.get)b(Element.prototype,za);else if(Aa&&Aa.get)b(HTMLElement.prototype,Aa);else{var d=Ba.call(document,"div");a.addPatch(function(a){b(a,{enumerable:!0,configurable:!0,get:function(){return rb.call(this,!0).innerHTML},set:function(a){var b="template"===this.localName?this.content:this;for(d.innerHTML=a;0<b.childNodes.length;)Ca.call(b,b.childNodes[0]);for(;0<d.childNodes.length;)ma.call(b,d.childNodes[0])}})})}B(Element.prototype,
|
|
"setAttribute",function(b,c){if(1!==this.__CE_state)return sb.call(this,b,c);var d=Da.call(this,b);sb.call(this,b,c);c=Da.call(this,b);d!==c&&a.attributeChangedCallback(this,b,d,c,null)});B(Element.prototype,"setAttributeNS",function(b,c,d){if(1!==this.__CE_state)return tb.call(this,b,c,d);var e=na.call(this,b,c);tb.call(this,b,c,d);d=na.call(this,b,c);e!==d&&a.attributeChangedCallback(this,c,e,d,b)});B(Element.prototype,"removeAttribute",function(b){if(1!==this.__CE_state)return ub.call(this,b);
|
|
var c=Da.call(this,b);ub.call(this,b);null!==c&&a.attributeChangedCallback(this,b,c,null,null)});B(Element.prototype,"removeAttributeNS",function(b,c){if(1!==this.__CE_state)return vb.call(this,b,c);var d=na.call(this,b,c);vb.call(this,b,c);var e=na.call(this,b,c);d!==e&&a.attributeChangedCallback(this,c,d,e,b)});wb?c(HTMLElement.prototype,wb):xb?c(Element.prototype,xb):console.warn("Custom Elements: `Element#insertAdjacentElement` was not patched.");yb(a,Element.prototype,{prepend:Tc,append:Uc});
|
|
Vc(a,Element.prototype,{before:Wc,after:Xc,replaceWith:Yc,remove:Zc})}function Vc(a,b,c){b.before=function(b){for(var d=[],f=0;f<arguments.length;++f)d[f-0]=arguments[f];f=d.filter(function(a){return a instanceof Node&&m(a)});c.before.apply(this,d);for(var g=0;g<f.length;g++)a.disconnectTree(f[g]);if(m(this))for(f=0;f<d.length;f++)g=d[f],g instanceof Element&&a.connectTree(g)};b.after=function(b){for(var d=[],f=0;f<arguments.length;++f)d[f-0]=arguments[f];f=d.filter(function(a){return a instanceof
|
|
Node&&m(a)});c.after.apply(this,d);for(var g=0;g<f.length;g++)a.disconnectTree(f[g]);if(m(this))for(f=0;f<d.length;f++)g=d[f],g instanceof Element&&a.connectTree(g)};b.replaceWith=function(b){for(var d=[],f=0;f<arguments.length;++f)d[f-0]=arguments[f];var f=d.filter(function(a){return a instanceof Node&&m(a)}),g=m(this);c.replaceWith.apply(this,d);for(var h=0;h<f.length;h++)a.disconnectTree(f[h]);if(g)for(a.disconnectTree(this),f=0;f<d.length;f++)g=d[f],g instanceof Element&&a.connectTree(g)};b.remove=
|
|
function(){var b=m(this);c.remove.call(this);b&&a.disconnectTree(this)}}function $c(a){function b(b,d){Object.defineProperty(b,"textContent",{enumerable:d.enumerable,configurable:!0,get:d.get,set:function(b){if(this.nodeType===Node.TEXT_NODE)d.set.call(this,b);else{var c=void 0;if(this.firstChild){var e=this.childNodes,h=e.length;if(0<h&&m(this))for(var c=Array(h),l=0;l<h;l++)c[l]=e[l]}d.set.call(this,b);if(c)for(b=0;b<c.length;b++)a.disconnectTree(c[b])}}})}B(Node.prototype,"insertBefore",function(b,
|
|
d){if(b instanceof DocumentFragment){var c=Array.prototype.slice.apply(b.childNodes);b=zb.call(this,b,d);if(m(this))for(d=0;d<c.length;d++)a.connectTree(c[d]);return b}c=m(b);d=zb.call(this,b,d);c&&a.disconnectTree(b);m(this)&&a.connectTree(b);return d});B(Node.prototype,"appendChild",function(b){if(b instanceof DocumentFragment){var c=Array.prototype.slice.apply(b.childNodes);b=ma.call(this,b);if(m(this))for(var e=0;e<c.length;e++)a.connectTree(c[e]);return b}c=m(b);e=ma.call(this,b);c&&a.disconnectTree(b);
|
|
m(this)&&a.connectTree(b);return e});B(Node.prototype,"cloneNode",function(b){b=rb.call(this,b);this.ownerDocument.__CE_hasRegistry?a.patchAndUpgradeTree(b):a.patchTree(b);return b});B(Node.prototype,"removeChild",function(b){var c=m(b),e=Ca.call(this,b);c&&a.disconnectTree(b);return e});B(Node.prototype,"replaceChild",function(b,d){if(b instanceof DocumentFragment){var c=Array.prototype.slice.apply(b.childNodes);b=Ab.call(this,b,d);if(m(this))for(a.disconnectTree(d),d=0;d<c.length;d++)a.connectTree(c[d]);
|
|
return b}var c=m(b),f=Ab.call(this,b,d),g=m(this);g&&a.disconnectTree(d);c&&a.disconnectTree(b);g&&a.connectTree(b);return f});Ea&&Ea.get?b(Node.prototype,Ea):a.addPatch(function(a){b(a,{enumerable:!0,configurable:!0,get:function(){for(var a=[],b=0;b<this.childNodes.length;b++)a.push(this.childNodes[b].textContent);return a.join("")},set:function(a){for(;this.firstChild;)Ca.call(this,this.firstChild);ma.call(this,document.createTextNode(a))}})})}function ad(a){B(Document.prototype,"createElement",
|
|
function(b){if(this.__CE_hasRegistry){var c=a.localNameToDefinition(b);if(c)return new c.constructor}b=Ba.call(this,b);a.patch(b);return b});B(Document.prototype,"importNode",function(b,c){b=bd.call(this,b,c);this.__CE_hasRegistry?a.patchAndUpgradeTree(b):a.patchTree(b);return b});B(Document.prototype,"createElementNS",function(b,c){if(this.__CE_hasRegistry&&(null===b||"http://www.w3.org/1999/xhtml"===b)){var d=a.localNameToDefinition(c);if(d)return new d.constructor}b=cd.call(this,b,c);a.patch(b);
|
|
return b});yb(a,Document.prototype,{prepend:dd,append:ed})}function yb(a,b,c){b.prepend=function(b){for(var d=[],f=0;f<arguments.length;++f)d[f-0]=arguments[f];f=d.filter(function(a){return a instanceof Node&&m(a)});c.prepend.apply(this,d);for(var g=0;g<f.length;g++)a.disconnectTree(f[g]);if(m(this))for(f=0;f<d.length;f++)g=d[f],g instanceof Element&&a.connectTree(g)};b.append=function(b){for(var d=[],f=0;f<arguments.length;++f)d[f-0]=arguments[f];f=d.filter(function(a){return a instanceof Node&&
|
|
m(a)});c.append.apply(this,d);for(var g=0;g<f.length;g++)a.disconnectTree(f[g]);if(m(this))for(f=0;f<d.length;f++)g=d[f],g instanceof Element&&a.connectTree(g)}}function fd(a){window.HTMLElement=function(){function b(){var b=this.constructor,d=a.constructorToDefinition(b);if(!d)throw Error("The custom element being constructed was not registered with `customElements`.");var e=d.constructionStack;if(0===e.length)return e=Ba.call(document,d.localName),Object.setPrototypeOf(e,b.prototype),e.__CE_state=
|
|
1,e.__CE_definition=d,a.patch(e),e;var d=e.length-1,f=e[d];if(f===Bb)throw Error("The HTMLElement constructor was either called reentrantly for this constructor or called multiple times.");e[d]=Bb;Object.setPrototypeOf(f,b.prototype);a.patch(f);return f}b.prototype=gd.prototype;return b}()}function A(a){this._elementDefinitionIsRunning=!1;this._internals=a;this._whenDefinedDeferred=new Map;this._flushCallback=function(a){return a()};this._flushPending=!1;this._unflushedLocalNames=[];this._documentConstructionObserver=
|
|
new Fa(a,document)}function Ga(){var a=this;this._resolve=this._value=void 0;this._promise=new Promise(function(b){a._resolve=b;a._value&&b(a._value)})}function Fa(a,b){this._internals=a;this._document=b;this._observer=void 0;this._internals.patchAndUpgradeTree(this._document);"loading"===this._document.readyState&&(this._observer=new MutationObserver(this._handleMutations.bind(this)),this._observer.observe(this._document,{childList:!0,subtree:!0}))}function x(){this._localNameToDefinition=new Map;
|
|
this._constructorToDefinition=new Map;this._patches=[];this._hasPatches=!1}function q(a,b){if(a!==Cb)throw new TypeError("Illegal constructor");a=document.createDocumentFragment();a.__proto__=q.prototype;a._init(b);return a}function E(a){this.root=a;this.insertionPointTag="slot"}function U(a){if(!C(a,"firstChild")){a.__shady=a.__shady||{};a.__shady.firstChild=Db(a);a.__shady.lastChild=Eb(a);Fb(a);for(var b=a.__shady.childNodes=da(a),c=0,d;c<b.length&&(d=b[c]);c++)d.__shady=d.__shady||{},d.__shady.parentNode=
|
|
a,d.__shady.nextSibling=b[c+1]||null,d.__shady.previousSibling=b[c-1]||null,Gb(d)}}function hd(a){var b=a&&a._observer;b&&(b.callbacks.delete(a._callback),b.callbacks.size||(a._node.__shady.observer=null))}function id(a,b){a.__shady=a.__shady||{};a.__shady.observer||(a.__shady.observer=new oa);a.__shady.observer.callbacks.add(b);var c=a.__shady.observer;return{_callback:b,_observer:c,_node:a,takeRecords:function(){return c.takeRecords()}}}function oa(){this._scheduled=!1;this.addedNodes=[];this.removedNodes=
|
|
[];this.callbacks=new Set}function N(a){return"ShadyRoot"===a.__localName}function V(a){a=a.getRootNode();if(N(a))return a}function Ha(a,b){if(a&&b)for(var c=Object.getOwnPropertyNames(b),d=0,e;d<c.length&&(e=c[d]);d++){var f=e,g=a,h=Object.getOwnPropertyDescriptor(b,f);h&&Object.defineProperty(g,f,h)}return a||b}function Hb(a,b){for(var c=[],d=1;d<arguments.length;++d)c[d-1]=arguments[d];for(d=0;d<c.length;d++)Ha(a,c[d]);return a}function jd(a,b){for(var c in b)a[c]=b[c];return a}function Ib(a){Ia.push(a);
|
|
Ja.textContent=Jb++}function Kb(a){Ka||(Ka=!0,Ib(La));ea.push(a)}function La(){Ka=!1;for(var a=!!ea.length;ea.length;)ea.shift()();return a}function kd(a,b){var c=b.getRootNode();return a.map(function(a){var b=c===a.target.getRootNode();if(b&&a.addedNodes){if(b=Array.from(a.addedNodes).filter(function(a){return c===a.getRootNode()}),b.length)return a=Object.create(a),Object.defineProperty(a,"addedNodes",{value:b,configurable:!0}),a}else if(b)return a}).filter(function(a){return a})}function Lb(a){switch(a){case "&":return"&";
|
|
case "<":return"<";case ">":return">";case '"':return""";case "\u00a0":return" "}}function Mb(a){for(var b={},c=0;c<a.length;c++)b[a[c]]=!0;return b}function Ma(a,b){"template"===a.localName&&(a=a.content);for(var c="",d=b?b(a):a.childNodes,e=0,f=d.length,g;e<f&&(g=d[e]);e++){var h;a:{var l;h=g;l=a;var Sc=b;switch(h.nodeType){case Node.ELEMENT_NODE:for(var k=h.localName,M="<"+k,m=h.attributes,n=0;l=m[n];n++)M+=" "+l.name+'="'+l.value.replace(ld,Lb)+'"';M+=">";h=md[k]?M:M+Ma(h,Sc)+
|
|
"</"+k+">";break a;case Node.TEXT_NODE:h=h.data;h=l&&nd[l.localName]?h:h.replace(od,Lb);break a;case Node.COMMENT_NODE:h="\x3c!--"+h.data+"--\x3e";break a;default:throw window.console.error(h),Error("not implemented");}}c+=h}return c}function W(a){D.currentNode=a;return D.parentNode()}function Db(a){D.currentNode=a;return D.firstChild()}function Eb(a){D.currentNode=a;return D.lastChild()}function da(a){var b=[];D.currentNode=a;for(a=D.firstChild();a;)b.push(a),a=D.nextSibling();return b}function Nb(a){G.currentNode=
|
|
a;return G.firstChild()}function Ob(a){G.currentNode=a;return G.lastChild()}function Pb(a){G.currentNode=a;return G.previousSibling()}function Qb(a){G.currentNode=a;return G.nextSibling()}function Rb(a){var b=[];G.currentNode=a;for(a=G.firstChild();a;)b.push(a),a=G.nextSibling();return b}function Sb(a){return Ma(a,function(a){return da(a)})}function Tb(a){if(a.nodeType!==Node.ELEMENT_NODE)return a.nodeValue;a=document.createTreeWalker(a,NodeFilter.SHOW_TEXT,null,!1);for(var b="",c;c=a.nextNode();)b+=
|
|
c.nodeValue;return b}function C(a,b){return void 0!==(a.__shady&&a.__shady[b])}function X(a){return{get:function(){var b=this.__shady&&this.__shady[a];return void 0!==b?b:Ub[a](this)},configurable:!0}}function J(a,b,c){for(var d in b){var e=Object.getOwnPropertyDescriptor(a,d);e&&e.configurable||!e&&c?Object.defineProperty(a,d,b[d]):c&&console.warn("Could not define",d,"on",a)}}function R(a){J(a,Vb);J(a,Na);J(a,Oa)}function Wb(a,b,c){Gb(a);c=c||null;a.__shady=a.__shady||{};b.__shady=b.__shady||{};
|
|
c&&(c.__shady=c.__shady||{});a.__shady.previousSibling=c?c.__shady.previousSibling:b.lastChild;var d=a.__shady.previousSibling;d&&d.__shady&&(d.__shady.nextSibling=a);(d=a.__shady.nextSibling=c)&&d.__shady&&(d.__shady.previousSibling=a);a.__shady.parentNode=b;c?c===b.__shady.firstChild&&(b.__shady.firstChild=a):(b.__shady.lastChild=a,b.__shady.firstChild||(b.__shady.firstChild=a));b.__shady.childNodes=null}function Xb(a){var b=C(a,"parentNode")&&a.__shady&&a.__shady.parentNode,c,d=V(a);if(b||d){c=
|
|
Yb(a);if(b){a.__shady=a.__shady||{};b.__shady=b.__shady||{};a===b.__shady.firstChild&&(b.__shady.firstChild=a.__shady.nextSibling);a===b.__shady.lastChild&&(b.__shady.lastChild=a.__shady.previousSibling);var e=a.__shady.previousSibling,f=a.__shady.nextSibling;e&&(e.__shady=e.__shady||{},e.__shady.nextSibling=f);f&&(f.__shady=f.__shady||{},f.__shady.previousSibling=e);a.__shady.parentNode=a.__shady.previousSibling=a.__shady.nextSibling=void 0;C(b,"childNodes")&&(b.__shady.childNodes=null)}if(e=d){for(var g,
|
|
e=d._getInsertionPoints(),f=0;f<e.length;f++){var h=e[f],l;a:{for(l=h;l;){if(l==a){l=!0;break a}l=l.parentNode}l=void 0}if(l)for(h=h.assignedNodes({flatten:!0}),l=0;l<h.length;l++){g=!0;var k=h[l],p=W(k);p&&Y.call(p,k)}}e=g}g=e;b=b&&d&&b.localName===d.getInsertionPointTag();if(g||b)d._skipUpdateInsertionPoints=!1,pa(d)}Pa(a);return c}function Qa(a,b,c){if(a=a.__shady&&a.__shady.observer)b&&a.addedNodes.push(b),c&&a.removedNodes.push(c),a.schedule()}function Ra(a){if(a&&a.nodeType){var b=a.__ownerShadyRoot;
|
|
void 0===b&&(b=N(a)?a:(b=a.parentNode)?Ra(b):a,document.documentElement.contains(a)&&(a.__ownerShadyRoot=b));return b}}function Zb(a,b,c){var d,e=c.getInsertionPointTag();if(a.nodeType!==Node.DOCUMENT_FRAGMENT_NODE||a.__noInsertionPoint)a.localName===e&&(U(b),U(a),d=!0);else for(var e=a.querySelectorAll(e),f=0,g,h;f<e.length&&(g=e[f]);f++)h=g.parentNode,h===a&&(h=b),h=Zb(g,h,c),d=d||h;return d}function Pa(a){if(void 0!==a.__ownerShadyRoot)for(var b=a.childNodes,c=0,d=b.length,e;c<d&&(e=b[c]);c++)Pa(e);
|
|
a.__ownerShadyRoot=void 0}function Yb(a){if((a=a.parentNode)&&a.shadyRoot&&a.shadyRoot.hasInsertionPoint())return pa(a.shadyRoot),!0}function pa(a){a._changePending=!0;a.update()}function $b(a,b){"slot"===b?Yb(a):"slot"===a.localName&&"name"===b&&(a=V(a))&&a.update()}function ac(a,b,c){var d=[];bc(a.childNodes,b,c,d);return d}function bc(a,b,c,d){for(var e=0,f=a.length,g;e<f&&(g=a[e]);e++){var h;if(h=g.nodeType===Node.ELEMENT_NODE){h=g;var l=b,k=c,p=d,M=l(h);M&&p.push(h);k&&k(M)?h=M:(bc(h.childNodes,
|
|
l,k,p),h=void 0)}if(h)return!0}}function cc(a){a=a.getRootNode();N(a)&&a.render()}function dc(a,b,c){if(c){var d=c.__shady&&c.__shady.parentNode;if(void 0!==d&&d!==a||void 0===d&&W(c)!==a)throw Error("Failed to execute 'insertBefore' on 'Node': The node before which the new node is to be inserted is not a child of this node.");}if(c===b)return b;b.nodeType!==Node.DOCUMENT_FRAGMENT_NODE&&(d=b.__shady&&b.__shady.parentNode,d?(Qa(d,null,b),Xb(b)):(b.parentNode&&Y.call(b.parentNode,b),Pa(b)));var d=c,
|
|
e=V(a),f;e&&(b.__noInsertionPoint&&!e._changePending&&(e._skipUpdateInsertionPoints=!0),f=Zb(b,a,e))&&(e._skipUpdateInsertionPoints=!1);if(C(a,"firstChild"))if(Fb(a),a.__shady=a.__shady||{},C(a,"firstChild")&&(a.__shady.childNodes=null),b.nodeType===Node.DOCUMENT_FRAGMENT_NODE){for(var g=b.childNodes,h=0;h<g.length;h++)Wb(g[h],a,d);b.__shady=b.__shady||{};g=C(b,"firstChild")?null:void 0;b.__shady.firstChild=b.__shady.lastChild=g;b.__shady.childNodes=g}else Wb(b,a,d);var g=f,h=e&&e.getInsertionPointTag()||
|
|
"",l=b.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&!b.__noInsertionPoint&&h&&b.querySelector(h);f=l&&l.parentNode.nodeType!==Node.DOCUMENT_FRAGMENT_NODE;((l=l||b.localName===h)||a.localName===h||g)&&e&&pa(e);(e=a&&a.shadyRoot&&a.shadyRoot.hasInsertionPoint())&&pa(a.shadyRoot);if(!(e||l&&!f||a.shadyRoot||d&&N(d.parentNode)&&d.parentNode._renderPending)){if(c&&(d=V(c))){var k;if(c.localName===d.getInsertionPointTag())a:{d=c.assignedNodes({flatten:!0});e=Ra(c);f=0;for(g=d.length;f<g&&(k=d[f]);f++)if(e.isFinalDestination(c,
|
|
k))break a;k=void 0}else k=c;c=k}k=N(a)?a.host:a;c?Sa.call(k,b,c):ec.call(k,b)}Qa(a,b);return b}function fc(a,b){if(a.ownerDocument!==document)return Ta.call(document,a,b);var c=Ta.call(document,a,!1);if(b){a=a.childNodes;b=0;for(var d;b<a.length;b++)d=fc(a[b],!0),c.appendChild(d)}return c}function Ua(a,b){var c=[],d=a;for(a=a===window?window:a.getRootNode();d;)c.push(d),d=d.assignedSlot?d.assignedSlot:d.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&d.host&&(b||d!==a)?d.host:d.parentNode;c[c.length-1]===
|
|
document&&c.push(window);return c}function gc(a,b){if(!N)return a;a=Ua(a,!0);for(var c=0,d,e,f,g;c<b.length;c++)if(d=b[c],f=d===window?window:d.getRootNode(),f!==e&&(g=a.indexOf(f),e=f),!N(f)||-1<g)return d}function Va(a){function b(b,d){b=new a(b,d);b.__composed=d&&!!d.composed;return b}jd(b,a);b.prototype=a.prototype;return b}function hc(a,b,c){if(c=b.__handlers&&b.__handlers[a.type]&&b.__handlers[a.type][c])for(var d=0,e;(e=c[d])&&(e.call(b,a),!a.__immediatePropagationStopped);d++);}function pd(a){var b=
|
|
a.composedPath(),c;Object.defineProperty(a,"currentTarget",{get:function(){return c},configurable:!0});for(var d=b.length-1;0<=d;d--)if(c=b[d],hc(a,c,"capture"),a.__propagationStopped)return;Object.defineProperty(a,"eventPhase",{value:Event.AT_TARGET});for(var e,d=0;d<b.length;d++)if(c=b[d],0===d||c.shadowRoot&&c.shadowRoot===e)if(hc(a,c,"bubble"),c!==window&&(e=c.getRootNode()),a.__propagationStopped)break}function qd(){for(var a in Wa)window.addEventListener(a,function(a){a.__target||(ic(a),pd(a),
|
|
a.stopImmediatePropagation())},!0)}function ic(a){a.__target=a.target;a.__relatedTarget=a.relatedTarget;if(K.hasDescriptors){var b=jc,c=Object.getPrototypeOf(a);if(!c.hasOwnProperty("__patchProto")){var d=Object.create(c);d.__sourceProto=c;Ha(d,b);c.__patchProto=d}a.__proto__=c.__patchProto}else Ha(a,jc)}function fa(a,b,c){return{index:a,removed:b,addedCount:c}}function rd(a,b,c,d,e,f){var g=0,h=0,l=Math.min(c-b,f-e);if(0==b&&0==e)a:{for(g=0;g<l;g++)if(a[g]!==d[g])break a;g=l}if(c==a.length&&f==d.length){for(var h=
|
|
l-g,l=a.length,k=d.length,p=0;p<h&&sd(a[--l],d[--k]);)p++;h=p}b+=g;e+=g;c-=h;f-=h;if(0==c-b&&0==f-e)return[];if(b==c){for(c=fa(b,[],0);e<f;)c.removed.push(d[e++]);return[c]}if(e==f)return[fa(b,[],c-b)];g=b;h=e;f=f-h+1;l=c-g+1;c=Array(f);for(k=0;k<f;k++)c[k]=Array(l),c[k][0]=k;for(k=0;k<l;k++)c[0][k]=k;for(k=1;k<f;k++)for(p=1;p<l;p++)if(a[g+p-1]===d[h+k-1])c[k][p]=c[k-1][p-1];else{var M=c[k-1][p]+1,m=c[k][p-1]+1;c[k][p]=M<m?M:m}f=c.length-1;g=c[0].length-1;h=c[f][g];for(a=[];0<f||0<g;)0==f?(a.push(2),
|
|
g--):0==g?(a.push(3),f--):(l=c[f-1][g-1],k=c[f-1][g],p=c[f][g-1],M=k<p?k<l?k:l:p<l?p:l,M==l?(l==h?a.push(0):(a.push(1),h=l),f--,g--):M==k?(a.push(3),f--,h=k):(a.push(2),g--,h=p));a.reverse();c=void 0;f=[];for(g=0;g<a.length;g++)switch(a[g]){case 0:c&&(f.push(c),c=void 0);b++;e++;break;case 1:c||(c=fa(b,[],0));c.addedCount++;b++;c.removed.push(d[e]);e++;break;case 2:c||(c=fa(b,[],0));c.addedCount++;b++;break;case 3:c||(c=fa(b,[],0)),c.removed.push(d[e]),e++}c&&f.push(c);return f}function sd(a,b){return a===
|
|
b}function kc(a){cc(a);return a.__shady&&a.__shady.assignedSlot||null}function Z(a,b){for(var c=Object.getOwnPropertyNames(b),d=0;d<c.length;d++){var e=c[d],f=Object.getOwnPropertyDescriptor(b,e);f.value?a[e]=f.value:Object.defineProperty(a,e,f)}}function lc(a){var b=td.has(a);a=/^[a-z][.0-9_a-z]*-[\-.0-9_a-z]*$/.test(a);return!b&&a}function m(a){var b=a.isConnected;if(void 0!==b)return b;for(;a&&!(a.__CE_isImportDocument||a instanceof Document);)a=a.parentNode||(window.ShadowRoot&&a instanceof ShadowRoot?
|
|
a.host:void 0);return!(!a||!(a.__CE_isImportDocument||a instanceof Document))}function Xa(a,b){for(;b&&b!==a&&!b.nextSibling;)b=b.parentNode;return b&&b!==a?b.nextSibling:null}function Q(a,b,c){c=void 0===c?new Set:c;for(var d=a;d;){if(d.nodeType===Node.ELEMENT_NODE){var e=d;b(e);var f=e.localName;if("link"===f&&"import"===e.getAttribute("rel")){d=e.import;if(d instanceof Node&&!c.has(d))for(c.add(d),d=d.firstChild;d;d=d.nextSibling)Q(d,b,c);d=Xa(a,e);continue}else if("template"===f){d=Xa(a,e);continue}if(e=
|
|
e.__CE_shadowRoot)for(e=e.firstChild;e;e=e.nextSibling)Q(e,b,c)}d=d.firstChild?d.firstChild:Xa(a,d)}}function B(a,b,c){a[b]=c}function Ya(a){a=a.replace(H.comments,"").replace(H.port,"");var b=mc,c=a,d=new ya;d.start=0;d.end=c.length;for(var e=d,f=0,g=c.length;f<g;f++)if("{"===c[f]){e.rules||(e.rules=[]);var h=e,k=h.rules[h.rules.length-1]||null,e=new ya;e.start=f+1;e.parent=h;e.previous=k;h.rules.push(e)}else"}"===c[f]&&(e.end=f+1,e=e.parent||d);return b(d,a)}function mc(a,b){var c=b.substring(a.start,
|
|
a.end-1);a.parsedCssText=a.cssText=c.trim();a.parent&&(c=b.substring(a.previous?a.previous.end:a.parent.start,a.start-1),c=ud(c),c=c.replace(H.multipleSpaces," "),c=c.substring(c.lastIndexOf(";")+1),c=a.parsedSelector=a.selector=c.trim(),a.atRule=0===c.indexOf("@"),a.atRule?0===c.indexOf("@media")?a.type=L.MEDIA_RULE:c.match(H.keyframesRule)&&(a.type=L.KEYFRAMES_RULE,a.keyframesName=a.selector.split(H.multipleSpaces).pop()):0===c.indexOf("--")?a.type=L.MIXIN_RULE:a.type=L.STYLE_RULE);if(c=a.rules)for(var d=
|
|
0,e=c.length,f;d<e&&(f=c[d]);d++)mc(f,b);return a}function ud(a){return a.replace(/\\([0-9a-f]{1,6})\s/gi,function(a,c){a=c;for(c=6-a.length;c--;)a="0"+a;return"\\"+a})}function nc(a,b,c){c=void 0===c?"":c;var d="";if(a.cssText||a.rules){var e=a.rules,f;if(f=e)f=e[0],f=!(f&&f.selector&&0===f.selector.indexOf("--"));if(f){f=0;for(var g=e.length,h;f<g&&(h=e[f]);f++)d=nc(h,b,d)}else b?b=a.cssText:(b=a.cssText,b=b.replace(H.customProp,"").replace(H.mixinProp,""),b=b.replace(H.mixinApply,"").replace(H.varApply,
|
|
"")),(d=b.trim())&&(d=" "+d+"\n")}d&&(a.selector&&(c+=a.selector+" {\n"),c+=d,a.selector&&(c+="}\n\n"));return c}function oc(a){a&&(r=r&&!a.nativeCss&&!a.shimcssproperties,y=y&&!a.nativeShadow&&!a.shimshadow)}function aa(a,b){if(!a)return"";"string"===typeof a&&(a=Ya(a));b&&ba(a,b);return nc(a,r)}function qa(a){!a.__cssRules&&a.textContent&&(a.__cssRules=Ya(a.textContent));return a.__cssRules||null}function pc(a){return!!a.parent&&a.parent.type===L.KEYFRAMES_RULE}function ba(a,b,c,d){if(a){var e=
|
|
!1,f=a.type;if(d&&f===L.MEDIA_RULE){var g=a.selector.match(vd);g&&(window.matchMedia(g[1]).matches||(e=!0))}f===L.STYLE_RULE?b(a):c&&f===L.KEYFRAMES_RULE?c(a):f===L.MIXIN_RULE&&(e=!0);if((a=a.rules)&&!e)for(var e=0,f=a.length,h;e<f&&(h=a[e]);e++)ba(h,b,c,d)}}function Za(a,b,c,d){var e=document.createElement("style");b&&e.setAttribute("scope",b);e.textContent=a;qc(e,c,d);return e}function qc(a,b,c){b=b||document.head;b.insertBefore(a,c&&c.nextSibling||b.firstChild);S?a.compareDocumentPosition(S)===
|
|
Node.DOCUMENT_POSITION_PRECEDING&&(S=a):S=a}function rc(a,b){var c=a.indexOf("var(");if(-1===c)return b(a,"","","");var d;a:{var e=0;d=c+3;for(var f=a.length;d<f;d++)if("("===a[d])e++;else if(")"===a[d]&&0===--e)break a;d=-1}e=a.substring(c+4,d);c=a.substring(0,c);a=rc(a.substring(d+1),b);f=e.indexOf(",");if(-1===f)return b(c,e.trim(),"",a);d=e.substring(0,f).trim();e=e.substring(f+1).trim();return b(c,d,e,a)}function ra(a,b){y?a.setAttribute("class",b):window.ShadyDOM.nativeMethods.setAttribute.call(a,
|
|
"class",b)}function T(a){var b=a.localName,c="";b?-1<b.indexOf("-")||(c=b,b=a.getAttribute&&a.getAttribute("is")||""):(b=a.is,c=a.extends);return{is:b,typeExtension:c}}function wd(a){(a=sa[a])&&(a._applyShimInvalid=!0)}function xd(a){a._validating||(a._validating=!0,yd.then(function(){a._applyShimInvalid=!1;a._validating=!1}))}function ob(a){sc?sc(a):($a||($a=new Promise(function(a){ab=a}),"complete"===document.readyState?ab():document.addEventListener("readystatechange",function(){"complete"===document.readyState&&
|
|
ab()})),$a.then(function(){a&&a()}))}(function(){if(!function(){var a=document.createEvent("Event");a.initEvent("foo",!0,!0);a.preventDefault();return a.defaultPrevented}()){var a=Event.prototype.preventDefault;Event.prototype.preventDefault=function(){this.cancelable&&(a.call(this),Object.defineProperty(this,"defaultPrevented",{get:function(){return!0},configurable:!0}))}}var b=/Trident/.test(navigator.userAgent);if(!window.CustomEvent||b&&"function"!==typeof window.CustomEvent)window.CustomEvent=
|
|
function(a,b){b=b||{};var c=document.createEvent("CustomEvent");c.initCustomEvent(a,!!b.bubbles,!!b.cancelable,b.detail);return c},window.CustomEvent.prototype=window.Event.prototype;if(!window.Event||b&&"function"!==typeof window.Event){var c=window.Event;window.Event=function(a,b){b=b||{};var c=document.createEvent("Event");c.initEvent(a,!!b.bubbles,!!b.cancelable);return c};if(c)for(var d in c)window.Event[d]=c[d];window.Event.prototype=c.prototype}if(!window.MouseEvent||b&&"function"!==typeof window.MouseEvent){b=
|
|
window.MouseEvent;window.MouseEvent=function(a,b){b=b||{};var c=document.createEvent("MouseEvent");c.initMouseEvent(a,!!b.bubbles,!!b.cancelable,b.view||window,b.detail,b.screenX,b.screenY,b.clientX,b.clientY,b.ctrlKey,b.altKey,b.shiftKey,b.metaKey,b.button,b.relatedTarget);return c};if(b)for(d in b)window.MouseEvent[d]=b[d];window.MouseEvent.prototype=b.prototype}Array.from||(Array.from=function(a){return[].slice.call(a)});Object.assign||(Object.assign=function(a,b){for(var c=[].slice.call(arguments,
|
|
1),d=0,e;d<c.length;d++)if(e=c[d])for(var f=a,k=e,m=Object.getOwnPropertyNames(k),n=0;n<m.length;n++)e=m[n],f[e]=k[e];return a})})(window.WebComponents);(function(){function a(){}var b="undefined"===typeof HTMLTemplateElement;/Trident/.test(navigator.userAgent)&&function(){var a=Document.prototype.importNode;Document.prototype.importNode=function(){var b=a.apply(this,arguments);if(b.nodeType===Node.DOCUMENT_FRAGMENT_NODE){var c=this.createDocumentFragment();c.appendChild(b);return c}return b}}();
|
|
var c=Node.prototype.cloneNode,d=Document.prototype.createElement,e=Document.prototype.importNode,f=function(){if(!b){var a=document.createElement("template"),c=document.createElement("template");c.content.appendChild(document.createElement("div"));a.content.appendChild(c);a=a.cloneNode(!0);return 0===a.content.childNodes.length||0===a.content.firstChild.content.childNodes.length||!(document.createDocumentFragment().cloneNode()instanceof DocumentFragment)}}();if(b){var g=function(a){switch(a){case "&":return"&";
|
|
case "<":return"<";case ">":return">";case "\u00a0":return" "}},h=function(b){Object.defineProperty(b,"innerHTML",{get:function(){for(var a="",b=this.content.firstChild;b;b=b.nextSibling)a+=b.outerHTML||b.data.replace(v,g);return a},set:function(b){k.body.innerHTML=b;for(a.bootstrap(k);this.content.firstChild;)this.content.removeChild(this.content.firstChild);for(;k.body.firstChild;)this.content.appendChild(k.body.firstChild)},configurable:!0})},k=document.implementation.createHTMLDocument("template"),
|
|
m=!0,p=document.createElement("style");p.textContent="template{display:none;}";var n=document.head;n.insertBefore(p,n.firstElementChild);a.prototype=Object.create(HTMLElement.prototype);var q=!document.createElement("div").hasOwnProperty("innerHTML");a.decorate=function(b){if(!b.content){b.content=k.createDocumentFragment();for(var c;c=b.firstChild;)b.content.appendChild(c);if(q)b.__proto__=a.prototype;else if(b.cloneNode=function(b){return a._cloneNode(this,b)},m)try{h(b)}catch(ae){m=!1}a.bootstrap(b.content)}};
|
|
h(a.prototype);a.bootstrap=function(b){b=b.querySelectorAll("template");for(var c=0,d=b.length,e;c<d&&(e=b[c]);c++)a.decorate(e)};document.addEventListener("DOMContentLoaded",function(){a.bootstrap(document)});Document.prototype.createElement=function(){var b=d.apply(this,arguments);"template"===b.localName&&a.decorate(b);return b};var v=/[&\u00A0<>]/g}if(b||f)a._cloneNode=function(a,b){var d=c.call(a,!1);this.decorate&&this.decorate(d);b&&(d.content.appendChild(c.call(a.content,!0)),this.fixClonedDom(d.content,
|
|
a.content));return d},a.prototype.cloneNode=function(b){return a._cloneNode(this,b)},a.fixClonedDom=function(a,b){if(b.querySelectorAll){b=b.querySelectorAll("template");a=a.querySelectorAll("template");for(var c=0,d=a.length,e,f;c<d;c++)f=b[c],e=a[c],this.decorate&&this.decorate(f),e.parentNode.replaceChild(f.cloneNode(!0),e)}},Node.prototype.cloneNode=function(b){var d;if(this instanceof DocumentFragment)if(b)d=this.ownerDocument.importNode(this,!0);else return this.ownerDocument.createDocumentFragment();
|
|
else d=c.call(this,b);b&&a.fixClonedDom(d,this);return d},Document.prototype.importNode=function(b,c){if("template"===b.localName)return a._cloneNode(b,c);var d=e.call(this,b,c);c&&a.fixClonedDom(d,b);return d},f&&(window.HTMLTemplateElement.prototype.cloneNode=function(b){return a._cloneNode(this,b)});b&&(window.HTMLTemplateElement=a)})();!function(a,b){"object"==typeof exports&&"undefined"!=typeof module?module.exports=b():"function"==typeof define&&define.amd?define(b):a.ES6Promise=b()}(window,
|
|
function(){function a(a,b){z[x]=a;z[x+1]=b;x+=2;2===x&&(E?E(g):N())}function b(){return function(){return process.nextTick(g)}}function c(){return"undefined"!=typeof C?function(){C(g)}:f()}function d(){var a=0,b=new G(g),c=document.createTextNode("");return b.observe(c,{characterData:!0}),function(){c.data=a=++a%2}}function e(){var a=new MessageChannel;return a.port1.onmessage=g,function(){return a.port2.postMessage(0)}}function f(){var a=setTimeout;return function(){return a(g,1)}}function g(){for(var a=
|
|
0;a<x;a+=2)(0,z[a])(z[a+1]),z[a]=void 0,z[a+1]=void 0;x=0}function h(){try{var a=require("vertx");return C=a.runOnLoop||a.runOnContext,c()}catch(tc){return f()}}function k(b,c){var d=arguments,e=this,f=new this.constructor(p);void 0===f[H]&&bb(f);var g=e._state;return g?!function(){var b=d[g-1];a(function(){return uc(g,f,b,e._result)})}():A(e,f,b,c),f}function m(a){if(a&&"object"==typeof a&&a.constructor===this)return a;var b=new this(p);return u(b,a),b}function p(){}function n(a){try{return a.then}catch(tc){return P.error=
|
|
tc,P}}function q(a,b,c,d){try{a.call(b,c,d)}catch(Bd){return Bd}}function v(b,c,d){a(function(a){var b=!1,e=q(d,c,function(d){b||(b=!0,c!==d?u(a,d):r(a,d))},function(c){b||(b=!0,O(a,c))},"Settle: "+(a._label||" unknown promise"));!b&&e&&(b=!0,O(a,e))},b)}function t(a,b){b._state===L?r(a,b._result):b._state===J?O(a,b._result):A(b,void 0,function(b){return u(a,b)},function(b){return O(a,b)})}function w(a,b,c){b.constructor===a.constructor&&c===k&&b.constructor.resolve===m?t(a,b):c===P?O(a,P.error):
|
|
void 0===c?r(a,b):"function"==typeof c?v(a,b,c):r(a,b)}function u(a,b){a===b?O(a,new TypeError("You cannot resolve a promise with itself")):"function"==typeof b||"object"==typeof b&&null!==b?w(a,b,n(b)):r(a,b)}function y(a){a._onerror&&a._onerror(a._result);B(a)}function r(b,c){b._state===F&&(b._result=c,b._state=L,0!==b._subscribers.length&&a(B,b))}function O(b,c){b._state===F&&(b._state=J,b._result=c,a(y,b))}function A(b,c,d,e){var f=b._subscribers,g=f.length;b._onerror=null;f[g]=c;f[g+L]=d;f[g+
|
|
J]=e;0===g&&b._state&&a(B,b)}function B(a){var b=a._subscribers,c=a._state;if(0!==b.length){for(var d,e,f=a._result,g=0;g<b.length;g+=3)d=b[g],e=b[g+c],d?uc(c,d,e,f):e(f);a._subscribers.length=0}}function ga(){this.error=null}function uc(a,b,c,d){var e="function"==typeof c,f=void 0,g=void 0,h=void 0,ga=void 0;if(e){var k;try{k=c(d)}catch(Cd){k=(Q.error=Cd,Q)}if(f=k,f===Q?(ga=!0,g=f.error,f=null):h=!0,b===f)return void O(b,new TypeError("A promises callback cannot return that same promise."))}else f=
|
|
d,h=!0;b._state!==F||(e&&h?u(b,f):ga?O(b,g):a===L?r(b,f):a===J&&O(b,f))}function Dd(a,b){try{b(function(b){u(a,b)},function(b){O(a,b)})}catch(zd){O(a,zd)}}function bb(a){a[H]=R++;a._state=void 0;a._result=void 0;a._subscribers=[]}function ha(a,b){this._instanceConstructor=a;this.promise=new a(p);this.promise[H]||bb(this.promise);vc(b)?(this._input=b,this.length=b.length,this._remaining=b.length,this._result=Array(this.length),0===this.length?r(this.promise,this._result):(this.length=this.length||
|
|
0,this._enumerate(),0===this._remaining&&r(this.promise,this._result))):O(this.promise,Error("Array Methods must be provided an Array"))}function I(a){this[H]=R++;this._result=this._state=void 0;this._subscribers=[];if(p!==a){if("function"!=typeof a)throw new TypeError("You must pass a resolver function as the first argument to the promise constructor");if(this instanceof I)Dd(this,a);else throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.");
|
|
}}var cb=void 0,vc=cb=Array.isArray?Array.isArray:function(a){return"[object Array]"===Object.prototype.toString.call(a)},x=0,C=void 0,E=void 0,D=(cb="undefined"!=typeof window?window:void 0)||{},G=D.MutationObserver||D.WebKitMutationObserver,D="undefined"==typeof self&&"undefined"!=typeof process&&"[object process]"==={}.toString.call(process),K="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel,z=Array(1E3),N=void 0,N=D?b():G?d():K?e():void 0===
|
|
cb&&"function"==typeof require?h():f(),H=Math.random().toString(36).substring(16),F=void 0,L=1,J=2,P=new ga,Q=new ga,R=0;return ha.prototype._enumerate=function(){for(var a=this.length,b=this._input,c=0;this._state===F&&c<a;c++)this._eachEntry(b[c],c)},ha.prototype._eachEntry=function(a,b){var c=this._instanceConstructor,d=c.resolve;d===m?(d=n(a),d===k&&a._state!==F?this._settledAt(a._state,b,a._result):"function"!=typeof d?(this._remaining--,this._result[b]=a):c===I?(c=new c(p),w(c,a,d),this._willSettleAt(c,
|
|
b)):this._willSettleAt(new c(function(b){return b(a)}),b)):this._willSettleAt(d(a),b)},ha.prototype._settledAt=function(a,b,c){var d=this.promise;d._state===F&&(this._remaining--,a===J?O(d,c):this._result[b]=c);0===this._remaining&&r(d,this._result)},ha.prototype._willSettleAt=function(a,b){var c=this;A(a,void 0,function(a){return c._settledAt(L,b,a)},function(a){return c._settledAt(J,b,a)})},I.all=function(a){return(new ha(this,a)).promise},I.race=function(a){var b=this;return new b(vc(a)?function(c,
|
|
d){for(var e=a.length,f=0;f<e;f++)b.resolve(a[f]).then(c,d)}:function(a,b){return b(new TypeError("You must pass an array to race."))})},I.resolve=m,I.reject=function(a){var b=new this(p);return O(b,a),b},I._setScheduler=function(a){E=a},I._setAsap=function(b){a=b},I._asap=a,I.prototype={constructor:I,then:k,"catch":function(a){return this.then(null,a)}},I.polyfill=function(){var a=void 0;if("undefined"!=typeof global)a=global;else if("undefined"!=typeof self)a=self;else try{a=Function("return this")()}catch(Ad){throw Error("polyfill failed because global object is unavailable in this environment");
|
|
}var b=a.Promise;if(b){var c=null;try{c=Object.prototype.toString.call(b.resolve())}catch(Ad){}if("[object Promise]"===c&&!b.cast)return}a.Promise=I},I.Promise=I,I});ES6Promise.polyfill();(function(a){function b(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 c(a){if(m)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(;!h(b)&&(b=b.parentNode););a.__importDoc=b}return b}function d(a){var b=document.querySelectorAll("link[rel=import]:not(import-dependency)"),c=b.length;if(c)for(var d=0,e=b.length,f;d<e&&(f=b[d]);d++)g(f,function(){0===--c&&a()});else a()}function e(a){if("loading"!==document.readyState)a();else{var b=function(){"loading"!==document.readyState&&(document.removeEventListener("readystatechange",b),a())};document.addEventListener("readystatechange",
|
|
b)}}function f(a){e(function(){return d(function(){return a&&a()})})}function g(a,b){if(a.__loaded)b&&b();else if("script"!==a.localName||a.src){var c=function(d){a.removeEventListener(d.type,c);a.__loaded=!0;b&&b()};a.addEventListener("load",c);x&&"style"===a.localName||a.addEventListener("error",c)}else a.__loaded=!0,b&&b()}function h(a){return a.nodeType===Node.ELEMENT_NODE&&"link"===a.localName&&"import"===a.rel}function k(){var a=this;this.documents={};this.inflight=0;this.dynamicImportsMO=new MutationObserver(function(b){return a.handleMutations(b)});
|
|
e(function(){a.dynamicImportsMO.observe(document.head,{childList:!0,subtree:!0});a.loadImports(document)})}var m="import"in document.createElement("link"),p=null;!1==="currentScript"in document&&Object.defineProperty(document,"currentScript",{get:function(){return p||("complete"!==document.readyState?document.scripts[document.scripts.length-1]:null)},configurable:!0});var n=/(^\/)|(^#)|(^[\w-\d]*:)/,q=/(url\()([^)]*)(\))/g,r=/(@import[\s]+(?!url\())([^;]*)(;)/g,u=/(<link[^>]*)(rel=['|"]?stylesheet['|"]?[^>]*>)/g,
|
|
w={fixUrls:function(a,b){a.href&&a.setAttribute("href",w.replaceAttrUrl(a.getAttribute("href"),b));a.src&&a.setAttribute("src",w.replaceAttrUrl(a.getAttribute("src"),b));"style"===a.localName&&w.resolveUrlsInStyle(a,b)},fixUrlAttributes:function(a,b){for(var c=["action","src","href","url","style"],d=0,e;d<c.length&&(e=c[d]);d++){var f=a.attributes[e],g=f&&f.value;g&&0>g.search(/({{|\[\[)/)&&(f.value="style"===e?w.resolveUrlsInCssText(g,b):w.replaceAttrUrl(g,b))}},fixUrlsInTemplates:function(a,b){a=
|
|
a.querySelectorAll("template");for(var c=0;c<a.length;c++)w.fixUrlsInTemplate(a[c],b)},fixUrlsInTemplate:function(a,b){a=a.content||a;for(var c=a.querySelectorAll("style, form[action], [src], [href], [url], [style]"),d=0;d<c.length;d++){var e=c[d];"style"==e.localName?w.resolveUrlsInStyle(e,b):w.fixUrlAttributes(e,b)}w.fixUrlsInTemplates(a,b)},resolveUrlsInStyle:function(a,b){a.textContent=w.resolveUrlsInCssText(a.textContent,b)},resolveUrlsInCssText:function(a,b){a=w.replaceUrls(a,b,q);return a=
|
|
w.replaceUrls(a,b,r)},replaceUrls:function(a,b,c){return a.replace(c,function(a,c,d,e){a=d.replace(/["']/g,"");b&&(a=w.resolveUrl(a,b));return c+"'"+a+"'"+e})},replaceAttrUrl:function(a,b){return a&&n.test(a)?a:w.resolveUrl(a,b)},resolveUrl:function(a,b){if(void 0===w.__workingURL){w.__workingURL=!1;try{var c=new URL("b","http://a");c.pathname="c%20d";w.__workingURL="http://a/c%20d"===c.href}catch(bb){}}if(w.__workingURL)return(new URL(a,b)).href;c=w.__tempDoc;c||(c=document.implementation.createHTMLDocument("temp"),
|
|
w.__tempDoc=c,c.__base=c.createElement("base"),c.head.appendChild(c.__base),c.__anchor=c.createElement("a"));c.__base.href=b;c.__anchor.href=a;return c.__anchor.href||a}},v={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 e=new XMLHttpRequest;e.open("GET",a,v.async);e.onload=function(){var a=e.getResponseHeader("Location");a&&0===a.indexOf("/")&&(a=(location.origin||location.protocol+"//"+location.host)+
|
|
a);var d=e.response||e.responseText;304===e.status||0===e.status||200<=e.status&&300>e.status?b(d,a):c(d)};e.send()}else c("error: href must be specified")}},x=/Trident/.test(navigator.userAgent)||/Edge\/\d./i.test(navigator.userAgent);k.prototype.loadImports=function(a){a=a.querySelectorAll("link[rel=import]");for(var b=0,c=a.length;b<c;b++)this.loadImport(a[b])};k.prototype.loadImport=function(a){var b=this,c=a.href;if(void 0!==this.documents[c]){var d=this.documents[c];d&&d.__loaded&&(a.import=
|
|
d,this.fireEventIfNeeded(a))}else this.inflight++,this.documents[c]="pending",v.load(c,function(a,d){a=b.makeDocument(a,d||c);b.documents[c]=a;b.inflight--;b.loadImports(a);b.processImportsIfLoadingDone()},function(){b.documents[c]=null;b.inflight--;b.processImportsIfLoadingDone()})};k.prototype.makeDocument=function(a,b){if(!a)return document.createDocumentFragment();x&&(a=a.replace(u,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=w.replaceAttrUrl(c.getAttribute("href"),b),c.removeAttribute("href");for(var c=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"]'),d=0,e=0,f=c.length,
|
|
h;e<f&&(h=c[e]);e++)g(h),w.fixUrls(h,b),h.setAttribute("import-dependency",""),"script"===h.localName&&!h.src&&h.textContent&&(h.setAttribute("src","data:text/javascript;charset=utf-8,"+encodeURIComponent(h.textContent+("\n//# sourceURL="+b+(d?"-"+d:"")+".js\n"))),h.textContent="",d++);w.fixUrlsInTemplates(a,b);return a};k.prototype.processImportsIfLoadingDone=function(){var a=this;if(!this.inflight){this.dynamicImportsMO.disconnect();this.flatten(document);var b=!1,c=!1,d=function(){c&&b&&(a.dynamicImportsMO.observe(document.head,
|
|
{childList:!0,subtree:!0}),a.fireEvents())};this.waitForStyles(function(){c=!0;d()});this.runScripts(function(){b=!0;d()})}};k.prototype.flatten=function(a){a=a.querySelectorAll("link[rel=import]");for(var b={},c=0,d=a.length;c<d&&(b.n=a[c]);b={n:b.n},c++){var e=this.documents[b.n.href];(b.n.import=e)&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&(this.documents[b.n.href]=b.n,b.n.readyState="loading",b.n.import=b.n,Object.defineProperty(b.n,"baseURI",{get:function(a){return function(){return a.n.href}}(b),
|
|
configurable:!0,enumerable:!0}),this.flatten(e),b.n.appendChild(e))}};k.prototype.runScripts=function(a){function b(e){if(e<d){var f=c[e],h=document.createElement("script");f.removeAttribute("import-dependency");for(var k=0,l=f.attributes.length;k<l;k++)h.setAttribute(f.attributes[k].name,f.attributes[k].value);p=h;f.parentNode.replaceChild(h,f);g(h,function(){p=null;b(e+1)})}else a()}var c=document.querySelectorAll("script[import-dependency]"),d=c.length;b(0)};k.prototype.waitForStyles=function(a){var b=
|
|
document.querySelectorAll("style[import-dependency],\n link[rel=stylesheet][import-dependency]"),d=b.length;if(d)for(var e=x&&!!document.querySelector("link[rel=stylesheet][href][type=import-disable]"),f={},h=0,k=b.length;h<k&&(f.s=b[h]);f={s:f.s},h++){if(g(f.s,function(b){return function(){b.s.removeAttribute("import-dependency");0===--d&&a()}}(f)),e&&f.s.parentNode!==document.head){var l=document.createElement(f.s.localName);l.__appliedElement=f.s;l.setAttribute("type","import-placeholder");
|
|
f.s.parentNode.insertBefore(l,f.s.nextSibling);for(l=c(f.s);l&&c(l);)l=c(l);l.parentNode!==document.head&&(l=null);document.head.insertBefore(f.s,l);f.s.removeAttribute("type")}}else a()};k.prototype.fireEvents=function(){for(var a=document.querySelectorAll("link[rel=import]"),b=a.length-1,c;0<=b&&(c=a[b]);b--)this.fireEventIfNeeded(c)};k.prototype.fireEventIfNeeded=function(a){a.__loaded||(a.__loaded=!0,a.import&&(a.import.readyState="complete"),a.dispatchEvent(b(a.import?"load":"error",{bubbles:!1,
|
|
cancelable:!1,detail:void 0})))};k.prototype.handleMutations=function(a){for(var b=0;b<a.length;b++){var c=a[b];if(c.addedNodes)for(var d=0;d<c.addedNodes.length;d++){var e=c.addedNodes[d];e&&e.nodeType===Node.ELEMENT_NODE&&(h(e)?this.loadImport(e):this.loadImports(e))}}};if(m){for(var t=document.querySelectorAll("link[rel=import]"),y=0,A=t.length,z;y<A&&(z=t[y]);y++)z.import&&"loading"===z.import.readyState||(z.__loaded=!0);t=function(a){a=a.target;h(a)&&(a.__loaded=!0)};document.addEventListener("load",
|
|
t,!0);document.addEventListener("error",t,!0)}else new k;f(function(){return document.dispatchEvent(b("HTMLImportsLoaded",{cancelable:!0,bubbles:!0,detail:void 0}))});a.useNative=m;a.whenReady=f;a.importForElement=c})(window.HTMLImports=window.HTMLImports||{});(function(){window.WebComponents=window.WebComponents||{flags:{}};var a=document.querySelector('script[src*="webcomponents-lite.js"]'),b={};if(!b.noOpts){location.search.slice(1).split("&").forEach(function(a){a=a.split("=");var c;a[0]&&(c=
|
|
a[0].match(/wc-(.+)/))&&(b[c[1]]=a[1]||!0)});if(a)for(var c=0,d;d=a.attributes[c];c++)"src"!==d.name&&(b[d.name]=d.value||!0);b.log&&b.log.split?(a=b.log.split(","),b.log={},a.forEach(function(a){b.log[a]=!0})):b.log={}}WebComponents.flags=b;a=window.WebComponents;if(c=a.flags.shadydom)window.ShadyDOM=window.ShadyDOM||{},ShadyDOM.force=c;(a=a.flags.register||a.flags.ce)&&window.customElements&&(customElements.forcePolyfill=a)})();var K=window.ShadyDOM||{};K.hasNativeShadowDOM=!(!Element.prototype.attachShadow||
|
|
!Node.prototype.getRootNode);var db=Object.getOwnPropertyDescriptor(Node.prototype,"firstChild");K.hasDescriptors=!!(db&&db.configurable&&db.get);K.inUse=K.force||!K.hasNativeShadowDOM;var ca=Element.prototype,wc=ca.matches||ca.matchesSelector||ca.mozMatchesSelector||ca.msMatchesSelector||ca.oMatchesSelector||ca.webkitMatchesSelector,Ja=document.createTextNode(""),Jb=0,Ia=[];(new MutationObserver(function(){for(;Ia.length;)try{Ia.shift()()}catch(a){throw Ja.textContent=Jb++,a;}})).observe(Ja,{characterData:!0});
|
|
var ea=[],Ka;La.list=ea;oa.prototype.schedule=function(){var a=this;this._scheduled||(this._scheduled=!0,Ib(function(){a.flush()}))};oa.prototype.flush=function(){if(this._scheduled){this._scheduled=!1;var a=this.takeRecords();a.length&&this.callbacks.forEach(function(b){b(a)})}};oa.prototype.takeRecords=function(){if(this.addedNodes.length||this.removedNodes.length){var a=[{addedNodes:this.addedNodes,removedNodes:this.removedNodes}];this.addedNodes=[];this.removedNodes=[];return a}return[]};var ec=
|
|
Element.prototype.appendChild,Sa=Element.prototype.insertBefore,Y=Element.prototype.removeChild,xc=Element.prototype.setAttribute,yc=Element.prototype.removeAttribute,eb=Element.prototype.cloneNode,Ta=Document.prototype.importNode,zc=Element.prototype.addEventListener,Ac=Element.prototype.removeEventListener,Ed=Object.freeze({appendChild:ec,insertBefore:Sa,removeChild:Y,setAttribute:xc,removeAttribute:yc,cloneNode:eb,importNode:Ta,addEventListener:zc,removeEventListener:Ac}),ld=/[&\u00A0"]/g,od=/[&\u00A0<>]/g,
|
|
md=Mb("area base br col command embed hr img input keygen link meta param source track wbr".split(" ")),nd=Mb("style script xmp iframe noembed noframes plaintext noscript".split(" ")),D=document.createTreeWalker(document,NodeFilter.SHOW_ALL,null,!1),G=document.createTreeWalker(document,NodeFilter.SHOW_ELEMENT,null,!1),Ub=Object.freeze({parentNode:W,firstChild:Db,lastChild:Eb,previousSibling:function(a){D.currentNode=a;return D.previousSibling()},nextSibling:function(a){D.currentNode=a;return D.nextSibling()},
|
|
childNodes:da,parentElement:function(a){G.currentNode=a;return G.parentNode()},firstElementChild:Nb,lastElementChild:Ob,previousElementSibling:Pb,nextElementSibling:Qb,children:Rb,innerHTML:Sb,textContent:Tb}),fb=Object.getOwnPropertyDescriptor(Element.prototype,"innerHTML")||Object.getOwnPropertyDescriptor(HTMLElement.prototype,"innerHTML"),ta=document.implementation.createHTMLDocument("inert").createElement("div"),gb=Object.getOwnPropertyDescriptor(Document.prototype,"activeElement"),Vb={parentElement:X("parentElement"),
|
|
parentNode:X("parentNode"),nextSibling:X("nextSibling"),previousSibling:X("previousSibling"),className:{get:function(){return this.getAttribute("class")},set:function(a){this.setAttribute("class",a)},configurable:!0},nextElementSibling:{get:function(){if(C(this,"nextSibling")){for(var a=this.nextSibling;a&&a.nodeType!==Node.ELEMENT_NODE;)a=a.nextSibling;return a}return Qb(this)},configurable:!0},previousElementSibling:{get:function(){if(C(this,"previousSibling")){for(var a=this.previousSibling;a&&
|
|
a.nodeType!==Node.ELEMENT_NODE;)a=a.previousSibling;return a}return Pb(this)},configurable:!0}},Na={childNodes:{get:function(){if(C(this,"firstChild")){if(!this.__shady.childNodes){this.__shady.childNodes=[];for(var a=this.firstChild;a;a=a.nextSibling)this.__shady.childNodes.push(a)}return this.__shady.childNodes}return da(this)},configurable:!0},firstChild:X("firstChild"),lastChild:X("lastChild"),textContent:{get:function(){if(C(this,"firstChild")){for(var a=[],b=0,c=this.childNodes,d;d=c[b];b++)d.nodeType!==
|
|
Node.COMMENT_NODE&&a.push(d.textContent);return a.join("")}return Tb(this)},set:function(a){if(this.nodeType!==Node.ELEMENT_NODE)this.nodeValue=a;else{for(;this.firstChild;)this.removeChild(this.firstChild);a&&this.appendChild(document.createTextNode(a))}},configurable:!0},firstElementChild:{get:function(){if(C(this,"firstChild")){for(var a=this.firstChild;a&&a.nodeType!==Node.ELEMENT_NODE;)a=a.nextSibling;return a}return Nb(this)},configurable:!0},lastElementChild:{get:function(){if(C(this,"lastChild")){for(var a=
|
|
this.lastChild;a&&a.nodeType!==Node.ELEMENT_NODE;)a=a.previousSibling;return a}return Ob(this)},configurable:!0},children:{get:function(){return C(this,"firstChild")?Array.prototype.filter.call(this.childNodes,function(a){return a.nodeType===Node.ELEMENT_NODE}):Rb(this)},configurable:!0},innerHTML:{get:function(){var a="template"===this.localName?this.content:this;return C(this,"firstChild")?Ma(a):Sb(a)},set:function(a){for(var b="template"===this.localName?this.content:this;b.firstChild;)b.removeChild(b.firstChild);
|
|
for(fb&&fb.set?fb.set.call(ta,a):ta.innerHTML=a;ta.firstChild;)b.appendChild(ta.firstChild)},configurable:!0}},Bc={shadowRoot:{get:function(){return this.shadyRoot},set:function(a){this.shadyRoot=a},configurable:!0}},Oa={activeElement:{get:function(){var a;a=gb&&gb.get?gb.get.call(document):K.hasDescriptors?void 0:document.activeElement;if(a&&a.nodeType){var b=!!N(this);if(this===document||b&&this.host!==a&&this.host.contains(a)){for(b=V(a);b&&b!==this;)a=b.host,b=V(a);a=this===document?b?null:a:
|
|
b===this?a:null}else a=null}else a=null;return a},set:function(){},configurable:!0}},Gb=K.hasDescriptors?function(){}:function(a){a.__shady&&a.__shady.__outsideAccessors||(a.__shady=a.__shady||{},a.__shady.__outsideAccessors=!0,J(a,Vb,!0))},Fb=K.hasDescriptors?function(){}:function(a){a.__shady&&a.__shady.__insideAccessors||(a.__shady=a.__shady||{},a.__shady.__insideAccessors=!0,J(a,Na,!0),J(a,Bc,!0))},ua=null,Fd={focusin:!0,focusout:!0,click:!0,dblclick:!0,mousedown:!0,mouseenter:!0,mouseleave:!0,
|
|
mousemove:!0,mouseout:!0,mouseover:!0,mouseup:!0,wheel:!0,beforeinput:!0,input:!0,keydown:!0,keyup:!0,compositionstart:!0,compositionupdate:!0,compositionend:!0,touchstart:!0,touchend:!0,touchmove:!0,touchcancel:!0,pointerover:!0,pointerenter:!0,pointerdown:!0,pointermove:!0,pointerup:!0,pointercancel:!0,pointerout:!0,pointerleave:!0,gotpointercapture:!0,lostpointercapture:!0,dragstart:!0,drag:!0,dragenter:!0,dragleave:!0,dragover:!0,drop:!0,dragend:!0,DOMActivate:!0,DOMFocusIn:!0,DOMFocusOut:!0,
|
|
keypress:!0},jc={get composed(){!1!==this.isTrusted&&void 0===this.__composed&&(this.__composed=Fd[this.type]);return this.__composed||!1},composedPath:function(){this.__composedPath||(this.__composedPath=Ua(this.__target,this.composed));return this.__composedPath},get target(){return gc(this.currentTarget,this.composedPath())},get relatedTarget(){if(!this.__relatedTarget)return null;this.__relatedTargetComposedPath||(this.__relatedTargetComposedPath=Ua(this.__relatedTarget,!0));return gc(this.currentTarget,
|
|
this.__relatedTargetComposedPath)},stopPropagation:function(){Event.prototype.stopPropagation.call(this);this.__propagationStopped=!0},stopImmediatePropagation:function(){Event.prototype.stopImmediatePropagation.call(this);this.__propagationStopped=this.__immediatePropagationStopped=!0}},Wa={focus:!0,blur:!0},Gd=Va(window.Event),Hd=Va(window.CustomEvent),Id=Va(window.MouseEvent),Jd="function"===typeof Event?Event:function(a,b){b=b||{};var c=document.createEvent("Event");c.initEvent(a,!!b.bubbles,
|
|
!!b.cancelable);return c};E.prototype.getInsertionPoints=function(){return this.root.querySelectorAll(this.insertionPointTag)};E.prototype.isInsertionPoint=function(a){return a.localName&&a.localName==this.insertionPointTag};E.prototype.distribute=function(){return this.root.hasInsertionPoint()?this.distributePool(this.root,this.collectPool()):[]};E.prototype.collectPool=function(){for(var a=[],b=0,c=this.root.host.firstChild;c;c=c.nextSibling)a[b++]=c;return a};E.prototype.distributePool=function(a,
|
|
b){a=[];for(var c=this.root._getInsertionPoints(),d=0,e=c.length,f;d<e&&(f=c[d]);d++){this.distributeInsertionPoint(f,b);var g=f.parentNode;g&&g.shadyRoot&&g.shadyRoot.hasInsertionPoint()&&a.push(g.shadyRoot)}for(f=0;f<b.length;f++)if(c=b[f])c.__shady=c.__shady||{},c.__shady.assignedSlot=void 0,(d=W(c))&&Y.call(d,c);return a};E.prototype.distributeInsertionPoint=function(a,b){var c=a.__shady.assignedNodes;c&&this.clearAssignedSlots(a,!0);a.__shady.assignedNodes=[];for(var d=!1,e=!1,f=0,g=b.length,
|
|
h;f<g;f++)(h=b[f])&&this.matchesInsertionPoint(h,a)&&(h.__shady._prevAssignedSlot!=a&&(d=!0),this.distributeNodeInto(h,a),b[f]=void 0,e=!0);if(!e)for(b=a.childNodes,e=0;e<b.length;e++)h=b[e],h.__shady._prevAssignedSlot!=a&&(d=!0),this.distributeNodeInto(h,a);if(c){for(h=0;h<c.length;h++)c[h].__shady._prevAssignedSlot=null;a.__shady.assignedNodes.length<c.length&&(d=!0)}this.setDistributedNodesOnInsertionPoint(a);d&&this._fireSlotChange(a)};E.prototype.clearAssignedSlots=function(a,b){var c=a.__shady.assignedNodes;
|
|
if(c)for(var d=0;d<c.length;d++){var e=c[d];b&&(e.__shady._prevAssignedSlot=e.__shady.assignedSlot);e.__shady.assignedSlot===a&&(e.__shady.assignedSlot=null)}};E.prototype.matchesInsertionPoint=function(a,b){b=(b=b.getAttribute("name"))?b.trim():"";a=(a=a.getAttribute&&a.getAttribute("slot"))?a.trim():"";return a==b};E.prototype.distributeNodeInto=function(a,b){b.__shady.assignedNodes.push(a);a.__shady.assignedSlot=b};E.prototype.setDistributedNodesOnInsertionPoint=function(a){var b=a.__shady.assignedNodes;
|
|
a.__shady.distributedNodes=[];for(var c=0,d;c<b.length&&(d=b[c]);c++)if(this.isInsertionPoint(d)){var e=d.__shady.distributedNodes;if(e)for(var f=0;f<e.length;f++)a.__shady.distributedNodes.push(e[f])}else a.__shady.distributedNodes.push(b[c])};E.prototype._fireSlotChange=function(a){a.dispatchEvent(new Jd("slotchange"));a.__shady.assignedSlot&&this._fireSlotChange(a.__shady.assignedSlot)};E.prototype.isFinalDestination=function(a){return!a.__shady.assignedSlot};var Cb={};q.prototype=Object.create(DocumentFragment.prototype);
|
|
q.prototype._init=function(a){this.__localName="ShadyRoot";U(a);U(this);a.shadowRoot=this;this.host=a;this._changePending=this._hasRendered=this._renderPending=!1;this._distributor=new E(this);this.update()};q.prototype.update=function(){var a=this;this._renderPending||(this._renderPending=!0,Kb(function(){return a.render()}))};q.prototype._getRenderRoot=function(){for(var a=this,b=this;b;)b._renderPending&&(a=b),b=b._rendererForHost();return a};q.prototype._rendererForHost=function(){var a=this.host.getRootNode();
|
|
if(N(a))for(var b=this.host.childNodes,c=0,d;c<b.length;c++)if(d=b[c],this._distributor.isInsertionPoint(d))return a};q.prototype.render=function(){this._renderPending&&this._getRenderRoot()._render()};q.prototype._render=function(){this._changePending=this._renderPending=!1;this._skipUpdateInsertionPoints?this._hasRendered||(this.__insertionPoints=[]):this.updateInsertionPoints();this._skipUpdateInsertionPoints=!1;this.distribute();this.compose();this._hasRendered=!0};q.prototype.forceRender=function(){this._renderPending=
|
|
!0;this.render()};q.prototype.distribute=function(){for(var a=this._distributor.distribute(),b=0;b<a.length;b++)a[b]._render()};q.prototype.updateInsertionPoints=function(){var a=this._insertionPoints;if(a)for(var b=0,c;b<a.length;b++)c=a[b],c.getRootNode()!==this&&this._distributor.clearAssignedSlots(c);a=this._insertionPoints=this._distributor.getInsertionPoints();for(b=0;b<a.length;b++)c=a[b],c.__shady=c.__shady||{},U(c),U(c.parentNode)};q.prototype.compose=function(){this._composeTree()};q.prototype._composeTree=
|
|
function(){this._updateChildNodes(this.host,this._composeNode(this.host));for(var a=this._getInsertionPoints(),b=0,c=a.length,d,e;b<c&&(d=a[b]);b++)e=d.parentNode,e!==this.host&&e!==this&&this._updateChildNodes(e,this._composeNode(e))};q.prototype._composeNode=function(a){var b=[];a=(a.shadyRoot||a).childNodes;for(var c=0;c<a.length;c++){var d=a[c];if(this._distributor.isInsertionPoint(d))for(var e=d.__shady.distributedNodes||(d.__shady.distributedNodes=[]),f=0;f<e.length;f++){var g=e[f];this.isFinalDestination(d,
|
|
g)&&b.push(g)}else b.push(d)}return b};q.prototype.isFinalDestination=function(a,b){return this._distributor.isFinalDestination(a,b)};q.prototype._updateChildNodes=function(a,b){for(var c=da(a),d=rd(b,0,b.length,c,0,c.length),e=0,f=0,g;e<d.length&&(g=d[e]);e++){for(var h=0,k;h<g.removed.length&&(k=g.removed[h]);h++)W(k)===a&&Y.call(a,k),c.splice(g.index+f,1);f-=g.addedCount}for(e=0;e<d.length&&(g=d[e]);e++)for(f=c[g.index],h=g.index;h<g.index+g.addedCount;h++)k=b[h],Sa.call(a,k,f),c.splice(h,0,k)};
|
|
q.prototype.getInsertionPointTag=function(){return this._distributor.insertionPointTag};q.prototype.hasInsertionPoint=function(){return!(!this._insertionPoints||!this._insertionPoints.length)};q.prototype._getInsertionPoints=function(){this._insertionPoints||this.updateInsertionPoints();return this._insertionPoints};(function(a){J(a,Na,!0);J(a,Oa,!0)})(q.prototype);var Kd={addEventListener:function(a,b,c){if(b){var d,e,f;"object"===typeof c?(d=!!c.capture,e=!!c.once,f=!!c.passive):(d=!!c,f=e=!1);
|
|
if(b.__eventWrappers)for(var g=0;g<b.__eventWrappers.length;g++){if(b.__eventWrappers[g].node===this&&b.__eventWrappers[g].type===a&&b.__eventWrappers[g].capture===d&&b.__eventWrappers[g].once===e&&b.__eventWrappers[g].passive===f)return}else b.__eventWrappers=[];g=function(d){e&&this.removeEventListener(a,b,c);d.__target||ic(d);if(d.composed||-1<d.composedPath().indexOf(this))if(d.eventPhase===Event.BUBBLING_PHASE&&d.target===d.relatedTarget)d.stopImmediatePropagation();else return b(d)};b.__eventWrappers.push({node:this,
|
|
type:a,capture:d,once:e,passive:f,wrapperFn:g});Wa[a]?(this.__handlers=this.__handlers||{},this.__handlers[a]=this.__handlers[a]||{capture:[],bubble:[]},this.__handlers[a][d?"capture":"bubble"].push(g)):zc.call(this,a,g,c)}},removeEventListener:function(a,b,c){if(b){var d,e,f;"object"===typeof c?(d=!!c.capture,e=!!c.once,f=!!c.passive):(d=!!c,f=e=!1);var g=void 0;if(b.__eventWrappers)for(var h=0;h<b.__eventWrappers.length;h++)if(b.__eventWrappers[h].node===this&&b.__eventWrappers[h].type===a&&b.__eventWrappers[h].capture===
|
|
d&&b.__eventWrappers[h].once===e&&b.__eventWrappers[h].passive===f){g=b.__eventWrappers.splice(h,1)[0].wrapperFn;b.__eventWrappers.length||(b.__eventWrappers=void 0);break}Ac.call(this,a,g||b,c);g&&Wa[a]&&this.__handlers&&this.__handlers[a]&&(a=this.__handlers[a][d?"capture":"bubble"],g=a.indexOf(g),-1<g&&a.splice(g,1))}},appendChild:function(a){return dc(this,a)},insertBefore:function(a,b){return dc(this,a,b)},removeChild:function(a){if(a.parentNode!==this)throw Error("The node to be removed is not a child of this node: "+
|
|
a);if(!Xb(a)){var b=N(this)?this.host:this,c=W(a);b===c&&Y.call(b,a)}Qa(this,null,a);return a},replaceChild:function(a,b){this.insertBefore(a,b);this.removeChild(b);return a},cloneNode:function(a){var b;if("template"==this.localName)b=eb.call(this,a);else if(b=eb.call(this,!1),a){a=this.childNodes;for(var c=0,d;c<a.length;c++)d=a[c].cloneNode(!0),b.appendChild(d)}return b},getRootNode:function(a){return Ra(this,a)},get isConnected(){var a=this.ownerDocument;if(a&&a.contains&&a.contains(this)||(a=
|
|
a.documentElement)&&a.contains&&a.contains(this))return!0;for(a=this;a&&!(a instanceof Document);)a=a.parentNode||(a instanceof q?a.host:void 0);return!!(a&&a instanceof Document)}},Ld={get assignedSlot(){return kc(this)}},hb={querySelector:function(a){return ac(this,function(b){return wc.call(b,a)},function(a){return!!a})[0]||null},querySelectorAll:function(a){return ac(this,function(b){return wc.call(b,a)})}},Cc={assignedNodes:function(a){if("slot"===this.localName)return cc(this),this.__shady?
|
|
(a&&a.flatten?this.__shady.distributedNodes:this.__shady.assignedNodes)||[]:[]}},Dc=Hb({setAttribute:function(a,b){ua||(ua=window.ShadyCSS&&window.ShadyCSS.ScopingShim);ua&&"class"===a?ua.setElementClass(this,b):(xc.call(this,a,b),$b(this,a))},removeAttribute:function(a){yc.call(this,a);$b(this,a)},attachShadow:function(a){if(!this)throw"Must provide a host.";if(!a)throw"Not enough arguments.";return new q(Cb,this)},get slot(){return this.getAttribute("slot")},set slot(a){this.setAttribute("slot",
|
|
a)},get assignedSlot(){return kc(this)}},hb,Cc);Object.defineProperties(Dc,Bc);var Ec=Hb({importNode:function(a,b){return fc(a,b)}},hb);Object.defineProperties(Ec,{_activeElement:Oa.activeElement});K.inUse&&(window.ShadyDOM={},window.ShadyDOM.inUse=K.inUse,window.ShadyDOM.patch=function(a){return a},window.ShadyDOM.isShadyRoot=N,window.ShadyDOM.enqueue=Kb,window.ShadyDOM.flush=La,window.ShadyDOM.settings=K,window.ShadyDOM.filterMutations=kd,window.ShadyDOM.observeChildren=id,window.ShadyDOM.unobserveChildren=
|
|
hd,window.ShadyDOM.nativeMethods=Ed,window.ShadyDOM.nativeTree=Ub,window.Event=Gd,window.CustomEvent=Hd,window.MouseEvent=Id,qd(),Z(window.Node.prototype,Kd),Z(window.Text.prototype,Ld),Z(window.DocumentFragment.prototype,hb),Z(window.Element.prototype,Dc),Z(window.Document.prototype,Ec),window.HTMLSlotElement&&Z(window.HTMLSlotElement.prototype,Cc),K.hasDescriptors&&(R(window.Node.prototype),R(window.Text.prototype),R(window.DocumentFragment.prototype),R(window.Element.prototype),R((window.customElements&&
|
|
customElements.nativeHTMLElement||HTMLElement).prototype),R(window.Document.prototype),window.HTMLSlotElement&&R(window.HTMLSlotElement.prototype)),window.ShadowRoot=q);var td=new Set("annotation-xml color-profile font-face font-face-src font-face-uri font-face-format font-face-name missing-glyph".split(" "));x.prototype.setDefinition=function(a,b){this._localNameToDefinition.set(a,b);this._constructorToDefinition.set(b.constructor,b)};x.prototype.localNameToDefinition=function(a){return this._localNameToDefinition.get(a)};
|
|
x.prototype.constructorToDefinition=function(a){return this._constructorToDefinition.get(a)};x.prototype.addPatch=function(a){this._hasPatches=!0;this._patches.push(a)};x.prototype.patchTree=function(a){var b=this;this._hasPatches&&Q(a,function(a){return b.patch(a)})};x.prototype.patch=function(a){if(this._hasPatches&&!a.__CE_patched){a.__CE_patched=!0;for(var b=0;b<this._patches.length;b++)this._patches[b](a)}};x.prototype.connectTree=function(a){var b=[];Q(a,function(a){return b.push(a)});for(a=
|
|
0;a<b.length;a++){var c=b[a];1===c.__CE_state?this.connectedCallback(c):this.upgradeElement(c)}};x.prototype.disconnectTree=function(a){var b=[];Q(a,function(a){return b.push(a)});for(a=0;a<b.length;a++){var c=b[a];1===c.__CE_state&&this.disconnectedCallback(c)}};x.prototype.patchAndUpgradeTree=function(a,b){b=void 0===b?new Set:b;var c=this,d=[];Q(a,function(a){if("link"===a.localName&&"import"===a.getAttribute("rel")){var e=a.import;e instanceof Node&&"complete"===e.readyState?(e.__CE_isImportDocument=
|
|
!0,e.__CE_hasRegistry=!0):a.addEventListener("load",function(){var d=a.import;d.__CE_documentLoadHandled||(d.__CE_documentLoadHandled=!0,d.__CE_isImportDocument=!0,d.__CE_hasRegistry=!0,new Set(b),b.delete(d),c.patchAndUpgradeTree(d,b))})}else d.push(a)},b);if(this._hasPatches)for(a=0;a<d.length;a++)this.patch(d[a]);for(a=0;a<d.length;a++)this.upgradeElement(d[a])};x.prototype.upgradeElement=function(a){if(void 0===a.__CE_state){var b=this.localNameToDefinition(a.localName);if(b){b.constructionStack.push(a);
|
|
var c=b.constructor;try{try{if(new c!==a)throw Error("The custom element constructor did not produce the element being upgraded.");}finally{b.constructionStack.pop()}}catch(f){throw a.__CE_state=2,f;}a.__CE_state=1;a.__CE_definition=b;if(b.attributeChangedCallback)for(b=b.observedAttributes,c=0;c<b.length;c++){var d=b[c],e=a.getAttribute(d);null!==e&&this.attributeChangedCallback(a,d,null,e,null)}m(a)&&this.connectedCallback(a)}}};x.prototype.connectedCallback=function(a){var b=a.__CE_definition;
|
|
b.connectedCallback&&b.connectedCallback.call(a)};x.prototype.disconnectedCallback=function(a){var b=a.__CE_definition;b.disconnectedCallback&&b.disconnectedCallback.call(a)};x.prototype.attributeChangedCallback=function(a,b,c,d,e){var f=a.__CE_definition;f.attributeChangedCallback&&-1<f.observedAttributes.indexOf(b)&&f.attributeChangedCallback.call(a,b,c,d,e)};Fa.prototype.disconnect=function(){this._observer&&this._observer.disconnect()};Fa.prototype._handleMutations=function(a){var b=this._document.readyState;
|
|
"interactive"!==b&&"complete"!==b||this.disconnect();for(b=0;b<a.length;b++)for(var c=a[b].addedNodes,d=0;d<c.length;d++)this._internals.patchAndUpgradeTree(c[d])};Ga.prototype.resolve=function(a){if(this._value)throw Error("Already resolved.");this._value=a;this._resolve&&this._resolve(a)};Ga.prototype.toPromise=function(){return this._promise};A.prototype.define=function(a,b){var c=this;if(!(b instanceof Function))throw new TypeError("Custom element constructors must be functions.");if(!lc(a))throw new SyntaxError("The element name '"+
|
|
a+"' is not valid.");if(this._internals.localNameToDefinition(a))throw Error("A custom element with name '"+a+"' has already been defined.");if(this._elementDefinitionIsRunning)throw Error("A custom element is already being defined.");this._elementDefinitionIsRunning=!0;var d,e,f,g,h;try{var k=function(a){var b=m[a];if(void 0!==b&&!(b instanceof Function))throw Error("The '"+a+"' callback must be a function.");return b},m=b.prototype;if(!(m instanceof Object))throw new TypeError("The custom element constructor's prototype is not an object.");
|
|
d=k("connectedCallback");e=k("disconnectedCallback");f=k("adoptedCallback");g=k("attributeChangedCallback");h=b.observedAttributes||[]}catch(p){return}finally{this._elementDefinitionIsRunning=!1}this._internals.setDefinition(a,{localName:a,constructor:b,connectedCallback:d,disconnectedCallback:e,adoptedCallback:f,attributeChangedCallback:g,observedAttributes:h,constructionStack:[]});this._unflushedLocalNames.push(a);this._flushPending||(this._flushPending=!0,this._flushCallback(function(){return c._flush()}))};
|
|
A.prototype._flush=function(){if(!1!==this._flushPending)for(this._flushPending=!1,this._internals.patchAndUpgradeTree(document);0<this._unflushedLocalNames.length;){var a=this._unflushedLocalNames.shift();(a=this._whenDefinedDeferred.get(a))&&a.resolve(void 0)}};A.prototype.get=function(a){if(a=this._internals.localNameToDefinition(a))return a.constructor};A.prototype.whenDefined=function(a){if(!lc(a))return Promise.reject(new SyntaxError("'"+a+"' is not a valid custom element name."));var b=this._whenDefinedDeferred.get(a);
|
|
if(b)return b.toPromise();b=new Ga;this._whenDefinedDeferred.set(a,b);this._internals.localNameToDefinition(a)&&-1===this._unflushedLocalNames.indexOf(a)&&b.resolve(void 0);return b.toPromise()};A.prototype.polyfillWrapFlushCallback=function(a){this._documentConstructionObserver.disconnect();var b=this._flushCallback;this._flushCallback=function(c){return a(function(){return b(c)})}};window.CustomElementRegistry=A;A.prototype.define=A.prototype.define;A.prototype.get=A.prototype.get;A.prototype.whenDefined=
|
|
A.prototype.whenDefined;A.prototype.polyfillWrapFlushCallback=A.prototype.polyfillWrapFlushCallback;var Ba=window.Document.prototype.createElement,cd=window.Document.prototype.createElementNS,bd=window.Document.prototype.importNode,dd=window.Document.prototype.prepend,ed=window.Document.prototype.append,rb=window.Node.prototype.cloneNode,ma=window.Node.prototype.appendChild,zb=window.Node.prototype.insertBefore,Ca=window.Node.prototype.removeChild,Ab=window.Node.prototype.replaceChild,Ea=Object.getOwnPropertyDescriptor(window.Node.prototype,
|
|
"textContent"),qb=window.Element.prototype.attachShadow,za=Object.getOwnPropertyDescriptor(window.Element.prototype,"innerHTML"),Da=window.Element.prototype.getAttribute,sb=window.Element.prototype.setAttribute,ub=window.Element.prototype.removeAttribute,na=window.Element.prototype.getAttributeNS,tb=window.Element.prototype.setAttributeNS,vb=window.Element.prototype.removeAttributeNS,xb=window.Element.prototype.insertAdjacentElement,Tc=window.Element.prototype.prepend,Uc=window.Element.prototype.append,
|
|
Wc=window.Element.prototype.before,Xc=window.Element.prototype.after,Yc=window.Element.prototype.replaceWith,Zc=window.Element.prototype.remove,gd=window.HTMLElement,Aa=Object.getOwnPropertyDescriptor(window.HTMLElement.prototype,"innerHTML"),wb=window.HTMLElement.prototype.insertAdjacentElement,Bb=new function(){},va=window.customElements;if(!va||va.forcePolyfill||"function"!=typeof va.define||"function"!=typeof va.get){var ia=new x;fd(ia);ad(ia);$c(ia);Rc(ia);document.__CE_hasRegistry=!0;var Md=
|
|
new A(ia);Object.defineProperty(window,"customElements",{configurable:!0,enumerable:!0,value:Md})}var L={STYLE_RULE:1,KEYFRAMES_RULE:7,MEDIA_RULE:4,MIXIN_RULE:1E3},H={comments:/\/\*[^*]*\*+([^/*][^*]*\*+)*\//gim,port:/@import[^;]*;/gim,customProp:/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?(?:[;\n]|$)/gim,mixinProp:/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?{[^}]*?}(?:[;\n]|$)?/gim,mixinApply:/@apply\s*\(?[^);]*\)?\s*(?:[;\n]|$)?/gim,varApply:/[^;:]*?:[^;]*?var\([^;]*\)(?:[;\n]|$)?/gim,keyframesRule:/^@[^\s]*keyframes/,
|
|
multipleSpaces:/\s+/g},y=!(window.ShadyDOM&&window.ShadyDOM.inUse),r=!navigator.userAgent.match("AppleWebKit/601")&&window.CSS&&CSS.supports&&CSS.supports("box-shadow","0 0 0 var(--foo)");window.ShadyCSS?oc(window.ShadyCSS):window.WebComponents&&oc(window.WebComponents.flags);var Fc=/(?:^|[;\s{]\s*)(--[\w-]*?)\s*:\s*(?:([^;{]*)|{([^}]*)})(?:(?=[;\s}])|$)/gi,Gc=/(?:^|\W+)@apply\s*\(?([^);\n]*)\)?/gi,Nd=/(--[\w-]+)\s*([:,;)]|$)/gi,Od=/(animation\s*:)|(animation-name\s*:)/,vd=/@media[^(]*(\([^)]*\))/,
|
|
Pd=/\{[^}]*\}/g,S=null;v.prototype.dom=function(a,b,c){a.__styleScoped?a.__styleScoped=null:this._transformDom(a,b||"",c)};v.prototype._transformDom=function(a,b,c){a.nodeType===Node.ELEMENT_NODE&&this.element(a,b,c);if(a="template"===a.localName?(a.content||a._content).childNodes:a.children||a.childNodes)for(var d=0;d<a.length;d++)this._transformDom(a[d],b,c)};v.prototype.element=function(a,b,c){if(b)if(a.classList)c?(a.classList.remove("style-scope"),a.classList.remove(b)):(a.classList.add("style-scope"),
|
|
a.classList.add(b));else if(a.getAttribute){var d=a.getAttribute(Qd);c?d&&(b=d.replace("style-scope","").replace(b,""),ra(a,b)):ra(a,(d?d+" ":"")+"style-scope "+b)}};v.prototype.elementStyles=function(a,b,c){var d=a.__cssBuild;y||"shady"===d?b=aa(b,c):(a=T(a),b=this.css(b,a.is,a.typeExtension,c)+"\n\n");return b.trim()};v.prototype.css=function(a,b,c,d){var e=this._calcHostScope(b,c);b=this._calcElementScope(b);var f=this;return aa(a,function(a){a.isScoped||(f.rule(a,b,e),a.isScoped=!0);d&&d(a,b,
|
|
e)})};v.prototype._calcElementScope=function(a){return a?Rd+a:""};v.prototype._calcHostScope=function(a,b){return b?"[is="+a+"]":a};v.prototype.rule=function(a,b,c){this._transformRule(a,this._transformComplexSelector,b,c)};v.prototype._transformRule=function(a,b,c,d){a.selector=a.transformedSelector=this._transformRuleCss(a,b,c,d)};v.prototype._transformRuleCss=function(a,b,c,d){var e=a.selector.split(Hc);if(!pc(a)){a=0;for(var f=e.length,g;a<f&&(g=e[a]);a++)e[a]=b.call(this,g,c,d)}return e.join(Hc)};
|
|
v.prototype._transformComplexSelector=function(a,b,c){var d=this,e=!1;a=a.trim();a=a.replace(Sd,function(a,b,c){return":"+b+"("+c.replace(/\s/g,"")+")"});a=a.replace(Td,ib+" $1");return a=a.replace(Ud,function(a,g,h){e||(a=d._transformCompoundSelector(h,g,b,c),e=e||a.stop,g=a.combinator,h=a.value);return g+h})};v.prototype._transformCompoundSelector=function(a,b,c,d){var e=a.indexOf(jb);0<=a.indexOf(ib)?a=this._transformHostSelector(a,d):0!==e&&(a=c?this._transformSimpleSelector(a,c):a);c=!1;0<=e&&
|
|
(b="",c=!0);var f;c&&(f=!0,c&&(a=a.replace(Vd,function(a,b){return" > "+b})));a=a.replace(Wd,function(a,b,c){return'[dir="'+c+'"] '+b+", "+b+'[dir="'+c+'"]'});return{value:a,combinator:b,stop:f}};v.prototype._transformSimpleSelector=function(a,b){a=a.split(Ic);a[0]+=b;return a.join(Ic)};v.prototype._transformHostSelector=function(a,b){var c=a.match(Jc);return(c=c&&c[2].trim()||"")?c[0].match(Kc)?a.replace(Jc,function(a,c,f){return b+f}):c.split(Kc)[0]===b?c:Xd:a.replace(ib,b)};v.prototype.documentRule=
|
|
function(a){a.selector=a.parsedSelector;this.normalizeRootSelector(a);this._transformRule(a,this._transformDocumentSelector)};v.prototype.normalizeRootSelector=function(a){a.selector===Yd&&(a.selector="html")};v.prototype._transformDocumentSelector=function(a){return a.match(jb)?this._transformComplexSelector(a,Lc):this._transformSimpleSelector(a.trim(),Lc)};ka.global.Object.defineProperties(v.prototype,{SCOPE_NAME:{configurable:!0,enumerable:!0,get:function(){return"style-scope"}}});var Sd=/:(nth[-\w]+)\(([^)]+)\)/,
|
|
Lc=":not(.style-scope)",Hc=",",Ud=/(^|[\s>+~]+)((?:\[.+?\]|[^\s>+~=\[])+)/g,Kc=/[[.:#*]/,ib=":host",Yd=":root",jb="::slotted",Td=new RegExp("^("+jb+")"),Jc=/(:host)(?:\(((?:\([^)(]*\)|[^)(]*)+?)\))/,Vd=/(?:::slotted)(?:\(((?:\([^)(]*\)|[^)(]*)+?)\))/,Wd=/(.*):dir\((?:(ltr|rtl))\)/,Rd=".",Ic=":",Qd="class",Xd="should_not_match",t=new v;u.get=function(a){return a?a.__styleInfo:null};u.set=function(a,b){return a.__styleInfo=b};u.prototype._getStyleRules=function(){return this.styleRules};u.prototype._getStyleRules=
|
|
u.prototype._getStyleRules;var Mc=function(a){return a.matches||a.matchesSelector||a.mozMatchesSelector||a.msMatchesSelector||a.oMatchesSelector||a.webkitMatchesSelector}(window.Element.prototype),Zd=navigator.userAgent.match("Trident");n.prototype.decorateStyles=function(a){var b=this,c={},d=[],e=0;ba(a,function(a){b.decorateRule(a);a.index=e++;b.collectPropertiesInCssText(a.propertyInfo.cssText,c)},function(a){d.push(a)});a._keyframes=d;a=[];for(var f in c)a.push(f);return a};n.prototype.decorateRule=
|
|
function(a){if(a.propertyInfo)return a.propertyInfo;var b={},c={};this.collectProperties(a,c)&&(b.properties=c,a.rules=null);b.cssText=this.collectCssText(a);return a.propertyInfo=b};n.prototype.collectProperties=function(a,b){var c=a.propertyInfo;if(c){if(c.properties)return Object.assign(b,c.properties),!0}else{for(var c=a.parsedCssText,d;a=Fc.exec(c);){d=(a[2]||a[3]).trim();if("inherit"!==d||"unset"!==d)b[a[1].trim()]=d;d=!0}return d}};n.prototype.collectCssText=function(a){return this.collectConsumingCssText(a.parsedCssText)};
|
|
n.prototype.collectConsumingCssText=function(a){return a.replace(Pd,"").replace(Fc,"")};n.prototype.collectPropertiesInCssText=function(a,b){for(var c;c=Nd.exec(a);){var d=c[1];":"!==c[2]&&(b[d]=!0)}};n.prototype.reify=function(a){for(var b=Object.getOwnPropertyNames(a),c=0,d;c<b.length;c++)d=b[c],a[d]=this.valueForProperty(a[d],a)};n.prototype.valueForProperty=function(a,b){if(a)if(0<=a.indexOf(";"))a=this.valueForProperties(a,b);else{var c=this;a=rc(a,function(a,e,f,g){if(!e)return a+g;(e=c.valueForProperty(b[e],
|
|
b))&&"initial"!==e?"apply-shim-inherit"===e&&(e="inherit"):e=c.valueForProperty(b[f]||f,b)||f;return a+(e||"")+g})}return a&&a.trim()||""};n.prototype.valueForProperties=function(a,b){a=a.split(";");for(var c=0,d,e;c<a.length;c++)if(d=a[c]){Gc.lastIndex=0;if(e=Gc.exec(d))d=this.valueForProperty(b[e[1]],b);else if(e=d.indexOf(":"),-1!==e){var f=d.substring(e),f=f.trim(),f=this.valueForProperty(f,b)||f;d=d.substring(0,e)+f}a[c]=d&&d.lastIndexOf(";")===d.length-1?d.slice(0,-1):d||""}return a.join(";")};
|
|
n.prototype.applyProperties=function(a,b){var c="";a.propertyInfo||this.decorateRule(a);a.propertyInfo.cssText&&(c=this.valueForProperties(a.propertyInfo.cssText,b));a.cssText=c};n.prototype.applyKeyframeTransforms=function(a,b){var c=a.cssText,d=a.cssText;null==a.hasAnimations&&(a.hasAnimations=Od.test(c));if(a.hasAnimations)if(null==a.keyframeNamesToTransform){a.keyframeNamesToTransform=[];for(var e in b)d=b[e],d=d(c),c!==d&&(c=d,a.keyframeNamesToTransform.push(e))}else{for(e=0;e<a.keyframeNamesToTransform.length;++e)d=
|
|
b[a.keyframeNamesToTransform[e]],c=d(c);d=c}a.cssText=d};n.prototype.propertyDataFromStyles=function(a,b){var c={},d=this,e=[];ba(a,function(a){a.propertyInfo||d.decorateRule(a);var f=a.transformedSelector||a.parsedSelector;b&&a.propertyInfo.properties&&f&&Mc.call(b,f)&&(d.collectProperties(a,c),a=a.index,f=parseInt(a/32,10),e[f]=(e[f]||0)|1<<a%32)},null,!0);return{properties:c,key:e}};n.prototype.whenHostOrRootRule=function(a,b,c,d){b.propertyInfo||this.decorateRule(b);if(b.propertyInfo.properties){var e=
|
|
T(a),f=e.is,e=e.typeExtension;a=a.is?t._calcHostScope(f,e):"html";var g=b.parsedSelector,e=":host > *"===g||"html"===g,h=0===g.indexOf(":host")&&!e;"shady"===c&&(e=g===a+" > *."+a||-1!==g.indexOf("html"),h=!e&&0===g.indexOf(a));"shadow"===c&&(e=":host > *"===g||"html"===g,h=h&&!e);if(e||h)c=a,h&&(y&&!b.transformedSelector&&(b.transformedSelector=t._transformRuleCss(b,t._transformComplexSelector,t._calcElementScope(f),a)),c=b.transformedSelector||a),d({selector:c,isHost:h,isRoot:e})}};n.prototype.hostAndRootPropertiesForScope=
|
|
function(a,b){var c={},d={},e=this,f=b&&b.__cssBuild;ba(b,function(b){e.whenHostOrRootRule(a,b,f,function(f){Mc.call(a._element||a,f.selector)&&(f.isHost?e.collectProperties(b,c):e.collectProperties(b,d))})},null,!0);return{rootProps:d,hostProps:c}};n.prototype.transformStyles=function(a,b,c){var d=this,e=T(a),f=t._calcHostScope(e.is,e.typeExtension),e=a.extends?"\\"+f.slice(0,-1)+"\\]":f,g=new RegExp("(?:^|[^.#[:])"+e+"($|[.:[\\s>+~])"),e=u.get(a).styleRules,h=this._elementKeyframeTransforms(a,e,
|
|
c);return t.elementStyles(a,e,function(a){d.applyProperties(a,b);y||pc(a)||!a.cssText||(d.applyKeyframeTransforms(a,h),d._scopeSelector(a,g,f,c))})};n.prototype._elementKeyframeTransforms=function(a,b,c){a=b._keyframes;b={};if(!y&&a)for(var d=0,e=a[d];d<a.length;e=a[++d])this._scopeKeyframes(e,c),b[e.keyframesName]=this._keyframesRuleTransformer(e);return b};n.prototype._keyframesRuleTransformer=function(a){return function(b){return b.replace(a.keyframesNameRx,a.transformedKeyframesName)}};n.prototype._scopeKeyframes=
|
|
function(a,b){a.keyframesNameRx=new RegExp(a.keyframesName,"g");a.transformedKeyframesName=a.keyframesName+"-"+b;a.transformedSelector=a.transformedSelector||a.selector;a.selector=a.transformedSelector.replace(a.keyframesName,a.transformedKeyframesName)};n.prototype._scopeSelector=function(a,b,c,d){a.transformedSelector=a.transformedSelector||a.selector;d="."+d;for(var e=a.transformedSelector.split(","),f=0,g=e.length,h;f<g&&(h=e[f]);f++)e[f]=h.match(b)?h.replace(c,d):d+" "+h;a.selector=e.join(",")};
|
|
n.prototype.applyElementScopeSelector=function(a,b,c){var d=a.getAttribute("class")||"",e=d;c&&(e=d.replace(new RegExp("\\s*x-scope\\s*"+c+"\\s*","g")," "));e+=(e?" ":"")+"x-scope "+b;d!==e&&ra(a,e)};n.prototype.applyElementStyle=function(a,b,c,d){b=d?d.textContent||"":this.transformStyles(a,b,c);var e=u.get(a),f=e.customStyle;f&&!y&&f!==d&&(f._useCount--,0>=f._useCount&&f.parentNode&&f.parentNode.removeChild(f));y?e.customStyle?(e.customStyle.textContent=b,d=e.customStyle):b&&(d=Za(b,c,a.shadowRoot,
|
|
e.placeholder)):d?d.parentNode||qc(d,null,e.placeholder):b&&(d=Za(b,c,null,e.placeholder));d&&(d._useCount=d._useCount||0,e.customStyle!=d&&d._useCount++,e.customStyle=d);Zd&&(d.textContent=d.textContent);return d};n.prototype.applyCustomStyle=function(a,b){var c=qa(a),d=this;a.textContent=aa(c,function(a){var c=a.cssText=a.parsedCssText;a.propertyInfo&&a.propertyInfo.cssText&&(c=c.replace(H.customProp,"").replace(H.mixinProp,""),a.cssText=d.valueForProperties(c,b))})};ka.global.Object.defineProperties(n.prototype,
|
|
{XSCOPE_NAME:{configurable:!0,enumerable:!0,get:function(){return"x-scope"}}});var P=new n,kb={},wa=window.customElements;if(wa&&!y){var $d=wa.define;wa.define=function(a,b,c){var d=document.createComment(" Shady DOM styles for "+a+" "),e=document.head;e.insertBefore(d,(S?S.nextSibling:null)||e.firstChild);S=d;kb[a]=d;return $d.call(wa,a,b,c)}}la.prototype._validate=function(a,b,c){for(var d=0;d<c.length;d++){var e=c[d];if(a.properties[e]!==b[e])return!1}return!0};la.prototype.store=function(a,b,
|
|
c,d){var e=this.cache[a]||[];e.push({properties:b,styleElement:c,scopeSelector:d});e.length>this.typeMax&&e.shift();this.cache[a]=e};la.prototype.fetch=function(a,b,c){if(a=this.cache[a])for(var d=a.length-1;0<=d;d--){var e=a[d];if(this._validate(e,b,c))return e}};if(!y){var Nc=function(a){for(var b=0;b<a.length;b++){var c=a[b];if(c.target!==document.documentElement&&c.target!==document.head){for(var d=0;d<c.addedNodes.length;d++){var e=c.addedNodes[d],f=e;if(f.classList&&!f.classList.contains(t.SCOPE_NAME)||
|
|
f instanceof window.SVGElement&&(!f.hasAttribute("class")||0>f.getAttribute("class").indexOf(t.SCOPE_NAME)))if(f=e.getRootNode(),f.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&(f=f.host))f=T(f).is,t.dom(e,f)}for(d=0;d<c.removedNodes.length;d++)if(e=c.removedNodes[d],e.nodeType===Node.ELEMENT_NODE&&(f=void 0,e.classList?f=Array.from(e.classList):e.hasAttribute("class")&&(f=e.getAttribute("class").split(/\s+/)),void 0!==f)){var g=f.indexOf(t.SCOPE_NAME);0<=g&&(f=f[g+1])&&t.dom(e,f,!0)}}}},Oc=new MutationObserver(Nc),
|
|
Pc=function(a){Oc.observe(a,{childList:!0,subtree:!0})};if(window.customElements&&!window.customElements.flush)Pc(document);else{var lb=function(){Pc(document.body)};window.HTMLImports?window.HTMLImports.whenReady(lb):requestAnimationFrame(function(){if("loading"===document.readyState){var a=function(){lb();document.removeEventListener("readystatechange",a)};document.addEventListener("readystatechange",a)}else lb()})}pb=function(){Nc(Oc.takeRecords())}}var sa={},yd=Promise.resolve(),$a=null,sc=window.HTMLImports&&
|
|
window.HTMLImports.whenReady||null,ab,xa=null,ja=null;z.prototype.enqueueDocumentValidation=function(){!this.enqueued&&ja&&(this.enqueued=!0,ob(ja))};z.prototype.addCustomStyle=function(a){a.__seenByShadyCSS||(a.__seenByShadyCSS=!0,this.customStyles.push(a),this.enqueueDocumentValidation())};z.prototype.getStyleForCustomStyle=function(a){return a.__shadyCSSCachedStyle?a.__shadyCSSCachedStyle:a.getStyle?a.getStyle():a};z.prototype.processStyles=function(){for(var a=this.customStyles,b=0;b<a.length;b++){var c=
|
|
a[b];if(!c.__shadyCSSCachedStyle){var d=this.getStyleForCustomStyle(c);if(d){var e=d.__appliedElement;if(e)for(var f=0;f<d.attributes.length;f++){var g=d.attributes[f];e.setAttribute(g.name,g.value)}d=e||d;xa&&xa(d);c.__shadyCSSCachedStyle=d}}}return a};z.prototype.addCustomStyle=z.prototype.addCustomStyle;z.prototype.getStyleForCustomStyle=z.prototype.getStyleForCustomStyle;z.prototype.processStyles=z.prototype.processStyles;Object.defineProperties(z.prototype,{transformCallback:{get:function(){return xa},
|
|
set:function(a){xa=a}},validateCallback:{get:function(){return ja},set:function(a){var b=!1;ja||(b=!0);ja=a;b&&this.enqueueDocumentValidation()}}});var Qc=new la;k.prototype.flush=function(){pb()};k.prototype._generateScopeSelector=function(a){var b=this._scopeCounter[a]=(this._scopeCounter[a]||0)+1;return a+"-"+b};k.prototype.getStyleAst=function(a){return qa(a)};k.prototype.styleAstToString=function(a){return aa(a)};k.prototype._gatherStyles=function(a){a=a.content.querySelectorAll("style");for(var b=
|
|
[],c=0;c<a.length;c++){var d=a[c];b.push(d.textContent);d.parentNode.removeChild(d)}return b.join("").trim()};k.prototype._getCssBuild=function(a){return(a=a.content.querySelector("style"))?a.getAttribute("css-build")||"":""};k.prototype.prepareTemplate=function(a,b,c){if(!a._prepared){a._prepared=!0;a.name=b;a.extends=c;sa[b]=a;var d=this._getCssBuild(a),e=this._gatherStyles(a);c={is:b,extends:c,__cssBuild:d};y||t.dom(a.content,b);this._ensure();var f=this._applyShim.detectMixin(e),e=Ya(e);f&&r&&
|
|
this._applyShim.transformRules(e,b);a._styleAst=e;a._cssBuild=d;d=[];r||(d=P.decorateStyles(a._styleAst,c));if(!d.length||r)b=this._generateStaticStyle(c,a._styleAst,y?a.content:null,kb[b]),a._style=b;a._ownPropertyNames=d}};k.prototype._generateStaticStyle=function(a,b,c,d){b=t.elementStyles(a,b);if(b.length)return Za(b,a.is,c,d)};k.prototype._prepareHost=function(a){var b=T(a),c=b.is,b=b.typeExtension,d=kb[c],e=sa[c],f,g,h;e&&(f=e._styleAst,g=e._ownPropertyNames,h=e._cssBuild);return u.set(a,new u(f,
|
|
d,g,c,b,h))};k.prototype._ensureApplyShim=function(){if(!this._applyShim)if(window.ShadyCSS.ApplyShim)this._applyShim=window.ShadyCSS.ApplyShim,this._applyShim.invalidCallback=wd;else{var a={};this._applyShim=(a.detectMixin=function(){return!1},a.transformRule=function(){},a.transformRules=function(){},a)}};k.prototype._ensureCustomStyleInterface=function(){var a=this;if(!this._customStyleInterface)if(window.ShadyCSS.CustomStyleInterface)this._customStyleInterface=window.ShadyCSS.CustomStyleInterface,
|
|
this._customStyleInterface.transformCallback=function(b){a.transformCustomStyleForDocument(b)},this._customStyleInterface.validateCallback=function(){requestAnimationFrame(function(){(a._customStyleInterface.enqueued||a._elementsHaveApplied)&&a.flushCustomStyles()})};else{var b={};this._customStyleInterface=(b.processStyles=function(){},b.enqueued=!1,b.getStyleForCustomStyle=function(){return null},b)}};k.prototype._ensure=function(){this._ensureApplyShim();this._ensureCustomStyleInterface()};k.prototype.flushCustomStyles=
|
|
function(){this._ensure();var a=this._customStyleInterface.processStyles();this._customStyleInterface.enqueued&&(r?this._revalidateCustomStyleApplyShim(a):(this._updateProperties(this._documentOwner,this._documentOwnerStyleInfo),this._applyCustomStyles(a)),this._customStyleInterface.enqueued=!1,this._elementsHaveApplied&&!r&&this.styleDocument())};k.prototype.styleElement=function(a,b){var c=T(a).is,d=u.get(a);d||(d=this._prepareHost(a));this._isRootOwner(a)||(this._elementsHaveApplied=!0);b&&(d.overrideStyleProperties=
|
|
d.overrideStyleProperties||{},Object.assign(d.overrideStyleProperties,b));if(r){if(d.overrideStyleProperties){b=d.overrideStyleProperties;for(var e in b)null===e?a.style.removeProperty(e):a.style.setProperty(e,b[e])}((e=sa[c])||this._isRootOwner(a))&&e&&e._style&&e._applyShimInvalid&&(e._validating||(this._ensure(),this._applyShim.transformRules(e._styleAst,c),e._style.textContent=t.elementStyles(a,d.styleRules),xd(e)),y&&(c=a.shadowRoot)&&(c.querySelector("style").textContent=t.elementStyles(a,d.styleRules)),
|
|
d.styleRules=e._styleAst)}else this._updateProperties(a,d),d.ownStylePropertyNames&&d.ownStylePropertyNames.length&&this._applyStyleProperties(a,d)};k.prototype._styleOwnerForNode=function(a){return(a=a.getRootNode().host)?u.get(a)?a:this._styleOwnerForNode(a):this._documentOwner};k.prototype._isRootOwner=function(a){return a===this._documentOwner};k.prototype._applyStyleProperties=function(a,b){var c=T(a).is,d=Qc.fetch(c,b.styleProperties,b.ownStylePropertyNames),e=d?d.styleElement:null,f=b.scopeSelector;
|
|
b.scopeSelector=d&&d.scopeSelector||this._generateScopeSelector(c);e=P.applyElementStyle(a,b.styleProperties,b.scopeSelector,e);y||P.applyElementScopeSelector(a,b.scopeSelector,f);d||Qc.store(c,b.styleProperties,e,b.scopeSelector);return e};k.prototype._updateProperties=function(a,b){var c=this._styleOwnerForNode(a),d=u.get(c),c=Object.create(d.styleProperties||null),e=P.hostAndRootPropertiesForScope(a,b.styleRules);a=P.propertyDataFromStyles(d.styleRules,a).properties;Object.assign(c,e.hostProps,
|
|
a,e.rootProps);this._mixinOverrideStyles(c,b.overrideStyleProperties);P.reify(c);b.styleProperties=c};k.prototype._mixinOverrideStyles=function(a,b){for(var c in b){var d=b[c];if(d||0===d)a[c]=d}};k.prototype.styleDocument=function(a){this.styleSubtree(this._documentOwner,a)};k.prototype.styleSubtree=function(a,b){var c=a.shadowRoot;(c||this._isRootOwner(a))&&this.styleElement(a,b);if(b=c&&(c.children||c.childNodes))for(a=0;a<b.length;a++)this.styleSubtree(b[a]);else if(a=a.children||a.childNodes)for(b=
|
|
0;b<a.length;b++)this.styleSubtree(a[b])};k.prototype._revalidateCustomStyleApplyShim=function(a){for(var b=0;b<a.length;b++){var c=this._customStyleInterface.getStyleForCustomStyle(a[b]);c&&this._revalidateApplyShim(c)}};k.prototype._applyCustomStyles=function(a){for(var b=0;b<a.length;b++){var c=this._customStyleInterface.getStyleForCustomStyle(a[b]);c&&P.applyCustomStyle(c,this._documentOwnerStyleInfo.styleProperties)}};k.prototype.transformCustomStyleForDocument=function(a){var b=this,c=qa(a);
|
|
ba(c,function(a){y?t.normalizeRootSelector(a):t.documentRule(a);r&&(b._ensure(),b._applyShim.transformRule(a))});r?a.textContent=aa(c):this._documentOwnerStyleInfo.styleRules.rules.push(c)};k.prototype._revalidateApplyShim=function(a){if(r){var b=qa(a);this._ensure();this._applyShim.transformRules(b);a.textContent=aa(b)}};k.prototype.getComputedStyleValue=function(a,b){var c;r||(c=(u.get(a)||u.get(this._styleOwnerForNode(a))).styleProperties[b]);return(c=c||window.getComputedStyle(a).getPropertyValue(b))?
|
|
c.trim():""};k.prototype.setElementClass=function(a,b){var c=a.getRootNode();b=b?b.split(/\s/):[];c=c.host&&c.host.localName;if(!c){var d=a.getAttribute("class");if(d)for(var d=d.split(/\s/),e=0;e<d.length;e++)if(d[e]===t.SCOPE_NAME){c=d[e+1];break}}c&&b.push(t.SCOPE_NAME,c);r||(c=u.get(a))&&c.scopeSelector&&b.push(P.XSCOPE_NAME,c.scopeSelector);ra(a,b.join(" "))};k.prototype._styleInfoForNode=function(a){return u.get(a)};k.prototype.flush=k.prototype.flush;k.prototype.prepareTemplate=k.prototype.prepareTemplate;
|
|
k.prototype.styleElement=k.prototype.styleElement;k.prototype.styleDocument=k.prototype.styleDocument;k.prototype.styleSubtree=k.prototype.styleSubtree;k.prototype.getComputedStyleValue=k.prototype.getComputedStyleValue;k.prototype.setElementClass=k.prototype.setElementClass;k.prototype._styleInfoForNode=k.prototype._styleInfoForNode;k.prototype.transformCustomStyleForDocument=k.prototype.transformCustomStyleForDocument;k.prototype.getStyleAst=k.prototype.getStyleAst;k.prototype.styleAstToString=
|
|
k.prototype.styleAstToString;k.prototype.flushCustomStyles=k.prototype.flushCustomStyles;Object.defineProperties(k.prototype,{nativeShadow:{get:function(){return y}},nativeCss:{get:function(){return r}}});var F=new k,mb,nb;window.ShadyCSS&&(mb=window.ShadyCSS.ApplyShim,nb=window.ShadyCSS.CustomStyleInterface);window.ShadyCSS={ScopingShim:F,prepareTemplate:function(a,b,c){F.flushCustomStyles();F.prepareTemplate(a,b,c)},styleSubtree:function(a,b){F.flushCustomStyles();F.styleSubtree(a,b)},styleElement:function(a){F.flushCustomStyles();
|
|
F.styleElement(a)},styleDocument:function(a){F.flushCustomStyles();F.styleDocument(a)},getComputedStyleValue:function(a,b){return F.getComputedStyleValue(a,b)},nativeCss:r,nativeShadow:y};mb&&(window.ShadyCSS.ApplyShim=mb);nb&&(window.ShadyCSS.CustomStyleInterface=nb);(function(){if(customElements&&customElements.polyfillWrapFlushCallback){var a=function(){if(b){var a=b;b=null;a();return!0}},b,c=HTMLImports.whenReady;customElements.polyfillWrapFlushCallback(function(d){b=d;c(a)});HTMLImports.whenReady=
|
|
function(b){c(function(){a()?HTMLImports.whenReady(b):b()})}}HTMLImports.whenReady(function(){requestAnimationFrame(function(){window.dispatchEvent(new CustomEvent("WebComponentsReady"))})})})(window.WebComponents);(function(){var a=document.createElement("style");a.textContent="body {transition: opacity ease-in 0.2s; } \nbody[unresolved] {opacity: 0; display: block; overflow: hidden; position: relative; } \n";var b=document.querySelector("head");b.insertBefore(a,b.firstChild)})(window.WebComponents)})();
|
|
}).call(self)
|
|
|
|
//# sourceMappingURL=webcomponents-lite.js.map
|