mirror of
https://github.com/jlengrand/webcomponentsjs.git
synced 2026-03-10 08:51:22 +00:00
3 lines
73 KiB
JavaScript
3 lines
73 KiB
JavaScript
(function(){'use strict';function _(xt){return xt=j(xt),ee($(xt),xt)}function j(xt){return xt.replace(Ae.comments,'').replace(Ae.port,'')}function $(xt){let Ot={start:0,end:xt.length},Mt=Ot;for(let It=0,wt=xt.length;It<wt;It++)if(xt[It]===Pe){Mt.rules||(Mt.rules=[]);let Dt=Mt,Lt=Dt.rules[Dt.rules.length-1];Mt={start:It+1,parent:Dt,previous:Lt},Dt.rules.push(Mt)}else xt[It]===Te&&(Mt.end=It+1,Mt=Mt.parent||Ot);return Ot}function ee(xt,Ot){let Mt=Ot.substring(xt.start,xt.end-1);if(xt.parsedCssText=xt.cssText=Mt.trim(),xt.parent){let wt=xt.previous?xt.previous.end:xt.parent.start;Mt=Ot.substring(wt,xt.start-1),Mt=te(Mt),Mt=Mt.replace(Ae.multipleSpaces,' '),Mt=Mt.substring(Mt.lastIndexOf(';')+1);let Dt=xt.parsedSelector=xt.selector=Mt.trim();xt.atRule=0===Dt.indexOf('@'),xt.atRule?0===Dt.indexOf('@media')?xt.type=ve.MEDIA_RULE:Dt.match(Ae.keyframesRule)&&(xt.type=ve.KEYFRAMES_RULE,xt.keyframesName=xt.selector.split(Ae.multipleSpaces).pop()):0===Dt.indexOf(Re)?xt.type=ve.MIXIN_RULE:xt.type=ve.STYLE_RULE}let It=xt.rules;if(It)for(let Lt,wt=0,Dt=It.length;wt<Dt&&(Lt=It[wt]);wt++)ee(Lt,Ot);return xt}function te(xt){return xt.replace(/\\([0-9a-f]{1,6})\s/gi,function(){let Ot=arguments[1],Mt=6-Ot.length;for(;Mt--;)Ot='0'+Ot;return'\\'+Ot})}function oe(xt,Ot,Mt){Mt=Mt||'';let It='';if(xt.cssText||xt.rules){let wt=xt.rules;if(wt&&!se(wt))for(let kt,Dt=0,Lt=wt.length;Dt<Lt&&(kt=wt[Dt]);Dt++)It=oe(kt,Ot,It);else It=Ot?xt.cssText:re(xt.cssText),It=It.trim(),It&&(It=' '+It+'\n')}return It&&(xt.selector&&(Mt+=xt.selector+' '+Pe+'\n'),Mt+=It,xt.selector&&(Mt+=Te+'\n\n')),Mt}function se(xt){return 0===xt[0].selector.indexOf(Re)}function re(xt){return xt=ne(xt),ae(xt)}function ne(xt){return xt.replace(Ae.customProp,'').replace(Ae.mixinProp,'')}function ae(xt){return xt.replace(Ae.mixinApply,'').replace(Ae.varApply,'')}function ie(xt){xt&&(Ie=Ie&&!xt.shimcssproperties,Me=Me&&!xt.shimshadow)}function de(xt,Ot){return'string'==typeof xt&&(xt=_(xt)),Ot&&_e(xt,Ot),oe(xt,Ie)}function pe(xt){return!xt.__cssRules&&xt.textContent&&(xt.__cssRules=_(xt.textContent)),xt.__cssRules}function he(xt){return xt.parent&&xt.parent.type===ve.KEYFRAMES_RULE}function _e(xt,Ot,Mt,It){if(xt){let wt=!1;if(It&&xt.type===ve.MEDIA_RULE){let Lt=xt.selector.match(Le.MEDIA_MATCH);Lt&&!window.matchMedia(Lt[1]).matches&&(wt=!0)}xt.type===ve.STYLE_RULE?Ot(xt):Mt&&xt.type===ve.KEYFRAMES_RULE?Mt(xt):xt.type===ve.MIXIN_RULE&&(wt=!0);let Dt=xt.rules;if(Dt&&!wt)for(let Ht,Lt=0,kt=Dt.length;Lt<kt&&(Ht=Dt[Lt]);Lt++)_e(Ht,Ot,Mt,It)}}function ue(xt,Ot,Mt,It){let wt=ye(xt,Ot);return me(wt,Mt,It)}function me(xt,Ot,Mt){Ot=Ot||document.head;let It=Mt&&Mt.nextSibling||Ot.firstChild;return De=xt,Ot.insertBefore(xt,It)}function ye(xt,Ot){let Mt=document.createElement('style');return Ot&&Mt.setAttribute('scope',Ot),Mt.textContent=xt,Mt}function ge(xt){let Ot=document.createComment(' Shady DOM styles for '+xt+' '),Mt=De?De.nextSibling:null,It=document.head;return It.insertBefore(Ot,Mt||It.firstChild),De=Ot,Ot}function fe(xt,Ot){let Mt=0;for(let It=Ot,wt=xt.length;It<wt;It++)if('('===xt[It])Mt++;else if(')'===xt[It]&&0==--Mt)return It;return-1}function Ne(xt,Ot){let Mt=xt.indexOf('var(');if(-1===Mt)return Ot(xt,'','','');let It=fe(xt,Mt+3),wt=xt.substring(Mt+4,It),Dt=xt.substring(0,Mt),Lt=Ne(xt.substring(It+1),Ot),kt=wt.indexOf(',');if(-1===kt)return Ot(Dt,wt.trim(),'',Lt);let Ht=wt.substring(0,kt).trim(),Ft=wt.substring(kt+1).trim();return Ot(Dt,Ht,Ft,Lt)}function Se(xt,Ot){window.ShadyDOM?window.ShadyDOM.nativeMethods.setAttribute.call(xt,'class',Ot):xt.setAttribute('class',Ot)}function be(xt,Ot){let Mt=parseInt(xt/32);Ot[Mt]=(Ot[Mt]||0)|1<<xt%32}function Ce(){Pt||(Pt=!0,window.HTMLImports?window.HTMLImports.whenReady(Ee):'complete'===document.readyState?Ee():document.addEventListener('readystatechange',()=>{'complete'===document.readyState&&Ee()}))}function Ee(){requestAnimationFrame(()=>{(Pt||vt._elementsHaveApplied)&&vt.updateStyles(),Pt=!1})}(function(){'use strict';function xt(bs,Cs,Es){return{index:bs,removed:Cs,addedCount:Es}}function Ot(bs){return'ShadyRoot'===bs.__localName}function Mt(bs,Cs){if(bs&&Cs)for(var Ps,Es=Object.getOwnPropertyNames(Cs),vs=0;vs<Es.length&&(Ps=Es[vs]);vs++){var Ts=Ps,Rs=Object.getOwnPropertyDescriptor(Cs,Ts);Rs&&Object.defineProperty(bs,Ts,Rs)}return bs||Cs}function It(){Eo=!1;for(var bs=!!Co.length;Co.length;)Co.shift()();return bs}function wt(bs,Cs){return bs.__shady&&bs.__shady[Cs]}function Dt(bs){return'&'===bs?'&':'<'===bs?'<':'>'===bs?'>':'"'===bs?'"':'\xA0'===bs?' ':void 0}function Lt(bs){for(var Cs={},Es=0;Es<bs.length;Es++)Cs[bs[Es]]=!0;return Cs}function kt(bs,Cs,Es){switch(bs.nodeType){case Node.ELEMENT_NODE:Cs=bs.localName;for(var As,vs='<'+Cs,Ps=bs.attributes,Ts=0;As=Ps[Ts];Ts++)vs+=' '+As.name+'="'+As.value.replace(To,Dt)+'"';return vs+='>',Ro[Cs]?vs:vs+Ht(bs,Es)+'</'+Cs+'>';case Node.TEXT_NODE:return bs=bs.data,Cs&&xo[Cs.localName]?bs:bs.replace(Ao,Dt);case Node.COMMENT_NODE:return'<!--'+bs.data+'-->';default:throw window.console.error(bs),Error('not implemented');}}function Ht(bs,Cs){'template'===bs.localName&&(bs=bs.content);for(var As,Es='',vs=Cs?Cs(bs):bs.childNodes,Ps=0,Ts=vs.length;Ps<Ts&&(As=vs[Ps]);Ps++)Es+=kt(As,bs,Cs);return Es}function Ft(bs){var Cs=[];for(Mo.currentNode=bs,bs=Mo.firstChild();bs;)Cs.push(bs),bs=Mo.nextSibling();return Cs}function Ut(bs){return{get:function(){var Cs=vo.getProperty(this,bs);return void 0===Cs?Oo[bs](this):Cs},configurable:!0}}function Wt(bs,Cs,Es){for(var vs in Cs){var Ps=Object.getOwnPropertyDescriptor(bs,vs);Ps&&Ps.configurable||!Ps&&Es?Object.defineProperty(bs,vs,Cs[vs]):Es&&console.warn('Could not define',vs,'on',bs)}}function Bt(bs,Cs,Es){wo.patchOutsideElementAccessors(bs),Es=Es||null,bs.__shady=bs.__shady||{},Cs.__shady=Cs.__shady||{},Es&&(Es.__shady=Es.__shady||{}),bs.__shady.previousSibling=Es?Es.__shady.previousSibling:Cs.lastChild;var vs=bs.__shady.previousSibling;vs&&vs.__shady&&(vs.__shady.nextSibling=bs),(vs=bs.__shady.nextSibling=Es)&&vs.__shady&&(vs.__shady.previousSibling=bs),bs.__shady.parentNode=Cs,Es?Es===Cs.__shady.firstChild&&(Cs.__shady.firstChild=bs):(Cs.__shady.lastChild=bs,Cs.__shady.firstChild||(Cs.__shady.firstChild=bs)),Cs.__shady.childNodes=null}function jt(bs){this.root=bs,this.insertionPointTag='slot'}function qt(bs,Cs){if(bs!==os)throw new TypeError('Illegal constructor');return bs=document.createDocumentFragment(),bs.__proto__=qt.prototype,bs._init(Cs),bs}function Xt(bs){var Es,Cs=vo.hasProperty(bs,'parentNode')&&vo.getProperty(bs,'parentNode'),vs=_o.ownerShadyRootForNode(bs);if(Cs||vs){Es=zt(bs),Cs&&qo.recordRemoveChild(bs,Cs);var Ps;if(Ps=vs){var Ts;Ps=vs._insertionPoints;for(var As=0;As<Ps.length;As++){var xs,Rs=Ps[As];a:{for(xs=Rs;xs;){if(xs==bs){xs=!0;break a}xs=xs.parentNode}xs=void 0}if(xs)for(Rs=Rs.assignedNodes({flatten:!0}),xs=0;xs<Rs.length;xs++){Ts=!0;var Os=Rs[xs],Ms=Oo.parentNode(Os);Ms&&Xo.removeChild.call(Ms,Os)}}Ps=Ts}Ts=Ps,Cs=Cs&&vs&&Cs.localName===vs.getInsertionPointTag(),(Ts||Cs)&&(vs._skipUpdateInsertionPoints=!1,$t(vs))}return Yt(bs),Es}function Vt(bs,Cs,Es){(bs=bs.__shady&&bs.__shady.observer)&&(Cs&&bs.addedNodes.push(Cs),Es&&bs.removedNodes.push(Es),bs.schedule())}function Kt(bs){if(bs&&bs.nodeType){var Cs=bs.__ownerShadyRoot;return void 0===Cs&&(Cs=_o.isShadyRoot(bs)?bs:(Cs=bs.parentNode)?Kt(Cs):bs,document.documentElement.contains(bs)&&(bs.__ownerShadyRoot=Cs)),Cs}}function Gt(bs,Cs,Es){var vs,Ps=Es.getInsertionPointTag();if(bs.nodeType!==Node.DOCUMENT_FRAGMENT_NODE||bs.__noInsertionPoint)bs.localName===Ps&&(qo.recordChildNodes(Cs),qo.recordChildNodes(bs),vs=!0);else for(var As,Rs,Ps=bs.querySelectorAll(Ps),Ts=0;Ts<Ps.length&&(As=Ps[Ts]);Ts++)Rs=As.parentNode,Rs===bs&&(Rs=Cs),Rs=Gt(As,Rs,Es),vs=vs||Rs;return vs}function Yt(bs){if(void 0!==bs.__ownerShadyRoot)for(var Ps,Cs=bs.childNodes,Es=0,vs=Cs.length;Es<vs&&(Ps=Cs[Es]);Es++)Yt(Ps);bs.__ownerShadyRoot=void 0}function zt(bs){if((bs=bs.parentNode)&&bs.shadyRoot&&bs.shadyRoot.hasInsertionPoint())return $t(bs.shadyRoot),!0}function $t(bs){bs._changePending=!0,bs.update()}function Jt(bs,Cs){'slot'===Cs?zt(bs):'slot'===bs.localName&&'name'==Cs&&(bs=_o.ownerShadyRootForNode(bs))&&bs.update()}function Zt(bs,Cs,Es,vs){for(var As,Ps=0,Ts=bs.length;Ps<Ts&&(As=bs[Ps]);Ps++){var Rs;if(Rs=As.nodeType===Node.ELEMENT_NODE){Rs=As;var xs=Cs,Os=Es,Ms=vs,Is=xs(Rs);Is&&Ms.push(Rs),Os&&Os(Is)?Rs=Is:(Zt(Rs.childNodes,xs,Os,Ms),Rs=void 0)}if(Rs)return!0}}function Qt(bs,Cs){if(bs.ownerDocument!==document)return Xo.importNode.call(document,bs,Cs);var Es=Xo.importNode.call(document,bs,!1);if(Cs){bs=bs.childNodes,Cs=0;for(var vs;Cs<bs.length;Cs++)vs=Qt(bs[Cs],!0),Es.appendChild(vs)}return Es}function eo(){this._scheduled=!1,this.addedNodes=[],this.removedNodes=[],this.callbacks=new Set}function to(bs,Cs){var Es=[],vs=bs;for(bs=bs===window?window:bs.getRootNode();vs;)Es.push(vs),vs=vs.assignedSlot?vs.assignedSlot:vs.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&vs.host&&(Cs||vs!==bs)?vs.host:vs.parentNode;return Es[Es.length-1]===document&&Es.push(window),Es}function oo(bs,Cs){if(!_o.isShadyRoot)return bs;bs=to(bs,!0);for(var vs,Ps,Ts,As,Es=0;Es<Cs.length;Es++)if(vs=Cs[Es],Ts=vs===window?window:vs.getRootNode(),Ts!==Ps&&(As=bs.indexOf(Ts),Ps=Ts),!_o.isShadyRoot(Ts)||-1<As)return vs}function so(bs){function Cs(Es,vs){return Es=new bs(Es,vs),Es.__composed=vs&&!!vs.composed,Es}return _o.mixin(Cs,bs),Cs.prototype=bs.prototype,Cs}function ro(bs,Cs,Es){if(Es=Cs.__handlers&&Cs.__handlers[bs.type]&&Cs.__handlers[bs.type][Es])for(var Ps,vs=0;(Ps=Es[vs])&&(Ps.call(Cs,bs),!bs.__immediatePropagationStopped);vs++);}function no(bs){var Es,Cs=bs.composedPath();Object.defineProperty(bs,'currentTarget',{get:function(){return Es},configurable:!0});for(var vs=Cs.length-1;0<=vs;vs--)if(Es=Cs[vs],ro(bs,Es,'capture'),bs.__propagationStopped)return;Object.defineProperty(bs,'eventPhase',{value:Event.AT_TARGET});for(var Ps,vs=0;vs<Cs.length&&!((Es=Cs[vs],0===vs||Es.shadowRoot&&Es.shadowRoot===Ps)&&(ro(bs,Es,'bubble'),Es!==window&&(Ps=Es.getRootNode()),bs.__propagationStopped));vs++);}function ao(){for(var bs in ps)window.addEventListener(bs,function(Cs){Cs.__target||(lo(Cs),no(Cs),Cs.stopImmediatePropagation())},!0)}function lo(bs){bs.__target=bs.target,bs.__relatedTarget=bs.relatedTarget,_o.settings.hasDescriptors?_o.patchPrototype(bs,ds):_o.extend(bs,ds)}function io(bs){return rs.renderRootNode(bs),vo.getProperty(bs,'assignedSlot')||null}function po(bs,Cs){for(var Es=Object.getOwnPropertyNames(Cs),vs=0;vs<Es.length;vs++){var Ps=Es[vs],Ts=Object.getOwnPropertyDescriptor(Cs,Ps);Ts.value?bs[Ps]=Ts.value:Object.defineProperty(bs,Ps,Ts)}}var co={},ho={calcEditDistances:function(bs,Cs,Es,vs,Ps,Ts){Ts=Ts-Ps+1,Es=Es-Cs+1;for(var As=Array(Ts),Rs=0;Rs<Ts;Rs++)As[Rs]=Array(Es),As[Rs][0]=Rs;for(Rs=0;Rs<Es;Rs++)As[0][Rs]=Rs;for(Rs=1;Rs<Ts;Rs++)for(var xs=1;xs<Es;xs++)if(this.equals(bs[Cs+xs-1],vs[Ps+Rs-1]))As[Rs][xs]=As[Rs-1][xs-1];else{var Os=As[Rs-1][xs]+1,Ms=As[Rs][xs-1]+1;As[Rs][xs]=Os<Ms?Os:Ms}return As},spliceOperationsFromEditDistances:function(bs){for(var Cs=bs.length-1,Es=bs[0].length-1,vs=bs[Cs][Es],Ps=[];0<Cs||0<Es;)if(0==Cs)Ps.push(2),Es--;else if(0==Es)Ps.push(3),Cs--;else{var xs,Ts=bs[Cs-1][Es-1],As=bs[Cs-1][Es],Rs=bs[Cs][Es-1];xs=As<Rs?As<Ts?As:Ts:Rs<Ts?Rs:Ts,xs==Ts?(Ts==vs?Ps.push(0):(Ps.push(1),vs=Ts),Cs--,Es--):xs==As?(Ps.push(3),Cs--,vs=As):(Ps.push(2),Es--,vs=Rs)}return Ps.reverse(),Ps},calcSplices:function(bs,Cs,Es,vs,Ps,Ts){var As=0,Rs=0,xs=Math.min(Es-Cs,Ts-Ps);if(0==Cs&&0==Ps&&(As=this.sharedPrefix(bs,vs,xs)),Es==bs.length&&Ts==vs.length&&(Rs=this.sharedSuffix(bs,vs,xs-As)),Cs+=As,Ps+=As,Es-=Rs,Ts-=Rs,0==Es-Cs&&0==Ts-Ps)return[];if(Cs==Es){for(bs=xt(Cs,[],0);Ps<Ts;)bs.removed.push(vs[Ps++]);return[bs]}if(Ps==Ts)return[xt(Cs,[],Es-Cs)];for(Ts=this.spliceOperationsFromEditDistances(this.calcEditDistances(bs,Cs,Es,vs,Ps,Ts)),bs=void 0,Es=[],As=0;As<Ts.length;As++)switch(Ts[As]){case 0:bs&&(Es.push(bs),bs=void 0),Cs++,Ps++;break;case 1:bs||(bs=xt(Cs,[],0)),bs.addedCount++,Cs++,bs.removed.push(vs[Ps]),Ps++;break;case 2:bs||(bs=xt(Cs,[],0)),bs.addedCount++,Cs++;break;case 3:bs||(bs=xt(Cs,[],0)),bs.removed.push(vs[Ps]),Ps++;}return bs&&Es.push(bs),Es},sharedPrefix:function(bs,Cs,Es){for(var vs=0;vs<Es;vs++)if(!this.equals(bs[vs],Cs[vs]))return vs;return Es},sharedSuffix:function(bs,Cs,Es){for(var vs=bs.length,Ps=Cs.length,Ts=0;Ts<Es&&this.equals(bs[--vs],Cs[--Ps]);)Ts++;return Ts},calculateSplices:function(bs,Cs){return this.calcSplices(bs,0,bs.length,Cs,0,Cs.length)},equals:function(bs,Cs){return bs===Cs}};co.calculateSplices=function(bs,Cs){return ho.calculateSplices(bs,Cs)};var _o={},uo=window.ShadyDOM||{};uo.hasNativeShadowDOM=Element.prototype.attachShadow&&Node.prototype.getRootNode;var mo=Object.getOwnPropertyDescriptor(Node.prototype,'firstChild');uo.hasDescriptors=!!(mo&&mo.configurable&&mo.get),uo.inUse=uo.force||!uo.hasNativeShadowDOM;var yo=Element.prototype,go=yo.matches||yo.matchesSelector||yo.mozMatchesSelector||yo.msMatchesSelector||yo.oMatchesSelector||yo.webkitMatchesSelector,fo=document.createTextNode(''),No=0,So=[];new MutationObserver(function(){for(;So.length;)try{So.shift()()}catch(bs){throw fo.textContent=No++,bs}}).observe(fo,{characterData:!0}),_o.settings=uo,_o.isShadyRoot=Ot,_o.ownerShadyRootForNode=function(bs){if(bs=bs.getRootNode(),Ot(bs))return bs},_o.matchesSelector=function(bs,Cs){return go.call(bs,Cs)},_o.extend=Mt,_o.extendAll=function(bs){for(var Es=[],vs=1;vs<arguments.length;++vs)Es[vs-1]=arguments[vs];for(vs=0;vs<Es.length;vs++)Mt(bs,Es[vs]);return bs},_o.mixin=function(bs,Cs){for(var Es in Cs)bs[Es]=Cs[Es];return bs},_o.patchPrototype=function(bs,Cs){var Es=Object.getPrototypeOf(bs);if(!Es.hasOwnProperty('__patchProto')){var vs=Object.create(Es);vs.__sourceProto=Es,Mt(vs,Cs),Es.__patchProto=vs}bs.__proto__=Es.__patchProto},_o.microtask=function(bs){So.push(bs),fo.textContent=No++};var Eo,bo={},Co=[];It.list=Co,bo.enqueue=function(bs){Eo||(Eo=!0,_o.microtask(It)),Co.push(bs)},bo.flush=It;var vo={};vo.getProperty=wt,vo.hasProperty=function(bs,Cs){return void 0!==wt(bs,Cs)};var Po={},To=/[&\u00A0"]/g,Ao=/[&\u00A0<>]/g,Ro=Lt('area base br col command embed hr img input keygen link meta param source track wbr'.split(' ')),xo=Lt('style script xmp iframe noembed noframes plaintext noscript'.split(' '));Po.getOuterHTML=kt,Po.getInnerHTML=Ht;var Oo={},Mo=document.createTreeWalker(document,NodeFilter.SHOW_ALL,null,!1),Io=document.createTreeWalker(document,NodeFilter.SHOW_ELEMENT,null,!1);Oo.parentNode=function(bs){return Mo.currentNode=bs,Mo.parentNode()},Oo.firstChild=function(bs){return Mo.currentNode=bs,Mo.firstChild()},Oo.lastChild=function(bs){return Mo.currentNode=bs,Mo.lastChild()},Oo.previousSibling=function(bs){return Mo.currentNode=bs,Mo.previousSibling()},Oo.nextSibling=function(bs){return Mo.currentNode=bs,Mo.nextSibling()},Oo.childNodes=Ft,Oo.parentElement=function(bs){return Io.currentNode=bs,Io.parentNode()},Oo.firstElementChild=function(bs){return Io.currentNode=bs,Io.firstChild()},Oo.lastElementChild=function(bs){return Io.currentNode=bs,Io.lastChild()},Oo.previousElementSibling=function(bs){return Io.currentNode=bs,Io.previousSibling()},Oo.nextElementSibling=function(bs){return Io.currentNode=bs,Io.nextSibling()},Oo.children=function(bs){var Cs=[];for(Io.currentNode=bs,bs=Io.firstChild();bs;)Cs.push(bs),bs=Io.nextSibling();return Cs},Oo.innerHTML=function(bs){return Po.getInnerHTML(bs,function(Cs){return Ft(Cs)})},Oo.textContent=function(bs){if(bs.nodeType!==Node.ELEMENT_NODE)return bs.nodeValue;bs=document.createTreeWalker(bs,NodeFilter.SHOW_TEXT,null,!1);for(var Es,Cs='';Es=bs.nextNode();)Cs+=Es.nodeValue;return Cs};var wo={},Do=Object.getOwnPropertyDescriptor(Element.prototype,'innerHTML')||Object.getOwnPropertyDescriptor(HTMLElement.prototype,'innerHTML'),Lo=document.implementation.createHTMLDocument('inert').createElement('div'),ko=Object.getOwnPropertyDescriptor(Document.prototype,'activeElement'),Ho={parentElement:Ut('parentElement'),parentNode:Ut('parentNode'),nextSibling:Ut('nextSibling'),previousSibling:Ut('previousSibling'),className:{get:function(){return this.getAttribute('class')},set:function(bs){this.setAttribute('class',bs)},configurable:!0},nextElementSibling:{get:function(){if(vo.hasProperty(this,'nextSibling')){for(var bs=this.nextSibling;bs&&bs.nodeType!==Node.ELEMENT_NODE;)bs=bs.nextSibling;return bs}return Oo.nextElementSibling(this)},configurable:!0},previousElementSibling:{get:function(){if(vo.hasProperty(this,'previousSibling')){for(var bs=this.previousSibling;bs&&bs.nodeType!==Node.ELEMENT_NODE;)bs=bs.previousSibling;return bs}return Oo.previousElementSibling(this)},configurable:!0}},Fo={childNodes:{get:function(){if(vo.hasProperty(this,'firstChild')){if(!this.__shady.childNodes){this.__shady.childNodes=[];for(var bs=this.firstChild;bs;bs=bs.nextSibling)this.__shady.childNodes.push(bs)}return this.__shady.childNodes}return Oo.childNodes(this)},configurable:!0},firstChild:Ut('firstChild'),lastChild:Ut('lastChild'),textContent:{get:function(){if(vo.hasProperty(this,'firstChild')){for(var vs,bs=[],Cs=0,Es=this.childNodes;vs=Es[Cs];Cs++)vs.nodeType!==Node.COMMENT_NODE&&bs.push(vs.textContent);return bs.join('')}return Oo.textContent(this)},set:function(bs){if(this.nodeType!==Node.ELEMENT_NODE)this.nodeValue=bs;else{for(;this.firstChild;)this.removeChild(this.firstChild);bs&&this.appendChild(document.createTextNode(bs))}},configurable:!0},firstElementChild:{get:function(){if(vo.hasProperty(this,'firstChild')){for(var bs=this.firstChild;bs&&bs.nodeType!==Node.ELEMENT_NODE;)bs=bs.nextSibling;return bs}return Oo.firstElementChild(this)},configurable:!0},lastElementChild:{get:function(){if(vo.hasProperty(this,'lastChild')){for(var bs=this.lastChild;bs&&bs.nodeType!==Node.ELEMENT_NODE;)bs=bs.previousSibling;return bs}return Oo.lastElementChild(this)},configurable:!0},children:{get:function(){return vo.hasProperty(this,'firstChild')?Array.prototype.filter.call(this.childNodes,function(bs){return bs.nodeType===Node.ELEMENT_NODE}):Oo.children(this)},configurable:!0},innerHTML:{get:function(){var bs='template'===this.localName?this.content:this;return vo.hasProperty(this,'firstChild')?Po.getInnerHTML(bs):Oo.innerHTML(bs)},set:function(bs){for(var Cs='template'===this.localName?this.content:this;Cs.firstChild;)Cs.removeChild(Cs.firstChild);for(Do&&Do.set?Do.set.call(Lo,bs):Lo.innerHTML=bs;Lo.firstChild;)Cs.appendChild(Lo.firstChild)},configurable:!0}},Uo={shadowRoot:{get:function(){return this.shadyRoot},set:function(bs){this.shadyRoot=bs},configurable:!0}},Wo={activeElement:{get:function(){var bs;if(bs=ko&&ko.get?ko.get.call(document):_o.settings.hasDescriptors?void 0:document.activeElement,bs){var Cs=!!_o.isShadyRoot(this);if(this===document||Cs&&this.host!==bs&&this.host.contains(bs)){for(Cs=_o.ownerShadyRootForNode(bs);Cs&&Cs!==this;)bs=Cs.host,Cs=_o.ownerShadyRootForNode(bs);bs=this===document?Cs?null:bs:Cs===this?bs:null}else bs=null}else bs=null;return bs},set:function(){},configurable:!0}},Bo=_o.settings.hasDescriptors?function(){}:function(bs){bs.__shady&&bs.__shady.__outsideAccessors||(bs.__shady=bs.__shady||{},bs.__shady.__outsideAccessors=!0,Wt(bs,Ho,!0))},jo=_o.settings.hasDescriptors?function(){}:function(bs){bs.__shady&&bs.__shady.__insideAccessors||(bs.__shady=bs.__shady||{},bs.__shady.__insideAccessors=!0,Wt(bs,Fo,!0),Wt(bs,Uo,!0))};wo.ShadowRootAccessor=Uo,wo.ActiveElementAccessor=Wo,wo.patchAccessors=function(bs){Wt(bs,Ho),Wt(bs,Fo),Wt(bs,Wo)},wo.patchShadowRootAccessors=function(bs){Wt(bs,Fo,!0),Wt(bs,Wo,!0)},wo.patchOutsideElementAccessors=Bo,wo.patchInsideElementAccessors=jo;var qo={};qo.recordInsertBefore=function(bs,Cs,Es){if(wo.patchInsideElementAccessors(Cs),Cs.__shady=Cs.__shady||{},vo.hasProperty(Cs,'firstChild')&&(Cs.__shady.childNodes=null),bs.nodeType===Node.DOCUMENT_FRAGMENT_NODE){for(var vs=bs.childNodes,Ps=0;Ps<vs.length;Ps++)Bt(vs[Ps],Cs,Es);bs.__shady=bs.__shady||{},Cs=vo.hasProperty(bs,'firstChild')?null:void 0,bs.__shady.firstChild=bs.__shady.lastChild=Cs,bs.__shady.childNodes=Cs}else Bt(bs,Cs,Es)},qo.recordRemoveChild=function(bs,Cs){bs.__shady=bs.__shady||{},Cs.__shady=Cs.__shady||{},bs===Cs.__shady.firstChild&&(Cs.__shady.firstChild=bs.__shady.nextSibling),bs===Cs.__shady.lastChild&&(Cs.__shady.lastChild=bs.__shady.previousSibling);var Es=bs.__shady.previousSibling,vs=bs.__shady.nextSibling;Es&&(Es.__shady=Es.__shady||{},Es.__shady.nextSibling=vs),vs&&(vs.__shady=vs.__shady||{},vs.__shady.previousSibling=Es),bs.__shady.parentNode=bs.__shady.previousSibling=bs.__shady.nextSibling=void 0,vo.hasProperty(Cs,'childNodes')&&(Cs.__shady.childNodes=null)},qo.recordChildNodes=function(bs){if(!vo.hasProperty(bs,'firstChild')){bs.__shady=bs.__shady||{},bs.__shady.firstChild=Oo.firstChild(bs),bs.__shady.lastChild=Oo.lastChild(bs),wo.patchInsideElementAccessors(bs);for(var vs,Cs=bs.__shady.childNodes=Oo.childNodes(bs),Es=0;Es<Cs.length&&(vs=Cs[Es]);Es++)vs.__shady=vs.__shady||{},vs.__shady.parentNode=bs,vs.__shady.nextSibling=Cs[Es+1]||null,vs.__shady.previousSibling=Cs[Es-1]||null,wo.patchOutsideElementAccessors(vs)}};var Xo={},Vo=Element.prototype.insertBefore,Ko=Element.prototype.removeChild,Go=Element.prototype.setAttribute,Yo=Element.prototype.removeAttribute,zo=Element.prototype.cloneNode,$o=Document.prototype.importNode,Jo=Element.prototype.addEventListener,Zo=Element.prototype.removeEventListener;Xo.appendChild=Element.prototype.appendChild,Xo.insertBefore=Vo,Xo.removeChild=Ko,Xo.setAttribute=Go,Xo.removeAttribute=Yo,Xo.cloneNode=zo,Xo.importNode=$o,Xo.addEventListener=Jo,Xo.removeEventListener=Zo;var Qo={},es='function'==typeof Event?Event:function(bs,Cs){Cs=Cs||{};var Es=document.createEvent('Event');return Es.initEvent(bs,!!Cs.bubbles,!!Cs.cancelable),Es};jt.prototype.getInsertionPoints=function(){return this.root.querySelectorAll(this.insertionPointTag)},jt.prototype.hasInsertionPoint=function(){return this.root._insertionPoints&&this.root._insertionPoints.length},jt.prototype.isInsertionPoint=function(bs){return bs.localName&&bs.localName==this.insertionPointTag},jt.prototype.distribute=function(){return this.hasInsertionPoint()?this.distributePool(this.root,this.collectPool()):[]},jt.prototype.collectPool=function(){for(var bs=[],Cs=0,Es=this.root.host.firstChild;Es;Es=Es.nextSibling)bs[Cs++]=Es;return bs},jt.prototype.distributePool=function(bs,Cs){bs=[];for(var Ts,Es=this.root._insertionPoints,vs=0,Ps=Es.length;vs<Ps&&(Ts=Es[vs]);vs++){this.distributeInsertionPoint(Ts,Cs);var As=Ts.parentNode;As&&As.shadyRoot&&this.hasInsertionPoint(As.shadyRoot)&&bs.push(As.shadyRoot)}for(Es=0;Es<Cs.length;Es++)(Ts=Cs[Es])&&(Ts.__shady=Ts.__shady||{},Ts.__shady.assignedSlot=void 0,(vs=Oo.parentNode(Ts))&&Xo.removeChild.call(vs,Ts));return bs},jt.prototype.distributeInsertionPoint=function(bs,Cs){var Es=bs.__shady.assignedNodes;Es&&this.clearAssignedSlots(bs,!0),bs.__shady.assignedNodes=[];for(var Rs,vs=!1,Ps=!1,Ts=0,As=Cs.length;Ts<As;Ts++)(Rs=Cs[Ts])&&this.matchesInsertionPoint(Rs,bs)&&(Rs.__shady._prevAssignedSlot!=bs&&(vs=!0),this.distributeNodeInto(Rs,bs),Cs[Ts]=void 0,Ps=!0);if(!Ps)for(Cs=bs.childNodes,Ps=0;Ps<Cs.length;Ps++)Rs=Cs[Ps],Rs.__shady._prevAssignedSlot!=bs&&(vs=!0),this.distributeNodeInto(Rs,bs);if(Es){for(Rs=0;Rs<Es.length;Rs++)Es[Rs].__shady._prevAssignedSlot=null;bs.__shady.assignedNodes.length<Es.length&&(vs=!0)}this.setDistributedNodesOnInsertionPoint(bs),vs&&this._fireSlotChange(bs)},jt.prototype.clearAssignedSlots=function(bs,Cs){var Es=bs.__shady.assignedNodes;if(Es)for(var Ps,vs=0;vs<Es.length;vs++)Ps=Es[vs],Cs&&(Ps.__shady._prevAssignedSlot=Ps.__shady.assignedSlot),Ps.__shady.assignedSlot===bs&&(Ps.__shady.assignedSlot=null)},jt.prototype.matchesInsertionPoint=function(bs,Cs){return Cs=(Cs=Cs.getAttribute('name'))?Cs.trim():'',bs=(bs=bs.getAttribute&&bs.getAttribute('slot'))?bs.trim():'',bs==Cs},jt.prototype.distributeNodeInto=function(bs,Cs){Cs.__shady.assignedNodes.push(bs),bs.__shady.assignedSlot=Cs},jt.prototype.setDistributedNodesOnInsertionPoint=function(bs){var Cs=bs.__shady.assignedNodes;bs.__shady.distributedNodes=[];for(var vs,Es=0;Es<Cs.length&&(vs=Cs[Es]);Es++)if(this.isInsertionPoint(vs)){var Ps=vs.__shady.distributedNodes;if(Ps)for(var Ts=0;Ts<Ps.length;Ts++)bs.__shady.distributedNodes.push(Ps[Ts])}else bs.__shady.distributedNodes.push(Cs[Es])},jt.prototype._fireSlotChange=function(bs){bs.dispatchEvent(new es('slotchange')),bs.__shady.assignedSlot&&this._fireSlotChange(bs.__shady.assignedSlot)},jt.prototype.isFinalDestination=function(bs){return!bs.__shady.assignedSlot},Qo.default=jt;var ts={},os={};qt.prototype=Object.create(DocumentFragment.prototype),_o.extendAll(qt.prototype,{_init:function(bs){this.__localName='ShadyRoot',qo.recordChildNodes(bs),qo.recordChildNodes(this),bs.shadowRoot=this,this.host=bs,this._changePending=this._hasRendered=this._renderPending=!1,this._distributor=new Qo.default(this),this.update()},update:function(){var bs=this;this._renderPending||(this._renderPending=!0,bo.enqueue(function(){return bs.render()}))},_getRenderRoot:function(){for(var bs=this,Cs=this;Cs;)Cs._renderPending&&(bs=Cs),Cs=Cs._rendererForHost();return bs},_rendererForHost:function(){var bs=this.host.getRootNode();if(_o.isShadyRoot(bs))for(var vs,Cs=this.host.childNodes,Es=0;Es<Cs.length;Es++)if(vs=Cs[Es],this._distributor.isInsertionPoint(vs))return bs},render:function(){this._renderPending&&this._getRenderRoot()._render()},_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},forceRender:function(){this._renderPending=!0,this.render()},distribute:function(){for(var bs=this._distributor.distribute(),Cs=0;Cs<bs.length;Cs++)bs[Cs]._render()},updateInsertionPoints:function(){var bs=this.__insertionPoints;if(bs)for(var Es,Cs=0;Cs<bs.length;Cs++)Es=bs[Cs],Es.getRootNode()!==this&&this._distributor.clearAssignedSlots(Es);for(bs=this._insertionPoints=this._distributor.getInsertionPoints(),Cs=0;Cs<bs.length;Cs++)Es=bs[Cs],Es.__shady=Es.__shady||{},qo.recordChildNodes(Es),qo.recordChildNodes(Es.parentNode)},get _insertionPoints(){return this.__insertionPoints||this.updateInsertionPoints(),this.__insertionPoints||(this.__insertionPoints=[])},set _insertionPoints(bs){this.__insertionPoints=bs},hasInsertionPoint:function(){return this._distributor.hasInsertionPoint()},compose:function(){this._composeTree()},_composeTree:function(){this._updateChildNodes(this.host,this._composeNode(this.host));for(var vs,Ps,bs=this._insertionPoints||[],Cs=0,Es=bs.length;Cs<Es&&(vs=bs[Cs]);Cs++)Ps=vs.parentNode,Ps!==this.host&&Ps!==this&&this._updateChildNodes(Ps,this._composeNode(Ps))},_composeNode:function(bs){var Cs=[];bs=(bs.shadyRoot||bs).childNodes;for(var vs,Es=0;Es<bs.length;Es++)if(vs=bs[Es],this._distributor.isInsertionPoint(vs))for(var As,Ps=vs.__shady.distributedNodes||(vs.__shady.distributedNodes=[]),Ts=0;Ts<Ps.length;Ts++)As=Ps[Ts],this.isFinalDestination(vs,As)&&Cs.push(As);else Cs.push(vs);return Cs},isFinalDestination:function(bs,Cs){return this._distributor.isFinalDestination(bs,Cs)},_updateChildNodes:function(bs,Cs){for(var As,Es=Oo.childNodes(bs),vs=co.calculateSplices(Cs,Es),Ps=0,Ts=0;Ps<vs.length&&(As=vs[Ps]);Ps++){for(var xs,Rs=0;Rs<As.removed.length&&(xs=As.removed[Rs]);Rs++)Oo.parentNode(xs)===bs&&Xo.removeChild.call(bs,xs),Es.splice(As.index+Ts,1);Ts-=As.addedCount}for(Ps=0;Ps<vs.length&&(As=vs[Ps]);Ps++)for(Ts=Es[As.index],Rs=As.index;Rs<As.index+As.addedCount;Rs++)xs=Cs[Rs],Xo.insertBefore.call(bs,xs,Ts),Es.splice(Rs,0,xs)},getInsertionPointTag:function(){return this._distributor.insertionPointTag}}),wo.patchShadowRootAccessors(qt.prototype),ts.ShadyRoot=qt,ts.attachShadow=function(bs,Cs){if(!bs)throw'Must provide a host.';if(!Cs)throw'Not enough arguments.';return new qt(os,bs)};var rs={};rs.getRootNode=Kt,rs.query=function(bs,Cs,Es){var vs=[];return Zt(bs.childNodes,Cs,Es,vs),vs},rs.renderRootNode=function(bs){bs=bs.getRootNode(),_o.isShadyRoot(bs)&&bs.render()},rs.setAttribute=function(bs,Cs,Es){window.ShadyCSS&&'class'===Cs&&bs.ownerDocument===document?window.ShadyCSS.setElementClass(bs,Es):(Xo.setAttribute.call(bs,Cs,Es),Jt(bs,Cs))},rs.removeAttribute=function(bs,Cs){Xo.removeAttribute.call(bs,Cs),Jt(bs,Cs)},rs.insertBefore=function(bs,Cs,Es){if(Es){var vs=vo.getProperty(Es,'parentNode');if(void 0!==vs&&vs!==bs)throw Error('The ref_node to be inserted before is not a child of this node')}Cs.nodeType!==Node.DOCUMENT_FRAGMENT_NODE&&(vs=vo.getProperty(Cs,'parentNode'),vs?(Vt(vs,null,Cs),Xt(Cs)):(Cs.parentNode&&Xo.removeChild.call(Cs.parentNode,Cs),Yt(Cs)));var Ts,Ps=Es,vs=_o.ownerShadyRootForNode(bs);vs&&(Cs.__noInsertionPoint&&!vs._changePending&&(vs._skipUpdateInsertionPoints=!0),Ts=Gt(Cs,bs,vs))&&(vs._skipUpdateInsertionPoints=!1),vo.hasProperty(bs,'firstChild')&&qo.recordInsertBefore(Cs,bs,Ps);var Ps=Ts,As=vs&&vs.getInsertionPointTag()||'',Rs=Cs.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&!Cs.__noInsertionPoint&&As&&Cs.querySelector(As);if(Ts=Rs&&Rs.parentNode.nodeType!==Node.DOCUMENT_FRAGMENT_NODE,((Rs=Rs||Cs.localName===As)||bs.localName===As||Ps)&&vs&&$t(vs),(vs=bs&&bs.shadyRoot&&bs.shadyRoot.hasInsertionPoint())&&$t(bs.shadyRoot),!(vs||Rs&&!Ts||bs.shadyRoot)){if(Es&&(vs=_o.ownerShadyRootForNode(Es))){var xs;if(Es.localName===vs.getInsertionPointTag())a:{for(vs=Es.assignedNodes({flatten:!0}),Ts=Kt(Es),Ps=0,As=vs.length;Ps<As&&(xs=vs[Ps]);Ps++)if(Ts.isFinalDestination(Es,xs))break a;xs=void 0}else xs=Es;Es=xs}xs=_o.isShadyRoot(bs)?bs.host:bs,Es?Xo.insertBefore.call(xs,Cs,Es):Xo.appendChild.call(xs,Cs)}return Vt(bs,Cs),Cs},rs.removeChild=function(bs,Cs){if(Cs.parentNode!==bs)throw Error('The node to be removed is not a child of this node: '+Cs);if(!Xt(Cs)){var Es=_o.isShadyRoot(bs)?bs.host:bs,vs=Oo.parentNode(Cs);Es===vs&&Xo.removeChild.call(Es,Cs)}return Vt(bs,null,Cs),Cs},rs.cloneNode=function(bs,Cs){if('template'==bs.localName)return Xo.cloneNode.call(bs,Cs);var Es=Xo.cloneNode.call(bs,!1);if(Cs){bs=bs.childNodes,Cs=0;for(var vs;Cs<bs.length;Cs++)vs=bs[Cs].cloneNode(!0),Es.appendChild(vs)}return Es},rs.importNode=Qt;var ns={};eo.prototype.schedule=function(){var bs=this;this._scheduled||(this._scheduled=!0,_o.microtask(function(){bs.flush()}))},eo.prototype.flush=function(){if(this._scheduled){this._scheduled=!1;var bs=this.takeRecords();bs.length&&this.callbacks.forEach(function(Cs){Cs(bs)})}},eo.prototype.takeRecords=function(){if(this.addedNodes.length||this.removedNodes.length){var bs=[{addedNodes:this.addedNodes,removedNodes:this.removedNodes}];return this.addedNodes=[],this.removedNodes=[],bs}return[]},ns.observeChildren=function(bs,Cs){bs.__shady=bs.__shady||{},bs.__shady.observer||(bs.__shady.observer=new eo),bs.__shady.observer.callbacks.add(Cs);var Es=bs.__shady.observer;return{_callback:Cs,_observer:Es,_node:bs,takeRecords:function(){return Es.takeRecords()}}},ns.unobserveChildren=function(bs){var Cs=bs&&bs._observer;Cs&&(Cs.callbacks.delete(bs._callback),Cs.callbacks.size||(bs._node.__shady.observer=null))},ns.filterMutations=function(bs,Cs){var Es=Cs.getRootNode();return bs.map(function(vs){var Ps=Es===vs.target.getRootNode();if(Ps&&vs.addedNodes){if(Ps=Array.from(vs.addedNodes).filter(function(Ts){return Es===Ts.getRootNode()}),Ps.length)return vs=Object.create(vs),Object.defineProperty(vs,'addedNodes',{value:Ps,configurable:!0}),vs;}else if(Ps)return vs}).filter(function(vs){return vs})};var as={},ls={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},ds={get composed(){return this.isTrusted&&void 0===this.__composed&&(this.__composed=ls[this.type]),this.__composed||!1},composedPath:function(){return this.__composedPath||(this.__composedPath=to(this.__target,this.composed)),this.__composedPath},get target(){return oo(this.currentTarget,this.composedPath())},get relatedTarget(){return this.__relatedTarget?(this.__relatedTargetComposedPath||(this.__relatedTargetComposedPath=to(this.__relatedTarget,!0)),oo(this.currentTarget,this.__relatedTargetComposedPath)):null},stopPropagation:function(){Event.prototype.stopPropagation.call(this),this.__propagationStopped=!0},stopImmediatePropagation:function(){Event.prototype.stopImmediatePropagation.call(this),this.__propagationStopped=this.__immediatePropagationStopped=!0}},ps={focus:!0,blur:!0},cs=so(window.Event),hs=so(window.CustomEvent),_s=so(window.MouseEvent);as.addEventListener=function(bs,Cs,Es){if(Cs){var vs,Ps,Ts;if('object'==typeof Es?(vs=!!Es.capture,Ps=!!Es.once,Ts=!!Es.passive):(vs=!!Es,Ts=Ps=!1),Cs.__eventWrappers){for(var As=0;As<Cs.__eventWrappers.length;As++)if(Cs.__eventWrappers[As].node===this&&Cs.__eventWrappers[As].type===bs&&Cs.__eventWrappers[As].capture===vs&&Cs.__eventWrappers[As].once===Ps&&Cs.__eventWrappers[As].passive===Ts)return;}else Cs.__eventWrappers=[];As=function(Rs){if(Ps&&this.removeEventListener(bs,Cs,Es),Rs.__target||lo(Rs),Rs.composed||-1<Rs.composedPath().indexOf(this))if(Rs.eventPhase===Event.BUBBLING_PHASE&&Rs.target===Rs.relatedTarget)Rs.stopImmediatePropagation();else return Cs(Rs)},Cs.__eventWrappers.push({node:this,type:bs,capture:vs,once:Ps,passive:Ts,wrapperFn:As}),ps[bs]?(this.__handlers=this.__handlers||{},this.__handlers[bs]=this.__handlers[bs]||{capture:[],bubble:[]},this.__handlers[bs][vs?'capture':'bubble'].push(As)):Xo.addEventListener.call(this,bs,As,Es)}},as.removeEventListener=function(bs,Cs,Es){if(Cs){var vs,Ps,Ts;'object'==typeof Es?(vs=!!Es.capture,Ps=!!Es.once,Ts=!!Es.passive):(vs=!!Es,Ts=Ps=!1);var As;if(Cs.__eventWrappers)for(var Rs=0;Rs<Cs.__eventWrappers.length;Rs++)if(Cs.__eventWrappers[Rs].node===this&&Cs.__eventWrappers[Rs].type===bs&&Cs.__eventWrappers[Rs].capture===vs&&Cs.__eventWrappers[Rs].once===Ps&&Cs.__eventWrappers[Rs].passive===Ts){As=Cs.__eventWrappers.splice(Rs,1)[0].wrapperFn,Cs.__eventWrappers.length||(Cs.__eventWrappers=void 0);break}Xo.removeEventListener.call(this,bs,As||Cs,Es),As&&ps[bs]&&this.__handlers&&this.__handlers[bs]&&(bs=this.__handlers[bs][vs?'capture':'bubble'],As=bs.indexOf(As),-1<As&&bs.splice(As,1))}},as.patchEvents=function(){window.Event=cs,window.CustomEvent=hs,window.MouseEvent=_s,ao()};var us={},ms={addEventListener:as.addEventListener,removeEventListener:as.removeEventListener,appendChild:function(bs){return rs.insertBefore(this,bs)},insertBefore:function(bs,Cs){return rs.insertBefore(this,bs,Cs)},removeChild:function(bs){return rs.removeChild(this,bs)},replaceChild:function(bs,Cs){return this.insertBefore(bs,Cs),this.removeChild(Cs),bs},cloneNode:function(bs){return rs.cloneNode(this,bs)},getRootNode:function(bs){return rs.getRootNode(this,bs)},get isConnected(){var bs=this.ownerDocument;if(bs&&bs.contains&&bs.contains(this)||(bs=bs.documentElement)&&bs.contains&&bs.contains(this))return!0;for(bs=this;bs&&!(bs instanceof Document);)bs=bs.parentNode||(bs instanceof ts.ShadyRoot?bs.host:void 0);return!!(bs&&bs instanceof Document)}},ys={get assignedSlot(){return io(this)}},gs={querySelector:function(bs){return rs.query(this,function(Cs){return _o.matchesSelector(Cs,bs)},function(Cs){return!!Cs})[0]||null},querySelectorAll:function(bs){return rs.query(this,function(Cs){return _o.matchesSelector(Cs,bs)})}},fs={assignedNodes:function(bs){if('slot'===this.localName)return rs.renderRootNode(this),this.__shady?(bs&&bs.flatten?this.__shady.distributedNodes:this.__shady.assignedNodes)||[]:[]}},Ns=_o.extendAll({setAttribute:function(bs,Cs){rs.setAttribute(this,bs,Cs)},removeAttribute:function(bs){rs.removeAttribute(this,bs)},attachShadow:function(bs){return ts.attachShadow(this,bs)},get slot(){return this.getAttribute('slot')},set slot(bs){this.setAttribute('slot',bs)},get assignedSlot(){return io(this)}},gs,fs);Object.defineProperties(Ns,wo.ShadowRootAccessor);var Ss=_o.extendAll({importNode:function(bs,Cs){return rs.importNode(bs,Cs)}},gs);Object.defineProperties(Ss,{_activeElement:wo.ActiveElementAccessor.activeElement}),us.patchBuiltins=function(){po(window.Node.prototype,ms),po(window.Text.prototype,ys),po(window.DocumentFragment.prototype,gs),po(window.Element.prototype,Ns),po(window.Document.prototype,Ss),window.HTMLSlotElement&&po(window.HTMLSlotElement.prototype,fs),_o.settings.hasDescriptors&&(wo.patchAccessors(window.Node.prototype),wo.patchAccessors(window.Text.prototype),wo.patchAccessors(window.DocumentFragment.prototype),wo.patchAccessors(window.Element.prototype),wo.patchAccessors((window.customElements&&customElements.nativeHTMLElement||HTMLElement).prototype),wo.patchAccessors(window.Document.prototype),window.HTMLSlotElement&&wo.patchAccessors(window.HTMLSlotElement.prototype))},_o.settings.inUse&&(window.ShadyDOM={inUse:_o.settings.inUse,patch:function(bs){return bs},isShadyRoot:_o.isShadyRoot,enqueue:bo.enqueue,flush:bo.flush,settings:_o.settings,filterMutations:ns.filterMutations,observeChildren:ns.observeChildren,unobserveChildren:ns.unobserveChildren,nativeMethods:Xo,nativeTree:Oo},as.patchEvents(),us.patchBuiltins(),window.ShadowRoot=ts.ShadyRoot)}).call(void 0),function(){'use strict';function xt(Lo){var ko=to.has(Lo);return Lo=/^[a-z][.0-9_a-z]*-[\-.0-9_a-z]*$/.test(Lo),!ko&&Lo}function Ot(Lo){var ko=Lo.isConnected;if(void 0!==ko)return ko;for(;Lo&&!(Lo.__CE_isImportDocument||Lo instanceof Document);)Lo=Lo.parentNode||(window.ShadowRoot&&Lo instanceof ShadowRoot?Lo.host:void 0);return Lo&&(Lo.__CE_isImportDocument||Lo instanceof Document)}function Mt(Lo,ko){for(;ko&&ko!==Lo&&!ko.nextSibling;)ko=ko.parentNode;return ko&&ko!==Lo?ko.nextSibling:null}function It(Lo,ko,Ho){Ho=Ho?Ho:new Set;for(var Fo=Lo;Fo;){if(Fo.nodeType===Node.ELEMENT_NODE){var Uo=Fo;ko(Uo);var Wo=Uo.localName;if('link'===Wo&&'import'===Uo.getAttribute('rel')){if(Fo=Uo.import,Fo instanceof Node&&!Ho.has(Fo))for(Ho.add(Fo),Fo=Fo.firstChild;Fo;Fo=Fo.nextSibling)It(Fo,ko,Ho);Fo=Mt(Lo,Uo);continue}else if('template'===Wo){Fo=Mt(Lo,Uo);continue}if(Uo=Uo.__CE_shadowRoot)for(Uo=Uo.firstChild;Uo;Uo=Uo.nextSibling)It(Uo,ko,Ho)}Fo=Fo.firstChild?Fo.firstChild:Mt(Lo,Fo)}}function wt(Lo,ko,Ho){Lo[ko]=Ho}function Dt(){this.a=new Map,this.f=new Map,this.c=[],this.b=!1}function Lt(Lo,ko,Ho){Lo.a.set(ko,Ho),Lo.f.set(Ho.constructor,Ho)}function kt(Lo,ko){Lo.b=!0,Lo.c.push(ko)}function Ht(Lo,ko){Lo.b&&It(ko,function(Ho){return Ft(Lo,Ho)})}function Ft(Lo,ko){if(Lo.b&&!ko.__CE_patched){ko.__CE_patched=!0;for(var Ho=0;Ho<Lo.c.length;Ho++)Lo.c[Ho](ko)}}function Ut(Lo,ko){var Ho=[];for(It(ko,function(Uo){return Ho.push(Uo)}),ko=0;ko<Ho.length;ko++){var Fo=Ho[ko];1===Fo.__CE_state?Lo.connectedCallback(Fo):jt(Lo,Fo)}}function Wt(Lo,ko){var Ho=[];for(It(ko,function(Uo){return Ho.push(Uo)}),ko=0;ko<Ho.length;ko++){var Fo=Ho[ko];1===Fo.__CE_state&&Lo.disconnectedCallback(Fo)}}function Bt(Lo,ko,Ho){Ho=Ho?Ho:new Set;var Fo=[];if(It(ko,function(Uo){if('link'===Uo.localName&&'import'===Uo.getAttribute('rel')){var Wo=Uo.import;Wo instanceof Node&&'complete'===Wo.readyState?(Wo.__CE_isImportDocument=!0,Wo.__CE_hasRegistry=!0):Uo.addEventListener('load',function(){var Bo=Uo.import;Bo.__CE_documentLoadHandled||(Bo.__CE_documentLoadHandled=!0,Bo.__CE_isImportDocument=!0,Bo.__CE_hasRegistry=!0,new Set(Ho),Ho.delete(Bo),Bt(Lo,Bo,Ho))})}else Fo.push(Uo)},Ho),Lo.b)for(ko=0;ko<Fo.length;ko++)Ft(Lo,Fo[ko]);for(ko=0;ko<Fo.length;ko++)jt(Lo,Fo[ko])}function jt(Lo,ko){if(void 0===ko.__CE_state){var Ho=Lo.a.get(ko.localName);if(Ho){Ho.constructionStack.push(ko);var Fo=Ho.constructor;try{try{if(new Fo!==ko)throw Error('The custom element constructor did not produce the element being upgraded.')}finally{Ho.constructionStack.pop()}}catch(Bo){throw ko.__CE_state=2,Bo}if(ko.__CE_state=1,ko.__CE_definition=Ho,Ho.attributeChangedCallback)for(Ho=Ho.observedAttributes,Fo=0;Fo<Ho.length;Fo++){var Uo=Ho[Fo],Wo=ko.getAttribute(Uo);null!==Wo&&Lo.attributeChangedCallback(ko,Uo,null,Wo,null)}Ot(ko)&&Lo.connectedCallback(ko)}}}function qt(Lo,ko){this.c=Lo,this.a=ko,this.b=void 0,Bt(this.c,this.a),'loading'===this.a.readyState&&(this.b=new MutationObserver(this.f.bind(this)),this.b.observe(this.a,{childList:!0,subtree:!0}))}function Xt(Lo){Lo.b&&Lo.b.disconnect()}function Vt(){var Lo=this;this.b=this.a=void 0,this.c=new Promise(function(ko){Lo.b=ko,Lo.a&&ko(Lo.a)})}function Kt(Lo){if(Lo.a)throw Error('Already resolved.');Lo.a=void 0,Lo.b&&Lo.b(void 0)}function Gt(Lo){this.f=!1,this.a=Lo,this.h=new Map,this.g=function(ko){return ko()},this.b=!1,this.c=[],this.j=new qt(Lo,document)}function Yt(){var Lo=wo;window.HTMLElement=function(){function ko(){var Ho=this.constructor,Fo=Lo.f.get(Ho);if(!Fo)throw Error('The custom element being constructed was not registered with `customElements`.');var Uo=Fo.constructionStack;if(!Uo.length)return Uo=oo.call(document,Fo.localName),Object.setPrototypeOf(Uo,Ho.prototype),Uo.__CE_state=1,Uo.__CE_definition=Fo,Ft(Lo,Uo),Uo;var Fo=Uo.length-1,Wo=Uo[Fo];if(Wo===eo)throw Error('The HTMLElement constructor was either called reentrantly for this constructor or called multiple times.');return Uo[Fo]=eo,Object.setPrototypeOf(Wo,Ho.prototype),Ft(Lo,Wo),Wo}return ko.prototype=xo.prototype,ko}()}function zt(Lo,ko,Ho){ko.prepend=function(){for(var Uo=[],Wo=0;Wo<arguments.length;++Wo)Uo[Wo-0]=arguments[Wo];Wo=Uo.filter(function(jo){return jo instanceof Node&&Ot(jo)}),Ho.i.apply(this,Uo);for(var Bo=0;Bo<Wo.length;Bo++)Wt(Lo,Wo[Bo]);if(Ot(this))for(Wo=0;Wo<Uo.length;Wo++)Bo=Uo[Wo],Bo instanceof Element&&Ut(Lo,Bo)},ko.append=function(){for(var Uo=[],Wo=0;Wo<arguments.length;++Wo)Uo[Wo-0]=arguments[Wo];Wo=Uo.filter(function(jo){return jo instanceof Node&&Ot(jo)}),Ho.append.apply(this,Uo);for(var Bo=0;Bo<Wo.length;Bo++)Wt(Lo,Wo[Bo]);if(Ot(this))for(Wo=0;Wo<Uo.length;Wo++)Bo=Uo[Wo],Bo instanceof Element&&Ut(Lo,Bo)}}function $t(){var Lo=wo;wt(Document.prototype,'createElement',function(ko){if(this.__CE_hasRegistry){var Ho=Lo.a.get(ko);if(Ho)return new Ho.constructor}return ko=oo.call(this,ko),Ft(Lo,ko),ko}),wt(Document.prototype,'importNode',function(ko,Ho){return ko=ro.call(this,ko,Ho),this.__CE_hasRegistry?Bt(Lo,ko):Ht(Lo,ko),ko}),wt(Document.prototype,'createElementNS',function(ko,Ho){if(this.__CE_hasRegistry&&(null===ko||'http://www.w3.org/1999/xhtml'===ko)){var Fo=Lo.a.get(Ho);if(Fo)return new Fo.constructor}return ko=so.call(this,ko,Ho),Ft(Lo,ko),ko}),zt(Lo,Document.prototype,{i:no,append:ao})}function Jt(){function Lo(Ho,Fo){Object.defineProperty(Ho,'textContent',{enumerable:Fo.enumerable,configurable:!0,get:Fo.get,set:function(Uo){if(this.nodeType===Node.TEXT_NODE)Fo.set.call(this,Uo);else{var Wo;if(this.firstChild){var Bo=this.childNodes,jo=Bo.length;if(0<jo&&Ot(this))for(var Wo=Array(jo),qo=0;qo<jo;qo++)Wo[qo]=Bo[qo]}if(Fo.set.call(this,Uo),Wo)for(Uo=0;Uo<Wo.length;Uo++)Wt(ko,Wo[Uo])}}})}var ko=wo;wt(Node.prototype,'insertBefore',function(Ho,Fo){if(Ho instanceof DocumentFragment){var Uo=Array.prototype.slice.apply(Ho.childNodes);if(Ho=po.call(this,Ho,Fo),Ot(this))for(Fo=0;Fo<Uo.length;Fo++)Ut(ko,Uo[Fo]);return Ho}return Uo=Ot(Ho),Fo=po.call(this,Ho,Fo),Uo&&Wt(ko,Ho),Ot(this)&&Ut(ko,Ho),Fo}),wt(Node.prototype,'appendChild',function(Ho){if(Ho instanceof DocumentFragment){var Fo=Array.prototype.slice.apply(Ho.childNodes);if(Ho=io.call(this,Ho),Ot(this))for(var Uo=0;Uo<Fo.length;Uo++)Ut(ko,Fo[Uo]);return Ho}return Fo=Ot(Ho),Uo=io.call(this,Ho),Fo&&Wt(ko,Ho),Ot(this)&&Ut(ko,Ho),Uo}),wt(Node.prototype,'cloneNode',function(Ho){return Ho=lo.call(this,Ho),this.ownerDocument.__CE_hasRegistry?Bt(ko,Ho):Ht(ko,Ho),Ho}),wt(Node.prototype,'removeChild',function(Ho){var Fo=Ot(Ho),Uo=co.call(this,Ho);return Fo&&Wt(ko,Ho),Uo}),wt(Node.prototype,'replaceChild',function(Ho,Fo){if(Ho instanceof DocumentFragment){var Uo=Array.prototype.slice.apply(Ho.childNodes);if(Ho=ho.call(this,Ho,Fo),Ot(this))for(Wt(ko,Fo),Fo=0;Fo<Uo.length;Fo++)Ut(ko,Uo[Fo]);return Ho}var Uo=Ot(Ho),Wo=ho.call(this,Ho,Fo),Bo=Ot(this);return Bo&&Wt(ko,Fo),Uo&&Wt(ko,Ho),Bo&&Ut(ko,Ho),Wo}),_o&&_o.get?Lo(Node.prototype,_o):kt(ko,function(Ho){Lo(Ho,{enumerable:!0,configurable:!0,get:function(){for(var Fo=[],Uo=0;Uo<this.childNodes.length;Uo++)Fo.push(this.childNodes[Uo].textContent);return Fo.join('')},set:function(Fo){for(;this.firstChild;)co.call(this,this.firstChild);io.call(this,document.createTextNode(Fo))}})})}function Zt(Lo){var ko=Element.prototype;ko.before=function(){for(var Fo=[],Uo=0;Uo<arguments.length;++Uo)Fo[Uo-0]=arguments[Uo];Uo=Fo.filter(function(Bo){return Bo instanceof Node&&Ot(Bo)}),Po.apply(this,Fo);for(var Wo=0;Wo<Uo.length;Wo++)Wt(Lo,Uo[Wo]);if(Ot(this))for(Uo=0;Uo<Fo.length;Uo++)Wo=Fo[Uo],Wo instanceof Element&&Ut(Lo,Wo)},ko.after=function(){for(var Fo=[],Uo=0;Uo<arguments.length;++Uo)Fo[Uo-0]=arguments[Uo];Uo=Fo.filter(function(Bo){return Bo instanceof Node&&Ot(Bo)}),To.apply(this,Fo);for(var Wo=0;Wo<Uo.length;Wo++)Wt(Lo,Uo[Wo]);if(Ot(this))for(Uo=0;Uo<Fo.length;Uo++)Wo=Fo[Uo],Wo instanceof Element&&Ut(Lo,Wo)},ko.replaceWith=function(){for(var Fo=[],Uo=0;Uo<arguments.length;++Uo)Fo[Uo-0]=arguments[Uo];var Uo=Fo.filter(function(jo){return jo instanceof Node&&Ot(jo)}),Wo=Ot(this);Ao.apply(this,Fo);for(var Bo=0;Bo<Uo.length;Bo++)Wt(Lo,Uo[Bo]);if(Wo)for(Wt(Lo,this),Uo=0;Uo<Fo.length;Uo++)Wo=Fo[Uo],Wo instanceof Element&&Ut(Lo,Wo)},ko.remove=function(){var Ho=Ot(this);Ro.call(this),Ho&&Wt(Lo,this)}}function Qt(){function Lo(Uo,Wo){Object.defineProperty(Uo,'innerHTML',{enumerable:Wo.enumerable,configurable:!0,get:Wo.get,set:function(Bo){var qo,jo=this;if(Ot(this)&&(qo=[],It(this,function(Ko){Ko!==jo&&qo.push(Ko)})),Wo.set.call(this,Bo),qo)for(var Vo,Xo=0;Xo<qo.length;Xo++)Vo=qo[Xo],1===Vo.__CE_state&&Ho.disconnectedCallback(Vo);return this.ownerDocument.__CE_hasRegistry?Bt(Ho,this):Ht(Ho,this),Bo}})}function ko(Uo,Wo){wt(Uo,'insertAdjacentElement',function(Bo,jo){var qo=Ot(jo);return Bo=Wo.call(this,Bo,jo),qo&&Wt(Ho,jo),Ot(Bo)&&Ut(Ho,jo),Bo})}var Ho=wo;if(uo?wt(Element.prototype,'attachShadow',function(Uo){return this.__CE_shadowRoot=Uo=uo.call(this,Uo)}):console.warn('Custom Elements: `Element#attachShadow` was not patched.'),mo&&mo.get)Lo(Element.prototype,mo);else if(Oo&&Oo.get)Lo(HTMLElement.prototype,Oo);else{var Fo=oo.call(document,'div');kt(Ho,function(Uo){Lo(Uo,{enumerable:!0,configurable:!0,get:function(){return lo.call(this,!0).innerHTML},set:function(Wo){var Bo='template'===this.localName?this.content:this;for(Fo.innerHTML=Wo;0<Bo.childNodes.length;)co.call(Bo,Bo.childNodes[0]);for(;0<Fo.childNodes.length;)io.call(Bo,Fo.childNodes[0])}})})}wt(Element.prototype,'setAttribute',function(Uo,Wo){if(1!==this.__CE_state)return go.call(this,Uo,Wo);var Bo=yo.call(this,Uo);go.call(this,Uo,Wo),Wo=yo.call(this,Uo),Bo!==Wo&&Ho.attributeChangedCallback(this,Uo,Bo,Wo,null)}),wt(Element.prototype,'setAttributeNS',function(Uo,Wo,Bo){if(1!==this.__CE_state)return So.call(this,Uo,Wo,Bo);var jo=No.call(this,Uo,Wo);So.call(this,Uo,Wo,Bo),Bo=No.call(this,Uo,Wo),jo!==Bo&&Ho.attributeChangedCallback(this,Wo,jo,Bo,Uo)}),wt(Element.prototype,'removeAttribute',function(Uo){if(1!==this.__CE_state)return fo.call(this,Uo);var Wo=yo.call(this,Uo);fo.call(this,Uo),null!==Wo&&Ho.attributeChangedCallback(this,Uo,Wo,null,null)}),wt(Element.prototype,'removeAttributeNS',function(Uo,Wo){if(1!==this.__CE_state)return bo.call(this,Uo,Wo);var Bo=No.call(this,Uo,Wo);bo.call(this,Uo,Wo);var jo=No.call(this,Uo,Wo);Bo!==jo&&Ho.attributeChangedCallback(this,Wo,Bo,jo,Uo)}),Mo?ko(HTMLElement.prototype,Mo):Co?ko(Element.prototype,Co):console.warn('Custom Elements: `Element#insertAdjacentElement` was not patched.'),zt(Ho,Element.prototype,{i:Eo,append:vo}),Zt(Ho)}var eo=new function(){},to=new Set('annotation-xml color-profile font-face font-face-src font-face-uri font-face-format font-face-name missing-glyph'.split(' '));Dt.prototype.connectedCallback=function(Lo){var ko=Lo.__CE_definition;ko.connectedCallback&&ko.connectedCallback.call(Lo)},Dt.prototype.disconnectedCallback=function(Lo){var ko=Lo.__CE_definition;ko.disconnectedCallback&&ko.disconnectedCallback.call(Lo)},Dt.prototype.attributeChangedCallback=function(Lo,ko,Ho,Fo,Uo){var Wo=Lo.__CE_definition;Wo.attributeChangedCallback&&-1<Wo.observedAttributes.indexOf(ko)&&Wo.attributeChangedCallback.call(Lo,ko,Ho,Fo,Uo)},qt.prototype.f=function(Lo){var ko=this.a.readyState;for('interactive'!==ko&&'complete'!==ko||Xt(this),ko=0;ko<Lo.length;ko++)for(var Ho=Lo[ko].addedNodes,Fo=0;Fo<Ho.length;Fo++)Bt(this.c,Ho[Fo])},Gt.prototype.l=function(Lo,ko){var Ho=this;if(!(ko instanceof Function))throw new TypeError('Custom element constructors must be functions.');if(!xt(Lo))throw new SyntaxError('The element name \''+Lo+'\' is not valid.');if(this.a.a.get(Lo))throw Error('A custom element with name \''+Lo+'\' has already been defined.');if(this.f)throw Error('A custom element is already being defined.');this.f=!0;var Fo,Uo,Wo,Bo,jo;try{var qo=function(Vo){var Ko=Xo[Vo];if(void 0!==Ko&&!(Ko instanceof Function))throw Error('The \''+Vo+'\' callback must be a function.');return Ko},Xo=ko.prototype;if(!(Xo instanceof Object))throw new TypeError('The custom element constructor\'s prototype is not an object.');Fo=qo('connectedCallback'),Uo=qo('disconnectedCallback'),Wo=qo('adoptedCallback'),Bo=qo('attributeChangedCallback'),jo=ko.observedAttributes||[]}catch(Vo){return}finally{this.f=!1}Lt(this.a,Lo,{localName:Lo,constructor:ko,connectedCallback:Fo,disconnectedCallback:Uo,adoptedCallback:Wo,attributeChangedCallback:Bo,observedAttributes:jo,constructionStack:[]}),this.c.push(Lo),this.b||(this.b=!0,this.g(function(){if(!1!==Ho.b)for(Ho.b=!1,Bt(Ho.a,document);0<Ho.c.length;){var Vo=Ho.c.shift();(Vo=Ho.h.get(Vo))&&Kt(Vo)}}))},Gt.prototype.get=function(Lo){if(Lo=this.a.a.get(Lo))return Lo.constructor},Gt.prototype.o=function(Lo){if(!xt(Lo))return Promise.reject(new SyntaxError('\''+Lo+'\' is not a valid custom element name.'));var ko=this.h.get(Lo);return ko?ko.c:(ko=new Vt,this.h.set(Lo,ko),this.a.a.get(Lo)&&-1===this.c.indexOf(Lo)&&Kt(ko),ko.c)},Gt.prototype.m=function(Lo){Xt(this.j);var ko=this.g;this.g=function(Ho){return Lo(function(){return ko(Ho)})}},window.CustomElementRegistry=Gt,Gt.prototype.define=Gt.prototype.l,Gt.prototype.get=Gt.prototype.get,Gt.prototype.whenDefined=Gt.prototype.o,Gt.prototype.polyfillWrapFlushCallback=Gt.prototype.m;var oo=window.Document.prototype.createElement,so=window.Document.prototype.createElementNS,ro=window.Document.prototype.importNode,no=window.Document.prototype.prepend,ao=window.Document.prototype.append,lo=window.Node.prototype.cloneNode,io=window.Node.prototype.appendChild,po=window.Node.prototype.insertBefore,co=window.Node.prototype.removeChild,ho=window.Node.prototype.replaceChild,_o=Object.getOwnPropertyDescriptor(window.Node.prototype,'textContent'),uo=window.Element.prototype.attachShadow,mo=Object.getOwnPropertyDescriptor(window.Element.prototype,'innerHTML'),yo=window.Element.prototype.getAttribute,go=window.Element.prototype.setAttribute,fo=window.Element.prototype.removeAttribute,No=window.Element.prototype.getAttributeNS,So=window.Element.prototype.setAttributeNS,bo=window.Element.prototype.removeAttributeNS,Co=window.Element.prototype.insertAdjacentElement,Eo=window.Element.prototype.prepend,vo=window.Element.prototype.append,Po=window.Element.prototype.before,To=window.Element.prototype.after,Ao=window.Element.prototype.replaceWith,Ro=window.Element.prototype.remove,xo=window.HTMLElement,Oo=Object.getOwnPropertyDescriptor(window.HTMLElement.prototype,'innerHTML'),Mo=window.HTMLElement.prototype.insertAdjacentElement,Io=window.customElements;if(!Io||Io.forcePolyfill||'function'!=typeof Io.define||'function'!=typeof Io.get){var wo=new Dt;Yt(),$t(),Jt(),Qt(),document.__CE_hasRegistry=!0;var Do=new Gt(wo);Object.defineProperty(window,'customElements',{configurable:!0,enumerable:!0,value:Do})}}.call(self);let ve={STYLE_RULE:1,KEYFRAMES_RULE:7,MEDIA_RULE:4,MIXIN_RULE:1e3},Pe='{',Te='}',Ae={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},Re='--',Me=!(window.ShadyDOM&&window.ShadyDOM.inUse),Ie=!navigator.userAgent.match('AppleWebKit/601')&&window.CSS&&CSS.supports&&CSS.supports('box-shadow','0 0 0 var(--foo)');window.ShadyCSS?ie(window.ShadyCSS):window.WebComponents&&ie(window.WebComponents.flags);let De=null,Le={VAR_ASSIGN:/(?:^|[;\s{]\s*)(--[\w-]*?)\s*:\s*(?:([^;{]*)|{([^}]*)})(?:(?=[;\s}])|$)/gi,MIXIN_MATCH:/(?:^|\W+)@apply\s*\(?([^);\n]*)\)?/gi,VAR_CONSUMED:/(--[\w-]+)\s*([:,;)]|$)/gi,ANIMATION_MATCH:/(animation\s*:)|(animation-name\s*:)/,MEDIA_MATCH:/@media[^(]*(\([^)]*\))/,IS_VAR:/^--/,BRACKETED:/\{[^}]*\}/g,HOST_PREFIX:'(?:^|[^.#[:])',HOST_SUFFIX:'($|[.:[\\s>+~])'};const ke='style-scope';class He{get SCOPE_NAME(){return ke}dom(xt,Ot,Mt){xt.__styleScoped?xt.__styleScoped=null:this._transformDom(xt,Ot||'',Mt)}_transformDom(xt,Ot,Mt){xt.nodeType===Node.ELEMENT_NODE&&this.element(xt,Ot,Mt);let It='template'===xt.localName?(xt.content||xt._content).childNodes:xt.children||xt.childNodes;if(It)for(let wt=0;wt<It.length;wt++)this._transformDom(It[wt],Ot,Mt)}element(xt,Ot,Mt){if(Ot)if(xt.classList)Mt?(xt.classList.remove(ke),xt.classList.remove(Ot)):(xt.classList.add(ke),xt.classList.add(Ot));else if(xt.getAttribute){let It=xt.getAttribute('class');if(!Mt){let wt=(It?It+' ':'')+ke+' '+Ot;Se(xt,wt)}else if(It){let wt=It.replace(ke,'').replace(Ot,'');Se(xt,wt)}}}elementStyles(xt,Ot,Mt){let It=xt.__cssBuild,wt=Me||'shady'===It?de(Ot,Mt):this.css(Ot,xt.is,xt.extends,Mt)+'\n\n';return wt.trim()}css(xt,Ot,Mt,It){let wt=this._calcHostScope(Ot,Mt);Ot=this._calcElementScope(Ot);let Dt=this;return de(xt,function(Lt){Lt.isScoped||(Dt.rule(Lt,Ot,wt),Lt.isScoped=!0),It&&It(Lt,Ot,wt)})}_calcElementScope(xt){return xt?'.'+xt:''}_calcHostScope(xt,Ot){return Ot?'[is='+xt+']':xt}rule(xt,Ot,Mt){this._transformRule(xt,this._transformComplexSelector,Ot,Mt)}_transformRule(xt,Ot,Mt,It){xt.selector=xt.transformedSelector=this._transformRuleCss(xt,Ot,Mt,It)}_transformRuleCss(xt,Ot,Mt,It){let wt=xt.selector.split(We);if(!he(xt))for(let kt,Dt=0,Lt=wt.length;Dt<Lt&&(kt=wt[Dt]);Dt++)wt[Dt]=Ot.call(this,kt,Mt,It);return wt.join(We)}_transformComplexSelector(xt,Ot,Mt){let It=!1;return xt=xt.trim(),xt=xt.replace(Fe,(wt,Dt,Lt)=>`:${Dt}(${Lt.replace(/\s/g,'')})`),xt=xt.replace(Ke,`${qe} $1`),xt=xt.replace(Be,(wt,Dt,Lt)=>{if(!It){let kt=this._transformCompoundSelector(Lt,Dt,Ot,Mt);It=It||kt.stop,Dt=kt.combinator,Lt=kt.value}return Dt+Lt}),xt}_transformCompoundSelector(xt,Ot,Mt,It){let wt=xt.indexOf(Ve);0<=xt.indexOf(qe)?xt=this._transformHostSelector(xt,It):0!==wt&&(xt=Mt?this._transformSimpleSelector(xt,Mt):xt);let Dt=!1;0<=wt&&(Ot='',Dt=!0);let Lt;return Dt&&(Lt=!0,Dt&&(xt=xt.replace(Ye,(kt,Ht)=>` > ${Ht}`))),xt=xt.replace(ze,(kt,Ht,Ft)=>`[dir="${Ft}"] ${Ht}, ${Ht}[dir="${Ft}"]`),{value:xt,combinator:Ot,stop:Lt}}_transformSimpleSelector(xt,Ot){let Mt=xt.split(Je);return Mt[0]+=Ot,Mt.join(Je)}_transformHostSelector(xt,Ot){let Mt=xt.match(Ge),It=Mt&&Mt[2].trim()||'';if(It){if(!It[0].match(je)){let wt=It.split(je)[0];return wt===Ot?It:'should_not_match'}return xt.replace(Ge,function(wt,Dt,Lt){return Ot+Lt})}return xt.replace(qe,Ot)}documentRule(xt){xt.selector=xt.parsedSelector,this.normalizeRootSelector(xt),this._transformRule(xt,this._transformDocumentSelector)}normalizeRootSelector(xt){xt.selector===':root'&&(xt.selector='html')}_transformDocumentSelector(xt){return xt.match(Ve)?this._transformComplexSelector(xt,Ue):this._transformSimpleSelector(xt.trim(),Ue)}}let Fe=/:(nth[-\w]+)\(([^)]+)\)/,Ue=`:not(.${ke})`,We=',',Be=/(^|[\s>+~]+)((?:\[.+?\]|[^\s>+~=\[])+)/g,je=/[[.:#*]/,qe=':host',Ve='::slotted',Ke=/^(::slotted)/,Ge=/(:host)(?:\(((?:\([^)(]*\)|[^)(]*)+?)\))/,Ye=/(?:::slotted)(?:\(((?:\([^)(]*\)|[^)(]*)+?)\))/,ze=/(.*):dir\((?:(ltr|rtl))\)/,Je=':';var et=new He,tt={};const ot=Promise.resolve();class st{static get(xt){return xt.__styleInfo}static set(xt,Ot){return xt.__styleInfo=Ot,Ot}static invalidate(xt){tt[xt]&&(tt[xt]._applyShimInvalid=!0)}static startValidating(xt){const Ot=tt[xt];Ot._validating||(Ot._validating=!0,ot.then(()=>{Ot._applyShimInvalid=!1,Ot._validating=!1}))}constructor(xt,Ot,Mt,It,wt,Dt){this.styleRules=xt||null,this.placeholder=Ot||null,this.ownStylePropertyNames=Mt||[],this.overrideStyleProperties=null,this.elementName=It||'',this.cssBuild=Dt||'',this.typeExtension=wt||'',this.styleProperties=null,this.scopeSelector=null,this.customStyle=null}}const rt=window.Element.prototype,nt=rt.matches||rt.matchesSelector||rt.mozMatchesSelector||rt.msMatchesSelector||rt.oMatchesSelector||rt.webkitMatchesSelector,at=navigator.userAgent.match('Trident'),lt='x-scope';class it{get XSCOPE_NAME(){return lt}decorateStyles(xt){let Ot=this,Mt={},It=[],wt=0;_e(xt,function(Lt){Ot.decorateRule(Lt),Lt.index=wt++,Ot.collectPropertiesInCssText(Lt.propertyInfo.cssText,Mt)},function(kt){It.push(kt)}),xt._keyframes=It;let Dt=[];for(let Lt in Mt)Dt.push(Lt);return Dt}decorateRule(xt){if(xt.propertyInfo)return xt.propertyInfo;let Ot={},Mt={},It=this.collectProperties(xt,Mt);return It&&(Ot.properties=Mt,xt.rules=null),Ot.cssText=this.collectCssText(xt),xt.propertyInfo=Ot,Ot}collectProperties(xt,Ot){let Mt=xt.propertyInfo;if(!Mt){let It,wt=Le.VAR_ASSIGN,Dt=xt.parsedCssText,Lt,kt;for(;It=wt.exec(Dt);)Lt=(It[2]||It[3]).trim(),('inherit'!==Lt||'unset'!==Lt)&&(Ot[It[1].trim()]=Lt),kt=!0;return kt}else if(Mt.properties)return Object.assign(Ot,Mt.properties),!0}collectCssText(xt){return this.collectConsumingCssText(xt.parsedCssText)}collectConsumingCssText(xt){return xt.replace(Le.BRACKETED,'').replace(Le.VAR_ASSIGN,'')}collectPropertiesInCssText(xt,Ot){for(let Mt,It;Mt=Le.VAR_CONSUMED.exec(xt);)It=Mt[1],':'!==Mt[2]&&(Ot[It]=!0)}reify(xt){let Ot=Object.getOwnPropertyNames(xt);for(let It,Mt=0;Mt<Ot.length;Mt++)It=Ot[Mt],xt[It]=this.valueForProperty(xt[It],xt)}valueForProperty(xt,Ot){if(xt)if(0<=xt.indexOf(';'))xt=this.valueForProperties(xt,Ot);else{let Mt=this;xt=Ne(xt,function(wt,Dt,Lt,kt){if(!Dt)return wt+kt;let Ht=Mt.valueForProperty(Ot[Dt],Ot);return Ht&&'initial'!==Ht?'apply-shim-inherit'===Ht&&(Ht='inherit'):Ht=Mt.valueForProperty(Ot[Lt]||Lt,Ot)||Lt,wt+(Ht||'')+kt})}return xt&&xt.trim()||''}valueForProperties(xt,Ot){let Mt=xt.split(';');for(let wt,Dt,It=0;It<Mt.length;It++)if(wt=Mt[It]){if(Le.MIXIN_MATCH.lastIndex=0,Dt=Le.MIXIN_MATCH.exec(wt),Dt)wt=this.valueForProperty(Ot[Dt[1]],Ot);else{let Lt=wt.indexOf(':');if(-1!==Lt){let kt=wt.substring(Lt);kt=kt.trim(),kt=this.valueForProperty(kt,Ot)||kt,wt=wt.substring(0,Lt)+kt}}Mt[It]=wt&&wt.lastIndexOf(';')===wt.length-1?wt.slice(0,-1):wt||''}return Mt.join(';')}applyProperties(xt,Ot){let Mt='';xt.propertyInfo||this.decorateRule(xt),xt.propertyInfo.cssText&&(Mt=this.valueForProperties(xt.propertyInfo.cssText,Ot)),xt.cssText=Mt}applyKeyframeTransforms(xt,Ot){let Mt=xt.cssText,It=xt.cssText;if(null==xt.hasAnimations&&(xt.hasAnimations=Le.ANIMATION_MATCH.test(Mt)),xt.hasAnimations){let wt;if(null==xt.keyframeNamesToTransform)for(let Dt in xt.keyframeNamesToTransform=[],Ot)wt=Ot[Dt],It=wt(Mt),Mt!==It&&(Mt=It,xt.keyframeNamesToTransform.push(Dt));else{for(let Dt=0;Dt<xt.keyframeNamesToTransform.length;++Dt)wt=Ot[xt.keyframeNamesToTransform[Dt]],Mt=wt(Mt);It=Mt}}xt.cssText=It}propertyDataFromStyles(xt,Ot){let Mt={},It=this,wt=[];return _e(xt,function(Dt){Dt.propertyInfo||It.decorateRule(Dt);let Lt=Dt.transformedSelector||Dt.parsedSelector;Ot&&Dt.propertyInfo.properties&&Lt&&nt.call(Ot,Lt)&&(It.collectProperties(Dt,Mt),be(Dt.index,wt))},null,!0),{properties:Mt,key:wt}}whenHostOrRootRule(xt,Ot,Mt,It){if(Ot.propertyInfo||this.decorateRule(Ot),!!Ot.propertyInfo.properties){let wt=xt.is?et._calcHostScope(xt.is,xt.extends):'html',Dt=Ot.parsedSelector,Lt=':host > *'===Dt||'html'===Dt,kt=0===Dt.indexOf(':host')&&!Lt;if('shady'===Mt&&(Lt=Dt===wt+' > *.'+wt||-1!==Dt.indexOf('html'),kt=!Lt&&0===Dt.indexOf(wt)),'shadow'===Mt&&(Lt=':host > *'===Dt||'html'===Dt,kt=kt&&!Lt),Lt||kt){let Ht=wt;kt&&(Me&&!Ot.transformedSelector&&(Ot.transformedSelector=et._transformRuleCss(Ot,et._transformComplexSelector,et._calcElementScope(xt.is),wt)),Ht=Ot.transformedSelector||wt),It({selector:Ht,isHost:kt,isRoot:Lt})}}}hostAndRootPropertiesForScope(xt,Ot){let Mt={},It={},wt=this,Dt=Ot&&Ot.__cssBuild;return _e(Ot,function(Lt){wt.whenHostOrRootRule(xt,Lt,Dt,function(kt){let Ht=xt._element||xt;nt.call(Ht,kt.selector)&&(kt.isHost?wt.collectProperties(Lt,Mt):wt.collectProperties(Lt,It))})},null,!0),{rootProps:It,hostProps:Mt}}transformStyles(xt,Ot,Mt){let It=this,wt=et._calcHostScope(xt.is,xt.extends),Dt=xt.extends?'\\'+wt.slice(0,-1)+'\\]':wt,Lt=new RegExp(Le.HOST_PREFIX+Dt+Le.HOST_SUFFIX),kt=st.get(xt).styleRules,Ht=this._elementKeyframeTransforms(xt,kt,Mt);return et.elementStyles(xt,kt,function(Ft){It.applyProperties(Ft,Ot),Me||he(Ft)||!Ft.cssText||(It.applyKeyframeTransforms(Ft,Ht),It._scopeSelector(Ft,Lt,wt,Mt))})}_elementKeyframeTransforms(xt,Ot,Mt){let It=Ot._keyframes,wt={};if(!Me&&It)for(let Dt=0,Lt=It[Dt];Dt<It.length;Lt=It[++Dt])this._scopeKeyframes(Lt,Mt),wt[Lt.keyframesName]=this._keyframesRuleTransformer(Lt);return wt}_keyframesRuleTransformer(xt){return function(Ot){return Ot.replace(xt.keyframesNameRx,xt.transformedKeyframesName)}}_scopeKeyframes(xt,Ot){xt.keyframesNameRx=new RegExp(xt.keyframesName,'g'),xt.transformedKeyframesName=xt.keyframesName+'-'+Ot,xt.transformedSelector=xt.transformedSelector||xt.selector,xt.selector=xt.transformedSelector.replace(xt.keyframesName,xt.transformedKeyframesName)}_scopeSelector(xt,Ot,Mt,It){xt.transformedSelector=xt.transformedSelector||xt.selector;let wt=xt.transformedSelector,Dt='.'+It,Lt=wt.split(',');for(let Ft,kt=0,Ht=Lt.length;kt<Ht&&(Ft=Lt[kt]);kt++)Lt[kt]=Ft.match(Ot)?Ft.replace(Mt,Dt):Dt+' '+Ft;xt.selector=Lt.join(',')}applyElementScopeSelector(xt,Ot,Mt){let It=xt.getAttribute('class')||'',wt=It;Mt&&(wt=It.replace(new RegExp('\\s*'+lt+'\\s*'+Mt+'\\s*','g'),' ')),wt+=(wt?' ':'')+lt+' '+Ot,It!==wt&&Se(xt,wt)}applyElementStyle(xt,Ot,Mt,It){let wt=It?It.textContent||'':this.transformStyles(xt,Ot,Mt),Dt=st.get(xt),Lt=Dt.customStyle;return Lt&&!Me&&Lt!==It&&(Lt._useCount--,0>=Lt._useCount&&Lt.parentNode&&Lt.parentNode.removeChild(Lt)),Me?Dt.customStyle?(Dt.customStyle.textContent=wt,It=Dt.customStyle):wt&&(It=ue(wt,Mt,xt.shadowRoot,Dt.placeholder)):It?!It.parentNode&&me(It,null,Dt.placeholder):wt&&(It=ue(wt,Mt,null,Dt.placeholder)),It&&(It._useCount=It._useCount||0,Dt.customStyle!=It&&It._useCount++,Dt.customStyle=It),at&&(It.textContent=It.textContent),It}applyCustomStyle(xt,Ot){let Mt=pe(xt),It=this;xt.textContent=de(Mt,function(wt){let Dt=wt.cssText=wt.parsedCssText;wt.propertyInfo&&wt.propertyInfo.cssText&&(Dt=ne(Dt),wt.cssText=It.valueForProperties(Dt,Ot))})}}var dt=new it;let pt={};const ct=window.customElements;if(ct&&!Me){const xt=ct.define;ct.define=function(Ot,Mt,It){return pt[Ot]=ge(Ot),xt.call(ct,Ot,Mt,It)}}let _t=Le.MIXIN_MATCH,ut=Le.VAR_ASSIGN,mt=/;\s*/m,yt=/^\s*(initial)|(inherit)\s*$/,gt='_-_';class ft{constructor(){this._map={}}set(xt,Ot){xt=xt.trim(),this._map[xt]={properties:Ot,dependants:{}}}get(xt){return xt=xt.trim(),this._map[xt]}}class Nt{constructor(){this._currentTemplate=null,this._measureElement=null,this._map=new ft,this._separator=gt,this._boundProduceCssProperties=(xt,Ot,Mt,It)=>this._produceCssProperties(xt,Ot,Mt,It)}detectMixin(xt){const Ot=_t.test(xt)||ut.test(xt);return _t.lastIndex=0,ut.lastIndex=0,Ot}transformStyle(xt,Ot){let Mt=pe(xt);return this.transformRules(Mt,Ot),Mt}transformRules(xt,Ot){this._currentTemplate=tt[Ot],_e(xt,Mt=>{this.transformRule(Mt)}),this._currentTemplate=null}transformRule(xt){xt.cssText=this.transformCssText(xt.parsedCssText),':root'===xt.selector&&(xt.selector=':host > *')}transformCssText(xt){return xt=xt.replace(ut,this._boundProduceCssProperties),this._consumeCssProperties(xt)}_getInitialValueForProperty(xt){return this._measureElement||(this._measureElement=document.createElement('meta'),this._measureElement.style.all='initial',document.head.appendChild(this._measureElement)),window.getComputedStyle(this._measureElement).getPropertyValue(xt)}_consumeCssProperties(xt){for(let Ot;Ot=_t.exec(xt);){let Mt=Ot[0],It=Ot[1],wt=Ot.index,Dt=wt+Mt.indexOf('@apply'),Lt=wt+Mt.length,kt=xt.slice(0,Dt),Ht=xt.slice(Lt),Ft=this._cssTextToMap(kt),Ut=this._atApplyToCssProperties(It,Ft);xt=[kt,Ut,Ht].join(''),_t.lastIndex=wt+Ut.length}return xt}_atApplyToCssProperties(xt,Ot){xt=xt.replace(mt,'');let Mt=[],It=this._map.get(xt);if(It||(this._map.set(xt,{}),It=this._map.get(xt)),It){this._currentTemplate&&(It.dependants[this._currentTemplate.name]=this._currentTemplate);let wt,Dt,Lt;for(wt in It.properties)Lt=Ot&&Ot[wt],Dt=[wt,': var(',xt,gt,wt],Lt&&Dt.push(',',Lt),Dt.push(')'),Mt.push(Dt.join(''))}return Mt.join('; ')}_replaceInitialOrInherit(xt,Ot){let Mt=yt.exec(Ot);return Mt&&(Mt[1]?Ot=Nt._getInitialValueForProperty(xt):Ot='apply-shim-inherit'),Ot}_cssTextToMap(xt){let Ot=xt.split(';'),Mt,It,wt={};for(let Lt,kt,Dt=0;Dt<Ot.length;Dt++)Lt=Ot[Dt],Lt&&(kt=Lt.split(':'),1<kt.length&&(Mt=kt[0].trim(),It=this._replaceInitialOrInherit(Mt,kt.slice(1).join(':')),wt[Mt]=It));return wt}_invalidateMixinEntry(xt){for(let Ot in xt.dependants)this._currentTemplate&&Ot===this._currentTemplate.name||st.invalidate(Ot)}_produceCssProperties(xt,Ot,Mt,It){if(Mt&&Ne(Mt,(qt,Xt)=>{Xt&&this._map.get(Xt)&&(It='@apply '+Xt+';')}),!It)return xt;let wt=this._consumeCssProperties(It),Dt=xt.slice(0,xt.indexOf('--')),Lt=this._cssTextToMap(wt),kt=Lt,Ht=this._map.get(Ot),Ft=Ht&&Ht.properties;Ft?kt=Object.assign(Object.create(Ft),Lt):this._map.set(Ot,kt);let Wt,Bt,Ut=[],jt=!1;for(Wt in kt)Bt=Lt[Wt],void 0==Bt&&(Bt='initial'),Ft&&!(Wt in Ft)&&(jt=!0),Ut.push(Ot+gt+Wt+': '+Bt);return jt&&this._invalidateMixinEntry(Ht),Ht&&(Ht.properties=kt),Mt&&(Dt=xt+';'+Dt),Dt+Ut.join('; ')+';'}}let St=new Nt;window.ApplyShim=St;let bt=function(){};if(!Me){let xt=Dt=>{return Dt.classList&&!Dt.classList.contains(et.SCOPE_NAME)||Dt instanceof SVGElement&&(!Dt.hasAttribute('class')||0>Dt.getAttribute('class').indexOf(et.SCOPE_NAME))},Ot=Dt=>{for(let kt,Lt=0;Lt<Dt.length;Lt++)if(kt=Dt[Lt],kt.target!==document.documentElement&&kt.target!==document.head){for(let Ft,Ht=0;Ht<kt.addedNodes.length;Ht++)if(Ft=kt.addedNodes[Ht],xt(Ft)){let Ut=Ft.getRootNode();if(Ut.nodeType===Node.DOCUMENT_FRAGMENT_NODE){let Wt=Ut.host;if(Wt){let Bt=Wt.is||Wt.localName;et.dom(Ft,Bt)}}}for(let Ft,Ht=0;Ht<kt.removedNodes.length;Ht++)if(Ft=kt.removedNodes[Ht],Ft.nodeType===Node.ELEMENT_NODE){let Ut;if(Ft.classList?Ut=Array.from(Ft.classList):Ft.hasAttribute('class')&&(Ut=Ft.getAttribute('class').split(/\s+/)),void 0!=Ut){let Wt=Ut.indexOf(et.SCOPE_NAME);if(0<=Wt){let Bt=Ut[Wt+1];Bt&&et.dom(Ft,Bt,!0)}}}}},Mt=new MutationObserver(Ot),It=Dt=>{Mt.observe(Dt,{childList:!0,subtree:!0})},wt=window.customElements&&!window.customElements.flush;if(wt)It(document);else{let Dt=()=>{It(document.body)};window.HTMLImports?window.HTMLImports.whenReady(Dt):requestAnimationFrame(function(){if('loading'===document.readyState){let Lt=function(){Dt(),document.removeEventListener('readystatechange',Lt)};document.addEventListener('readystatechange',Lt)}else Dt()})}bt=function(){Ot(Mt.takeRecords())}}let Ct=new class{constructor(xt=100){this.cache={},this.typeMax=xt}_validate(xt,Ot,Mt){for(let wt,It=0;It<Mt.length;It++)if(wt=Mt[It],xt.properties[wt]!==Ot[wt])return!1;return!0}store(xt,Ot,Mt,It){let wt=this.cache[xt]||[];wt.push({properties:Ot,styleElement:Mt,scopeSelector:It}),wt.length>this.typeMax&&wt.shift(),this.cache[xt]=wt}fetch(xt,Ot,Mt){let It=this.cache[xt];if(It)for(let Dt,wt=It.length-1;0<=wt;wt--)if(Dt=It[wt],this._validate(Dt,Ot,Mt))return Dt}};class Et{constructor(){this._scopeCounter={},this._documentOwner=document.documentElement,this._documentOwnerStyleInfo=st.set(document.documentElement,new st({rules:[]})),this._elementsHaveApplied=!1}get nativeShadow(){return Me}get nativeCss(){return Ie}get nativeCssApply(){return!1}flush(){bt()}_generateScopeSelector(xt){let Ot=this._scopeCounter[xt]=(this._scopeCounter[xt]||0)+1;return`${xt}-${Ot}`}getStyleAst(xt){return pe(xt)}styleAstToString(xt){return de(xt)}_gatherStyles(xt){let Ot=xt.content.querySelectorAll('style'),Mt=[];for(let wt,It=0;It<Ot.length;It++)wt=Ot[It],Mt.push(wt.textContent),wt.parentNode.removeChild(wt);return Mt.join('').trim()}_getCssBuild(xt){let Ot=xt.content.querySelector('style');return Ot?Ot.getAttribute('css-build')||'':''}prepareTemplate(xt,Ot,Mt){if(!xt._prepared){xt._prepared=!0,xt.name=Ot,xt.extends=Mt,tt[Ot]=xt;let It=this._getCssBuild(xt),wt=this._gatherStyles(xt),Dt={is:Ot,extends:Mt,__cssBuild:It};this.nativeShadow||et.dom(xt.content,Ot);let Lt=St.detectMixin(wt),kt=_(wt);Lt&&this.nativeCss&&!this.nativeCssApply&&St.transformRules(kt,Ot),xt._styleAst=kt;let Ht=[];if(this.nativeCss||(Ht=dt.decorateStyles(xt._styleAst,Dt)),!Ht.length||this.nativeCss){let Ft=this.nativeShadow?xt.content:null,Ut=pt[Ot],Wt=this._generateStaticStyle(Dt,xt._styleAst,Ft,Ut);xt._style=Wt}xt._ownPropertyNames=Ht}}_generateStaticStyle(xt,Ot,Mt,It){let wt=et.elementStyles(xt,Ot);if(wt.length)return ue(wt,xt.is,Mt,It)}_prepareHost(xt){let Mt,Ot=xt.getAttribute('is')||xt.localName;Ot!==xt.localName&&(Mt=xt.localName);let Dt,Lt,kt,It=pt[Ot],wt=tt[Ot];return wt&&(Dt=wt._styleAst,Lt=wt._ownPropertyNames,kt=wt._cssBuild),st.set(xt,new st(Dt,It,Lt,Ot,Mt,kt))}applyStyle(xt,Ot){let Mt=xt.getAttribute('is')||xt.localName,It=st.get(xt),wt=!!It;if(It||(It=this._prepareHost(xt)),this._isRootOwner(xt)||(this._elementsHaveApplied=!0),window.CustomStyle){let Dt=window.CustomStyle;if(Dt._documentDirty){if(Dt.findStyles(),this.nativeCss?!this.nativeCssApply&&Dt._revalidateApplyShim():this._updateProperties(this._documentOwner,this._documentOwnerStyleInfo),Dt.applyStyles(),!this._elementsHaveApplied)return;if(!this.nativeCss&&(this.updateStyles(),wt))return}}if(Ot&&(It.overrideStyleProperties=It.overrideStyleProperties||{},Object.assign(It.overrideStyleProperties,Ot)),this.nativeCss){It.overrideStyleProperties&&this._updateNativeProperties(xt,It.overrideStyleProperties);let Dt=tt[Mt];if(!Dt&&!this._isRootOwner(xt))return;if(Dt&&Dt._applyShimInvalid&&Dt._style){if(Dt._validating||(St.transformRules(Dt._styleAst,Mt),Dt._style.textContent=et.elementStyles(xt,It.styleRules),st.startValidating(Mt)),this.nativeShadow){let Lt=xt.shadowRoot;if(Lt){let kt=Lt.querySelector('style');kt.textContent=et.elementStyles(xt,It.styleRules)}}It.styleRules=Dt._styleAst}}else this._updateProperties(xt,It),It.ownStylePropertyNames&&It.ownStylePropertyNames.length&&this._applyStyleProperties(xt,It);if(wt){let Dt=this._isRootOwner(xt)?xt:xt.shadowRoot;Dt&&this._applyToDescendants(Dt)}}_applyToDescendants(xt){let Ot=xt.children||xt.childNodes;for(let It,Mt=0;Mt<Ot.length;Mt++)It=Ot[Mt],It.shadowRoot&&this.applyStyle(It),this._applyToDescendants(It)}_styleOwnerForNode(xt){let Ot=xt.getRootNode(),Mt=Ot.host;return Mt?st.get(Mt)?Mt:this._styleOwnerForNode(Mt):this._documentOwner}_isRootOwner(xt){return xt===this._documentOwner}_applyStyleProperties(xt,Ot){let Mt=xt.getAttribute('is')||xt.localName,It=Ct.fetch(Mt,Ot.styleProperties,Ot.ownStylePropertyNames),wt=It&&It.scopeSelector,Dt=It?It.styleElement:null,Lt=Ot.scopeSelector;Ot.scopeSelector=wt||this._generateScopeSelector(Mt);let kt=dt.applyElementStyle(xt,Ot.styleProperties,Ot.scopeSelector,Dt);return this.nativeShadow||dt.applyElementScopeSelector(xt,Ot.scopeSelector,Lt),It||Ct.store(Mt,Ot.styleProperties,kt,Ot.scopeSelector),kt}_updateProperties(xt,Ot){let Mt=this._styleOwnerForNode(xt),It=st.get(Mt),wt=It.styleProperties,Dt=Object.create(wt||null),Lt=dt.hostAndRootPropertiesForScope(xt,Ot.styleRules),kt=dt.propertyDataFromStyles(It.styleRules,xt),Ht=kt.properties;Object.assign(Dt,Lt.hostProps,Ht,Lt.rootProps),this._mixinOverrideStyles(Dt,Ot.overrideStyleProperties),dt.reify(Dt),Ot.styleProperties=Dt}_mixinOverrideStyles(xt,Ot){for(let Mt in Ot){let It=Ot[Mt];(It||0===It)&&(xt[Mt]=It)}}_updateNativeProperties(xt,Ot){for(let Mt in Ot)null===Mt?xt.style.removeProperty(Mt):xt.style.setProperty(Mt,Ot[Mt])}updateStyles(xt){this.applyStyle(this._documentOwner,xt)}_transformCustomStyleForDocument(xt){let Ot=pe(xt);_e(Ot,Mt=>{Me?et.normalizeRootSelector(Mt):et.documentRule(Mt),this.nativeCss&&!this.nativeCssApply&&St.transformRule(Mt)}),this.nativeCss?xt.textContent=de(Ot):this._documentOwnerStyleInfo.styleRules.rules.push(Ot)}_revalidateApplyShim(xt){if(this.nativeCss&&!this.nativeCssApply){let Ot=pe(xt);St.transformRules(Ot),xt.textContent=de(Ot)}}_applyCustomStyleToDocument(xt){this.nativeCss||dt.applyCustomStyle(xt,this._documentOwnerStyleInfo.styleProperties)}getComputedStyleValue(xt,Ot){let Mt;if(!this.nativeCss){let It=st.get(xt)||st.get(this._styleOwnerForNode(xt));Mt=It.styleProperties[Ot]}return Mt=Mt||window.getComputedStyle(xt).getPropertyValue(Ot),Mt.trim()}setElementClass(xt,Ot){let Mt=xt.getRootNode(),It=Ot?Ot.split(/\s/):[],wt=Mt.host&&Mt.host.localName;if(!wt){var Dt=xt.getAttribute('class');if(Dt){let Lt=Dt.split(/\s/);for(let kt=0;kt<Lt.length;kt++)if(Lt[kt]===et.SCOPE_NAME){wt=Lt[kt+1];break}}}if(wt&&It.push(et.SCOPE_NAME,wt),!this.nativeCss){let Lt=st.get(xt);Lt&&Lt.scopeSelector&&It.push(dt.XSCOPE_NAME,Lt.scopeSelector)}Se(xt,It.join(' '))}_styleInfoForNode(xt){return st.get(xt)}}window.ShadyCSS=new Et;let vt=window.ShadyCSS,Pt=!1,Tt=[],At=null;class Rt extends HTMLElement{static get _customStyles(){return Tt}static get processHook(){return At}static set processHook(xt){At=xt}static get _documentDirty(){return Pt}static findStyles(){for(let Ot,xt=0;xt<Tt.length;xt++)if(Ot=Tt[xt],!Ot._style){let Mt=Ot.querySelector('style');if(!Mt)continue;if(Mt.__appliedElement)for(let wt,It=0;It<Mt.attributes.length;It++)wt=Mt.attributes[It],Mt.__appliedElement.setAttribute(wt.name,wt.value);Ot._style=Mt.__appliedElement||Mt,At&&At(Ot._style),vt._transformCustomStyleForDocument(Ot._style)}}static _revalidateApplyShim(){for(let Ot,xt=0;xt<Tt.length;xt++)Ot=Tt[xt],Ot._style&&vt._revalidateApplyShim(Ot._style)}static applyStyles(){for(let Ot,xt=0;xt<Tt.length;xt++)Ot=Tt[xt],Ot._style&&vt._applyCustomStyleToDocument(Ot._style);Pt=!1}constructor(){super(),Tt.push(this),Ce()}}window.CustomStyle=Rt,window.customElements.define('custom-style',Rt)})();
|
|
//# sourceMappingURL=webcomponents-sd-ce.js.map
|