UNPKG

@webcomponents/webcomponentsjs

Version:
122 lines (120 loc) 82.9 kB
/** @license @nocompile Copyright (c) 2018 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 */ (function(){/* Copyright (c) 2016 The Polymer Project Authors. All rights reserved. This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as part of the polymer project is also subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt */ 'use strict';var n,p="undefined"!=typeof window&&window===this?this:"undefined"!=typeof global&&null!=global?global:this,aa="function"==typeof Object.defineProperties?Object.defineProperty:function(a,b,c){a!=Array.prototype&&a!=Object.prototype&&(a[b]=c.value)};function ba(){ba=function(){};p.Symbol||(p.Symbol=ca)}var ca=function(){var a=0;return function(b){return"jscomp_symbol_"+(b||"")+a++}}(); function da(){ba();var a=p.Symbol.iterator;a||(a=p.Symbol.iterator=p.Symbol("iterator"));"function"!=typeof Array.prototype[a]&&aa(Array.prototype,a,{configurable:!0,writable:!0,value:function(){return ea(this)}});da=function(){}}function ea(a){var b=0;return fa(function(){return b<a.length?{done:!1,value:a[b++]}:{done:!0}})}function fa(a){da();a={next:a};a[p.Symbol.iterator]=function(){return this};return a}function ha(a){da();ba();da();var b=a[Symbol.iterator];return b?b.call(a):ea(a)} function ia(a){for(var b,c=[];!(b=a.next()).done;)c.push(b.value);return c}function ja(){}ja.prototype.toJSON=function(){return{}};function q(a){a.__shady||(a.__shady=new ja);return a.__shady}function r(a){return a&&a.__shady};var t=window.ShadyDOM||{};t.ra=!(!Element.prototype.attachShadow||!Node.prototype.getRootNode);var ma=Object.getOwnPropertyDescriptor(Node.prototype,"firstChild");t.j=!!(ma&&ma.configurable&&ma.get);t.V=t.force||!t.ra;t.v=t.noPatch||!1;t.ba=t.preferPerformance;var na=navigator.userAgent.match("Trident");t.ga=na;function u(a){return(a=r(a))&&void 0!==a.firstChild}function v(a){return"ShadyRoot"===a.la}function oa(a){return(a=(a=r(a))&&a.root)&&pa(a)} var w=Element.prototype,qa=w.matches||w.matchesSelector||w.mozMatchesSelector||w.msMatchesSelector||w.oMatchesSelector||w.webkitMatchesSelector,ra=document.createTextNode(""),sa=0,ta=[];(new MutationObserver(function(){for(;ta.length;)try{ta.shift()()}catch(a){throw ra.textContent=sa++,a;}})).observe(ra,{characterData:!0});function ua(a){ta.push(a);ra.textContent=sa++}var va=!!document.contains;function wa(a,b){for(;b;){if(b==a)return!0;b=b.__shady_parentNode}return!1} function xa(a){for(var b=a.length-1;0<=b;b--){var c=a[b],d=c.getAttribute("id")||c.getAttribute("name");d&&"length"!==d&&isNaN(d)&&(a[d]=c)}a.item=function(b){return a[b]};a.namedItem=function(b){if("length"!==b&&isNaN(b)&&a[b])return a[b];for(var c=ha(a),d=c.next();!d.done;d=c.next())if(d=d.value,(d.getAttribute("id")||d.getAttribute("name"))==b)return d;return null};return a}function ya(a){var b=[];for(a=a.__shady_native_firstChild;a;a=a.__shady_native_nextSibling)b.push(a);return b} function za(a){var b=[];for(a=a.__shady_firstChild;a;a=a.__shady_nextSibling)b.push(a);return b}function x(a,b,c,d){c=void 0===c?"":c;for(var e in b){var f=b[e];if(!(d&&0<=d.indexOf(e))){f.configurable=!0;var g=c+e;if(f.value)a[g]=f.value;else try{Object.defineProperty(a,g,f)}catch(h){}}}}function y(a){var b={};Object.getOwnPropertyNames(a).forEach(function(c){b[c]=Object.getOwnPropertyDescriptor(a,c)});return b};var Aa=[],Ba;function Ca(a){Ba||(Ba=!0,ua(Da));Aa.push(a)}function Da(){Ba=!1;for(var a=!!Aa.length;Aa.length;)Aa.shift()();return a}Da.list=Aa;function Ea(){this.a=!1;this.addedNodes=[];this.removedNodes=[];this.L=new Set}function Fa(a){a.a||(a.a=!0,ua(function(){a.flush()}))}Ea.prototype.flush=function(){if(this.a){this.a=!1;var a=this.takeRecords();a.length&&this.L.forEach(function(b){b(a)})}};Ea.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[]}; function Ga(a,b){var c=q(a);c.G||(c.G=new Ea);c.G.L.add(b);var d=c.G;return{ka:b,B:d,ma:a,takeRecords:function(){return d.takeRecords()}}}function Ha(a){var b=a&&a.B;b&&(b.L.delete(a.ka),b.L.size||(q(a.ma).G=null))} function Ia(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})};var Ja=/[&\u00A0"]/g,Ka=/[&\u00A0<>]/g;function La(a){switch(a){case "&":return"&amp;";case "<":return"&lt;";case ">":return"&gt;";case '"':return"&quot;";case "\u00a0":return"&nbsp;"}}function Ma(a){for(var b={},c=0;c<a.length;c++)b[a[c]]=!0;return b}var Na=Ma("area base br col command embed hr img input keygen link meta param source track wbr".split(" ")),Oa=Ma("style script xmp iframe noembed noframes plaintext noscript".split(" ")); function Pa(a,b){"template"===a.localName&&(a=a.content);for(var c="",d=b?b(a):a.childNodes,e=0,f=d.length,g=void 0;e<f&&(g=d[e]);e++){a:{var h=g;var k=a,l=b;switch(h.nodeType){case Node.ELEMENT_NODE:k=h.localName;for(var m="<"+k,B=h.attributes,ka=0,la;la=B[ka];ka++)m+=" "+la.name+'="'+la.value.replace(Ja,La)+'"';m+=">";h=Na[k]?m:m+Pa(h,l)+"</"+k+">";break a;case Node.TEXT_NODE:h=h.data;h=k&&Oa[k.localName]?h:h.replace(Ka,La);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};var Qa=t.j,Ra={querySelector:function(a){return this.__shady_native_querySelector(a)},querySelectorAll:function(a){return this.__shady_native_querySelectorAll(a)}},Sa={};function Ta(a){Sa[a]=function(b){return b["__shady_native_"+a]}}function Ua(a,b){x(a,b,"__shady_native_");for(var c in b)Ta(c)}function z(a,b){b=void 0===b?[]:b;for(var c=0;c<b.length;c++){var d=b[c],e=Object.getOwnPropertyDescriptor(a,d);e&&(Object.defineProperty(a,"__shady_native_"+d,e),e.value?Ra[d]||(Ra[d]=e.value):Ta(d))}} var A=document.createTreeWalker(document,NodeFilter.SHOW_ALL,null,!1),C=document.createTreeWalker(document,NodeFilter.SHOW_ELEMENT,null,!1),Wa=document.implementation.createHTMLDocument("inert");function Xa(a){for(var b;b=a.__shady_native_firstChild;)a.__shady_native_removeChild(b)}var Ya=["firstElementChild","lastElementChild","children","childElementCount"],Za=["querySelector","querySelectorAll"]; function $a(){var a=["dispatchEvent","addEventListener","removeEventListener"];window.EventTarget?z(window.EventTarget.prototype,a):(z(Node.prototype,a),z(Window.prototype,a));Qa?z(Node.prototype,"parentNode firstChild lastChild previousSibling nextSibling childNodes parentElement textContent".split(" ")):Ua(Node.prototype,{parentNode:{get:function(){A.currentNode=this;return A.parentNode()}},firstChild:{get:function(){A.currentNode=this;return A.firstChild()}},lastChild:{get:function(){A.currentNode= this;return A.lastChild()}},previousSibling:{get:function(){A.currentNode=this;return A.previousSibling()}},nextSibling:{get:function(){A.currentNode=this;return A.nextSibling()}},childNodes:{get:function(){var a=[];A.currentNode=this;for(var c=A.firstChild();c;)a.push(c),c=A.nextSibling();return a}},parentElement:{get:function(){C.currentNode=this;return C.parentNode()}},textContent:{get:function(){switch(this.nodeType){case Node.ELEMENT_NODE:case Node.DOCUMENT_FRAGMENT_NODE:for(var a=document.createTreeWalker(this, NodeFilter.SHOW_TEXT,null,!1),c="",d;d=a.nextNode();)c+=d.nodeValue;return c;default:return this.nodeValue}},set:function(a){if("undefined"===typeof a||null===a)a="";switch(this.nodeType){case Node.ELEMENT_NODE:case Node.DOCUMENT_FRAGMENT_NODE:Xa(this);(0<a.length||this.nodeType===Node.ELEMENT_NODE)&&this.__shady_native_insertBefore(document.createTextNode(a),void 0);break;default:this.nodeValue=a}}}});z(Node.prototype,"appendChild insertBefore removeChild replaceChild cloneNode contains".split(" ")); z(HTMLElement.prototype,["parentElement","contains"]);a={firstElementChild:{get:function(){C.currentNode=this;return C.firstChild()}},lastElementChild:{get:function(){C.currentNode=this;return C.lastChild()}},children:{get:function(){var a=[];C.currentNode=this;for(var c=C.firstChild();c;)a.push(c),c=C.nextSibling();return xa(a)}},childElementCount:{get:function(){return this.children?this.children.length:0}}};Qa?(z(Element.prototype,Ya),z(Element.prototype,["previousElementSibling","nextElementSibling", "innerHTML","className"]),z(HTMLElement.prototype,["children","innerHTML","className"])):(Ua(Element.prototype,a),Ua(Element.prototype,{previousElementSibling:{get:function(){C.currentNode=this;return C.previousSibling()}},nextElementSibling:{get:function(){C.currentNode=this;return C.nextSibling()}},innerHTML:{get:function(){return Pa(this,ya)},set:function(a){var b="template"===this.localName?this.content:this;Xa(b);var d=this.localName||"div";d=this.namespaceURI&&this.namespaceURI!==Wa.namespaceURI? Wa.createElementNS(this.namespaceURI,d):Wa.createElement(d);d.innerHTML=a;for(a="template"===this.localName?d.content:d;d=a.__shady_native_firstChild;)b.__shady_native_insertBefore(d,void 0)}},className:{get:function(){return this.getAttribute("class")||""},set:function(a){this.setAttribute("class",a)}}}));z(Element.prototype,"setAttribute getAttribute hasAttribute removeAttribute focus blur".split(" "));z(Element.prototype,Za);z(HTMLElement.prototype,["focus","blur"]);window.HTMLTemplateElement&& z(window.HTMLTemplateElement.prototype,["innerHTML"]);Qa?z(DocumentFragment.prototype,Ya):Ua(DocumentFragment.prototype,a);z(DocumentFragment.prototype,Za);Qa?(z(Document.prototype,Ya),z(Document.prototype,["activeElement"])):Ua(Document.prototype,a);z(Document.prototype,["importNode","getElementById"]);z(Document.prototype,Za)};var ab=y({get childNodes(){return this.__shady_childNodes},get firstChild(){return this.__shady_firstChild},get lastChild(){return this.__shady_lastChild},get childElementCount(){return this.__shady_childElementCount},get children(){return this.__shady_children},get firstElementChild(){return this.__shady_firstElementChild},get lastElementChild(){return this.__shady_lastElementChild},get shadowRoot(){return this.__shady_shadowRoot}}),bb=y({get textContent(){return this.__shady_textContent},set textContent(a){this.__shady_textContent= a},get innerHTML(){return this.__shady_innerHTML},set innerHTML(a){return this.__shady_innerHTML=a}}),cb=y({get parentElement(){return this.__shady_parentElement},get parentNode(){return this.__shady_parentNode},get nextSibling(){return this.__shady_nextSibling},get previousSibling(){return this.__shady_previousSibling},get nextElementSibling(){return this.__shady_nextElementSibling},get previousElementSibling(){return this.__shady_previousElementSibling},get className(){return this.__shady_className}, set className(a){return this.__shady_className=a}}),db;for(db in ab)ab[db].enumerable=!1;for(var eb in bb)bb[eb].enumerable=!1;for(var fb in cb)cb[fb].enumerable=!1;var gb=t.j||t.v,hb=gb?function(){}:function(a){var b=q(a);b.ia||(b.ia=!0,x(a,cb))},ib=gb?function(){}:function(a){var b=q(a);b.ha||(b.ha=!0,x(a,ab),window.customElements&&!t.v||x(a,bb))};var jb="__eventWrappers"+Date.now(),kb=function(){var a=Object.getOwnPropertyDescriptor(Event.prototype,"composed");return a?function(b){return a.get.call(b)}:null}(),lb=function(){function a(){}var b=!1,c={get capture(){b=!0}};window.addEventListener("test",a,c);window.removeEventListener("test",a,c);return b}();function mb(a){if(a&&"object"===typeof a){var b=!!a.capture;var c=!!a.once;var d=!!a.passive;var e=a.A}else b=!!a,d=c=!1;return{ca:e,capture:b,once:c,passive:d,aa:lb?a:b}} var nb={blur:!0,focus:!0,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},ob={DOMAttrModified:!0,DOMAttributeNameChanged:!0,DOMCharacterDataModified:!0,DOMElementNameChanged:!0,DOMNodeInserted:!0,DOMNodeInsertedIntoDocument:!0,DOMNodeRemoved:!0,DOMNodeRemovedFromDocument:!0,DOMSubtreeModified:!0};function pb(a){return a instanceof Node?a.__shady_getRootNode():a} function qb(a,b){var c=[],d=a;for(a=pb(a);d;)c.push(d),d.__shady_assignedSlot?d=d.__shady_assignedSlot:d.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&d.host&&(b||d!==a)?d=d.host:d=d.__shady_parentNode;c[c.length-1]===document&&c.push(window);return c}function rb(a){a.__composedPath||(a.__composedPath=qb(a.target,!0));return a.__composedPath}function sb(a,b){if(!v)return a;a=qb(a,!0);for(var c=0,d,e=void 0,f,g=void 0;c<b.length;c++)if(d=b[c],f=pb(d),f!==e&&(g=a.indexOf(f),e=f),!v(f)||-1<g)return d} function tb(a){function b(b,d){b=new a(b,d);b.__composed=d&&!!d.composed;return b}b.__proto__=a;b.prototype=a.prototype;return b}var ub={focus:!0,blur:!0};function vb(a){return a.__target!==a.target||a.__relatedTarget!==a.relatedTarget}function wb(a,b,c){if(c=b.__handlers&&b.__handlers[a.type]&&b.__handlers[a.type][c])for(var d=0,e;(e=c[d])&&(!vb(a)||a.target!==a.relatedTarget)&&(e.call(b,a),!a.__immediatePropagationStopped);d++);} function xb(a){var b=a.composedPath();Object.defineProperty(a,"currentTarget",{get:function(){return d},configurable:!0});for(var c=b.length-1;0<=c;c--){var d=b[c];wb(a,d,"capture");if(a.S)return}Object.defineProperty(a,"eventPhase",{get:function(){return Event.AT_TARGET}});var e;for(c=0;c<b.length;c++){d=b[c];var f=r(d);f=f&&f.root;if(0===c||f&&f===e)if(wb(a,d,"bubble"),d!==window&&(e=d.__shady_getRootNode()),a.S)break}} function yb(a,b,c,d,e,f){for(var g=0;g<a.length;g++){var h=a[g],k=h.type,l=h.capture,m=h.once,B=h.passive;if(b===h.node&&c===k&&d===l&&e===m&&f===B)return g}return-1} function zb(a,b,c){var d=mb(c),e=d.capture,f=d.once,g=d.passive,h=d.ca;d=d.aa;if(b){var k=typeof b;if("function"===k||"object"===k)if("object"!==k||b.handleEvent&&"function"===typeof b.handleEvent){if(ob[a])return this.__shady_native_addEventListener(a,b,d);var l=h||this;if(h=b[jb]){if(-1<yb(h,l,a,e,f,g))return}else b[jb]=[];h=function(d){f&&this.__shady_removeEventListener(a,b,c);d.__target||Ab(d);if(l!==this){var e=Object.getOwnPropertyDescriptor(d,"currentTarget");Object.defineProperty(d,"currentTarget", {get:function(){return l},configurable:!0})}d.__previousCurrentTarget=d.currentTarget;if(!v(l)&&"slot"!==l.localName||-1!=d.composedPath().indexOf(l))if(d.composed||-1<d.composedPath().indexOf(l))if(vb(d)&&d.target===d.relatedTarget)d.eventPhase===Event.BUBBLING_PHASE&&d.stopImmediatePropagation();else if(d.eventPhase===Event.CAPTURING_PHASE||d.bubbles||d.target===l||l instanceof Window){var g="function"===k?b.call(l,d):b.handleEvent&&b.handleEvent(d);l!==this&&(e?(Object.defineProperty(d,"currentTarget", e),e=null):delete d.currentTarget);return g}};b[jb].push({node:l,type:a,capture:e,once:f,passive:g,Fa:h});ub[a]?(this.__handlers=this.__handlers||{},this.__handlers[a]=this.__handlers[a]||{capture:[],bubble:[]},this.__handlers[a][e?"capture":"bubble"].push(h)):this.__shady_native_addEventListener(a,h,d)}}} function Bb(a,b,c){if(b){var d=mb(c);c=d.capture;var e=d.once,f=d.passive,g=d.ca;d=d.aa;if(ob[a])return this.__shady_native_removeEventListener(a,b,d);var h=g||this;g=void 0;var k=null;try{k=b[jb]}catch(l){}k&&(e=yb(k,h,a,c,e,f),-1<e&&(g=k.splice(e,1)[0].Fa,k.length||(b[jb]=void 0)));this.__shady_native_removeEventListener(a,g||b,d);g&&ub[a]&&this.__handlers&&this.__handlers[a]&&(a=this.__handlers[a][c?"capture":"bubble"],b=a.indexOf(g),-1<b&&a.splice(b,1))}} function Cb(){for(var a in ub)window.__shady_native_addEventListener(a,function(a){a.__target||(Ab(a),xb(a))},!0)} var Db=y({get composed(){void 0===this.__composed&&(kb?this.__composed="focusin"===this.type||"focusout"===this.type||kb(this):!1!==this.isTrusted&&(this.__composed=nb[this.type]));return this.__composed||!1},composedPath:function(){this.__composedPath||(this.__composedPath=qb(this.__target,this.composed));return this.__composedPath},get target(){return sb(this.currentTarget||this.__previousCurrentTarget,this.composedPath())},get relatedTarget(){if(!this.__relatedTarget)return null;this.__relatedTargetComposedPath|| (this.__relatedTargetComposedPath=qb(this.__relatedTarget,!0));return sb(this.currentTarget||this.__previousCurrentTarget,this.__relatedTargetComposedPath)},stopPropagation:function(){Event.prototype.stopPropagation.call(this);this.S=!0},stopImmediatePropagation:function(){Event.prototype.stopImmediatePropagation.call(this);this.S=this.__immediatePropagationStopped=!0}}); function Ab(a){a.__target=a.target;a.__relatedTarget=a.relatedTarget;if(t.j){var b=Object.getPrototypeOf(a);if(!Object.hasOwnProperty(b,"__shady_patchedProto")){var c=Object.create(b);c.__shady_sourceProto=b;x(c,Db);b.__shady_patchedProto=c}a.__proto__=b.__shady_patchedProto}else x(a,Db)}var Eb=tb(Event),Fb=tb(CustomEvent),Gb=tb(MouseEvent); function Hb(){if(!kb&&Object.getOwnPropertyDescriptor(Event.prototype,"isTrusted")){var a=function(){var a=new MouseEvent("click",{bubbles:!0,cancelable:!0,composed:!0});this.__shady_dispatchEvent(a)};Element.prototype.click?Element.prototype.click=a:HTMLElement.prototype.click&&(HTMLElement.prototype.click=a)}}var Ib=Object.getOwnPropertyNames(Document.prototype).filter(function(a){return"on"===a.substring(0,2)});function Jb(a,b){return{index:a,H:[],K:b}} function Kb(a,b,c,d){var e=0,f=0,g=0,h=0,k=Math.min(b-e,d-f);if(0==e&&0==f)a:{for(g=0;g<k;g++)if(a[g]!==c[g])break a;g=k}if(b==a.length&&d==c.length){h=a.length;for(var l=c.length,m=0;m<k-g&&Lb(a[--h],c[--l]);)m++;h=m}e+=g;f+=g;b-=h;d-=h;if(0==b-e&&0==d-f)return[];if(e==b){for(b=Jb(e,0);f<d;)b.H.push(c[f++]);return[b]}if(f==d)return[Jb(e,b-e)];k=e;g=f;d=d-g+1;h=b-k+1;b=Array(d);for(l=0;l<d;l++)b[l]=Array(h),b[l][0]=l;for(l=0;l<h;l++)b[0][l]=l;for(l=1;l<d;l++)for(m=1;m<h;m++)if(a[k+m-1]===c[g+l-1])b[l][m]= b[l-1][m-1];else{var B=b[l-1][m]+1,ka=b[l][m-1]+1;b[l][m]=B<ka?B:ka}k=b.length-1;g=b[0].length-1;d=b[k][g];for(a=[];0<k||0<g;)0==k?(a.push(2),g--):0==g?(a.push(3),k--):(h=b[k-1][g-1],l=b[k-1][g],m=b[k][g-1],B=l<m?l<h?l:h:m<h?m:h,B==h?(h==d?a.push(0):(a.push(1),d=h),k--,g--):B==l?(a.push(3),k--,d=l):(a.push(2),g--,d=m));a.reverse();b=void 0;k=[];for(g=0;g<a.length;g++)switch(a[g]){case 0:b&&(k.push(b),b=void 0);e++;f++;break;case 1:b||(b=Jb(e,0));b.K++;e++;b.H.push(c[f]);f++;break;case 2:b||(b=Jb(e, 0));b.K++;e++;break;case 3:b||(b=Jb(e,0)),b.H.push(c[f]),f++}b&&k.push(b);return k}function Lb(a,b){return a===b};function Mb(a,b,c,d){hb(a);d=d||null;var e=q(a),f=d?q(d):null;e.previousSibling=d?f.previousSibling:b.__shady_lastChild;if(f=r(e.previousSibling))f.nextSibling=a;if(f=r(e.nextSibling=d))f.previousSibling=a;e.parentNode=b;d?d===c.firstChild&&(c.firstChild=a):(c.lastChild=a,c.firstChild||(c.firstChild=a));c.childNodes=null} function Nb(a,b,c){ib(b);var d=q(b);void 0!==d.firstChild&&(d.childNodes=null);if(a.nodeType===Node.DOCUMENT_FRAGMENT_NODE)for(a=a.__shady_native_firstChild;a;a=a.__shady_native_nextSibling)Mb(a,b,d,c);else Mb(a,b,d,c)} function Ob(a,b){var c=q(a);b=q(b);a===b.firstChild&&(b.firstChild=c.nextSibling);a===b.lastChild&&(b.lastChild=c.previousSibling);a=c.previousSibling;var d=c.nextSibling;a&&(q(a).nextSibling=d);d&&(q(d).previousSibling=a);c.parentNode=c.previousSibling=c.nextSibling=void 0;void 0!==b.childNodes&&(b.childNodes=null)} function Pb(a,b){var c=q(a);if(b||void 0===c.firstChild){c.childNodes=null;var d=c.firstChild=a.__shady_native_firstChild;c.lastChild=a.__shady_native_lastChild;ib(a);c=d;for(d=void 0;c;c=c.__shady_native_nextSibling){var e=q(c);e.parentNode=b||a;e.nextSibling=c.__shady_native_nextSibling;e.previousSibling=d||null;d=c;hb(c)}}};var Qb=null;function D(){Qb||(Qb=window.ShadyCSS&&window.ShadyCSS.ScopingShim);return Qb||null}function Rb(a,b){var c=D();c&&c.unscopeNode(a,b)}function Sb(a,b){var c=D();if(!c)return!0;if(a.nodeType===Node.DOCUMENT_FRAGMENT_NODE){c=!0;for(a=a.__shady_firstChild;a;a=a.__shady_nextSibling)c=c&&Sb(a,b);return c}return a.nodeType!==Node.ELEMENT_NODE?!0:c.currentScopeForNode(a)===b}function Tb(a){if(a.nodeType!==Node.ELEMENT_NODE)return"";var b=D();return b?b.currentScopeForNode(a):""} function Ub(a,b){if(a)for(a.nodeType===Node.ELEMENT_NODE&&b(a),a=a.__shady_firstChild;a;a=a.__shady_nextSibling)a.nodeType===Node.ELEMENT_NODE&&Ub(a,b)};var Vb=window.document,Wb=t.ba,Xb=Object.getOwnPropertyDescriptor(Node.prototype,"isConnected"),Yb=Xb&&Xb.get;function Zb(a){for(var b;b=a.__shady_firstChild;)a.__shady_removeChild(b)}function $b(a){var b=r(a);if(b&&void 0!==b.N)for(b=a.__shady_firstChild;b;b=b.__shady_nextSibling)$b(b);if(a=r(a))a.N=void 0}function ac(a){var b=a;a&&"slot"===a.localName&&(b=(b=(b=r(a))&&b.D)&&b.length?b[0]:ac(a.__shady_nextSibling));return b} function bc(a,b,c){if(a=(a=r(a))&&a.G)b&&a.addedNodes.push(b),c&&a.removedNodes.push(c),Fa(a)} var ec=y({get parentNode(){var a=r(this);a=a&&a.parentNode;return void 0!==a?a:this.__shady_native_parentNode},get firstChild(){var a=r(this);a=a&&a.firstChild;return void 0!==a?a:this.__shady_native_firstChild},get lastChild(){var a=r(this);a=a&&a.lastChild;return void 0!==a?a:this.__shady_native_lastChild},get nextSibling(){var a=r(this);a=a&&a.nextSibling;return void 0!==a?a:this.__shady_native_nextSibling},get previousSibling(){var a=r(this);a=a&&a.previousSibling;return void 0!==a?a:this.__shady_native_previousSibling}, get childNodes(){if(u(this)){var a=r(this);if(!a.childNodes){a.childNodes=[];for(var b=this.__shady_firstChild;b;b=b.__shady_nextSibling)a.childNodes.push(b)}var c=a.childNodes}else c=this.__shady_native_childNodes;c.item=function(a){return c[a]};return c},get parentElement(){var a=r(this);(a=a&&a.parentNode)&&a.nodeType!==Node.ELEMENT_NODE&&(a=null);return void 0!==a?a:this.__shady_native_parentElement},get isConnected(){if(Yb&&Yb.call(this))return!0;if(this.nodeType==Node.DOCUMENT_FRAGMENT_NODE)return!1; var a=this.ownerDocument;if(va){if(a.__shady_native_contains(this))return!0}else if(a.documentElement&&a.documentElement.__shady_native_contains(this))return!0;for(a=this;a&&!(a instanceof Document);)a=a.__shady_parentNode||(v(a)?a.host:void 0);return!!(a&&a instanceof Document)},get textContent(){if(u(this)){for(var a=[],b=this.__shady_firstChild;b;b=b.__shady_nextSibling)b.nodeType!==Node.COMMENT_NODE&&a.push(b.__shady_textContent);return a.join("")}return this.__shady_native_textContent},set textContent(a){if("undefined"=== typeof a||null===a)a="";switch(this.nodeType){case Node.ELEMENT_NODE:case Node.DOCUMENT_FRAGMENT_NODE:if(!u(this)&&t.j){var b=this.__shady_firstChild;(b!=this.__shady_lastChild||b&&b.nodeType!=Node.TEXT_NODE)&&Zb(this);this.__shady_native_textContent=a}else Zb(this),(0<a.length||this.nodeType===Node.ELEMENT_NODE)&&this.__shady_insertBefore(document.createTextNode(a));break;default:this.nodeValue=a}},insertBefore:function(a,b){if(this.ownerDocument!==Vb&&a.ownerDocument!==Vb)return this.__shady_native_insertBefore(a, b),a;if(a===this)throw Error("Failed to execute 'appendChild' on 'Node': The new child element contains the parent.");if(b){var c=r(b);c=c&&c.parentNode;if(void 0!==c&&c!==this||void 0===c&&b.__shady_native_parentNode!==this)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(b===a)return a;var d=[],e=(c=E(this))?c.host.localName:Tb(this),f=a.__shady_parentNode;if(f){var g=Tb(a);var h=!!c||!E(a)||Wb&&void 0!== this.__noInsertionPoint;f.__shady_removeChild(a,h)}f=!0;var k=(!Wb||void 0===a.__noInsertionPoint&&void 0===this.__noInsertionPoint)&&!Sb(a,e),l=c&&!a.__noInsertionPoint&&(!Wb||a.nodeType===Node.DOCUMENT_FRAGMENT_NODE);if(l||k)k&&(g=g||Tb(a)),Ub(a,function(a){l&&"slot"===a.localName&&d.push(a);if(k){var b=g;D()&&(b&&Rb(a,b),(b=D())&&b.scopeNode(a,e))}});d.length&&(cc(c),c.c.push.apply(c.c,d instanceof Array?d:ia(ha(d))),F(c));u(this)&&(Nb(a,this,b),c=r(this),oa(this)?(F(c.root),f=!1):c.root&&(f=!1)); f?(c=v(this)?this.host:this,b?(b=ac(b),c.__shady_native_insertBefore(a,b)):c.__shady_native_appendChild(a)):a.ownerDocument!==this.ownerDocument&&this.ownerDocument.adoptNode(a);bc(this,a);return a},appendChild:function(a){if(this!=a||!v(a))return this.__shady_insertBefore(a)},removeChild:function(a,b){b=void 0===b?!1:b;if(this.ownerDocument!==Vb)return this.__shady_native_removeChild(a);if(a.__shady_parentNode!==this)throw Error("The node to be removed is not a child of this node: "+a);var c=E(a), d=c&&dc(c,a),e=r(this);if(u(this)&&(Ob(a,this),oa(this))){F(e.root);var f=!0}if(D()&&!b&&c&&a.nodeType!==Node.TEXT_NODE){var g=Tb(a);Ub(a,function(a){Rb(a,g)})}$b(a);c&&((b=this&&"slot"===this.localName)&&(f=!0),(d||b)&&F(c));f||(f=v(this)?this.host:this,(!e.root&&"slot"!==a.localName||f===a.__shady_native_parentNode)&&f.__shady_native_removeChild(a));bc(this,null,a);return a},replaceChild:function(a,b){this.__shady_insertBefore(a,b);this.__shady_removeChild(b);return a},cloneNode:function(a){if("template"== this.localName)return this.__shady_native_cloneNode(a);var b=this.__shady_native_cloneNode(!1);if(a&&b.nodeType!==Node.ATTRIBUTE_NODE){a=this.__shady_firstChild;for(var c;a;a=a.__shady_nextSibling)c=a.__shady_cloneNode(!0),b.__shady_appendChild(c)}return b},getRootNode:function(a){if(this&&this.nodeType){var b=q(this),c=b.N;void 0===c&&(v(this)?(c=this,b.N=c):(c=(c=this.__shady_parentNode)?c.__shady_getRootNode(a):this,document.documentElement.__shady_native_contains(this)&&(b.N=c)));return c}},contains:function(a){return wa(this, a)}});function fc(a,b,c){var d=[];gc(a,b,c,d);return d}function gc(a,b,c,d){for(a=a.__shady_firstChild;a;a=a.__shady_nextSibling){var e;if(e=a.nodeType===Node.ELEMENT_NODE){e=a;var f=b,g=c,h=d,k=f(e);k&&h.push(e);g&&g(k)?e=k:(gc(e,f,g,h),e=void 0)}if(e)break}} var G=y({get firstElementChild(){var a=r(this);if(a&&void 0!==a.firstChild){for(a=this.__shady_firstChild;a&&a.nodeType!==Node.ELEMENT_NODE;)a=a.__shady_nextSibling;return a}return this.__shady_native_firstElementChild},get lastElementChild(){var a=r(this);if(a&&void 0!==a.lastChild){for(a=this.__shady_lastChild;a&&a.nodeType!==Node.ELEMENT_NODE;)a=a.__shady_previousSibling;return a}return this.__shady_native_lastElementChild},get children(){return u(this)?xa(Array.prototype.filter.call(za(this), function(a){return a.nodeType===Node.ELEMENT_NODE})):this.__shady_native_children},get childElementCount(){var a=this.__shady_children;return a?a.length:0}}),hc=y({querySelector:function(a){return fc(this,function(b){return qa.call(b,a)},function(a){return!!a})[0]||null},querySelectorAll:function(a,b){if(b){b=Array.prototype.slice.call(this.__shady_native_querySelectorAll(a));var c=this.__shady_getRootNode();return b.filter(function(a){return a.__shady_getRootNode()==c})}return fc(this,function(b){return qa.call(b, a)})}}),ic=t.ba&&!t.v?Object.assign({},G):G;Object.assign(G,hc);var jc=y({getElementById:function(a){return""===a?null:fc(this,function(b){return b.id==a},function(a){return!!a})[0]||null}});var kc=y({get activeElement(){var a=t.j?document.__shady_native_activeElement:document.activeElement;if(!a||!a.nodeType)return null;var b=!!v(this);if(!(this===document||b&&this.host!==a&&this.host.__shady_native_contains(a)))return null;for(b=E(a);b&&b!==this;)a=b.host,b=E(a);return this===document?b?null:a:b===this?a:null}});var lc=document.implementation.createHTMLDocument("inert"),mc=y({get innerHTML(){return u(this)?Pa("template"===this.localName?this.content:this,za):this.__shady_native_innerHTML},set innerHTML(a){if("template"===this.localName)this.__shady_native_innerHTML=a;else{Zb(this);var b=this.localName||"div";b=this.namespaceURI&&this.namespaceURI!==lc.namespaceURI?lc.createElementNS(this.namespaceURI,b):lc.createElement(b);for(t.j?b.__shady_native_innerHTML=a:b.innerHTML=a;a=b.__shady_firstChild;)this.__shady_insertBefore(a)}}});var nc=y({addEventListener:function(a,b,c){"object"!==typeof c&&(c={capture:!!c});c.A=c.A||this;this.host.__shady_addEventListener(a,b,c)},removeEventListener:function(a,b,c){"object"!==typeof c&&(c={capture:!!c});c.A=c.A||this;this.host.__shady_removeEventListener(a,b,c)}});function oc(a,b){x(a,nc,b);x(a,kc,b);x(a,mc,b);x(a,G,b);t.v&&!b?(x(a,ec,b),x(a,jc,b)):t.j||(x(a,cb),x(a,ab),x(a,bb))};var pc={},H=t.deferConnectionCallbacks&&"loading"===document.readyState,qc;function rc(a){var b=[];do b.unshift(a);while(a=a.__shady_parentNode);return b}function sc(a,b,c){if(a!==pc)throw new TypeError("Illegal constructor");this.a=null;tc(this,b,c)} function tc(a,b,c){a.la="ShadyRoot";a.host=b;a.mode=c&&c.mode;Pb(a.host);b=q(a.host);b.root=a;b.xa="closed"!==a.mode?a:null;b=q(a);b.firstChild=b.lastChild=b.parentNode=b.nextSibling=b.previousSibling=null;if(t.preferPerformance)for(;b=a.host.__shady_native_firstChild;)a.host.__shady_native_removeChild(b);else F(a)}function F(a){a.C||(a.C=!0,Ca(function(){return uc(a)}))} function uc(a){var b;if(b=a.C){for(var c;a;)a:{a.C&&(c=a),b=a;a=b.host.__shady_getRootNode();if(v(a)&&(b=r(b.host))&&0<b.J)break a;a=void 0}b=c}(c=b)&&c._renderSelf()} sc.prototype._renderSelf=function(){var a=H;H=!0;this.C=!1;if(this.a){vc(this);for(var b=0,c;b<this.a.length;b++){c=this.a[b];var d=r(c),e=d.assignedNodes;d.assignedNodes=[];d.D=[];if(d.Z=e)for(d=0;d<e.length;d++){var f=r(e[d]);f.T=f.assignedSlot;f.assignedSlot===c&&(f.assignedSlot=null)}}for(b=this.host.__shady_firstChild;b;b=b.__shady_nextSibling)wc(this,b);for(b=0;b<this.a.length;b++){c=this.a[b];e=r(c);if(!e.assignedNodes.length)for(d=c.__shady_firstChild;d;d=d.__shady_nextSibling)wc(this,d,c); (d=(d=r(c.__shady_parentNode))&&d.root)&&(pa(d)||d.C)&&d._renderSelf();xc(this,e.D,e.assignedNodes);if(d=e.Z){for(f=0;f<d.length;f++)r(d[f]).T=null;e.Z=null;d.length>e.assignedNodes.length&&(e.U=!0)}e.U&&(e.U=!1,yc(this,c))}c=this.a;b=[];for(e=0;e<c.length;e++)d=c[e].__shady_parentNode,(f=r(d))&&f.root||!(0>b.indexOf(d))||b.push(d);for(c=0;c<b.length;c++){f=b[c];e=f===this?this.host:f;d=[];for(f=f.__shady_firstChild;f;f=f.__shady_nextSibling)if("slot"==f.localName)for(var g=r(f).D,h=0;h<g.length;h++)d.push(g[h]); else d.push(f);f=ya(e);g=Kb(d,d.length,f,f.length);for(var k=h=0,l=void 0;h<g.length&&(l=g[h]);h++){for(var m=0,B=void 0;m<l.H.length&&(B=l.H[m]);m++)B.__shady_native_parentNode===e&&e.__shady_native_removeChild(B),f.splice(l.index+k,1);k-=l.K}k=0;for(l=void 0;k<g.length&&(l=g[k]);k++)for(h=f[l.index],m=l.index;m<l.index+l.K;m++)B=d[m],e.__shady_native_insertBefore(B,h),f.splice(m,0,B)}}if(!t.preferPerformance&&!this.Y)for(b=this.host.__shady_firstChild;b;b=b.__shady_nextSibling)c=r(b),b.__shady_native_parentNode!== this.host||"slot"!==b.localName&&c.assignedSlot||this.host.__shady_native_removeChild(b);this.Y=!0;H=a;qc&&qc()};function wc(a,b,c){var d=q(b),e=d.T;d.T=null;c||(c=(a=a.b[b.__shady_slot||"__catchall"])&&a[0]);c?(q(c).assignedNodes.push(b),d.assignedSlot=c):d.assignedSlot=void 0;e!==d.assignedSlot&&d.assignedSlot&&(q(d.assignedSlot).U=!0)}function xc(a,b,c){for(var d=0,e=void 0;d<c.length&&(e=c[d]);d++)if("slot"==e.localName){var f=r(e).assignedNodes;f&&f.length&&xc(a,b,f)}else b.push(c[d])} function yc(a,b){b.__shady_native_dispatchEvent(new Event("slotchange"));b=r(b);b.assignedSlot&&yc(a,b.assignedSlot)}function cc(a){a.c=a.c||[];a.a=a.a||[];a.b=a.b||{}}function vc(a){if(a.c&&a.c.length){for(var b=a.c,c,d=0;d<b.length;d++){var e=b[d];Pb(e);var f=e.__shady_parentNode;Pb(f);f=r(f);f.J=(f.J||0)+1;f=zc(e);a.b[f]?(c=c||{},c[f]=!0,a.b[f].push(e)):a.b[f]=[e];a.a.push(e)}if(c)for(var g in c)a.b[g]=Ac(a.b[g]);a.c=[]}} function zc(a){var b=a.name||a.getAttribute("name")||"__catchall";return a.ja=b}function Ac(a){return a.sort(function(a,c){a=rc(a);for(var b=rc(c),e=0;e<a.length;e++){c=a[e];var f=b[e];if(c!==f)return a=za(c.__shady_parentNode),a.indexOf(c)-a.indexOf(f)}})} function dc(a,b){if(a.a){vc(a);var c=a.b,d;for(d in c)for(var e=c[d],f=0;f<e.length;f++){var g=e[f];if(wa(b,g)){e.splice(f,1);var h=a.a.indexOf(g);0<=h&&(a.a.splice(h,1),(h=r(g.__shady_parentNode))&&h.J&&h.J--);f--;g=r(g);if(h=g.D)for(var k=0;k<h.length;k++){var l=h[k],m=l.__shady_native_parentNode;m&&m.__shady_native_removeChild(l)}g.D=[];g.assignedNodes=[];h=!0}}return h}}function pa(a){vc(a);return!(!a.a||!a.a.length)} (function(a){a.__proto__=DocumentFragment.prototype;oc(a,"__shady_");oc(a);Object.defineProperties(a,{nodeType:{value:Node.DOCUMENT_FRAGMENT_NODE,configurable:!0},nodeName:{value:"#document-fragment",configurable:!0},nodeValue:{value:null,configurable:!0}});["localName","namespaceURI","prefix"].forEach(function(b){Object.defineProperty(a,b,{value:void 0,configurable:!0})});["ownerDocument","baseURI","isConnected"].forEach(function(b){Object.defineProperty(a,b,{get:function(){return this.host[b]}, configurable:!0})})})(sc.prototype); if(window.customElements&&t.V&&!t.preferPerformance){var Bc=new Map;qc=function(){var a=[];Bc.forEach(function(b,c){a.push([c,b])});Bc.clear();for(var b=0;b<a.length;b++){var c=a[b][0];a[b][1]?c.__shadydom_connectedCallback():c.__shadydom_disconnectedCallback()}};H&&document.addEventListener("readystatechange",function(){H=!1;qc()},{once:!0});var Cc=function(a,b,c){var d=0,e="__isConnected"+d++;if(b||c)a.prototype.connectedCallback=a.prototype.__shadydom_connectedCallback=function(){H?Bc.set(this, !0):this[e]||(this[e]=!0,b&&b.call(this))},a.prototype.disconnectedCallback=a.prototype.__shadydom_disconnectedCallback=function(){H?this.isConnected||Bc.set(this,!1):this[e]&&(this[e]=!1,c&&c.call(this))};return a},Dc=window.customElements.define,define=function(a,b){var c=b.prototype.connectedCallback,d=b.prototype.disconnectedCallback;Dc.call(window.customElements,a,Cc(b,c,d));b.prototype.connectedCallback=c;b.prototype.disconnectedCallback=d};window.customElements.define=define;Object.defineProperty(window.CustomElementRegistry.prototype, "define",{value:define,configurable:!0})}function E(a){a=a.__shady_getRootNode();if(v(a))return a};function I(a){this.node=a}n=I.prototype;n.addEventListener=function(a,b,c){return this.node.__shady_addEventListener(a,b,c)};n.removeEventListener=function(a,b,c){return this.node.__shady_removeEventListener(a,b,c)};n.appendChild=function(a){return this.node.__shady_appendChild(a)};n.insertBefore=function(a,b){return this.node.__shady_insertBefore(a,b)};n.removeChild=function(a){return this.node.__shady_removeChild(a)};n.replaceChild=function(a,b){return this.node.__shady_replaceChild(a,b)}; n.cloneNode=function(a){return this.node.__shady_cloneNode(a)};n.getRootNode=function(a){return this.node.__shady_getRootNode(a)};n.contains=function(a){return this.node.__shady_contains(a)};n.dispatchEvent=function(a){return this.node.__shady_dispatchEvent(a)};n.setAttribute=function(a,b){this.node.__shady_setAttribute(a,b)};n.getAttribute=function(a){return this.node.__shady_native_getAttribute(a)};n.removeAttribute=function(a){this.node.__shady_removeAttribute(a)};n.attachShadow=function(a){return this.node.__shady_attachShadow(a)}; n.focus=function(){this.node.__shady_native_focus()};n.blur=function(){this.node.__shady_blur()};n.importNode=function(a,b){if(this.node.nodeType===Node.DOCUMENT_NODE)return this.node.__shady_importNode(a,b)};n.getElementById=function(a){if(this.node.nodeType===Node.DOCUMENT_NODE)return this.node.__shady_getElementById(a)};n.querySelector=function(a){return this.node.__shady_querySelector(a)};n.querySelectorAll=function(a,b){return this.node.__shady_querySelectorAll(a,b)}; n.assignedNodes=function(a){if("slot"===this.node.localName)return this.node.__shady_assignedNodes(a)}; p.Object.defineProperties(I.prototype,{activeElement:{configurable:!0,enumerable:!0,get:function(){if(v(this.node)||this.node.nodeType===Node.DOCUMENT_NODE)return this.node.__shady_activeElement}},_activeElement:{configurable:!0,enumerable:!0,get:function(){return this.activeElement}},host:{configurable:!0,enumerable:!0,get:function(){if(v(this.node))return this.node.host}},parentNode:{configurable:!0,enumerable:!0,get:function(){return this.node.__shady_parentNode}},firstChild:{configurable:!0,enumerable:!0, get:function(){return this.node.__shady_firstChild}},lastChild:{configurable:!0,enumerable:!0,get:function(){return this.node.__shady_lastChild}},nextSibling:{configurable:!0,enumerable:!0,get:function(){return this.node.__shady_nextSibling}},previousSibling:{configurable:!0,enumerable:!0,get:function(){return this.node.__shady_previousSibling}},childNodes:{configurable:!0,enumerable:!0,get:function(){return this.node.__shady_childNodes}},parentElement:{configurable:!0,enumerable:!0,get:function(){return this.node.__shady_parentElement}}, firstElementChild:{configurable:!0,enumerable:!0,get:function(){return this.node.__shady_firstElementChild}},lastElementChild:{configurable:!0,enumerable:!0,get:function(){return this.node.__shady_lastElementChild}},nextElementSibling:{configurable:!0,enumerable:!0,get:function(){return this.node.__shady_nextElementSibling}},previousElementSibling:{configurable:!0,enumerable:!0,get:function(){return this.node.__shady_previousElementSibling}},children:{configurable:!0,enumerable:!0,get:function(){return this.node.__shady_children}}, childElementCount:{configurable:!0,enumerable:!0,get:function(){return this.node.__shady_childElementCount}},shadowRoot:{configurable:!0,enumerable:!0,get:function(){return this.node.__shady_shadowRoot}},assignedSlot:{configurable:!0,enumerable:!0,get:function(){return this.node.__shady_assignedSlot}},isConnected:{configurable:!0,enumerable:!0,get:function(){return this.node.__shady_isConnected}},innerHTML:{configurable:!0,enumerable:!0,get:function(){return this.node.__shady_innerHTML},set:function(a){this.node.__shady_innerHTML= a}},textContent:{configurable:!0,enumerable:!0,get:function(){return this.node.__shady_textContent},set:function(a){this.node.__shady_textContent=a}},slot:{configurable:!0,enumerable:!0,get:function(){return this.node.__shady_slot},set:function(a){this.node.__shady_slot=a}},className:{configurable:!0,enumerable:!0,get:function(){return this.node.__shady_className},set:function(a){return this.node.__shady_className=a}}}); Ib.forEach(function(a){Object.defineProperty(I.prototype,a,{get:function(){return this.node["__shady_"+a]},set:function(b){this.node["__shady_"+a]=b},configurable:!0})});var Ec=new WeakMap;function Fc(a){if(v(a)||a instanceof I)return a;var b=Ec.get(a);b||(b=new I(a),Ec.set(a,b));return b};var Gc=y({dispatchEvent:function(a){Da();return this.__shady_native_dispatchEvent(a)},addEventListener:zb,removeEventListener:Bb});var Hc=y({get assignedSlot(){var a=this.__shady_parentNode;(a=a&&a.__shady_shadowRoot)&&uc(a);return(a=r(this))&&a.assignedSlot||null}});var Ic=window.document;function Jc(a,b){if("slot"===b)a=a.__shady_parentNode,oa(a)&&F(r(a).root);else if("slot"===a.localName&&"name"===b&&(b=E(a))){if(b.a){vc(b);var c=a.ja,d=zc(a);if(d!==c){c=b.b[c];var e=c.indexOf(a);0<=e&&c.splice(e,1);c=b.b[d]||(b.b[d]=[]);c.push(a);1<c.length&&(b.b[d]=Ac(c))}}F(b)}} var Kc=y({get previousElementSibling(){var a=r(this);if(a&&void 0!==a.previousSibling){for(a=this.__shady_previousSibling;a&&a.nodeType!==Node.ELEMENT_NODE;)a=a.__shady_previousSibling;return a}return this.__shady_native_previousElementSibling},get nextElementSibling(){var a=r(this);if(a&&void 0!==a.nextSibling){for(a=this.__shady_nextSibling;a&&a.nodeType!==Node.ELEMENT_NODE;)a=a.__shady_nextSibling;return a}return this.__shady_native_nextElementSibling},get slot(){return this.getAttribute("slot")}, set slot(a){this.__shady_setAttribute("slot",a)},get shadowRoot(){var a=r(this);return a&&a.xa||null},get className(){return this.getAttribute("class")||""},set className(a){this.__shady_setAttribute("class",a)},setAttribute:function(a,b){if(this.ownerDocument!==Ic)this.__shady_native_setAttribute(a,b);else{var c;(c=D())&&"class"===a?(c.setElementClass(this,b),c=!0):c=!1;c||(this.__shady_native_setAttribute(a,b),Jc(this,a))}},removeAttribute:function(a){this.__shady_native_removeAttribute(a);Jc(this, a)},attachShadow:function(a){if(!this)throw Error("Must provide a host.");if(!a)throw Error("Not enough arguments.");if(a.shadyUpgradeFragment&&!t.ga){var b=a.shadyUpgradeFragment;b.__proto__=ShadowRoot.prototype;tc(b,this,a);Pb(b,b);a=b.__noInsertionPoint?null:b.querySelectorAll("slot");b.__noInsertionPoint=void 0;if(a&&a.length){var c=b;cc(c);c.c.push.apply(c.c,a instanceof Array?a:ia(ha(a)));F(b)}b.host.__shady_native_appendChild(b)}else b=new sc(pc,this,a);return b}});var Lc=y({blur:function(){var a=r(this);(a=(a=a&&a.root)&&a.activeElement)?a.__shady_blur():this.__shady_native_blur()}});Ib.forEach(function(a){Lc[a]={set:function(b){var c=q(this),d=a.substring(2);c.w||(c.w={});c.w[a]&&this.removeEventListener(d,c.w[a]);this.__shady_addEventListener(d,b);c.w[a]=b},get:function(){var b=r(this);return b&&b.w&&b.w[a]},configurable:!0}});var Mc=y({assignedNodes:function(a){if("slot"===this.localName){var b=this.__shady_getRootNode();b&&v(b)&&uc(b);return(b=r(this))?(a&&a.flatten?b.D:b.assignedNodes)||[]:[]}},addEventListener:function(a,b,c){if("slot"!==this.localName||"slotchange"===a)zb.call(this,a,b,c);else{"object"!==typeof c&&(c={capture:!!c});var d=this.__shady_parentNode;if(!d)throw Error("ShadyDOM cannot attach event to slot unless it has a `parentNode`");c.A=this;d.__shady_addEventListener(a,b,c)}},removeEventListener:function(a, b,c){if("slot"!==this.localName||"slotchange"===a)Bb.call(this,a,b,c);else{"object"!==typeof c&&(c={capture:!!c});var d=this.__shady_parentNode;if(!d)throw Error("ShadyDOM cannot attach event to slot unless it has a `parentNode`");c.A=this;d.__shady_removeEventListener(a,b,c)}}});var Nc=window.document,Oc=y({importNode:function(a,b){if(a.ownerDocument!==Nc||"template"===a.localName)return this.__shady_native_importNode(a,b);var c=this.__shady_native_importNode(a,!1);if(b)for(a=a.__shady_firstChild;a;a=a.__shady_nextSibling)b=this.__shady_importNode(a,!0),c.__shady_appendChild(b);return c}});var Pc=y({addEventListener:zb.bind(window),removeEventListener:Bb.bind(window)});var J={};Object.getOwnPropertyDescriptor(HTMLElement.prototype,"parentElement")&&(J.parentElement=ec.parentElement);Object.getOwnPropertyDescriptor(HTMLElement.prototype,"contains")&&(J.contains=ec.contains);Object.getOwnPropertyDescriptor(HTMLElement.prototype,"children")&&(J.children=G.children);Object.getOwnPropertyDescriptor(HTMLElement.prototype,"innerHTML")&&(J.innerHTML=mc.innerHTML);Object.getOwnPropertyDescriptor(HTMLElement.prototype,"className")&&(J.className=Kc.className); var Qc={EventTarget:[Gc],Node:[ec,window.EventTarget?null:Gc],Text:[Hc],Element:[Kc,G,Hc,!t.j||"innerHTML"in Element.prototype?mc:null,window.HTMLSlotElement?null:Mc],HTMLElement:[Lc,J],HTMLSlotElement:[Mc],DocumentFragment:[ic,jc],Document:[Oc,ic,jc,kc],Window:[Pc]},Rc=t.j?null:["innerHTML","textContent"];function Sc(a){var b=a?null:Rc,c={},d;for(d in Qc)c.P=window[d]&&window[d].prototype,Qc[d].forEach(function(c){return function(d){return c.P&&d&&x(c.P,d,a,b)}}(c)),c={P:c.P}};if(t.V){var ShadyDOM={inUse:t.V,patch:function(a){ib(a);hb(a);return a},isShadyRoot:v,enqueue:Ca,flush:Da,flushInitial:function(a){!a.Y&&a.C&&uc(a)},settings:t,filterMutations:Ia,observeChildren:Ga,unobserveChildren:Ha,deferConnectionCallbacks:t.deferConnectionCallbacks,preferPerformance:t.preferPerformance,handlesDynamicScoping:!0,wrap:t.v?Fc:function(a){return a},Wrapper:I,composedPath:rb,noPatch:t.v,nativeMethods:Ra,nativeTree:Sa};window.ShadyDOM=ShadyDOM;$a();Sc("__shady_");Object.defineProperty(document, "_activeElement",kc.activeElement);x(Window.prototype,Pc,"__shady_");t.v||(Sc(),Hb());Cb();window.Event=Eb;window.CustomEvent=Fb;window.MouseEvent=Gb;window.ShadowRoot=sc};/* 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 */ var Tc=new Set("annotation-xml color-profile font-face font-face-src font-face-uri font-face-format font-face-name missing-glyph".split(" "));function Uc(a){var b=Tc.has(a);a=/^[a-z][.0-9_a-z]*-[\-.0-9_a-z]*$/.test(a);return!b&&a}function K(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 Vc(a,b){for(;b&&b!==a&&!b.nextSibling;)b=b.parentNode;return b&&b!==a?b.nextSibling:null} function L(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)L(d,b,c);d=Vc(a,e);continue}else if("template"===f){d=Vc(a,e);continue}if(e=e.__CE_shadowRoot)for(e=e.firstChild;e;e=e.nextSibling)L(e,b,c)}d=d.firstChild?d.firstChild:Vc(a,d)}}function M(a,b,c){a[b]=c};function Wc(){this.a=new Map;this.i=new Map;this.c=[];this.f=[];this.b=!1}function Xc(a,b,c){a.a.set(b,c);a.i.set(c.constructorFunction,c)}function Yc(a,b){a.b=!0;a.c.push(b)}function Zc(a,b){a.b=!0;a.f.push(b)}function $c(a,b){a.b&&L(b,function(b){return ad(a,b)})}function ad(a,b){if(a.b&&!b.__CE_patched){b.__CE_patched=!0;for(var c=0;c<a.c.length;c++)a.c[c](b);for(c=0;c<a.f.length;c++)a.f[c](b)}} function N(a,b){var c=[];L(b,function(a){return c.push(a)});for(b=0;b<c.length;b++){var d=c[b];1===d.__CE_state?a.connectedCallback(d):bd(a,d)}}function O(a,b){var c=[];L(b,function(a){return c.push(a)});for(b=0;b<c.length;b++){var d=c[b];1===d.__CE_state&&a.disconnectedCallback(d)}} function P(a,b,c){c=void 0===c?{}:c;var d=c.Ea||new Set,e=c.R||function(b){return bd(a,b)},f=[];L(b,function(b){if("link"===b.localName&&"import"===b.getAttribute("rel")){var c=b.import;c instanceof Node&&(c.__CE_isImportDocument=!0,c.__CE_hasRegistry=!0);c&&"complete"===c.readyState?c.__CE_documentLoadHandled=!0:b.addEventListener("load",function(){var c=b.import;if(!c.__CE_documentLoadHandled){c.__CE_documentLoadHandled=!0;var f=new Set(d);f.delete(c);P(a,c,{Ea:f,R:e})}})}else f.push(b)},d);if(a.b)for(b= 0;b<f.length;b++)ad(a,f[b]);for(b=0;b<f.length;b++)e(f[b])} function bd(a,b){if(void 0===b.__CE_state){var c=b.ownerDocument;if(c.defaultView||c.__CE_isImportDocument&&c.__CE_hasRegistry)if(c=a.a.get(b.localName)){c.constructionStack.push(b);var d=c.constructorFunction;try{try{if(new d!==b)throw Error("The custom element constructor did not produce the element being upgraded.");}finally{c.constructionStack.pop()}}catch(g){throw b.__CE_state=2,g;}b.__CE_state=1;b.__CE_definition=c;if(c.attributeChangedCallback)for(c=c.observedAttributes,d=0;d<c.length;d++){var e= c[d],f=b.getAttribute(e);null!==f&&a.attributeChangedCallback(b,e,null,f,null)}K(b)&&a.connectedCallback(b)}}}Wc.prototype.connectedCallback=function(a){var b=a.__CE_definition;b.connectedCallback&&b.connectedCallback.call(a)};Wc.prototype.disconnectedCallback=function(a){var b=a.__CE_definition;b.disconnectedCallback&&b.disconnectedCallback.call(a)}; Wc.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)};function cd(a){var b=document;this.b=a;this.a=b;this.B=void 0;P(this.b,this.a);"loading"===this.a.readyState&&(this.B=new MutationObserver(this.c.bind(this)),this.B.observe(this.a,{childList:!0,subtree:!0}))}function dd(a){a.B&&a.B.disconnect()}cd.prototype.c=function(a){var b=this.a.readyState;"interactive"!==b&&"complete"!==b||dd(this);for(b=0;b<a.length;b++)for(var c=a[b].addedNodes,d=0;d<c.length;d++)P(this.b,c[d])};function ed(){var a=this;this.b=this.a=void 0;this.c=new Promise(function(b){a.b=b;a.a&&b(a.a)})}function fd(a){if(a.a)throw Error("Already resolved.");a.a=void 0;a.b&&a.b(void 0)};function Q(a){this.c=!1;this.a=a;this.F=new Map;this.f=function(a){return a()};this.b=!1;this.i=[];this.ta=new cd(a)}n=Q.prototype; n.ea=function(a,b){var c=this;if(!(b instanceof Function))throw new TypeError("Custom element constructors must be functions.");if(!Uc(a))throw new SyntaxError("The element name '"+a+"' is not valid.");if(this.a.a.get(a))throw Error("A custom element with name '"+a+"' has already been defined.");if(this.c)throw Error("A custom element is already being defined.");this.c=!0;try{var d=function(a){var b=e[a];if(void 0!==b&&!(b instanceof Function))throw Error("The '"+a+"' callback must be a function."); return b},e=b.prototype;if(!(e instanceof Object))throw new TypeError("The custom element constructor's prototype is not an object.");var f=d("connectedCallback");var g=d("disconnectedCallb