Files
webcomponentsjs/webcomponents-lite.js
2017-02-01 11:46:30 -08:00

7 lines
99 KiB
JavaScript

(function(){'use strict';function oo(Dr){return Dr=ro(Dr),so(no(Dr),Dr)}function ro(Dr){return Dr.replace(wo.comments,'').replace(wo.port,'')}function no(Dr){let Lr={start:0,end:Dr.length},kr=Lr;for(let Ur=0,Hr=Dr.length;Ur<Hr;Ur++)if(Dr[Ur]===Mo){kr.rules||(kr.rules=[]);let qr=kr,Fr=qr.rules[qr.rules.length-1];kr={start:Ur+1,parent:qr,previous:Fr},qr.rules.push(kr)}else Dr[Ur]===Oo&&(kr.end=Ur+1,kr=kr.parent||Lr);return Lr}function so(Dr,Lr){let kr=Lr.substring(Dr.start,Dr.end-1);if(Dr.parsedCssText=Dr.cssText=kr.trim(),Dr.parent){let Hr=Dr.previous?Dr.previous.end:Dr.parent.start;kr=Lr.substring(Hr,Dr.start-1),kr=ao(kr),kr=kr.replace(wo.multipleSpaces,' '),kr=kr.substring(kr.lastIndexOf(';')+1);let qr=Dr.parsedSelector=Dr.selector=kr.trim();Dr.atRule=0===qr.indexOf('@'),Dr.atRule?0===qr.indexOf('@media')?Dr.type=Ro.MEDIA_RULE:qr.match(wo.keyframesRule)&&(Dr.type=Ro.KEYFRAMES_RULE,Dr.keyframesName=Dr.selector.split(wo.multipleSpaces).pop()):0===qr.indexOf(Io)?Dr.type=Ro.MIXIN_RULE:Dr.type=Ro.STYLE_RULE}let Ur=Dr.rules;if(Ur)for(let Fr,Hr=0,qr=Ur.length;Hr<qr&&(Fr=Ur[Hr]);Hr++)so(Fr,Lr);return Dr}function ao(Dr){return Dr.replace(/\\([0-9a-f]{1,6})\s/gi,function(){let Lr=arguments[1],kr=6-Lr.length;for(;kr--;)Lr='0'+Lr;return'\\'+Lr})}function lo(Dr,Lr,kr){kr=kr||'';let Ur='';if(Dr.cssText||Dr.rules){let Hr=Dr.rules;if(Hr&&!io(Hr))for(let jr,qr=0,Fr=Hr.length;qr<Fr&&(jr=Hr[qr]);qr++)Ur=lo(jr,Lr,Ur);else Ur=Lr?Dr.cssText:po(Dr.cssText),Ur=Ur.trim(),Ur&&(Ur=' '+Ur+'\n')}return Ur&&(Dr.selector&&(kr+=Dr.selector+' '+Mo+'\n'),kr+=Ur,Dr.selector&&(kr+=Oo+'\n\n')),kr}function io(Dr){return 0===Dr[0].selector.indexOf(Io)}function po(Dr){return Dr=co(Dr),_o(Dr)}function co(Dr){return Dr.replace(wo.customProp,'').replace(wo.mixinProp,'')}function _o(Dr){return Dr.replace(wo.mixinApply,'').replace(wo.varApply,'')}function uo(Dr){Dr&&(Uo=Uo&&!Dr.shimcssproperties,ko=ko&&!Dr.shimshadow)}function mo(Dr,Lr){return'string'==typeof Dr&&(Dr=oo(Dr)),Lr&&go(Dr,Lr),lo(Dr,Uo)}function yo(Dr){return!Dr.__cssRules&&Dr.textContent&&(Dr.__cssRules=oo(Dr.textContent)),Dr.__cssRules}function fo(Dr){return Dr.parent&&Dr.parent.type===Ro.KEYFRAMES_RULE}function go(Dr,Lr,kr,Ur){if(Dr){let Hr=!1;if(Ur&&Dr.type===Ro.MEDIA_RULE){let Fr=Dr.selector.match(Fo.MEDIA_MATCH);Fr&&!window.matchMedia(Fr[1]).matches&&(Hr=!0)}Dr.type===Ro.STYLE_RULE?Lr(Dr):kr&&Dr.type===Ro.KEYFRAMES_RULE?kr(Dr):Dr.type===Ro.MIXIN_RULE&&(Hr=!0);let qr=Dr.rules;if(qr&&!Hr)for(let Wr,Fr=0,jr=qr.length;Fr<jr&&(Wr=qr[Fr]);Fr++)go(Wr,Lr,kr,Ur)}}function bo(Dr,Lr,kr,Ur){let Hr=Eo(Dr,Lr);return vo(Hr,kr,Ur)}function vo(Dr,Lr,kr){Lr=Lr||document.head;let Ur=kr&&kr.nextSibling||Lr.firstChild;return qo=Dr,Lr.insertBefore(Dr,Ur)}function Eo(Dr,Lr){let kr=document.createElement('style');return Lr&&kr.setAttribute('scope',Lr),kr.textContent=Dr,kr}function No(Dr){let Lr=document.createComment(' Shady DOM styles for '+Dr+' '),kr=qo?qo.nextSibling:null,Ur=document.head;return Ur.insertBefore(Lr,kr||Ur.firstChild),qo=Lr,Lr}function So(Dr,Lr){let kr=0;for(let Ur=Lr,Hr=Dr.length;Ur<Hr;Ur++)if('('===Dr[Ur])kr++;else if(')'===Dr[Ur]&&0==--kr)return Ur;return-1}function Co(Dr,Lr){let kr=Dr.indexOf('var(');if(-1===kr)return Lr(Dr,'','','');let Ur=So(Dr,kr+3),Hr=Dr.substring(kr+4,Ur),qr=Dr.substring(0,kr),Fr=Co(Dr.substring(Ur+1),Lr),jr=Hr.indexOf(',');if(-1===jr)return Lr(qr,Hr.trim(),'',Fr);let Wr=Hr.substring(0,jr).trim(),Br=Hr.substring(jr+1).trim();return Lr(qr,Wr,Br,Fr)}function To(Dr,Lr){window.ShadyDOM?window.ShadyDOM.nativeMethods.setAttribute.call(Dr,'class',Lr):Dr.setAttribute('class',Lr)}function Ao(Dr,Lr){let kr=parseInt(Dr/32);Lr[kr]=(Lr[kr]||0)|1<<Dr%32}function Po(){Mr||(Mr=!0,window.HTMLImports?window.HTMLImports.whenReady(xo):'complete'===document.readyState?xo():document.addEventListener('readystatechange',()=>{'complete'===document.readyState&&xo()}))}function xo(){requestAnimationFrame(()=>{(Mr||Rr._elementsHaveApplied)&&Rr.updateStyles(),Mr=!1})}(function(){'use strict';var Lr=function(){var Wr=document.createEvent('Event');return Wr.initEvent('foo',!0,!0),Wr.preventDefault(),Wr.defaultPrevented}();if(!Lr){var kr=Event.prototype.preventDefault;Event.prototype.preventDefault=function(){this.cancelable&&(kr.call(this),Object.defineProperty(this,'defaultPrevented',{get:function(){return!0},configurable:!0}))}}var Ur=/Trident/.test(navigator.userAgent);if((!window.CustomEvent||Ur&&'function'!=typeof window.CustomEvent)&&(window.CustomEvent=function(Wr,Br){Br=Br||{};var Gr=document.createEvent('CustomEvent');return Gr.initCustomEvent(Wr,!!Br.bubbles,!!Br.cancelable,Br.detail),Gr},window.CustomEvent.prototype=window.Event.prototype),!window.Event||Ur&&'function'!=typeof window.Event){var Hr=window.Event;if(window.Event=function(Wr,Br){Br=Br||{};var Gr=document.createEvent('Event');return Gr.initEvent(Wr,!!Br.bubbles,!!Br.cancelable),Gr},Hr)for(var qr in Hr)window.Event[qr]=Hr[qr];window.Event.prototype=Hr.prototype}if(!window.MouseEvent||Ur&&'function'!=typeof window.MouseEvent){var Fr=window.MouseEvent;if(window.MouseEvent=function(Wr,Br){Br=Br||{};var Gr=document.createEvent('MouseEvent');return Gr.initMouseEvent(Wr,!!Br.bubbles,!!Br.cancelable,Br.view||window,Br.detail,Br.screenX,Br.screenY,Br.clientX,Br.clientY,Br.ctrlKey,Br.altKey,Br.shiftKey,Br.metaKey,Br.button,Br.relatedTarget),Gr},Fr)for(var qr in Fr)window.MouseEvent[qr]=Fr[qr];window.MouseEvent.prototype=Fr.prototype}if(Array.from||(Array.from=function(Wr){return[].slice.call(Wr)}),!Object.assign){var jr=function(Wr,Br){for(var zr,Gr=Object.getOwnPropertyNames(Br),Kr=0;Kr<Gr.length;Kr++)zr=Gr[Kr],Wr[zr]=Br[zr]};Object.assign=function(Wr){for(var zr,Gr=[].slice.call(arguments,1),Kr=0;Kr<Gr.length;Kr++)zr=Gr[Kr],zr&&jr(Wr,zr);return Wr}}})(window.WebComponents),function(Dr){'use strict';function Lr(Qr){return Kr[Qr]!==void 0}function kr(){jr.call(this),this._isInvalid=!0}function Ur(Qr){return''==Qr&&kr.call(this),Qr.toLowerCase()}function Hr(Qr){var $r=Qr.charCodeAt(0);return 32<$r&&127>$r&&-1==[34,35,60,62,63,96].indexOf($r)?Qr:encodeURIComponent(Qr)}function qr(Qr){var $r=Qr.charCodeAt(0);return 32<$r&&127>$r&&-1==[34,35,60,62,96].indexOf($r)?Qr:encodeURIComponent(Qr)}function Fr(Qr,$r,Zr){function en(gn){an.push(gn)}var tn=$r||'scheme start',on=0,rn='',nn=!1,sn=!1,an=[];loop:for(;(Qr[on-1]!=Xr||0==on)&&!this._isInvalid;){var ln=Qr[on];switch(tn){case'scheme start':if(ln&&Vr.test(ln))rn+=ln.toLowerCase(),tn='scheme';else if(!$r){rn='',tn='no scheme';continue}else{en('Invalid scheme.');break loop}break;case'scheme':if(ln&&Yr.test(ln))rn+=ln.toLowerCase();else if(':'==ln){if(this._scheme=rn,rn='',$r)break loop;Lr(this._scheme)&&(this._isRelative=!0),tn='file'==this._scheme?'relative':this._isRelative&&Zr&&Zr._scheme==this._scheme?'relative or authority':this._isRelative?'authority first slash':'scheme data'}else if(!$r){rn='',on=0,tn='no scheme';continue}else if(Xr==ln)break loop;else{en('Code point not allowed in scheme: '+ln);break loop}break;case'scheme data':'?'==ln?(this._query='?',tn='query'):'#'==ln?(this._fragment='#',tn='fragment'):Xr!=ln&&'\t'!=ln&&'\n'!=ln&&'\r'!=ln&&(this._schemeData+=Hr(ln));break;case'no scheme':if(!Zr||!Lr(Zr._scheme))en('Missing scheme.'),kr.call(this);else{tn='relative';continue}break;case'relative or authority':if('/'==ln&&'/'==Qr[on+1])tn='authority ignore slashes';else{en('Expected /, got: '+ln),tn='relative';continue}break;case'relative':if(this._isRelative=!0,'file'!=this._scheme&&(this._scheme=Zr._scheme),Xr==ln){this._host=Zr._host,this._port=Zr._port,this._path=Zr._path.slice(),this._query=Zr._query,this._username=Zr._username,this._password=Zr._password;break loop}else if('/'==ln||'\\'==ln)'\\'==ln&&en('\\ is an invalid code point.'),tn='relative slash';else if('?'==ln)this._host=Zr._host,this._port=Zr._port,this._path=Zr._path.slice(),this._query='?',this._username=Zr._username,this._password=Zr._password,tn='query';else if('#'==ln)this._host=Zr._host,this._port=Zr._port,this._path=Zr._path.slice(),this._query=Zr._query,this._fragment='#',this._username=Zr._username,this._password=Zr._password,tn='fragment';else{var dn=Qr[on+1],cn=Qr[on+2];'file'==this._scheme&&Vr.test(ln)&&(':'==dn||'|'==dn)&&(Xr==cn||'/'==cn||'\\'==cn||'?'==cn||'#'==cn)||(this._host=Zr._host,this._port=Zr._port,this._username=Zr._username,this._password=Zr._password,this._path=Zr._path.slice(),this._path.pop()),tn='relative path';continue}break;case'relative slash':if('/'==ln||'\\'==ln)'\\'==ln&&en('\\ is an invalid code point.'),tn='file'==this._scheme?'file host':'authority ignore slashes';else{'file'!=this._scheme&&(this._host=Zr._host,this._port=Zr._port,this._username=Zr._username,this._password=Zr._password),tn='relative path';continue}break;case'authority first slash':if('/'==ln)tn='authority second slash';else{en('Expected \'/\', got: '+ln),tn='authority ignore slashes';continue}break;case'authority second slash':if(tn='authority ignore slashes','/'!=ln){en('Expected \'/\', got: '+ln);continue}break;case'authority ignore slashes':if('/'!=ln&&'\\'!=ln){tn='authority';continue}else en('Expected authority, got: '+ln);break;case'authority':if('@'==ln){nn&&(en('@ already seen.'),rn+='%40'),nn=!0;for(var hn,_n=0;_n<rn.length;_n++){if(hn=rn[_n],'\t'==hn||'\n'==hn||'\r'==hn){en('Invalid whitespace in authority.');continue}if(':'==hn&&null===this._password){this._password='';continue}var un=Hr(hn);null===this._password?this._username+=un:this._password+=un}rn=''}else if(Xr==ln||'/'==ln||'\\'==ln||'?'==ln||'#'==ln){on-=rn.length,rn='',tn='host';continue}else rn+=ln;break;case'file host':if(Xr==ln||'/'==ln||'\\'==ln||'?'==ln||'#'==ln){2==rn.length&&Vr.test(rn[0])&&(':'==rn[1]||'|'==rn[1])?tn='relative path':0==rn.length?tn='relative path start':(this._host=Ur.call(this,rn),rn='',tn='relative path start');continue}else'\t'==ln||'\n'==ln||'\r'==ln?en('Invalid whitespace in file host.'):rn+=ln;break;case'host':case'hostname':if(':'==ln&&!sn){if(this._host=Ur.call(this,rn),rn='',tn='port','hostname'==$r)break loop;}else if(Xr==ln||'/'==ln||'\\'==ln||'?'==ln||'#'==ln){if(this._host=Ur.call(this,rn),rn='',tn='relative path start',$r)break loop;continue}else'\t'!=ln&&'\n'!=ln&&'\r'!=ln?('['==ln?sn=!0:']'==ln&&(sn=!1),rn+=ln):en('Invalid code point in host/hostname: '+ln);break;case'port':if(/[0-9]/.test(ln))rn+=ln;else if(Xr==ln||'/'==ln||'\\'==ln||'?'==ln||'#'==ln||$r){if(''!=rn){var mn=parseInt(rn,10);mn!=Kr[this._scheme]&&(this._port=mn+''),rn=''}if($r)break loop;tn='relative path start';continue}else'\t'==ln||'\n'==ln||'\r'==ln?en('Invalid code point in port: '+ln):kr.call(this);break;case'relative path start':if('\\'==ln&&en('\'\\\' not allowed in path.'),tn='relative path','/'!=ln&&'\\'!=ln)continue;break;case'relative path':if(Xr==ln||'/'==ln||'\\'==ln||!$r&&('?'==ln||'#'==ln)){'\\'==ln&&en('\\ not allowed in relative path.');var yn;(yn=zr[rn.toLowerCase()])&&(rn=yn),'..'==rn?(this._path.pop(),'/'!=ln&&'\\'!=ln&&this._path.push('')):'.'==rn&&'/'!=ln&&'\\'!=ln?this._path.push(''):'.'!=rn&&('file'==this._scheme&&0==this._path.length&&2==rn.length&&Vr.test(rn[0])&&'|'==rn[1]&&(rn=rn[0]+':'),this._path.push(rn)),rn='','?'==ln?(this._query='?',tn='query'):'#'==ln&&(this._fragment='#',tn='fragment')}else'\t'!=ln&&'\n'!=ln&&'\r'!=ln&&(rn+=Hr(ln));break;case'query':$r||'#'!=ln?Xr!=ln&&'\t'!=ln&&'\n'!=ln&&'\r'!=ln&&(this._query+=qr(ln)):(this._fragment='#',tn='fragment');break;case'fragment':Xr!=ln&&'\t'!=ln&&'\n'!=ln&&'\r'!=ln&&(this._fragment+=ln);}on++}}function jr(){this._scheme='',this._schemeData='',this._username='',this._password=null,this._host='',this._port='',this._path=[],this._query='',this._fragment='',this._isInvalid=!1,this._isRelative=!1}function Wr(Qr,$r){$r===void 0||$r instanceof Wr||($r=new Wr($r+'')),this._url=Qr,jr.call(this);var Zr=Qr.replace(/^[ \t\r\n\f]+|[ \t\r\n\f]+$/g,'');Fr.call(this,Zr,null,$r)}var Br=!1;if(!Dr.forceJURL)try{var Gr=new URL('b','http://a');Gr.pathname='c%20d',Br='http://a/c%20d'===Gr.href}catch(Qr){}if(!Br){var Kr=Object.create(null);Kr.ftp=21,Kr.file=0,Kr.gopher=70,Kr.http=80,Kr.https=443,Kr.ws=80,Kr.wss=443;var zr=Object.create(null);zr['%2e']='.',zr['.%2e']='..',zr['%2e.']='..',zr['%2e%2e']='..';var Xr,Vr=/[a-zA-Z]/,Yr=/[a-zA-Z0-9\+\-\.]/;Wr.prototype={toString:function(){return this.href},get href(){if(this._isInvalid)return this._url;var Qr='';return(''!=this._username||null!=this._password)&&(Qr=this._username+(null==this._password?'':':'+this._password)+'@'),this.protocol+(this._isRelative?'//'+Qr+this.host:'')+this.pathname+this._query+this._fragment},set href(Qr){jr.call(this),Fr.call(this,Qr)},get protocol(){return this._scheme+':'},set protocol(Qr){this._isInvalid||Fr.call(this,Qr+':','scheme start')},get host(){return this._isInvalid?'':this._port?this._host+':'+this._port:this._host},set host(Qr){this._isInvalid||!this._isRelative||Fr.call(this,Qr,'host')},get hostname(){return this._host},set hostname(Qr){this._isInvalid||!this._isRelative||Fr.call(this,Qr,'hostname')},get port(){return this._port},set port(Qr){this._isInvalid||!this._isRelative||Fr.call(this,Qr,'port')},get pathname(){return this._isInvalid?'':this._isRelative?'/'+this._path.join('/'):this._schemeData},set pathname(Qr){this._isInvalid||!this._isRelative||(this._path=[],Fr.call(this,Qr,'relative path start'))},get search(){return this._isInvalid||!this._query||'?'==this._query?'':this._query},set search(Qr){this._isInvalid||!this._isRelative||(this._query='?','?'==Qr[0]&&(Qr=Qr.slice(1)),Fr.call(this,Qr,'query'))},get hash(){return this._isInvalid||!this._fragment||'#'==this._fragment?'':this._fragment},set hash(Qr){this._isInvalid||(this._fragment='#','#'==Qr[0]&&(Qr=Qr.slice(1)),Fr.call(this,Qr,'fragment'))},get origin(){var Qr;if(this._isInvalid||!this._scheme)return'';switch(this._scheme){case'data':case'file':case'javascript':case'mailto':return'null';}return Qr=this.host,Qr?this._scheme+'://'+Qr:''}};var Jr=Dr.URL;Jr&&(Wr.createObjectURL=function(){return Jr.createObjectURL.apply(Jr,arguments)},Wr.revokeObjectURL=function(Qr){Jr.revokeObjectURL(Qr)}),Dr.URL=Wr}}(window),function(){var Dr='undefined'==typeof HTMLTemplateElement;/Trident/.test(navigator.userAgent)&&function(){var zr=document.importNode;document.importNode=function(){var Xr=zr.apply(document,arguments);if(Xr.nodeType===Node.DOCUMENT_FRAGMENT_NODE){var Vr=document.createDocumentFragment();return Vr.appendChild(Xr),Vr}return Xr}}();var Lr=function(){if(!Dr){var zr=document.createElement('template'),Xr=document.createElement('template');Xr.content.appendChild(document.createElement('div')),zr.content.appendChild(Xr);var Vr=zr.cloneNode(!0);return 0===Vr.content.childNodes.length||0===Vr.content.firstChild.content.childNodes.length}}(),kr='template',Ur=function(){};if(Dr){function zr(Vr){return'&'===Vr?'&amp;':'<'===Vr?'&lt;':'>'===Vr?'&gt;':'\xA0'===Vr?'&nbsp;':void 0}function Xr(Vr){return Vr.replace(Br,zr)}var Hr=document.implementation.createHTMLDocument('template'),qr=!0,Fr=document.createElement('style');Fr.textContent=kr+'{display:none;}';var jr=document.head;jr.insertBefore(Fr,jr.firstElementChild),Ur.prototype=Object.create(HTMLElement.prototype),Ur.decorate=function(Vr){if(!Vr.content){Vr.content=Hr.createDocumentFragment();for(var Yr;Yr=Vr.firstChild;)Vr.content.appendChild(Yr);if(Vr.cloneNode=function(Jr){return Ur.cloneNode(this,Jr)},qr)try{Object.defineProperty(Vr,'innerHTML',{get:function(){for(var Jr='',Qr=this.content.firstChild;Qr;Qr=Qr.nextSibling)Jr+=Qr.outerHTML||Xr(Qr.data);return Jr},set:function(Jr){for(Hr.body.innerHTML=Jr,Ur.bootstrap(Hr);this.content.firstChild;)this.content.removeChild(this.content.firstChild);for(;Hr.body.firstChild;)this.content.appendChild(Hr.body.firstChild)},configurable:!0})}catch(Jr){qr=!1}Ur.bootstrap(Vr.content)}},Ur.bootstrap=function(Vr){for(var $r,Yr=Vr.querySelectorAll(kr),Jr=0,Qr=Yr.length;Jr<Qr&&($r=Yr[Jr]);Jr++)Ur.decorate($r)},document.addEventListener('DOMContentLoaded',function(){Ur.bootstrap(document)});var Wr=document.createElement;document.createElement=function(){'use strict';var Vr=Wr.apply(document,arguments);return'template'===Vr.localName&&Ur.decorate(Vr),Vr};var Br=/[&\u00A0<>]/g}if(Dr||Lr){var Gr=Node.prototype.cloneNode;Ur.cloneNode=function(zr,Xr){var Vr=Gr.call(zr,!1);return this.decorate&&this.decorate(Vr),Xr&&(Vr.content.appendChild(Gr.call(zr.content,!0)),this.fixClonedDom(Vr.content,zr.content)),Vr},Ur.fixClonedDom=function(zr,Xr){if(Xr.querySelectorAll)for(var $r,Zr,Vr=Xr.querySelectorAll(kr),Yr=zr.querySelectorAll(kr),Jr=0,Qr=Yr.length;Jr<Qr;Jr++)Zr=Vr[Jr],$r=Yr[Jr],this.decorate&&this.decorate(Zr),$r.parentNode.replaceChild(Zr.cloneNode(!0),$r)};var Kr=document.importNode;Node.prototype.cloneNode=function(zr){var Xr=Gr.call(this,zr);return zr&&Ur.fixClonedDom(Xr,this),Xr},document.importNode=function(zr,Xr){if(zr.localName===kr)return Ur.cloneNode(zr,Xr);var Vr=Kr.call(document,zr,Xr);return Xr&&Ur.fixClonedDom(Vr,zr),Vr},Lr&&(HTMLTemplateElement.prototype.cloneNode=function(zr){return Ur.cloneNode(this,zr)})}Dr&&(window.HTMLTemplateElement=Ur)}(),!function(Dr,Lr){'object'==typeof exports&&'undefined'!=typeof module?module.exports=Lr():'function'==typeof define&&define.amd?define(Lr):Dr.ES6Promise=Lr()}(window,function(){'use strict';function Dr(Kn){return'function'==typeof Kn||'object'==typeof Kn&&null!==Kn}function Lr(Kn){return'function'==typeof Kn}function qr(){return'undefined'==typeof xn?Wr():function(){xn(Br)}}function Wr(){var Kn=setTimeout;return function(){return Kn(Br,1)}}function Br(){for(var Kn=0;Kn<Pn;Kn+=2){var zn=kn[Kn],Xn=kn[Kn+1];zn(Xn),kn[Kn]=void 0,kn[Kn+1]=void 0}Pn=0}function Kr(Kn,zn){var Xn=arguments,Vn=this,Yn=new this.constructor(Xr);void 0===Yn[Hn]&&un(Yn);var Jn=Vn._state;return Jn?!function(){var Qn=Xn[Jn-1];Mn(function(){return cn(Jn,Yn,Qn,Vn._result)})}():sn(Vn,Yn,Kn,zn),Yn}function zr(Kn){var zn=this;if(Kn&&'object'==typeof Kn&&Kn.constructor===zn)return Kn;var Xn=new zn(Xr);return tn(Xn,Kn),Xn}function Xr(){}function Vr(){return new TypeError('You cannot resolve a promise with itself')}function Yr(){return new TypeError('A promises callback cannot return that same promise.')}function Jr(Kn){try{return Kn.then}catch(zn){return Wn.error=zn,Wn}}function Qr(Kn,zn,Xn,Vn){try{Kn.call(zn,Xn,Vn)}catch(Yn){return Yn}}function $r(Kn,zn,Xn){Mn(function(Vn){var Yn=!1,Jn=Qr(Xn,zn,function(Qn){Yn||(Yn=!0,zn===Qn?rn(Vn,Qn):tn(Vn,Qn))},function(Qn){Yn||(Yn=!0,nn(Vn,Qn))},'Settle: '+(Vn._label||' unknown promise'));!Yn&&Jn&&(Yn=!0,nn(Vn,Jn))},Kn)}function Zr(Kn,zn){zn._state===Fn?rn(Kn,zn._result):zn._state===jn?nn(Kn,zn._result):sn(zn,void 0,function(Xn){return tn(Kn,Xn)},function(Xn){return nn(Kn,Xn)})}function en(Kn,zn,Xn){zn.constructor===Kn.constructor&&Xn===Kr&&zn.constructor.resolve===zr?Zr(Kn,zn):Xn===Wn?nn(Kn,Wn.error):void 0===Xn?rn(Kn,zn):Lr(Xn)?$r(Kn,zn,Xn):rn(Kn,zn)}function tn(Kn,zn){Kn===zn?nn(Kn,Vr()):Dr(zn)?en(Kn,zn,Jr(zn)):rn(Kn,zn)}function on(Kn){Kn._onerror&&Kn._onerror(Kn._result),an(Kn)}function rn(Kn,zn){Kn._state===qn&&(Kn._result=zn,Kn._state=Fn,0!==Kn._subscribers.length&&Mn(an,Kn))}function nn(Kn,zn){Kn._state===qn&&(Kn._state=jn,Kn._result=zn,Mn(on,Kn))}function sn(Kn,zn,Xn,Vn){var Yn=Kn._subscribers,Jn=Yn.length;Kn._onerror=null,Yn[Jn]=zn,Yn[Jn+Fn]=Xn,Yn[Jn+jn]=Vn,0===Jn&&Kn._state&&Mn(an,Kn)}function an(Kn){var zn=Kn._subscribers,Xn=Kn._state;if(0!==zn.length){for(var Vn=void 0,Yn=void 0,Jn=Kn._result,Qn=0;Qn<zn.length;Qn+=3)Vn=zn[Qn],Yn=zn[Qn+Xn],Vn?cn(Xn,Vn,Yn,Jn):Yn(Jn);Kn._subscribers.length=0}}function ln(){this.error=null}function dn(Kn,zn){try{return Kn(zn)}catch(Xn){return Bn.error=Xn,Bn}}function cn(Kn,zn,Xn,Vn){var Yn=Lr(Xn),Jn,Qn,$n,Zn;if(!Yn)Jn=Vn,$n=!0;else if(Jn=dn(Xn,Vn),Jn===Bn?(Zn=!0,Qn=Jn.error,Jn=null):$n=!0,zn===Jn)return void nn(zn,Yr());zn._state!==qn||(Yn&&$n?tn(zn,Jn):Zn?nn(zn,Qn):Kn===Fn?rn(zn,Jn):Kn===jn&&nn(zn,Jn))}function _n(Kn,zn){try{zn(function(Xn){tn(Kn,Xn)},function(Xn){nn(Kn,Xn)})}catch(Xn){nn(Kn,Xn)}}function hn(){return Gn++}function un(Kn){Kn[Hn]=Gn++,Kn._state=void 0,Kn._result=void 0,Kn._subscribers=[]}function mn(Kn,zn){this._instanceConstructor=Kn,this.promise=new Kn(Xr),this.promise[Hn]||un(this.promise),An(zn)?(this._input=zn,this.length=zn.length,this._remaining=zn.length,this._result=Array(this.length),0===this.length?rn(this.promise,this._result):(this.length=this.length||0,this._enumerate(),0===this._remaining&&rn(this.promise,this._result))):nn(this.promise,yn())}function yn(){return new Error('Array Methods must be provided an Array')}function En(){throw new TypeError('You must pass a resolver function as the first argument to the promise constructor')}function Nn(){throw new TypeError('Failed to construct \'Promise\': Please use the \'new\' operator, this object constructor cannot be called as a function.')}function Sn(Kn){this[Hn]=hn(),this._result=this._state=void 0,this._subscribers=[],Xr!==Kn&&('function'!=typeof Kn&&En(),this instanceof Sn?_n(this,Kn):Nn())}var Tn=Array.isArray?Array.isArray:function(Kn){return'[object Array]'===Object.prototype.toString.call(Kn)};var An=Tn,Pn=0,xn=void 0,Rn=void 0,Mn=function(Kn,zn){kn[Pn]=Kn,kn[Pn+1]=zn,Pn+=2,2==Pn&&(Rn?Rn(Br):Un())},On='undefined'==typeof window?void 0:window,wn=On||{},In=wn.MutationObserver||wn.WebKitMutationObserver,Dn='undefined'==typeof self&&'undefined'!=typeof process&&'[object process]'==={}.toString.call(process),Ln='undefined'!=typeof Uint8ClampedArray&&'undefined'!=typeof importScripts&&'undefined'!=typeof MessageChannel,kn=Array(1e3),Un;Un=Dn?function(){return function(){return process.nextTick(Br)}}():In?function(){var Kn=0,zn=new In(Br),Xn=document.createTextNode('');return zn.observe(Xn,{characterData:!0}),function(){Xn.data=Kn=++Kn%2}}():Ln?function(){var Kn=new MessageChannel;return Kn.port1.onmessage=Br,function(){return Kn.port2.postMessage(0)}}():void 0===On&&'function'==typeof require?function(){try{var Kn=require,zn=Kn('vertx');return xn=zn.runOnLoop||zn.runOnContext,qr()}catch(Xn){return Wr()}}():Wr();var Hn=Math.random().toString(36).substring(16),qn,Fn=1,jn=2,Wn=new ln,Bn=new ln,Gn=0;return mn.prototype._enumerate=function(){for(var Kn=this.length,zn=this._input,Xn=0;this._state===qn&&Xn<Kn;Xn++)this._eachEntry(zn[Xn],Xn)},mn.prototype._eachEntry=function(Kn,zn){var Xn=this._instanceConstructor,Vn=Xn.resolve;if(Vn===zr){var Yn=Jr(Kn);if(Yn===Kr&&Kn._state!==qn)this._settledAt(Kn._state,zn,Kn._result);else if('function'!=typeof Yn)this._remaining--,this._result[zn]=Kn;else if(Xn===Sn){var Jn=new Xn(Xr);en(Jn,Kn,Yn),this._willSettleAt(Jn,zn)}else this._willSettleAt(new Xn(function(Qn){return Qn(Kn)}),zn)}else this._willSettleAt(Vn(Kn),zn)},mn.prototype._settledAt=function(Kn,zn,Xn){var Vn=this.promise;Vn._state===qn&&(this._remaining--,Kn===jn?nn(Vn,Xn):this._result[zn]=Xn),0===this._remaining&&rn(Vn,this._result)},mn.prototype._willSettleAt=function(Kn,zn){var Xn=this;sn(Kn,void 0,function(Vn){return Xn._settledAt(Fn,zn,Vn)},function(Vn){return Xn._settledAt(jn,zn,Vn)})},Sn.all=function(Kn){return new mn(this,Kn).promise},Sn.race=function(Kn){var zn=this;return new zn(An(Kn)?function(Xn,Vn){for(var Yn=Kn.length,Jn=0;Jn<Yn;Jn++)zn.resolve(Kn[Jn]).then(Xn,Vn)}:function(Xn,Vn){return Vn(new TypeError('You must pass an array to race.'))})},Sn.resolve=zr,Sn.reject=function(Kn){var zn=this,Xn=new zn(Xr);return nn(Xn,Kn),Xn},Sn._setScheduler=function(Kn){Rn=Kn},Sn._setAsap=function(Kn){Mn=Kn},Sn._asap=Mn,Sn.prototype={constructor:Sn,then:Kr,'catch':function(Kn){return this.then(null,Kn)}},Sn.polyfill=function(){var Kn;if('undefined'!=typeof global)Kn=global;else if('undefined'!=typeof self)Kn=self;else try{Kn=Function('return this')()}catch(Vn){throw new Error('polyfill failed because global object is unavailable in this environment')}var zn=Kn.Promise;if(zn){var Xn=null;try{Xn=Object.prototype.toString.call(zn.resolve())}catch(Vn){}if('[object Promise]'===Xn&&!zn.cast)return}Kn.Promise=Sn},Sn.Promise=Sn,Sn}),ES6Promise.polyfill(),(Dr=>{const Lr=!!('import'in document.createElement('link'));let kr=null;!1=='currentScript'in document&&Object.defineProperty(document,'currentScript',{get(){return kr||('complete'===document.readyState?null:document.scripts[document.scripts.length-1])},configurable:!0});const Ur=/(^\/)|(^#)|(^[\w-\d]*:)/,Hr=/(url\()([^)]*)(\))/g,qr=/(@import[\s]+(?!url\())([^;]*)(;)/g,Fr=/(<link[^>]*)(rel=['|"]?stylesheet['|"]?[^>]*>)/g,jr={fixUrls(an,ln){an.href&&an.setAttribute('href',jr.replaceAttrUrl(an.getAttribute('href'),ln)),an.src&&an.setAttribute('src',jr.replaceAttrUrl(an.getAttribute('src'),ln)),'style'===an.localName&&jr.resolveUrlsInStyle(an,ln)},fixUrlAttributes(an,ln){const dn=['action','src','href','url','style'];for(let _n,cn=0;cn<dn.length&&(_n=dn[cn]);cn++){const hn=an.attributes[_n],un=hn&&hn.value;un&&0>un.search(/({{|\[\[)/)&&(hn.value='style'===_n?jr.resolveUrlsInCssText(un,ln):jr.replaceAttrUrl(un,ln))}},fixUrlsInTemplates(an,ln){const dn=an.querySelectorAll('template');for(let cn=0;cn<dn.length;cn++)jr.fixUrlsInTemplate(dn[cn],ln)},fixUrlsInTemplate(an,ln){const dn=an.content;if(dn){const cn=dn.querySelectorAll('style, form[action], [src], [href], [url], [style]');for(let _n=0;_n<cn.length;_n++){const hn=cn[_n];'style'==hn.localName?jr.resolveUrlsInStyle(hn,ln):jr.fixUrlAttributes(hn,ln)}jr.fixUrlsInTemplates(dn,ln)}},resolveUrlsInStyle(an,ln){an.textContent=jr.resolveUrlsInCssText(an.textContent,ln)},resolveUrlsInCssText(an,ln){let dn=jr.replaceUrls(an,ln,Hr);return dn=jr.replaceUrls(dn,ln,qr),dn},replaceUrls(an,ln,dn){return an.replace(dn,(cn,_n,hn,un)=>{let mn=hn.replace(/["']/g,'');return ln&&(mn=jr.resolveUrl(mn,ln)),_n+'\''+mn+'\''+un})},replaceAttrUrl(an,ln){return an&&Ur.test(an)?an:jr.resolveUrl(an,ln)},resolveUrl(an,ln){if(void 0===jr.__workingURL){jr.__workingURL=!1;try{const cn=new URL('b','http://a');cn.pathname='c%20d',jr.__workingURL='http://a/c%20d'===cn.href}catch(cn){}}if(jr.__workingURL)return new URL(an,ln).href;let dn=jr.__tempDoc;return dn||(dn=document.implementation.createHTMLDocument('temp'),jr.__tempDoc=dn,dn.__base=dn.createElement('base'),dn.head.appendChild(dn.__base),dn.__anchor=dn.createElement('a')),dn.__base.href=ln,dn.__anchor.href=an,dn.__anchor.href||an}},Wr={async:!0,load(an){return new Promise((ln,dn)=>{if(!an)dn({resource:'error: href must be specified'});else if(an.match(/^data:/)){const cn=an.split(','),_n=cn[0];let hn=cn[1];hn=-1<_n.indexOf(';base64')?atob(hn):decodeURIComponent(hn),ln({resource:hn})}else{const cn=new XMLHttpRequest;cn.open('GET',an,Wr.async),cn.addEventListener('readystatechange',()=>{if(4===cn.readyState){let _n;try{const un=cn.getResponseHeader('Location');un&&(_n='/'===un.substr(0,1)?location.origin+un:un)}catch(un){console.error(un.message)}const hn={resource:cn.response||cn.responseText,redirectedUrl:_n};304===cn.status||0===cn.status||200<=cn.status&&300>cn.status?ln(hn):dn(hn)}}),cn.send()}})}},Br=/Trident/.test(navigator.userAgent)||/Edge\/\d./i.test(navigator.userAgent),Gr='link[rel=import]',Kr='import-disable',zr=`link[rel=stylesheet][href][type=${Kr}]`,Xr=`${Gr}, ${zr},
style:not([type]), link[rel=stylesheet][href]:not([type]),
script:not([type]), script[type="application/javascript"],
script[type="text/javascript"]`,Vr='import-dependency',Yr=`${Gr}:not(${Vr})`,Jr=`script[${Vr}]`,Qr=`style[${Vr}],
link[rel=stylesheet][${Vr}]`,$r=Element.prototype.matches||Element.prototype.matchesSelector||Element.prototype.mozMatchesSelector||Element.prototype.msMatchesSelector||Element.prototype.oMatchesSelector||Element.prototype.webkitMatchesSelector;const en=an=>{return an.nodeType===Node.ELEMENT_NODE&&$r.call(an,Gr)},tn=an=>{return an.__loadPromise||(an.__loadPromise=new Promise(ln=>{'script'!==an.localName||an.src?Br&&'style'===an.localName?an.addEventListener('load',ln):(an.addEventListener('load',ln),an.addEventListener('error',ln)):ln()}).then(()=>{return an.__loaded=!0,an})),an.__loadPromise},on=an=>{rn(()=>nn(()=>an&&an()))},rn=an=>{if('loading'!==document.readyState)an();else{const ln=()=>{'loading'!==document.readyState&&(document.removeEventListener('readystatechange',ln),an())};document.addEventListener('readystatechange',ln)}},nn=an=>{let ln=document.querySelectorAll(Yr);const dn=[];for(let hn,cn=0,_n=ln.length;cn<_n&&(hn=ln[cn]);cn++)hn.__loaded||dn.push(tn(hn));dn.length?Promise.all(dn).then(an):an()},sn=an=>{if(Lr)return an.ownerDocument;let ln=an.__ownerImport;if(!ln){for(ln=an;(ln=ln.parentNode||ln.host)&&!en(ln););an.__ownerImport=ln}return ln};if(on(()=>document.dispatchEvent(new CustomEvent('HTMLImportsLoaded',{cancelable:!0,bubbles:!0,detail:void 0}))),Lr){const an=ln=>{const dn=ln.target;en(dn)&&(dn.__loaded=!0)};document.addEventListener('load',an,!0),document.addEventListener('error',an,!0)}else new class{constructor(){this.documents={},this.inflight=0,rn(()=>{new MutationObserver(an=>this.handleMutations(an)).observe(document.head,{childList:!0,subtree:!0}),this.load()})}load(an){const ln=an?this.whenImportLoaded(an):this.whenImportsLoaded(document);ln&&(this.inflight++,ln.then(()=>{0==--this.inflight&&this.onLoadedAll()}))}whenImportsLoaded(an){const ln=an.querySelectorAll(Gr),dn=[];for(let cn=0,_n=ln.length;cn<_n;cn++){const hn=this.whenImportLoaded(ln[cn]);hn&&dn.push(hn)}return dn.length?Promise.all(dn).then(()=>an):null}whenImportLoaded(an){const ln=an.href;return void 0===this.documents[ln]?(this.documents[ln]='pending',Wr.load(ln).then(dn=>{const cn=this.makeDocument(dn.resource,dn.redirectedUrl||ln);return this.documents[ln]=cn,this.whenImportsLoaded(cn)}).catch(()=>this.documents[ln]=null).then(()=>an)):null}makeDocument(an,ln){if(!an)return document.createDocumentFragment();Br&&(an=an.replace(Fr,(yn,gn,bn)=>{return-1===yn.indexOf('type=')?`${gn} type=${Kr} ${bn}`:yn}));let dn;const cn=document.createElement('template');if(cn.innerHTML=an,cn.content)dn=cn.content;else for(dn=document.createDocumentFragment();cn.firstElementChild;)dn.appendChild(cn.firstElementChild);const _n=dn.querySelector('base');_n&&(ln=jr.replaceAttrUrl(_n.getAttribute('href'),ln),_n.removeAttribute('href'));const hn=dn.querySelectorAll('dom-module');for(let gn,yn=0;yn<hn.length&&(gn=hn[yn]);yn++)gn.setAttribute('assetpath',jr.replaceAttrUrl(gn.getAttribute('assetpath')||'',ln));const un=dn.querySelectorAll(Xr);let mn=0;for(let bn,yn=0,gn=un.length;yn<gn&&(bn=un[yn]);yn++)if(tn(bn),jr.fixUrls(bn,ln),bn.setAttribute(Vr,''),'script'===bn.localName&&!bn.src&&bn.textContent){const vn=mn?`-${mn}`:'',En=bn.textContent+`\n//# sourceURL=${ln}${vn}.js\n`;bn.setAttribute('src','data:text/javascript;charset=utf-8,'+encodeURIComponent(En)),bn.textContent='',mn++}return jr.fixUrlsInTemplates(dn,ln),dn}onLoadedAll(){this.flatten(document),Promise.all([this.waitForStyles(),this.runScripts()]).then(()=>this.fireEvents())}flatten(an){const ln=an.querySelectorAll(Gr);for(let _n,dn=0,cn=ln.length;dn<cn&&(_n=ln[dn]);dn++){const hn=this.documents[_n.href];_n.import=hn,hn&&hn.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&(this.documents[_n.href]=_n,_n.readyState='loading',_n.import=_n,this.flatten(hn),_n.appendChild(hn))}}runScripts(){const an=document.querySelectorAll(Jr);let ln=Promise.resolve();for(let _n,dn=0,cn=an.length;dn<cn&&(_n=an[dn]);dn++)ln=ln.then(()=>{const hn=document.createElement('script');_n.removeAttribute(Vr);for(let un=0,mn=_n.attributes.length;un<mn;un++)hn.setAttribute(_n.attributes[un].name,_n.attributes[un].value);return kr=hn,_n.parentNode.replaceChild(hn,_n),tn(hn).then(()=>kr=null)});return ln}waitForStyles(){const an=!!document.querySelector(zr),ln=document.querySelectorAll(Qr),dn=[];for(let hn,cn=0,_n=ln.length;cn<_n&&(hn=ln[cn]);cn++)if(dn.push(tn(hn).then(()=>hn.removeAttribute(Vr))),an&&hn.parentNode!==document.head){let un=sn(hn);for(;un&&sn(un);)un=sn(un);const mn=hn.parentNode,yn=hn.nextSibling,gn=document.createElement(hn.localName);gn.__appliedElement=hn,gn.setAttribute('type','import-placeholder'),un.parentNode===document.head?document.head.insertBefore(hn,un):document.head.appendChild(hn),mn.insertBefore(gn,yn),hn.removeAttribute('type')}return Promise.all(dn)}fireEvents(){const an=document.querySelectorAll(Gr);for(let dn,ln=an.length-1;0<=ln&&(dn=an[ln]);ln--)this.fireEventIfNeeded(dn)}fireEventIfNeeded(an){if(!an.__loaded){an.__loaded=!0,an.import&&(an.import.readyState='complete');const ln=an.import?'load':'error';an.dispatchEvent(new CustomEvent(ln,{bubbles:!1,cancelable:!1,detail:void 0}))}}handleMutations(an){for(let ln=0;ln<an.length;ln++){const dn=an[ln];if(dn.addedNodes)for(let cn=0;cn<dn.addedNodes.length;cn++){const _n=dn.addedNodes[cn];if(_n&&_n.nodeType===Node.ELEMENT_NODE){const hn=en(_n)?[_n]:_n.querySelectorAll(Gr);for(let un=0;un<hn.length;un++){const mn=hn[un],yn=this.documents[mn.href];void 0===yn?this.load(mn):!this.inflight&&(mn.import=yn,this.fireEventIfNeeded(mn))}}}}}};Dr.useNative=Lr,Dr.whenReady=on,Dr.importForElement=sn})(window.HTMLImports=window.HTMLImports||{}),function(){'use strict';window.WebComponents=window.WebComponents||{flags:{}};var Lr=document.querySelector('script[src*="'+'webcomponents-lite.js'+'"]'),kr={};if(!kr.noOpts){if(location.search.slice(1).split('&').forEach(function(Br){var Kr,Gr=Br.split('=');Gr[0]&&(Kr=Gr[0].match(/wc-(.+)/))&&(kr[Kr[1]]=Gr[1]||!0)}),Lr)for(var Hr,Ur=0;Hr=Lr.attributes[Ur];Ur++)'src'!==Hr.name&&(kr[Hr.name]=Hr.value||!0);if(kr.log&&kr.log.split){var qr=kr.log.split(',');kr.log={},qr.forEach(function(Br){kr.log[Br]=!0})}else kr.log={}}WebComponents.flags=kr;var Fr=window.WebComponents,jr=Fr.flags.shadydom;jr&&(window.ShadyDOM=window.ShadyDOM||{},ShadyDOM.force=jr);var Wr=Fr.flags.register||Fr.flags.ce;Wr&&window.customElements&&(customElements.forcePolyfill=Wr)}(),function(){'use strict';function Dr(Da){return'ShadyRoot'===Da.__localName}function Lr(Da){let La=Da.getRootNode();if(Dr(La))return La}function kr(Da,La){return cs.call(Da,La)}function Ur(Da,La,Ua){let Ha=Object.getOwnPropertyDescriptor(La,Da);Ha&&Object.defineProperty(Ua,Da,Ha)}function Hr(Da,La){if(Da&&La){let Ua=Object.getOwnPropertyNames(La);for(let Ha,Fa=0;Fa<Ua.length&&(Ha=Ua[Fa]);Fa++)Ur(Ha,La,Da)}return Da||La}function qr(Da,...La){for(let Ua=0;Ua<La.length;Ua++)Hr(Da,La[Ua]);return Da}function Fr(Da,La){for(var Ua in La)Da[Ua]=La[Ua];return Da}function jr(Da,La){let Ua=Object.getPrototypeOf(Da);if(!Ua.hasOwnProperty('__patchProto')){let Ha=Object.create(Ua);Ha.__sourceProto=Ua,Hr(Ha,La),Ua.__patchProto=Ha}Da.__proto__=Ua.__patchProto}function Wr(Da){ms||(ms=!0,_s.then(Br)),us.push(Da)}function Br(){for(ms=!1,ys++;us.length;)us.shift()();hs&&hs.flush&&hs.flush();const Da=100<ys;if(us.length&&!Da&&Br(),ys=0,Da)throw new Error('Loop detected in ShadyDOM distribution, aborting.')}function Kr(Da){return'&'===Da?'&amp;':'<'===Da?'&lt;':'>'===Da?'&gt;':'"'===Da?'&quot;':'\xA0'===Da?'&nbsp;':void 0}function zr(Da){return Da.replace(Ms,Kr)}function Xr(Da){return Da.replace(Os,Kr)}function Vr(Da){let La={};for(let Ua=0;Ua<Da.length;Ua++)La[Da[Ua]]=!0;return La}function Yr(Da,La,Ua){switch(Da.nodeType){case Node.ELEMENT_NODE:{let Ha=Da.localName,Fa='<'+Ha,Wa=Da.attributes;for(let Ba,Ga=0;Ba=Wa[Ga];Ga++)Fa+=' '+Ba.name+'="'+zr(Ba.value)+'"';return Fa+='>',ws[Ha]?Fa:Fa+Jr(Da,Ua)+'</'+Ha+'>'}case Node.TEXT_NODE:{let Ha=Da.data;return La&&Is[La.localName]?Ha:Xr(Ha)}case Node.COMMENT_NODE:return'<!--'+Da.data+'-->';default:throw window.console.error(Da),new Error('not implemented');}}function Jr(Da,La){'template'===Da.localName&&(Da=Da.content);let Ua='',Ha=La?La(Da):Da.childNodes;for(let Fa,Wa=0,Ba=Ha.length;Wa<Ba&&(Fa=Ha[Wa]);Wa++)Ua+=Yr(Fa,Da,La);return Ua}function Qr(Da){return Ds.currentNode=Da,Ds.parentNode()}function $r(Da){return Ds.currentNode=Da,Ds.firstChild()}function Zr(Da){return Ds.currentNode=Da,Ds.lastChild()}function en(Da){let La=[];Ds.currentNode=Da;for(let Ua=Ds.firstChild();Ua;)La.push(Ua),Ua=Ds.nextSibling();return La}function tn(Da){return Ls.currentNode=Da,Ls.firstChild()}function on(Da){return Ls.currentNode=Da,Ls.lastChild()}function rn(Da){return Ls.currentNode=Da,Ls.previousSibling()}function nn(Da){return Ls.currentNode=Da,Ls.nextSibling()}function sn(Da){let La=[];Ls.currentNode=Da;for(let Ua=Ls.firstChild();Ua;)La.push(Ua),Ua=Ls.nextSibling();return La}function an(Da){return Jr(Da,La=>en(La))}function ln(Da){if(Da.nodeType!==Node.ELEMENT_NODE)return Da.nodeValue;let Ha,La=document.createTreeWalker(Da,NodeFilter.SHOW_TEXT,null,!1),Ua='';for(;Ha=La.nextNode();)Ua+=Ha.nodeValue;return Ua}function dn(Da,La){return Da.__shady&&Da.__shady[La]}function cn(Da,La){return void 0!==dn(Da,La)}function _n(Da){return{get(){let La=dn(this,Da);return void 0===La?ks[Da](this):La},configurable:!0}}function hn(Da){for(;Da.firstChild;)Da.removeChild(Da.firstChild)}function un(){return Fs&&Fs.get?Fs.get.call(document):ls.hasDescriptors?void 0:document.activeElement}function mn(Da){let La=un();if(!La)return null;let Ua=!!Dr(Da);if(Da!==document){if(!Ua)return null;if(Da.host===La||!Da.host.contains(La))return null}let Ha=Lr(La);for(;Ha&&Ha!==Da;)La=Ha.host,Ha=Lr(La);return Da===document?Ha?null:La:Ha===Da?La:null}function yn(Da,La,Ua){for(let Ha in La){let Fa=Object.getOwnPropertyDescriptor(Da,Ha);Fa&&Fa.configurable||!Fa&&Ua?Object.defineProperty(Da,Ha,La[Ha]):Ua&&console.warn('Could not define',Ha,'on',Da)}}function gn(Da){yn(Da,js),yn(Da,Ws),yn(Da,Gs)}function bn(Da,La,Ua){if(zs(La),La.__shady=La.__shady||{},cn(La,'firstChild')&&(La.__shady.childNodes=null),Da.nodeType===Node.DOCUMENT_FRAGMENT_NODE){let Ha=Da.childNodes;for(let Wa=0;Wa<Ha.length;Wa++)vn(Ha[Wa],La,Ua);Da.__shady=Da.__shady||{};let Fa=cn(Da,'firstChild')?null:void 0;Da.__shady.firstChild=Da.__shady.lastChild=Fa,Da.__shady.childNodes=Fa}else vn(Da,La,Ua)}function vn(Da,La,Ua){Ks(Da),Ua=Ua||null,Da.__shady=Da.__shady||{},La.__shady=La.__shady||{},Ua&&(Ua.__shady=Ua.__shady||{}),Da.__shady.previousSibling=Ua?Ua.__shady.previousSibling:La.lastChild;let Ha=Da.__shady.previousSibling;Ha&&Ha.__shady&&(Ha.__shady.nextSibling=Da);let Fa=Da.__shady.nextSibling=Ua;Fa&&Fa.__shady&&(Fa.__shady.previousSibling=Da),Da.__shady.parentNode=La,Ua?Ua===La.__shady.firstChild&&(La.__shady.firstChild=Da):(La.__shady.lastChild=Da,!La.__shady.firstChild&&(La.__shady.firstChild=Da)),La.__shady.childNodes=null}function En(Da,La){Da.__shady=Da.__shady||{},La.__shady=La.__shady||{},Da===La.__shady.firstChild&&(La.__shady.firstChild=Da.__shady.nextSibling),Da===La.__shady.lastChild&&(La.__shady.lastChild=Da.__shady.previousSibling);let Ua=Da.__shady.previousSibling,Ha=Da.__shady.nextSibling;Ua&&(Ua.__shady=Ua.__shady||{},Ua.__shady.nextSibling=Ha),Ha&&(Ha.__shady=Ha.__shady||{},Ha.__shady.previousSibling=Ua),Da.__shady.parentNode=Da.__shady.previousSibling=Da.__shady.nextSibling=void 0,cn(La,'childNodes')&&(La.__shady.childNodes=null)}function Nn(Da,La,Ua){let Fa,Ha=Lr(Da);Ha&&(La.__noInsertionPoint&&!Ha._changePending&&(Ha._skipUpdateInsertionPoints=!0),Fa=Rn(La,Da,Ha),Fa&&(Ha._skipUpdateInsertionPoints=!1)),cn(Da,'firstChild')&&bn(La,Da,Ua);let Wa=xn(La,Da,Ha,Fa)||Da.shadyRoot;return Wa}function Sn(Da){let La,Ua=cn(Da,'parentNode')&&dn(Da,'parentNode'),Ha=Lr(Da);if(Ua||Ha){La=Ln(Da),Ua&&En(Da,Ua);let Fa=Ha&&On(Ha,Da),Wa=Ua&&Ha&&Ua.localName===Ha.getInsertionPointTag();(Fa||Wa)&&(Ha._skipUpdateInsertionPoints=!1,kn(Ha))}return In(Da),La}function Cn(Da,La,Ua){let Ha=Da.__shady&&Da.__shady.observer;Ha&&(La&&Ha.addedNodes.push(La),Ua&&Ha.removedNodes.push(Ua),Ha.schedule())}function Tn(Da,La){return La?(Cn(La,null,Da),Sn(Da)):void In(Da)}function An(Da){return void 0!==Da.__ownerShadyRoot}function Pn(Da){if(Da&&Da.nodeType){let La=Da.__ownerShadyRoot;if(void 0===La){if(Dr(Da))La=Da;else{let Ua=Da.parentNode;La=Ua?Pn(Ua):Da}document.documentElement.contains(Da)&&(Da.__ownerShadyRoot=La)}return La}}function xn(Da,La,Ua,Ha){let Fa=Ua&&Ua.getInsertionPointTag()||'',Wa=Da.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&!Da.__noInsertionPoint&&Fa&&Da.querySelector(Fa),Ba=Wa&&Wa.parentNode.nodeType!==Node.DOCUMENT_FRAGMENT_NODE,Ga=Wa||Da.localName===Fa;(Ga||La.localName===Fa||Ha)&&Ua&&kn(Ua);let Ka=Mn(La);return Ka&&kn(La.shadyRoot),Ka||Ga&&!Ba}function Rn(Da,La,Ua){let Ha,Fa=Ua.getInsertionPointTag();if(Da.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&!Da.__noInsertionPoint){let Wa=Da.querySelectorAll(Fa);for(let Ba,Ga,Ka,za=0;za<Wa.length&&(Ba=Wa[za]);za++)Ga=Ba.parentNode,Ga===Da&&(Ga=La),Ka=Rn(Ba,Ga,Ua),Ha=Ha||Ka}else Da.localName===Fa&&(Xs(La),Xs(Da),Ha=!0);return Ha}function Mn(Da){return Da&&Da.shadyRoot&&Da.shadyRoot.hasInsertionPoint()}function On(Da,La){let Ua,Ha=Da._insertionPoints;for(let Wa,Fa=0;Fa<Ha.length;Fa++)if(Wa=Ha[Fa],wn(La,Wa)){let Ba=Wa.assignedNodes({flatten:!0});for(let Ga=0;Ga<Ba.length;Ga++){Ua=!0;let Ka=Ba[Ga],za=Qr(Ka);za&&Ns.call(za,Ka)}}return Ua}function wn(Da,La){for(;La;){if(La==Da)return!0;La=La.parentNode}}function In(Da){if(An(Da)){let La=Da.childNodes;for(let Ua,Ha=0,Fa=La.length;Ha<Fa&&(Ua=La[Ha]);Ha++)In(Ua)}Da.__ownerShadyRoot=void 0}function Dn(Da){let La=Da.assignedNodes({flatten:!0}),Ua=Pn(Da);for(let Ha,Fa=0,Wa=La.length;Fa<Wa&&(Ha=La[Fa]);Fa++)if(Ua.isFinalDestination(Da,Ha))return Ha}function Ln(Da){let La=Da.parentNode;if(Mn(La))return kn(La.shadyRoot),!0}function kn(Da){Da._changePending=!0,Da.update()}function Un(Da,La){if('slot'===La)Ln(Da);else if('slot'===Da.localName&&'name'===La){let Ua=Lr(Da);Ua&&Ua.update()}}function Hn(Da,La,Ua){let Ha=[];return qn(Da.childNodes,La,Ua,Ha),Ha}function qn(Da,La,Ua,Ha){for(let Fa,Wa=0,Ba=Da.length;Wa<Ba&&(Fa=Da[Wa]);Wa++)if(Fa.nodeType===Node.ELEMENT_NODE&&Fn(Fa,La,Ua,Ha))return!0}function Fn(Da,La,Ua,Ha){let Fa=La(Da);return Fa&&Ha.push(Da),Ua&&Ua(Fa)?Fa:void qn(Da.childNodes,La,Ua,Ha)}function jn(Da){var La=Da.getRootNode();Dr(La)&&La.render()}function Wn(Da,La,Ua){window.ShadyCSS&&'class'===La&&Da.ownerDocument===document?window.ShadyCSS.setElementClass(Da,Ua):(Ss.call(Da,La,Ua),Un(Da,La))}function Bn(Da,La){Cs.call(Da,La),Un(Da,La)}function Gn(Da,La,Ua){if(Ua){let Ha=dn(Ua,'parentNode');if(void 0!==Ha&&Ha!==Da)throw Error('The ref_node to be inserted before is not a child of this node')}if(La.nodeType!==Node.DOCUMENT_FRAGMENT_NODE){let Ha=dn(La,'parentNode');Ha?Tn(La,Ha):La.parentNode&&Ns.call(La.parentNode,La)}if(!Nn(Da,La,Ua)){if(Ua){let Fa=Lr(Ua);Fa&&(Ua=Ua.localName===Fa.getInsertionPointTag()?Dn(Ua):Ua)}let Ha=Dr(Da)?Da.host:Da;Ua?Es.call(Ha,La,Ua):vs.call(Ha,La)}return Cn(Da,La),La}function Kn(Da,La){if(La.parentNode!==Da)throw Error('The node to be removed is not a child of this node: '+La);if(!Sn(La)){let Ua=Dr(Da)?Da.host:Da,Ha=Qr(La);Ua===Ha&&Ns.call(Ua,La)}return Cn(Da,null,La),La}function zn(Da,La){if('template'==Da.localName)return Ts.call(Da,La);let Ua=Ts.call(Da,!1);if(La){let Ha=Da.childNodes;for(let Fa,Wa=0;Wa<Ha.length;Wa++)Fa=Ha[Wa].cloneNode(!0),Ua.appendChild(Fa)}return Ua}function Xn(Da,La){if(Da.ownerDocument!==document)return As.call(document,Da,La);let Ua=As.call(document,Da,!1);if(La){let Ha=Da.childNodes;for(let Fa,Wa=0;Wa<Ha.length;Wa++)Fa=Xn(Ha[Wa],!0),Ua.appendChild(Fa)}return Ua}function Vn(Da,La){let Ua=[],Ha=Da,Fa=Da===window?window:Da.getRootNode();for(;Ha;)Ua.push(Ha),Ha=Ha.assignedSlot?Ha.assignedSlot:Ha.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&Ha.host&&(La||Ha!==Fa)?Ha.host:Ha.parentNode;return Ua[Ua.length-1]===document&&Ua.push(window),Ua}function Yn(Da,La){if(!Dr)return Da;let Ua=Vn(Da,!0),Ha=La;for(let Fa,Wa,Ba,Ga,Ka=0;Ka<Ha.length;Ka++)if(Fa=Ha[Ka],Ba=Fa===window?window:Fa.getRootNode(),Ba!=Wa&&(Ga=Ua.indexOf(Ba),Wa=Ba),!Dr(Ba)||-1<Ga)return Fa}function Jn(Da){let La=function(Ua,Ha){let Fa=new Da(Ua,Ha);return Fa.__composed=Ha&&!!Ha.composed,Fa};return Fr(La,Da),La.prototype=Da.prototype,La}function Qn(Da,La,Ua){let Ha=La.__handlers&&La.__handlers[Da.type]&&La.__handlers[Da.type][Ua];if(Ha)for(let Fa,Wa=0;Fa=Ha[Wa];Wa++)if(Fa.call(La,Da),Da.__immediatePropagationStopped)return}function $n(Da){let Ua,La=Da.composedPath();Object.defineProperty(Da,'currentTarget',{get:function(){return Ua},configurable:!0});for(let Fa=La.length-1;0<=Fa;Fa--)if(Ua=La[Fa],Qn(Da,Ua,'capture'),Da.__propagationStopped)return;Object.defineProperty(Da,'eventPhase',{value:Event.AT_TARGET});let Ha;for(let Fa=0;Fa<La.length;Fa++)if(Ua=La[Fa],(0===Fa||Ua.shadowRoot&&Ua.shadowRoot===Ha)&&(Qn(Da,Ua,'bubble'),Ua!==window&&(Ha=Ua.getRootNode()),Da.__propagationStopped))return}function Zn(){for(let Da in Js)window.addEventListener(Da,function(La){La.__target||(La.__target=La.target,La.__relatedTarget=La.relatedTarget,jr(La,Ys),$n(La),La.stopImmediatePropagation())},!0)}function ts(Da,La,Ua){return{index:Da,removed:La,addedCount:Ua}}function os(Da,La){if(!Da)throw'Must provide a host.';if(!La)throw'Not enough arguments.';return new Pa(Aa,Da)}function rs(Da){return jn(Da),dn(Da,'assignedSlot')||null}function ns(Da,La){let Ua=Object.getOwnPropertyNames(La);for(let Ha=0;Ha<Ua.length;Ha++){let Fa=Ua[Ha],Wa=Object.getOwnPropertyDescriptor(La,Fa);Wa.value?Da[Fa]=Wa.value:Object.defineProperty(Da,Fa,Wa)}}let ls=window.ShadyDOM||{};ls.hasNativeShadowDOM=!!(Element.prototype.attachShadow&&Node.prototype.getRootNode);let ds=Object.getOwnPropertyDescriptor(Node.prototype,'firstChild');ls.hasDescriptors=!!(ds&&ds.configurable&&ds.get),ls.inUse=ls.force||!ls.hasNativeShadowDOM;let _s,ps=Element.prototype,cs=ps.matches||ps.matchesSelector||ps.mozMatchesSelector||ps.msMatchesSelector||ps.oMatchesSelector||ps.webkitMatchesSelector;if(window.Promise)_s=Promise.resolve();else{let Da=document.createTextNode(''),La=0;_s={then(Ua){let Ha=new MutationObserver(function(){Ha.disconnect(),Ua()});Ha.observe(Da,{characterData:!0}),Da.textContent=La++}}}let ms,hs=window.customElements,us=[],ys=0;Br.list=us;class fs{constructor(){this._scheduled=!1,this.addedNodes=[],this.removedNodes=[],this.callbacks=new Set}schedule(){this._scheduled||(this._scheduled=!0,_s.then(()=>{this.flush()}))}flush(){if(this._scheduled){this._scheduled=!1;let Da=this.takeRecords();Da.length&&this.callbacks.forEach(function(La){La(Da)})}}takeRecords(){if(this.addedNodes.length||this.removedNodes.length){let Da=[{addedNodes:this.addedNodes,removedNodes:this.removedNodes}];return this.addedNodes=[],this.removedNodes=[],Da}return[]}}let vs=Element.prototype.appendChild,Es=Element.prototype.insertBefore,Ns=Element.prototype.removeChild,Ss=Element.prototype.setAttribute,Cs=Element.prototype.removeAttribute,Ts=Element.prototype.cloneNode,As=Document.prototype.importNode,Ps=Element.prototype.addEventListener,xs=Element.prototype.removeEventListener;var Rs=Object.freeze({appendChild:vs,insertBefore:Es,removeChild:Ns,setAttribute:Ss,removeAttribute:Cs,cloneNode:Ts,importNode:As,addEventListener:Ps,removeEventListener:xs});let Ms=/[&\u00A0"]/g,Os=/[&\u00A0<>]/g,ws=Vr(['area','base','br','col','command','embed','hr','img','input','keygen','link','meta','param','source','track','wbr']),Is=Vr(['style','script','xmp','iframe','noembed','noframes','plaintext','noscript']),Ds=document.createTreeWalker(document,NodeFilter.SHOW_ALL,null,!1),Ls=document.createTreeWalker(document,NodeFilter.SHOW_ELEMENT,null,!1);var ks=Object.freeze({parentNode:Qr,firstChild:$r,lastChild:Zr,previousSibling:function(Da){return Ds.currentNode=Da,Ds.previousSibling()},nextSibling:function(Da){return Ds.currentNode=Da,Ds.nextSibling()},childNodes:en,parentElement:function(Da){return Ls.currentNode=Da,Ls.parentNode()},firstElementChild:tn,lastElementChild:on,previousElementSibling:rn,nextElementSibling:nn,children:sn,innerHTML:an,textContent:ln});const Us=Object.getOwnPropertyDescriptor(Element.prototype,'innerHTML')||Object.getOwnPropertyDescriptor(HTMLElement.prototype,'innerHTML'),Hs=document.implementation.createHTMLDocument('inert'),qs=Hs.createElement('div'),Fs=Object.getOwnPropertyDescriptor(Document.prototype,'activeElement');let js={parentElement:_n('parentElement'),parentNode:_n('parentNode'),nextSibling:_n('nextSibling'),previousSibling:_n('previousSibling'),className:{get(){return this.getAttribute('class')},set(Da){this.setAttribute('class',Da)},configurable:!0},nextElementSibling:{get(){if(cn(this,'nextSibling')){let Da=this.nextSibling;for(;Da&&Da.nodeType!==Node.ELEMENT_NODE;)Da=Da.nextSibling;return Da}return nn(this)},configurable:!0},previousElementSibling:{get(){if(cn(this,'previousSibling')){let Da=this.previousSibling;for(;Da&&Da.nodeType!==Node.ELEMENT_NODE;)Da=Da.previousSibling;return Da}return rn(this)},configurable:!0}},Ws={childNodes:{get(){if(cn(this,'firstChild')){if(!this.__shady.childNodes){this.__shady.childNodes=[];for(let Da=this.firstChild;Da;Da=Da.nextSibling)this.__shady.childNodes.push(Da)}return this.__shady.childNodes}return en(this)},configurable:!0},firstChild:_n('firstChild'),lastChild:_n('lastChild'),textContent:{get(){if(cn(this,'firstChild')){let Da=[];for(let La,Ua=0,Ha=this.childNodes;La=Ha[Ua];Ua++)La.nodeType!==Node.COMMENT_NODE&&Da.push(La.textContent);return Da.join('')}return ln(this)},set(Da){this.nodeType===Node.ELEMENT_NODE?(hn(this),Da&&this.appendChild(document.createTextNode(Da))):this.nodeValue=Da},configurable:!0},firstElementChild:{get(){if(cn(this,'firstChild')){let Da=this.firstChild;for(;Da&&Da.nodeType!==Node.ELEMENT_NODE;)Da=Da.nextSibling;return Da}return tn(this)},configurable:!0},lastElementChild:{get(){if(cn(this,'lastChild')){let Da=this.lastChild;for(;Da&&Da.nodeType!==Node.ELEMENT_NODE;)Da=Da.previousSibling;return Da}return on(this)},configurable:!0},children:{get(){return cn(this,'firstChild')?Array.prototype.filter.call(this.childNodes,function(Da){return Da.nodeType===Node.ELEMENT_NODE}):sn(this)},configurable:!0},innerHTML:{get(){let Da='template'===this.localName?this.content:this;return cn(this,'firstChild')?Jr(Da):an(Da)},set(Da){let La='template'===this.localName?this.content:this;for(hn(La),Us&&Us.set?Us.set.call(qs,Da):qs.innerHTML=Da;qs.firstChild;)La.appendChild(qs.firstChild)},configurable:!0}},Bs={shadowRoot:{get(){return this.shadyRoot},set(Da){this.shadyRoot=Da},configurable:!0}},Gs={activeElement:{get(){return mn(this)},set(){},configurable:!0}},Ks=ls.hasDescriptors?function(){}:function(Da){Da.__shady&&Da.__shady.__outsideAccessors||(Da.__shady=Da.__shady||{},Da.__shady.__outsideAccessors=!0,yn(Da,js,!0))},zs=ls.hasDescriptors?function(){}:function(Da){Da.__shady&&Da.__shady.__insideAccessors||(Da.__shady=Da.__shady||{},Da.__shady.__insideAccessors=!0,yn(Da,Ws,!0),yn(Da,Bs,!0))},Xs=function(Da){if(!cn(Da,'firstChild')){Da.__shady=Da.__shady||{},Da.__shady.firstChild=$r(Da),Da.__shady.lastChild=Zr(Da),zs(Da);let La=Da.__shady.childNodes=en(Da);for(let Ua,Ha=0;Ha<La.length&&(Ua=La[Ha]);Ha++)Ua.__shady=Ua.__shady||{},Ua.__shady.parentNode=Da,Ua.__shady.nextSibling=La[Ha+1]||null,Ua.__shady.previousSibling=La[Ha-1]||null,Ks(Ua)}},Vs={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},Ys={get composed(){return this.isTrusted&&void 0===this.__composed&&(this.__composed=Vs[this.type]),this.__composed||!1},composedPath(){return this.__composedPath||(this.__composedPath=Vn(this.__target,this.composed)),this.__composedPath},get target(){return Yn(this.currentTarget,this.composedPath())},get relatedTarget(){return this.__relatedTarget?(this.__relatedTargetComposedPath||(this.__relatedTargetComposedPath=Vn(this.__relatedTarget,!0)),Yn(this.currentTarget,this.__relatedTargetComposedPath)):null},stopPropagation(){Event.prototype.stopPropagation.call(this),this.__propagationStopped=!0},stopImmediatePropagation(){Event.prototype.stopImmediatePropagation.call(this),this.__immediatePropagationStopped=!0,this.__propagationStopped=!0}},Js={focus:!0,blur:!0},Qs=Jn(window.Event),$s=Jn(window.CustomEvent),Zs=Jn(window.MouseEvent);const _a=0,ya=1,va=2,Ea=3;let Na={calcEditDistances(Da,La,Ua,Ha,Fa,Wa){let Ba=Wa-Fa+1,Ga=Ua-La+1,Ka=Array(Ba);for(let za=0;za<Ba;za++)Ka[za]=Array(Ga),Ka[za][0]=za;for(let za=0;za<Ga;za++)Ka[0][za]=za;for(let za=1;za<Ba;za++)for(let Xa=1;Xa<Ga;Xa++)if(this.equals(Da[La+Xa-1],Ha[Fa+za-1]))Ka[za][Xa]=Ka[za-1][Xa-1];else{let Va=Ka[za-1][Xa]+1,Ya=Ka[za][Xa-1]+1;Ka[za][Xa]=Va<Ya?Va:Ya}return Ka},spliceOperationsFromEditDistances(Da){let La=Da.length-1,Ua=Da[0].length-1,Ha=Da[La][Ua],Fa=[];for(;0<La||0<Ua;){if(0==La){Fa.push(va),Ua--;continue}if(0==Ua){Fa.push(Ea),La--;continue}let Wa,Ba=Da[La-1][Ua-1],Ga=Da[La-1][Ua],Ka=Da[La][Ua-1];Wa=Ga<Ka?Ga<Ba?Ga:Ba:Ka<Ba?Ka:Ba,Wa==Ba?(Ba==Ha?Fa.push(_a):(Fa.push(ya),Ha=Ba),La--,Ua--):Wa==Ga?(Fa.push(Ea),La--,Ha=Ga):(Fa.push(va),Ua--,Ha=Ka)}return Fa.reverse(),Fa},calcSplices(Da,La,Ua,Ha,Fa,Wa){let Ba,Ga=0,Ka=0,za=Math.min(Ua-La,Wa-Fa);if(0==La&&0==Fa&&(Ga=this.sharedPrefix(Da,Ha,za)),Ua==Da.length&&Wa==Ha.length&&(Ka=this.sharedSuffix(Da,Ha,za-Ga)),La+=Ga,Fa+=Ga,Ua-=Ka,Wa-=Ka,0==Ua-La&&0==Wa-Fa)return[];if(La==Ua){for(Ba=ts(La,[],0);Fa<Wa;)Ba.removed.push(Ha[Fa++]);return[Ba]}if(Fa==Wa)return[ts(La,[],Ua-La)];let Xa=this.spliceOperationsFromEditDistances(this.calcEditDistances(Da,La,Ua,Ha,Fa,Wa));Ba=void 0;let Va=[],Ya=La,Ja=Fa;for(let Qa=0;Qa<Xa.length;Qa++)switch(Xa[Qa]){case _a:Ba&&(Va.push(Ba),Ba=void 0),Ya++,Ja++;break;case ya:Ba||(Ba=ts(Ya,[],0)),Ba.addedCount++,Ya++,Ba.removed.push(Ha[Ja]),Ja++;break;case va:Ba||(Ba=ts(Ya,[],0)),Ba.addedCount++,Ya++;break;case Ea:Ba||(Ba=ts(Ya,[],0)),Ba.removed.push(Ha[Ja]),Ja++;}return Ba&&Va.push(Ba),Va},sharedPrefix(Da,La,Ua){for(let Ha=0;Ha<Ua;Ha++)if(!this.equals(Da[Ha],La[Ha]))return Ha;return Ua},sharedSuffix(Da,La,Ua){let Ha=Da.length,Fa=La.length,Wa=0;for(;Wa<Ua&&this.equals(Da[--Ha],La[--Fa]);)Wa++;return Wa},calculateSplices(Da,La){return this.calcSplices(Da,0,Da.length,La,0,La.length)},equals(Da,La){return Da===La}},Sa=(Da,La)=>Na.calculateSplices(Da,La),Ca='function'==typeof Event?Event:function(Da,La){La=La||{};var Ua=document.createEvent('Event');return Ua.initEvent(Da,!!La.bubbles,!!La.cancelable),Ua};var Ta=class{constructor(Da){this.root=Da,this.insertionPointTag='slot'}getInsertionPoints(){return this.root.querySelectorAll(this.insertionPointTag)}hasInsertionPoint(){return!!(this.root._insertionPoints&&this.root._insertionPoints.length)}isInsertionPoint(Da){return Da.localName&&Da.localName==this.insertionPointTag}distribute(){return this.hasInsertionPoint()?this.distributePool(this.root,this.collectPool()):[]}collectPool(){let Da=this.root.host,La=[],Ua=0;for(let Ha=Da.firstChild;Ha;Ha=Ha.nextSibling)La[Ua++]=Ha;return La}distributePool(Da,La){let Ua=[],Ha=this.root._insertionPoints;for(let Fa,Wa=0,Ba=Ha.length;Wa<Ba&&(Fa=Ha[Wa]);Wa++){this.distributeInsertionPoint(Fa,La);let Ga=Fa.parentNode;Ga&&Ga.shadyRoot&&this.hasInsertionPoint(Ga.shadyRoot)&&Ua.push(Ga.shadyRoot)}for(let Wa,Fa=0;Fa<La.length;Fa++)if(Wa=La[Fa],Wa){Wa.__shady=Wa.__shady||{},Wa.__shady.assignedSlot=void 0;let Ba=Qr(Wa);Ba&&Ns.call(Ba,Wa)}return Ua}distributeInsertionPoint(Da,La){let Ua=Da.__shady.assignedNodes;Ua&&this.clearAssignedSlots(Da,!0),Da.__shady.assignedNodes=[];let Ha=!1,Fa=!1;for(let Wa,Ba=0,Ga=La.length;Ba<Ga;Ba++)(Wa=La[Ba],!!Wa)&&this.matchesInsertionPoint(Wa,Da)&&(Wa.__shady._prevAssignedSlot!=Da&&(Ha=!0),this.distributeNodeInto(Wa,Da),La[Ba]=void 0,Fa=!0);if(!Fa){let Wa=Da.childNodes;for(let Ba,Ga=0;Ga<Wa.length;Ga++)Ba=Wa[Ga],Ba.__shady._prevAssignedSlot!=Da&&(Ha=!0),this.distributeNodeInto(Ba,Da)}if(Ua){for(let Wa=0;Wa<Ua.length;Wa++)Ua[Wa].__shady._prevAssignedSlot=null;Da.__shady.assignedNodes.length<Ua.length&&(Ha=!0)}this.setDistributedNodesOnInsertionPoint(Da),Ha&&this._fireSlotChange(Da)}clearAssignedSlots(Da,La){let Ua=Da.__shady.assignedNodes;if(Ua)for(let Fa,Ha=0;Ha<Ua.length;Ha++)Fa=Ua[Ha],La&&(Fa.__shady._prevAssignedSlot=Fa.__shady.assignedSlot),Fa.__shady.assignedSlot===Da&&(Fa.__shady.assignedSlot=null)}matchesInsertionPoint(Da,La){let Ua=La.getAttribute('name');Ua=Ua?Ua.trim():'';let Ha=Da.getAttribute&&Da.getAttribute('slot');return Ha=Ha?Ha.trim():'',Ha==Ua}distributeNodeInto(Da,La){La.__shady.assignedNodes.push(Da),Da.__shady.assignedSlot=La}setDistributedNodesOnInsertionPoint(Da){let La=Da.__shady.assignedNodes;Da.__shady.distributedNodes=[];for(let Ua,Ha=0;Ha<La.length&&(Ua=La[Ha]);Ha++)if(this.isInsertionPoint(Ua)){let Fa=Ua.__shady.distributedNodes;if(Fa)for(let Wa=0;Wa<Fa.length;Wa++)Da.__shady.distributedNodes.push(Fa[Wa])}else Da.__shady.distributedNodes.push(La[Ha])}_fireSlotChange(Da){Da.dispatchEvent(new Ca('slotchange')),Da.__shady.assignedSlot&&this._fireSlotChange(Da.__shady.assignedSlot)}isFinalDestination(Da){return!Da.__shady.assignedSlot}};const Aa={};let Pa=function(Da,La){if(Da!==Aa)throw new TypeError('Illegal constructor');let Ua=document.createDocumentFragment();return Ua.__proto__=Pa.prototype,Ua._init(La),Ua};Pa.prototype=Object.create(DocumentFragment.prototype),qr(Pa.prototype,{_init(Da){this.__localName='ShadyRoot',Xs(Da),Xs(this),Da.shadowRoot=this,this.host=Da,this._renderPending=!1,this._hasRendered=!1,this._changePending=!1,this._distributor=new Ta(this),this.update()},update(){this._renderPending||(this._renderPending=!0,Wr(()=>this.render()))},_getRenderRoot(){let Da=this,La=this;for(;La;)La._renderPending&&(Da=La),La=La._rendererForHost();return Da},_rendererForHost(){let Da=this.host.getRootNode();if(Dr(Da)){let La=this.host.childNodes;for(let Ua,Ha=0;Ha<La.length;Ha++)if(Ua=La[Ha],this._distributor.isInsertionPoint(Ua))return Da}},render(){this._renderPending&&this._getRenderRoot()._render()},_render(){this._renderPending=!1,this._changePending=!1,this._skipUpdateInsertionPoints?!this._hasRendered&&(this._insertionPoints=[]):this.updateInsertionPoints(),this._skipUpdateInsertionPoints=!1,this.distribute(),this.compose(),this._hasRendered=!0},forceRender(){this._renderPending=!0,this.render()},distribute(){let Da=this._distributor.distribute();for(let La=0;La<Da.length;La++)Da[La]._render()},updateInsertionPoints(){let Da=this.__insertionPoints;if(Da)for(let La,Ua=0;Ua<Da.length;Ua++)La=Da[Ua],La.getRootNode()!==this&&this._distributor.clearAssignedSlots(La);Da=this._insertionPoints=this._distributor.getInsertionPoints();for(let La,Ua=0;Ua<Da.length;Ua++)La=Da[Ua],La.__shady=La.__shady||{},Xs(La),Xs(La.parentNode)},get _insertionPoints(){return this.__insertionPoints||this.updateInsertionPoints(),this.__insertionPoints||(this.__insertionPoints=[])},set _insertionPoints(Da){this.__insertionPoints=Da},hasInsertionPoint(){return this._distributor.hasInsertionPoint()},compose(){this._composeTree()},_composeTree(){this._updateChildNodes(this.host,this._composeNode(this.host));let Da=this._insertionPoints||[];for(let La,Ua,Ha=0,Fa=Da.length;Ha<Fa&&(La=Da[Ha]);Ha++)Ua=La.parentNode,Ua!==this.host&&Ua!==this&&this._updateChildNodes(Ua,this._composeNode(Ua))},_composeNode(Da){let La=[],Ua=(Da.shadyRoot||Da).childNodes;for(let Fa,Ha=0;Ha<Ua.length;Ha++)if(Fa=Ua[Ha],this._distributor.isInsertionPoint(Fa)){let Wa=Fa.__shady.distributedNodes||(Fa.__shady.distributedNodes=[]);for(let Ga,Ba=0;Ba<Wa.length;Ba++)Ga=Wa[Ba],this.isFinalDestination(Fa,Ga)&&La.push(Ga)}else La.push(Fa);return La},isFinalDestination(Da,La){return this._distributor.isFinalDestination(Da,La)},_updateChildNodes(Da,La){let Ua=en(Da),Ha=Sa(La,Ua);for(let Fa,Wa=0,Ba=0;Wa<Ha.length&&(Fa=Ha[Wa]);Wa++){for(let Ga,Ka=0;Ka<Fa.removed.length&&(Ga=Fa.removed[Ka]);Ka++)Qr(Ga)===Da&&Ns.call(Da,Ga),Ua.splice(Fa.index+Ba,1);Ba-=Fa.addedCount}for(let Fa,Wa,Ba=0;Ba<Ha.length&&(Fa=Ha[Ba]);Ba++){Wa=Ua[Fa.index];for(let Ga,Ka=Fa.index;Ka<Fa.index+Fa.addedCount;Ka++)Ga=La[Ka],Es.call(Da,Ga,Wa),Ua.splice(Ka,0,Ga)}},getInsertionPointTag(){return this._distributor.insertionPointTag}}),function(Da){yn(Da,Ws,!0),yn(Da,Gs,!0)}(Pa.prototype);let xa={addEventListener:function(Da,La,Ua){if(La){let Ha,Fa,Wa;if('object'==typeof Ua?(Ha=!!Ua.capture,Fa=!!Ua.once,Wa=!!Ua.passive):(Ha=!!Ua,Fa=!1,Wa=!1),La.__eventWrappers){for(let Ga=0;Ga<La.__eventWrappers.length;Ga++)if(La.__eventWrappers[Ga].node===this&&La.__eventWrappers[Ga].type===Da&&La.__eventWrappers[Ga].capture===Ha&&La.__eventWrappers[Ga].once===Fa&&La.__eventWrappers[Ga].passive===Wa)return;}else La.__eventWrappers=[];const Ba=function(Ga){if(Fa&&this.removeEventListener(Da,La,Ua),Ga.__target||(Ga.__target=Ga.target,Ga.__relatedTarget=Ga.relatedTarget,jr(Ga,Ys)),Ga.composed||-1<Ga.composedPath().indexOf(this))return Ga.eventPhase===Event.BUBBLING_PHASE&&Ga.target===Ga.relatedTarget?void Ga.stopImmediatePropagation():La(Ga)};La.__eventWrappers.push({node:this,type:Da,capture:Ha,once:Fa,passive:Wa,wrapperFn:Ba}),Js[Da]?(this.__handlers=this.__handlers||{},this.__handlers[Da]=this.__handlers[Da]||{capture:[],bubble:[]},this.__handlers[Da][Ha?'capture':'bubble'].push(Ba)):Ps.call(this,Da,Ba,Ua)}},removeEventListener:function(Da,La,Ua){if(La){let Ha,Fa,Wa;'object'==typeof Ua?(Ha=!!Ua.capture,Fa=!!Ua.once,Wa=!!Ua.passive):(Ha=!!Ua,Fa=!1,Wa=!1);let Ba;if(La.__eventWrappers)for(let Ga=0;Ga<La.__eventWrappers.length;Ga++)if(La.__eventWrappers[Ga].node===this&&La.__eventWrappers[Ga].type===Da&&La.__eventWrappers[Ga].capture===Ha&&La.__eventWrappers[Ga].once===Fa&&La.__eventWrappers[Ga].passive===Wa){Ba=La.__eventWrappers.splice(Ga,1)[0].wrapperFn,La.__eventWrappers.length||(La.__eventWrappers=void 0);break}if(xs.call(this,Da,Ba||La,Ua),Ba&&Js[Da]&&this.__handlers&&this.__handlers[Da]){const Ga=this.__handlers[Da][Ha?'capture':'bubble'],Ka=Ga.indexOf(Ba);-1<Ka&&Ga.splice(Ka,1)}}},appendChild(Da){return Gn(this,Da)},insertBefore(Da,La){return Gn(this,Da,La)},removeChild(Da){return Kn(this,Da)},replaceChild(Da,La){return this.insertBefore(Da,La),this.removeChild(La),Da},cloneNode(Da){return zn(this,Da)},getRootNode(Da){return Pn(this,Da)},get isConnected(){if(this.ownerDocument.documentElement.contains(this))return!0;let Da=this;for(;Da&&!(Da instanceof Document);)Da=Da.parentNode||(Da instanceof Pa?Da.host:void 0);return!!(Da&&Da instanceof Document)}},Ra={get assignedSlot(){return rs(this)}},Ma={querySelector(Da){let La=Hn(this,function(Ua){return kr(Ua,Da)},function(Ua){return!!Ua})[0];return La||null},querySelectorAll(Da){return Hn(this,function(La){return kr(La,Da)})}},Oa={assignedNodes(Da){if('slot'===this.localName)return jn(this),this.__shady?(Da&&Da.flatten?this.__shady.distributedNodes:this.__shady.assignedNodes)||[]:[]}},wa=qr({setAttribute(Da,La){Wn(this,Da,La)},removeAttribute(Da){Bn(this,Da)},attachShadow(Da){return os(this,Da)},get slot(){return this.getAttribute('slot')},set slot(Da){this.setAttribute('slot',Da)},get assignedSlot(){return rs(this)}},Ma,Oa);Object.defineProperties(wa,Bs);let Ia=qr({importNode(Da,La){return Xn(Da,La)}},Ma);Object.defineProperties(Ia,{_activeElement:Gs.activeElement}),ls.inUse&&(window.ShadyDOM={inUse:ls.inUse,patch:function(Da){return Da},isShadyRoot:Dr,enqueue:Wr,flush:Br,settings:ls,filterMutations:function(Da,La){const Ua=La.getRootNode();return Da.map(function(Ha){const Fa=Ua===Ha.target.getRootNode();if(Fa&&Ha.addedNodes){let Wa=Array.from(Ha.addedNodes).filter(function(Ba){return Ua===Ba.getRootNode()});if(Wa.length)return Ha=Object.create(Ha),Object.defineProperty(Ha,'addedNodes',{value:Wa,configurable:!0}),Ha}else if(Fa)return Ha}).filter(function(Ha){return Ha})},observeChildren:function(Da,La){Da.__shady=Da.__shady||{},Da.__shady.observer||(Da.__shady.observer=new fs),Da.__shady.observer.callbacks.add(La);let Ua=Da.__shady.observer;return{_callback:La,_observer:Ua,_node:Da,takeRecords(){return Ua.takeRecords()}}},unobserveChildren:function(Da){let La=Da&&Da._observer;La&&(La.callbacks.delete(Da._callback),!La.callbacks.size&&(Da._node.__shady.observer=null))},nativeMethods:Rs,nativeTree:ks},function(){window.Event=Qs,window.CustomEvent=$s,window.MouseEvent=Zs,Zn()}(),function(){if(ns(window.Node.prototype,xa),ns(window.Text.prototype,Ra),ns(window.DocumentFragment.prototype,Ma),ns(window.Element.prototype,wa),ns(window.Document.prototype,Ia),window.HTMLSlotElement&&ns(window.HTMLSlotElement.prototype,Oa),ls.hasDescriptors){gn(window.Node.prototype),gn(window.Text.prototype),gn(window.DocumentFragment.prototype),gn(window.Element.prototype);let Da=window.customElements&&customElements.nativeHTMLElement||HTMLElement;gn(Da.prototype),gn(window.Document.prototype),window.HTMLSlotElement&&gn(window.HTMLSlotElement.prototype)}}(),window.ShadowRoot=Pa)}(),function(){'use strict';function Dr(Wn){var Bn=sn.has(Wn);return Wn=/^[a-z][.0-9_a-z]*-[\-.0-9_a-z]*$/.test(Wn),!Bn&&Wn}function Lr(Wn){for(;Wn&&!(Wn.__CE_isImportDocument||Wn instanceof Document);)Wn=Wn.parentNode||(Wn.nodeType===Node.DOCUMENT_FRAGMENT_NODE?Wn.host:void 0);return Wn&&(Wn.__CE_isImportDocument||Wn instanceof Document)}function kr(Wn,Bn){for(;Bn&&Bn!==Wn&&!Bn.nextSibling;)Bn=Bn.parentNode;return Bn&&Bn!==Wn?Bn.nextSibling:null}function Ur(Wn,Bn){for(var Gn=Wn;Gn;){if(Gn.nodeType===Node.ELEMENT_NODE){if(Bn(Gn),'link'===Gn.localName){Gn=kr(Wn,Gn);continue}var Kn=Gn.__CE_shadowRoot;if(Kn)for(Kn=Kn.firstChild;Kn;Kn=Kn.nextSibling)Ur(Kn,Bn)}Gn=Gn.firstChild?Gn.firstChild:kr(Wn,Gn)}}function Hr(Wn,Bn,Gn){Wn[Bn]=Gn}function qr(){this.a=new Map,this.f=new Map,this.c=[],this.b=!1}function Fr(Wn,Bn,Gn){Wn.a.set(Bn,Gn),Wn.f.set(Gn.constructor,Gn)}function jr(Wn,Bn){Wn.b=!0,Wn.c.push(Bn)}function Wr(Wn,Bn){Wn.b&&Ur(Bn,function(Gn){return Br(Wn,Gn)})}function Br(Wn,Bn){if(Wn.b&&!Bn.__CE_patched){Bn.__CE_patched=!0;for(var Gn=0;Gn<Wn.c.length;Gn++)Wn.c[Gn](Bn)}}function Gr(Wn,Bn){var Gn=[];for(Ur(Bn,function(zn){return Gn.push(zn)}),Bn=0;Bn<Gn.length;Bn++){var Kn=Gn[Bn];Kn.__CE_state===an.custom?Wn.connectedCallback(Kn):Xr(Wn,Kn)}}function Kr(Wn,Bn){var Gn=[];for(Ur(Bn,function(zn){return Gn.push(zn)}),Bn=0;Bn<Gn.length;Bn++){var Kn=Gn[Bn];Kn.__CE_state===an.custom&&Wn.disconnectedCallback(Kn)}}function zr(Wn,Bn,Gn){function Kn(Xn){if('link'===Xn.localName&&'import'===Xn.getAttribute('rel')){var Vn=Xn.import;Vn instanceof Node?Gn.has(Vn)||(Gn.add(Vn),Vn.__CE_isImportDocument=!0,Vn.__CE_hasRegistry=!0,Ur(Vn,Kn)):Xn.addEventListener('load',function(){var Yn=Xn.import;Yn.__CE_documentLoadHandled||(Yn.__CE_documentLoadHandled=!0,Gn.has(Yn)||(Gn.add(Yn),Yn.__CE_isImportDocument=!0,Yn.__CE_hasRegistry=!0,zr(Wn,Yn,Gn)))})}else zn.push(Xn)}Gn||(Gn=new Set);var zn=[];if(Ur(Bn,Kn),Wn.b)for(Bn=0;Bn<zn.length;Bn++)Br(Wn,zn[Bn]);for(Bn=0;Bn<zn.length;Bn++)Xr(Wn,zn[Bn])}function Xr(Wn,Bn){if(void 0===Bn.__CE_state){var Gn=Wn.a.get(Bn.localName);if(Gn){Gn.constructionStack.push(Bn);var Kn=Gn.constructor;try{try{if(new Kn!==Bn)throw Error('The custom element constructor did not produce the element being upgraded.')}finally{Gn.constructionStack.pop()}}catch(Vn){throw Bn.__CE_state=an.failed,Vn}if(Bn.__CE_state=an.custom,Bn.__CE_definition=Gn,Gn.attributeChangedCallback)for(Gn=Gn.observedAttributes,Kn=0;Kn<Gn.length;Kn++){var zn=Gn[Kn],Xn=Bn.getAttribute(zn);null!==Xn&&Wn.attributeChangedCallback(Bn,zn,null,Xn,null)}Lr(Bn)&&Wn.connectedCallback(Bn)}}}function Vr(){var Wn=this;this.b=this.a=void 0,this.c=new Promise(function(Bn){Wn.b=Bn,Wn.a&&Bn(Wn.a)})}function Yr(Wn){if(Wn.a)throw Error('Already resolved.');Wn.a=void 0,Wn.b&&Wn.b(void 0)}function Jr(Wn){this.b=!1,this.a=Wn,this.f=new Map,this.c=!0}function Qr(Wn,Bn){this.c=Wn,this.a=Bn,this.b=void 0,zr(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 $r(){var Wn=qn;window.HTMLElement=function(){function Bn(){var Gn=this.constructor,Kn=Wn.f.get(Gn);if(!Kn)throw Error('The custom element being constructed was not registered with `customElements`.');var zn=Kn.constructionStack;if(!zn.length)return zn=ln.call(document,Kn.localName),Object.setPrototypeOf(zn,Gn.prototype),zn.__CE_state=an.custom,zn.__CE_definition=Kn,Br(Wn,zn),zn;var Kn=zn.length-1,Xn=zn[Kn];if(Xn===nn)throw Error('The HTMLElement constructor was either called reentrantly for this constructor or called multiple times.');return zn[Kn]=nn,Object.setPrototypeOf(Xn,Gn.prototype),Br(Wn,Xn),Xn}return Bn.prototype=kn.prototype,Bn}()}function Zr(Wn,Bn,Gn){Bn.prepend=function(){for(var zn=[],Xn=0;Xn<arguments.length;++Xn)zn[Xn-0]=arguments[Xn];Xn=zn.filter(function(Yn){return Yn instanceof Node&&Lr(Yn)}),Gn.g.apply(this,zn);for(var Vn=0;Vn<Xn.length;Vn++)Kr(Wn,Xn[Vn]);if(Lr(this))for(Xn=0;Xn<zn.length;Xn++)Vn=zn[Xn],Vn instanceof Element&&Gr(Wn,Vn)},Bn.append=function(){for(var zn=[],Xn=0;Xn<arguments.length;++Xn)zn[Xn-0]=arguments[Xn];Xn=zn.filter(function(Yn){return Yn instanceof Node&&Lr(Yn)}),Gn.append.apply(this,zn);for(var Vn=0;Vn<Xn.length;Vn++)Kr(Wn,Xn[Vn]);if(Lr(this))for(Xn=0;Xn<zn.length;Xn++)Vn=zn[Xn],Vn instanceof Element&&Gr(Wn,Vn)}}function en(){var Wn=qn;Hr(Document.prototype,'createElement',function(Bn){if(this.__CE_hasRegistry){var Gn=Wn.a.get(Bn);if(Gn)return new Gn.constructor}return Bn=ln.call(this,Bn),Br(Wn,Bn),Bn}),Hr(Document.prototype,'importNode',function(Bn,Gn){return Bn=cn.call(this,Bn,Gn),this.__CE_hasRegistry?zr(Wn,Bn):Wr(Wn,Bn),Bn}),Hr(Document.prototype,'createElementNS',function(Bn,Gn){if(this.__CE_hasRegistry&&(null===Bn||'http://www.w3.org/1999/xhtml'===Bn)){var Kn=Wn.a.get(Gn);if(Kn)return new Kn.constructor}return Bn=dn.call(this,Bn,Gn),Br(Wn,Bn),Bn}),Zr(Wn,Document.prototype,{g:_n,append:hn})}function tn(){function Wn(Gn,Kn){Object.defineProperty(Gn,'textContent',{enumerable:Kn.enumerable,configurable:!0,get:Kn.get,set:function(zn){if(this.nodeType===Node.TEXT_NODE)Kn.set.call(this,zn);else{var Xn;if(this.firstChild){var Vn=this.childNodes,Yn=Vn.length;if(0<Yn&&Lr(this))for(var Xn=Array(Yn),Jn=0;Jn<Yn;Jn++)Xn[Jn]=Vn[Jn]}if(Kn.set.call(this,zn),Xn)for(zn=0;zn<Xn.length;zn++)Kr(Bn,Xn[zn])}}})}var Bn=qn;Hr(Node.prototype,'insertBefore',function(Gn,Kn){if(Gn instanceof DocumentFragment){var zn=Array.prototype.slice.apply(Gn.childNodes);if(Gn=yn.call(this,Gn,Kn),Lr(this))for(Kn=0;Kn<zn.length;Kn++)Gr(Bn,zn[Kn]);return Gn}return zn=Lr(Gn),Kn=yn.call(this,Gn,Kn),zn&&Kr(Bn,Gn),Lr(this)&&Gr(Bn,Gn),Kn}),Hr(Node.prototype,'appendChild',function(Gn){if(Gn instanceof DocumentFragment){var Kn=Array.prototype.slice.apply(Gn.childNodes);if(Gn=mn.call(this,Gn),Lr(this))for(var zn=0;zn<Kn.length;zn++)Gr(Bn,Kn[zn]);return Gn}return Kn=Lr(Gn),zn=mn.call(this,Gn),Kn&&Kr(Bn,Gn),Lr(this)&&Gr(Bn,Gn),zn}),Hr(Node.prototype,'cloneNode',function(Gn){return Gn=un.call(this,Gn),this.ownerDocument.__CE_hasRegistry?zr(Bn,Gn):Wr(Bn,Gn),Gn}),Hr(Node.prototype,'removeChild',function(Gn){var Kn=Lr(Gn),zn=gn.call(this,Gn);return Kn&&Kr(Bn,Gn),zn}),Hr(Node.prototype,'replaceChild',function(Gn,Kn){if(Gn instanceof DocumentFragment){var zn=Array.prototype.slice.apply(Gn.childNodes);if(Gn=bn.call(this,Gn,Kn),Lr(this))for(Kr(Bn,Kn),Kn=0;Kn<zn.length;Kn++)Gr(Bn,zn[Kn]);return Gn}var zn=Lr(Gn),Xn=bn.call(this,Gn,Kn),Vn=Lr(this);return Vn&&Kr(Bn,Kn),zn&&Kr(Bn,Gn),Vn&&Gr(Bn,Gn),Xn}),vn&&vn.get?Wn(Node.prototype,vn):jr(Bn,function(Gn){Wn(Gn,{enumerable:!0,configurable:!0,get:function(){for(var Kn=[],zn=0;zn<this.childNodes.length;zn++)Kn.push(this.childNodes[zn].textContent);return Kn.join('')},set:function(Kn){for(;this.firstChild;)gn.call(this,this.firstChild);mn.call(this,document.createTextNode(Kn))}})})}function on(Wn){var Bn=Element.prototype;Bn.before=function(){for(var Kn=[],zn=0;zn<arguments.length;++zn)Kn[zn-0]=arguments[zn];zn=Kn.filter(function(Vn){return Vn instanceof Node&&Lr(Vn)}),wn.apply(this,Kn);for(var Xn=0;Xn<zn.length;Xn++)Kr(Wn,zn[Xn]);if(Lr(this))for(zn=0;zn<Kn.length;zn++)Xn=Kn[zn],Xn instanceof Element&&Gr(Wn,Xn)},Bn.after=function(){for(var Kn=[],zn=0;zn<arguments.length;++zn)Kn[zn-0]=arguments[zn];zn=Kn.filter(function(Vn){return Vn instanceof Node&&Lr(Vn)}),In.apply(this,Kn);for(var Xn=0;Xn<zn.length;Xn++)Kr(Wn,zn[Xn]);if(Lr(this))for(zn=0;zn<Kn.length;zn++)Xn=Kn[zn],Xn instanceof Element&&Gr(Wn,Xn)},Bn.replaceWith=function(){for(var Kn=[],zn=0;zn<arguments.length;++zn)Kn[zn-0]=arguments[zn];var zn=Kn.filter(function(Yn){return Yn instanceof Node&&Lr(Yn)}),Xn=Lr(this);Dn.apply(this,Kn);for(var Vn=0;Vn<zn.length;Vn++)Kr(Wn,zn[Vn]);if(Xn)for(Kr(Wn,this),zn=0;zn<Kn.length;zn++)Xn=Kn[zn],Xn instanceof Element&&Gr(Wn,Xn)},Bn.remove=function(){var Gn=Lr(this);Ln.call(this),Gn&&Kr(Wn,this)}}function rn(){function Wn(Kn,zn){Object.defineProperty(Kn,'innerHTML',{enumerable:zn.enumerable,configurable:!0,get:zn.get,set:function(Xn){var Vn=Array.prototype.slice.apply(this.childNodes);if(zn.set.call(this,Xn),Lr(this))for(var Yn=0;Yn<Vn.length;Yn++)Kr(Bn,Vn[Yn]);return this.ownerDocument.__CE_hasRegistry?zr(Bn,this):Wr(Bn,this),Xn}})}var Bn=qn;if(En?Hr(Element.prototype,'attachShadow',function(Kn){return this.__CE_shadowRoot=Kn=En.call(this,Kn)}):console.warn('Custom Elements: `Element#attachShadow` was not patched.'),Nn&&Nn.get)Wn(Element.prototype,Nn);else if(Un&&Un.get)Wn(HTMLElement.prototype,Un);else{var Gn=ln.call(document,'div');jr(Bn,function(Kn){Wn(Kn,{enumerable:!0,configurable:!0,get:function(){return un.call(this,!0).innerHTML},set:function(zn){for(Gn.innerHTML=zn;0<this.childNodes.length;)gn.call(this,this.childNodes[0]);for(;0<Gn.childNodes.length;)mn.call(this,Gn.childNodes[0])}})})}Hr(Element.prototype,'setAttribute',function(Kn,zn){if(this.__CE_state!==an.custom)return Cn.call(this,Kn,zn);var Xn=Sn.call(this,Kn);Cn.call(this,Kn,zn),zn=Sn.call(this,Kn),Xn!==zn&&Bn.attributeChangedCallback(this,Kn,Xn,zn,null)}),Hr(Element.prototype,'setAttributeNS',function(Kn,zn,Xn){if(this.__CE_state!==an.custom)return Pn.call(this,Kn,zn,Xn);var Vn=An.call(this,Kn,zn);Pn.call(this,Kn,zn,Xn),Xn=An.call(this,Kn,zn),Vn!==Xn&&Bn.attributeChangedCallback(this,zn,Vn,Xn,Kn)}),Hr(Element.prototype,'removeAttribute',function(Kn){if(this.__CE_state!==an.custom)return Tn.call(this,Kn);var zn=Sn.call(this,Kn);Tn.call(this,Kn),null!==zn&&Bn.attributeChangedCallback(this,Kn,zn,null,null)}),Hr(Element.prototype,'remoteAttributeNS',function(Kn,zn){if(this.__CE_state!==an.custom)return xn.call(this,Kn,zn);var Xn=An.call(this,Kn,zn);xn.call(this,Kn,zn),null!==Xn&&Bn.attributeChangedCallback(this,zn,Xn,null,Kn)}),Hr(Element.prototype,'insertAdjacentElement',function(Kn,zn){var Xn=Lr(zn);return Kn=Rn.call(this,Kn,zn),Xn&&Kr(Bn,zn),Lr(Kn)&&Gr(Bn,zn),Kn}),Zr(Bn,Element.prototype,{g:Mn,append:On}),on(Bn)}var nn=new function(){},sn=new Set('annotation-xml color-profile font-face font-face-src font-face-uri font-face-format font-face-name missing-glyph'.split(' ')),an={custom:1,failed:2};qr.prototype.connectedCallback=function(Wn){var Bn=Wn.__CE_definition;Bn.connectedCallback&&Bn.connectedCallback.call(Wn)},qr.prototype.disconnectedCallback=function(Wn){var Bn=Wn.__CE_definition;Bn.disconnectedCallback&&Bn.disconnectedCallback.call(Wn)},qr.prototype.attributeChangedCallback=function(Wn,Bn,Gn,Kn,zn){var Xn=Wn.__CE_definition;Xn.attributeChangedCallback&&-1<Xn.observedAttributes.indexOf(Bn)&&Xn.attributeChangedCallback.call(Wn,Bn,Gn,Kn,zn)},Jr.prototype.h=function(Wn,Bn){if(!(Bn instanceof Function))throw new TypeError('Custom element constructors must be functions.');if(!Dr(Wn))throw new SyntaxError('The element name \''+Wn+'\' is not valid.');if(this.a.a.get(Wn))throw Error('A custom element with name \''+Wn+'\' has already been defined.');if(this.b)throw Error('A custom element is already being defined.');this.b=!0;var Gn,Kn,zn,Xn,Vn;try{var Yn=function(Qn){var $n=Jn[Qn];if(void 0!==$n&&!($n instanceof Function))throw Error('The \''+Qn+'\' callback must be a function.');return $n},Jn=Bn.prototype;if(!(Jn instanceof Object))throw new TypeError('The custom element constructor\'s prototype is not an object.');Gn=Yn('connectedCallback'),Kn=Yn('disconnectedCallback'),zn=Yn('adoptedCallback'),Xn=Yn('attributeChangedCallback'),Vn=Bn.observedAttributes||[]}catch(Qn){return}finally{this.b=!1}Fr(this.a,Wn,{localName:Wn,constructor:Bn,connectedCallback:Gn,disconnectedCallback:Kn,adoptedCallback:zn,attributeChangedCallback:Xn,observedAttributes:Vn,constructionStack:[]}),this.c&&zr(this.a,document),(Wn=this.f.get(Wn))&&Yr(Wn)},Jr.prototype.get=function(Wn){if(Wn=this.a.a.get(Wn))return Wn.constructor},Jr.prototype.i=function(Wn){if(!Dr(Wn))return Promise.reject(new SyntaxError('\''+Wn+'\' is not a valid custom element name.'));var Bn=this.f.get(Wn);return Bn?Bn.c:(Bn=new Vr,this.f.set(Wn,Bn),this.a.a.get(Wn)&&Yr(Bn),Bn.c)},window.CustomElementRegistry=Jr,Jr.prototype.define=Jr.prototype.h,Jr.prototype.get=Jr.prototype.get,Jr.prototype.whenDefined=Jr.prototype.i,Qr.prototype.f=function(Wn){var Bn=this.a.readyState;for('interactive'!==Bn&&'complete'!==Bn||this.b.disconnect(),Bn=0;Bn<Wn.length;Bn++)for(var Gn=Wn[Bn].addedNodes,Kn=0;Kn<Gn.length;Kn++)zr(this.c,Gn[Kn])};var ln=window.Document.prototype.createElement,dn=window.Document.prototype.createElementNS,cn=window.Document.prototype.importNode,_n=window.Document.prototype.prepend,hn=window.Document.prototype.append,un=window.Node.prototype.cloneNode,mn=window.Node.prototype.appendChild,yn=window.Node.prototype.insertBefore,gn=window.Node.prototype.removeChild,bn=window.Node.prototype.replaceChild,vn=Object.getOwnPropertyDescriptor(window.Node.prototype,'textContent'),En=window.Element.prototype.attachShadow,Nn=Object.getOwnPropertyDescriptor(window.Element.prototype,'innerHTML'),Sn=window.Element.prototype.getAttribute,Cn=window.Element.prototype.setAttribute,Tn=window.Element.prototype.removeAttribute,An=window.Element.prototype.getAttributeNS,Pn=window.Element.prototype.setAttributeNS,xn=window.Element.prototype.removeAttributeNS,Rn=window.Element.prototype.insertAdjacentElement,Mn=window.Element.prototype.prepend,On=window.Element.prototype.append,wn=window.Element.prototype.before,In=window.Element.prototype.after,Dn=window.Element.prototype.replaceWith,Ln=window.Element.prototype.remove,kn=window.HTMLElement,Un=Object.getOwnPropertyDescriptor(window.HTMLElement.prototype,'innerHTML'),Hn=window.customElements;if(!Hn||Hn.forcePolyfill){var qn=new qr;$r(),en(),tn(),rn(),document.__CE_hasRegistry=!0;var Fn=new Jr(qn);if(Hn&&Hn.documentReady){var jn=Hn.documentReady;jn.then instanceof Function&&(Fn.c=!1,jn.then(function(){Fn.c=!0,zr(qn,document)}))}else new Qr(qn,document);Object.defineProperty(window,'customElements',{configurable:!0,enumerable:!0,value:Fn})}}.call(window);let Ro={STYLE_RULE:1,KEYFRAMES_RULE:7,MEDIA_RULE:4,MIXIN_RULE:1e3},Mo='{',Oo='}',wo={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},Io='--',ko=!(window.ShadyDOM&&window.ShadyDOM.inUse),Uo=!navigator.userAgent.match('AppleWebKit/601')&&window.CSS&&CSS.supports&&CSS.supports('box-shadow','0 0 0 var(--foo)');window.ShadyCSS?uo(window.ShadyCSS):window.WebComponents&&uo(window.WebComponents.flags);let qo=null,Fo={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 jo='style-scope';class Wo{get SCOPE_NAME(){return jo}dom(Dr,Lr,kr){Dr.__styleScoped?Dr.__styleScoped=null:this._transformDom(Dr,Lr||'',kr)}_transformDom(Dr,Lr,kr){Dr.nodeType===Node.ELEMENT_NODE&&this.element(Dr,Lr,kr);let Ur='template'===Dr.localName?(Dr.content||Dr._content).childNodes:Dr.children||Dr.childNodes;if(Ur)for(let Hr=0;Hr<Ur.length;Hr++)this._transformDom(Ur[Hr],Lr,kr)}element(Dr,Lr,kr){if(Lr)if(Dr.classList)kr?(Dr.classList.remove(jo),Dr.classList.remove(Lr)):(Dr.classList.add(jo),Dr.classList.add(Lr));else if(Dr.getAttribute){let Ur=Dr.getAttribute('class');if(!kr){let Hr=(Ur?Ur+' ':'')+jo+' '+Lr;To(Dr,Hr)}else if(Ur){let Hr=Ur.replace(jo,'').replace(Lr,'');To(Dr,Hr)}}}elementStyles(Dr,Lr,kr){let Ur=Dr.__cssBuild,Hr=ko||'shady'===Ur?mo(Lr,kr):this.css(Lr,Dr.is,Dr.extends,kr)+'\n\n';return Hr.trim()}css(Dr,Lr,kr,Ur){let Hr=this._calcHostScope(Lr,kr);Lr=this._calcElementScope(Lr);let qr=this;return mo(Dr,function(Fr){Fr.isScoped||(qr.rule(Fr,Lr,Hr),Fr.isScoped=!0),Ur&&Ur(Fr,Lr,Hr)})}_calcElementScope(Dr){return Dr?'.'+Dr:''}_calcHostScope(Dr,Lr){return Lr?'[is='+Dr+']':Dr}rule(Dr,Lr,kr){this._transformRule(Dr,this._transformComplexSelector,Lr,kr)}_transformRule(Dr,Lr,kr,Ur){Dr.selector=Dr.transformedSelector=this._transformRuleCss(Dr,Lr,kr,Ur)}_transformRuleCss(Dr,Lr,kr,Ur){let Hr=Dr.selector.split(Ko);if(!fo(Dr))for(let jr,qr=0,Fr=Hr.length;qr<Fr&&(jr=Hr[qr]);qr++)Hr[qr]=Lr.call(this,jr,kr,Ur);return Hr.join(Ko)}_transformComplexSelector(Dr,Lr,kr){let Ur=!1;return Dr=Dr.trim(),Dr=Dr.replace(Bo,(Hr,qr,Fr)=>`:${qr}(${Fr.replace(/\s/g,'')})`),Dr=Dr.replace(Qo,`${Vo} $1`),Dr=Dr.replace(zo,(Hr,qr,Fr)=>{if(!Ur){let jr=this._transformCompoundSelector(Fr,qr,Lr,kr);Ur=Ur||jr.stop,qr=jr.combinator,Fr=jr.value}return qr+Fr}),Dr}_transformCompoundSelector(Dr,Lr,kr,Ur){let Hr=Dr.indexOf(Jo);0<=Dr.indexOf(Vo)?Dr=this._transformHostSelector(Dr,Ur):0!==Hr&&(Dr=kr?this._transformSimpleSelector(Dr,kr):Dr);let qr=!1;0<=Hr&&(Lr='',qr=!0);let Fr;return qr&&(Fr=!0,qr&&(Dr=Dr.replace(Zo,(jr,Wr)=>` > ${Wr}`))),Dr=Dr.replace(er,(jr,Wr,Br)=>`[dir="${Br}"] ${Wr}, ${Wr}[dir="${Br}"]`),{value:Dr,combinator:Lr,stop:Fr}}_transformSimpleSelector(Dr,Lr){let kr=Dr.split(or);return kr[0]+=Lr,kr.join(or)}_transformHostSelector(Dr,Lr){let kr=Dr.match($o),Ur=kr&&kr[2].trim()||'';if(Ur){if(!Ur[0].match(Xo)){let Hr=Ur.split(Xo)[0];return Hr===Lr?Ur:'should_not_match'}return Dr.replace($o,function(Hr,qr,Fr){return Lr+Fr})}return Dr.replace(Vo,Lr)}documentRule(Dr){Dr.selector=Dr.parsedSelector,this.normalizeRootSelector(Dr),this._transformRule(Dr,this._transformDocumentSelector)}normalizeRootSelector(Dr){Dr.selector===':root'&&(Dr.selector='html')}_transformDocumentSelector(Dr){return Dr.match(Jo)?this._transformComplexSelector(Dr,Go):this._transformSimpleSelector(Dr.trim(),Go)}}let Bo=/:(nth[-\w]+)\(([^)]+)\)/,Go=`:not(.${jo})`,Ko=',',zo=/(^|[\s>+~]+)((?:\[.+?\]|[^\s>+~=\[])+)/g,Xo=/[[.:#*]/,Vo=':host',Jo='::slotted',Qo=/^(::slotted)/,$o=/(:host)(?:\(((?:\([^)(]*\)|[^)(]*)+?)\))/,Zo=/(?:::slotted)(?:\(((?:\([^)(]*\)|[^)(]*)+?)\))/,er=/(.*):dir\((?:(ltr|rtl))\)/,or=':';var sr=new Wo,ar={};const lr=Promise.resolve();class ir{static get(Dr){return Dr.__styleInfo}static set(Dr,Lr){return Dr.__styleInfo=Lr,Lr}static invalidate(Dr){ar[Dr]&&(ar[Dr]._applyShimInvalid=!0)}static startValidating(Dr){const Lr=ar[Dr];Lr._validating||(Lr._validating=!0,lr.then(()=>{Lr._applyShimInvalid=!1,Lr._validating=!1}))}constructor(Dr,Lr,kr,Ur,Hr,qr){this.styleRules=Dr||null,this.placeholder=Lr||null,this.ownStylePropertyNames=kr||[],this.overrideStyleProperties=null,this.elementName=Ur||'',this.cssBuild=qr||'',this.typeExtension=Hr||'',this.styleProperties=null,this.scopeSelector=null,this.customStyle=null}}const dr=window.Element.prototype,pr=dr.matches||dr.matchesSelector||dr.mozMatchesSelector||dr.msMatchesSelector||dr.oMatchesSelector||dr.webkitMatchesSelector,cr=navigator.userAgent.match('Trident'),_r='x-scope';class hr{get XSCOPE_NAME(){return _r}decorateStyles(Dr){let Lr=this,kr={},Ur=[],Hr=0;go(Dr,function(Fr){Lr.decorateRule(Fr),Fr.index=Hr++,Lr.collectPropertiesInCssText(Fr.propertyInfo.cssText,kr)},function(jr){Ur.push(jr)}),Dr._keyframes=Ur;let qr=[];for(let Fr in kr)qr.push(Fr);return qr}decorateRule(Dr){if(Dr.propertyInfo)return Dr.propertyInfo;let Lr={},kr={},Ur=this.collectProperties(Dr,kr);return Ur&&(Lr.properties=kr,Dr.rules=null),Lr.cssText=this.collectCssText(Dr),Dr.propertyInfo=Lr,Lr}collectProperties(Dr,Lr){let kr=Dr.propertyInfo;if(!kr){let Ur,Hr=Fo.VAR_ASSIGN,qr=Dr.parsedCssText,Fr,jr;for(;Ur=Hr.exec(qr);)Fr=(Ur[2]||Ur[3]).trim(),('inherit'!==Fr||'unset'!==Fr)&&(Lr[Ur[1].trim()]=Fr),jr=!0;return jr}else if(kr.properties)return Object.assign(Lr,kr.properties),!0}collectCssText(Dr){return this.collectConsumingCssText(Dr.parsedCssText)}collectConsumingCssText(Dr){return Dr.replace(Fo.BRACKETED,'').replace(Fo.VAR_ASSIGN,'')}collectPropertiesInCssText(Dr,Lr){for(let kr,Ur;kr=Fo.VAR_CONSUMED.exec(Dr);)Ur=kr[1],':'!==kr[2]&&(Lr[Ur]=!0)}reify(Dr){let Lr=Object.getOwnPropertyNames(Dr);for(let Ur,kr=0;kr<Lr.length;kr++)Ur=Lr[kr],Dr[Ur]=this.valueForProperty(Dr[Ur],Dr)}valueForProperty(Dr,Lr){if(Dr)if(0<=Dr.indexOf(';'))Dr=this.valueForProperties(Dr,Lr);else{let kr=this;Dr=Co(Dr,function(Hr,qr,Fr,jr){if(!qr)return Hr+jr;let Wr=kr.valueForProperty(Lr[qr],Lr);return Wr&&'initial'!==Wr?'apply-shim-inherit'===Wr&&(Wr='inherit'):Wr=kr.valueForProperty(Lr[Fr]||Fr,Lr)||Fr,Hr+(Wr||'')+jr})}return Dr&&Dr.trim()||''}valueForProperties(Dr,Lr){let kr=Dr.split(';');for(let Hr,qr,Ur=0;Ur<kr.length;Ur++)if(Hr=kr[Ur]){if(Fo.MIXIN_MATCH.lastIndex=0,qr=Fo.MIXIN_MATCH.exec(Hr),qr)Hr=this.valueForProperty(Lr[qr[1]],Lr);else{let Fr=Hr.indexOf(':');if(-1!==Fr){let jr=Hr.substring(Fr);jr=jr.trim(),jr=this.valueForProperty(jr,Lr)||jr,Hr=Hr.substring(0,Fr)+jr}}kr[Ur]=Hr&&Hr.lastIndexOf(';')===Hr.length-1?Hr.slice(0,-1):Hr||''}return kr.join(';')}applyProperties(Dr,Lr){let kr='';Dr.propertyInfo||this.decorateRule(Dr),Dr.propertyInfo.cssText&&(kr=this.valueForProperties(Dr.propertyInfo.cssText,Lr)),Dr.cssText=kr}applyKeyframeTransforms(Dr,Lr){let kr=Dr.cssText,Ur=Dr.cssText;if(null==Dr.hasAnimations&&(Dr.hasAnimations=Fo.ANIMATION_MATCH.test(kr)),Dr.hasAnimations){let Hr;if(null==Dr.keyframeNamesToTransform)for(let qr in Dr.keyframeNamesToTransform=[],Lr)Hr=Lr[qr],Ur=Hr(kr),kr!==Ur&&(kr=Ur,Dr.keyframeNamesToTransform.push(qr));else{for(let qr=0;qr<Dr.keyframeNamesToTransform.length;++qr)Hr=Lr[Dr.keyframeNamesToTransform[qr]],kr=Hr(kr);Ur=kr}}Dr.cssText=Ur}propertyDataFromStyles(Dr,Lr){let kr={},Ur=this,Hr=[];return go(Dr,function(qr){qr.propertyInfo||Ur.decorateRule(qr);let Fr=qr.transformedSelector||qr.parsedSelector;Lr&&qr.propertyInfo.properties&&Fr&&pr.call(Lr,Fr)&&(Ur.collectProperties(qr,kr),Ao(qr.index,Hr))},null,!0),{properties:kr,key:Hr}}whenHostOrRootRule(Dr,Lr,kr,Ur){if(Lr.propertyInfo||this.decorateRule(Lr),!!Lr.propertyInfo.properties){let Hr=Dr.is?sr._calcHostScope(Dr.is,Dr.extends):'html',qr=Lr.parsedSelector,Fr=':host > *'===qr||'html'===qr,jr=0===qr.indexOf(':host')&&!Fr;if('shady'===kr&&(Fr=qr===Hr+' > *.'+Hr||-1!==qr.indexOf('html'),jr=!Fr&&0===qr.indexOf(Hr)),'shadow'===kr&&(Fr=':host > *'===qr||'html'===qr,jr=jr&&!Fr),Fr||jr){let Wr=Hr;jr&&(ko&&!Lr.transformedSelector&&(Lr.transformedSelector=sr._transformRuleCss(Lr,sr._transformComplexSelector,sr._calcElementScope(Dr.is),Hr)),Wr=Lr.transformedSelector||Hr),Ur({selector:Wr,isHost:jr,isRoot:Fr})}}}hostAndRootPropertiesForScope(Dr,Lr){let kr={},Ur={},Hr=this,qr=Lr&&Lr.__cssBuild;return go(Lr,function(Fr){Hr.whenHostOrRootRule(Dr,Fr,qr,function(jr){let Wr=Dr._element||Dr;pr.call(Wr,jr.selector)&&(jr.isHost?Hr.collectProperties(Fr,kr):Hr.collectProperties(Fr,Ur))})},null,!0),{rootProps:Ur,hostProps:kr}}transformStyles(Dr,Lr,kr){let Ur=this,Hr=sr._calcHostScope(Dr.is,Dr.extends),qr=Dr.extends?'\\'+Hr.slice(0,-1)+'\\]':Hr,Fr=new RegExp(Fo.HOST_PREFIX+qr+Fo.HOST_SUFFIX),jr=ir.get(Dr).styleRules,Wr=this._elementKeyframeTransforms(Dr,jr,kr);return sr.elementStyles(Dr,jr,function(Br){Ur.applyProperties(Br,Lr),ko||fo(Br)||!Br.cssText||(Ur.applyKeyframeTransforms(Br,Wr),Ur._scopeSelector(Br,Fr,Hr,kr))})}_elementKeyframeTransforms(Dr,Lr,kr){let Ur=Lr._keyframes,Hr={};if(!ko&&Ur)for(let qr=0,Fr=Ur[qr];qr<Ur.length;Fr=Ur[++qr])this._scopeKeyframes(Fr,kr),Hr[Fr.keyframesName]=this._keyframesRuleTransformer(Fr);return Hr}_keyframesRuleTransformer(Dr){return function(Lr){return Lr.replace(Dr.keyframesNameRx,Dr.transformedKeyframesName)}}_scopeKeyframes(Dr,Lr){Dr.keyframesNameRx=new RegExp(Dr.keyframesName,'g'),Dr.transformedKeyframesName=Dr.keyframesName+'-'+Lr,Dr.transformedSelector=Dr.transformedSelector||Dr.selector,Dr.selector=Dr.transformedSelector.replace(Dr.keyframesName,Dr.transformedKeyframesName)}_scopeSelector(Dr,Lr,kr,Ur){Dr.transformedSelector=Dr.transformedSelector||Dr.selector;let Hr=Dr.transformedSelector,qr='.'+Ur,Fr=Hr.split(',');for(let Br,jr=0,Wr=Fr.length;jr<Wr&&(Br=Fr[jr]);jr++)Fr[jr]=Br.match(Lr)?Br.replace(kr,qr):qr+' '+Br;Dr.selector=Fr.join(',')}applyElementScopeSelector(Dr,Lr,kr){let Ur=Dr.getAttribute('class')||'',Hr=Ur;kr&&(Hr=Ur.replace(new RegExp('\\s*'+_r+'\\s*'+kr+'\\s*','g'),' ')),Hr+=(Hr?' ':'')+_r+' '+Lr,Ur!==Hr&&To(Dr,Hr)}applyElementStyle(Dr,Lr,kr,Ur){let Hr=Ur?Ur.textContent||'':this.transformStyles(Dr,Lr,kr),qr=ir.get(Dr),Fr=qr.customStyle;return Fr&&!ko&&Fr!==Ur&&(Fr._useCount--,0>=Fr._useCount&&Fr.parentNode&&Fr.parentNode.removeChild(Fr)),ko?qr.customStyle?(qr.customStyle.textContent=Hr,Ur=qr.customStyle):Hr&&(Ur=bo(Hr,kr,Dr.shadowRoot,qr.placeholder)):Ur?!Ur.parentNode&&vo(Ur,null,qr.placeholder):Hr&&(Ur=bo(Hr,kr,null,qr.placeholder)),Ur&&(Ur._useCount=Ur._useCount||0,qr.customStyle!=Ur&&Ur._useCount++,qr.customStyle=Ur),cr&&(Ur.textContent=Ur.textContent),Ur}applyCustomStyle(Dr,Lr){let kr=yo(Dr),Ur=this;Dr.textContent=mo(kr,function(Hr){let qr=Hr.cssText=Hr.parsedCssText;Hr.propertyInfo&&Hr.propertyInfo.cssText&&(qr=co(qr),Hr.cssText=Ur.valueForProperties(qr,Lr))})}}var ur=new hr;let mr={};const yr=window.customElements;if(yr&&!ko){const Dr=yr.define;yr.define=function(Lr,kr,Ur){return mr[Lr]=No(Lr),Dr.call(yr,Lr,kr,Ur)}}let gr=Fo.MIXIN_MATCH,br=Fo.VAR_ASSIGN,vr=/;\s*/m,Er=/^\s*(initial)|(inherit)\s*$/,Nr='_-_';class Sr{constructor(){this._map={}}set(Dr,Lr){Dr=Dr.trim(),this._map[Dr]={properties:Lr,dependants:{}}}get(Dr){return Dr=Dr.trim(),this._map[Dr]}}class Cr{constructor(){this._currentTemplate=null,this._measureElement=null,this._map=new Sr,this._separator=Nr,this._boundProduceCssProperties=(Dr,Lr,kr,Ur)=>this._produceCssProperties(Dr,Lr,kr,Ur)}detectMixin(Dr){const Lr=gr.test(Dr)||br.test(Dr);return gr.lastIndex=0,br.lastIndex=0,Lr}transformStyle(Dr,Lr){let kr=yo(Dr);return this.transformRules(kr,Lr),kr}transformRules(Dr,Lr){this._currentTemplate=ar[Lr],go(Dr,kr=>{this.transformRule(kr)}),this._currentTemplate=null}transformRule(Dr){Dr.cssText=this.transformCssText(Dr.parsedCssText),':root'===Dr.selector&&(Dr.selector=':host > *')}transformCssText(Dr){return Dr=Dr.replace(br,this._boundProduceCssProperties),this._consumeCssProperties(Dr)}_getInitialValueForProperty(Dr){return this._measureElement||(this._measureElement=document.createElement('meta'),this._measureElement.style.all='initial',document.head.appendChild(this._measureElement)),window.getComputedStyle(this._measureElement).getPropertyValue(Dr)}_consumeCssProperties(Dr){for(let Lr;Lr=gr.exec(Dr);){let kr=Lr[0],Ur=Lr[1],Hr=Lr.index,qr=Hr+kr.indexOf('@apply'),Fr=Hr+kr.length,jr=Dr.slice(0,qr),Wr=Dr.slice(Fr),Br=this._cssTextToMap(jr),Gr=this._atApplyToCssProperties(Ur,Br);Dr=[jr,Gr,Wr].join(''),gr.lastIndex=Hr+Gr.length}return Dr}_atApplyToCssProperties(Dr,Lr){Dr=Dr.replace(vr,'');let kr=[],Ur=this._map.get(Dr);if(Ur||(this._map.set(Dr,{}),Ur=this._map.get(Dr)),Ur){this._currentTemplate&&(Ur.dependants[this._currentTemplate.name]=this._currentTemplate);let Hr,qr,Fr;for(Hr in Ur.properties)Fr=Lr&&Lr[Hr],qr=[Hr,': var(',Dr,Nr,Hr],Fr&&qr.push(',',Fr),qr.push(')'),kr.push(qr.join(''))}return kr.join('; ')}_replaceInitialOrInherit(Dr,Lr){let kr=Er.exec(Lr);return kr&&(kr[1]?Lr=Cr._getInitialValueForProperty(Dr):Lr='apply-shim-inherit'),Lr}_cssTextToMap(Dr){let Lr=Dr.split(';'),kr,Ur,Hr={};for(let Fr,jr,qr=0;qr<Lr.length;qr++)Fr=Lr[qr],Fr&&(jr=Fr.split(':'),1<jr.length&&(kr=jr[0].trim(),Ur=this._replaceInitialOrInherit(kr,jr.slice(1).join(':')),Hr[kr]=Ur));return Hr}_invalidateMixinEntry(Dr){for(let Lr in Dr.dependants)this._currentTemplate&&Lr===this._currentTemplate.name||ir.invalidate(Lr)}_produceCssProperties(Dr,Lr,kr,Ur){if(kr&&Co(kr,(Vr,Yr)=>{Yr&&this._map.get(Yr)&&(Ur='@apply '+Yr+';')}),!Ur)return Dr;let Hr=this._consumeCssProperties(Ur),qr=Dr.slice(0,Dr.indexOf('--')),Fr=this._cssTextToMap(Hr),jr=Fr,Wr=this._map.get(Lr),Br=Wr&&Wr.properties;Br?jr=Object.assign(Object.create(Br),Fr):this._map.set(Lr,jr);let Kr,zr,Gr=[],Xr=!1;for(Kr in jr)zr=Fr[Kr],void 0==zr&&(zr='initial'),Br&&!(Kr in Br)&&(Xr=!0),Gr.push(Lr+Nr+Kr+': '+zr);return Xr&&this._invalidateMixinEntry(Wr),Wr&&(Wr.properties=jr),kr&&(qr=Dr+';'+qr),qr+Gr.join('; ')+';'}}let Tr=new Cr;window.ApplyShim=Tr;let Ar=function(){};if(!ko){let Dr=qr=>{return qr.classList&&!qr.classList.contains(sr.SCOPE_NAME)||qr instanceof SVGElement&&(!qr.hasAttribute('class')||0>qr.getAttribute('class').indexOf(sr.SCOPE_NAME))},Lr=qr=>{for(let jr,Fr=0;Fr<qr.length;Fr++)if(jr=qr[Fr],jr.target!==document.documentElement&&jr.target!==document.head){for(let Br,Wr=0;Wr<jr.addedNodes.length;Wr++)if(Br=jr.addedNodes[Wr],Dr(Br)){let Gr=Br.getRootNode();if(Gr.nodeType===Node.DOCUMENT_FRAGMENT_NODE){let Kr=Gr.host;if(Kr){let zr=Kr.is||Kr.localName;sr.dom(Br,zr)}}}for(let Br,Wr=0;Wr<jr.removedNodes.length;Wr++)if(Br=jr.removedNodes[Wr],Br.nodeType===Node.ELEMENT_NODE){let Gr;if(Br.classList?Gr=Array.from(Br.classList):Br.hasAttribute('class')&&(Gr=Br.getAttribute('class').split(/\s+/)),void 0!=Gr){let Kr=Gr.indexOf(sr.SCOPE_NAME);if(0<=Kr){let zr=Gr[Kr+1];zr&&sr.dom(Br,zr,!0)}}}}},kr=new MutationObserver(Lr),Ur=qr=>{kr.observe(qr,{childList:!0,subtree:!0})},Hr=window.customElements&&!window.customElements.flush;if(Hr)Ur(document);else{let qr=()=>{Ur(document.body)};window.HTMLImports?window.HTMLImports.whenReady(qr):requestAnimationFrame(function(){if('loading'===document.readyState){let Fr=function(){qr(),document.removeEventListener('readystatechange',Fr)};document.addEventListener('readystatechange',Fr)}else qr()})}Ar=function(){Lr(kr.takeRecords())}}let Pr=new class{constructor(Dr=100){this.cache={},this.typeMax=Dr}_validate(Dr,Lr,kr){for(let Hr,Ur=0;Ur<kr.length;Ur++)if(Hr=kr[Ur],Dr.properties[Hr]!==Lr[Hr])return!1;return!0}store(Dr,Lr,kr,Ur){let Hr=this.cache[Dr]||[];Hr.push({properties:Lr,styleElement:kr,scopeSelector:Ur}),Hr.length>this.typeMax&&Hr.shift(),this.cache[Dr]=Hr}fetch(Dr,Lr,kr){let Ur=this.cache[Dr];if(Ur)for(let qr,Hr=Ur.length-1;0<=Hr;Hr--)if(qr=Ur[Hr],this._validate(qr,Lr,kr))return qr}};class xr{constructor(){this._scopeCounter={},this._documentOwner=document.documentElement,this._documentOwnerStyleInfo=ir.set(document.documentElement,new ir({rules:[]})),this._elementsHaveApplied=!1}get nativeShadow(){return ko}get nativeCss(){return Uo}get nativeCssApply(){return!1}flush(){Ar()}_generateScopeSelector(Dr){let Lr=this._scopeCounter[Dr]=(this._scopeCounter[Dr]||0)+1;return`${Dr}-${Lr}`}getStyleAst(Dr){return yo(Dr)}styleAstToString(Dr){return mo(Dr)}_gatherStyles(Dr){let Lr=Dr.content.querySelectorAll('style'),kr=[];for(let Hr,Ur=0;Ur<Lr.length;Ur++)Hr=Lr[Ur],kr.push(Hr.textContent),Hr.parentNode.removeChild(Hr);return kr.join('').trim()}_getCssBuild(Dr){let Lr=Dr.content.querySelector('style');return Lr?Lr.getAttribute('css-build')||'':''}prepareTemplate(Dr,Lr,kr){if(!Dr._prepared){Dr._prepared=!0,Dr.name=Lr,Dr.extends=kr,ar[Lr]=Dr;let Ur=this._getCssBuild(Dr),Hr=this._gatherStyles(Dr),qr={is:Lr,extends:kr,__cssBuild:Ur};this.nativeShadow||sr.dom(Dr.content,Lr);let Fr=Tr.detectMixin(Hr),jr=oo(Hr);Fr&&this.nativeCss&&!this.nativeCssApply&&Tr.transformRules(jr,Lr),Dr._styleAst=jr;let Wr=[];if(this.nativeCss||(Wr=ur.decorateStyles(Dr._styleAst,qr)),!Wr.length||this.nativeCss){let Br=this.nativeShadow?Dr.content:null,Gr=mr[Lr],Kr=this._generateStaticStyle(qr,Dr._styleAst,Br,Gr);Dr._style=Kr}Dr._ownPropertyNames=Wr}}_generateStaticStyle(Dr,Lr,kr,Ur){let Hr=sr.elementStyles(Dr,Lr);if(Hr.length)return bo(Hr,Dr.is,kr,Ur)}_prepareHost(Dr){let kr,Lr=Dr.getAttribute('is')||Dr.localName;Lr!==Dr.localName&&(kr=Dr.localName);let qr,Fr,jr,Ur=mr[Lr],Hr=ar[Lr];return Hr&&(qr=Hr._styleAst,Fr=Hr._ownPropertyNames,jr=Hr._cssBuild),ir.set(Dr,new ir(qr,Ur,Fr,Lr,kr,jr))}applyStyle(Dr,Lr){let kr=Dr.getAttribute('is')||Dr.localName,Ur=ir.get(Dr),Hr=!!Ur;if(Ur||(Ur=this._prepareHost(Dr)),this._isRootOwner(Dr)||(this._elementsHaveApplied=!0),window.CustomStyle){let qr=window.CustomStyle;if(qr._documentDirty){if(qr.findStyles(),this.nativeCss?!this.nativeCssApply&&qr._revalidateApplyShim():this._updateProperties(this._documentOwner,this._documentOwnerStyleInfo),qr.applyStyles(),!this._elementsHaveApplied)return;if(!this.nativeCss&&(this.updateStyles(),Hr))return}}if(Lr&&(Ur.overrideStyleProperties=Ur.overrideStyleProperties||{},Object.assign(Ur.overrideStyleProperties,Lr)),this.nativeCss){Ur.overrideStyleProperties&&this._updateNativeProperties(Dr,Ur.overrideStyleProperties);let qr=ar[kr];if(!qr&&!this._isRootOwner(Dr))return;if(qr&&qr._applyShimInvalid&&qr._style){if(qr._validating||(Tr.transformRules(qr._styleAst,kr),qr._style.textContent=sr.elementStyles(Dr,Ur.styleRules),ir.startValidating(kr)),this.nativeShadow){let Fr=Dr.shadowRoot;if(Fr){let jr=Fr.querySelector('style');jr.textContent=sr.elementStyles(Dr,Ur.styleRules)}}Ur.styleRules=qr._styleAst}}else this._updateProperties(Dr,Ur),Ur.ownStylePropertyNames&&Ur.ownStylePropertyNames.length&&this._applyStyleProperties(Dr,Ur);if(Hr){let qr=this._isRootOwner(Dr)?Dr:Dr.shadowRoot;qr&&this._applyToDescendants(qr)}}_applyToDescendants(Dr){let Lr=Dr.children;for(let Ur,kr=0;kr<Lr.length;kr++)Ur=Lr[kr],Ur.shadowRoot&&this.applyStyle(Ur),this._applyToDescendants(Ur)}_styleOwnerForNode(Dr){let Lr=Dr.getRootNode(),kr=Lr.host;return kr?ir.get(kr)?kr:this._styleOwnerForNode(kr):this._documentOwner}_isRootOwner(Dr){return Dr===this._documentOwner}_applyStyleProperties(Dr,Lr){let kr=Dr.getAttribute('is')||Dr.localName,Ur=Pr.fetch(kr,Lr.styleProperties,Lr.ownStylePropertyNames),Hr=Ur&&Ur.scopeSelector,qr=Ur?Ur.styleElement:null,Fr=Lr.scopeSelector;Lr.scopeSelector=Hr||this._generateScopeSelector(kr);let jr=ur.applyElementStyle(Dr,Lr.styleProperties,Lr.scopeSelector,qr);return this.nativeShadow||ur.applyElementScopeSelector(Dr,Lr.scopeSelector,Fr),Ur||Pr.store(kr,Lr.styleProperties,jr,Lr.scopeSelector),jr}_updateProperties(Dr,Lr){let kr=this._styleOwnerForNode(Dr),Ur=ir.get(kr),Hr=Ur.styleProperties,qr=Object.create(Hr||null),Fr=ur.hostAndRootPropertiesForScope(Dr,Lr.styleRules),jr=ur.propertyDataFromStyles(Ur.styleRules,Dr),Wr=jr.properties;Object.assign(qr,Fr.hostProps,Wr,Fr.rootProps),this._mixinOverrideStyles(qr,Lr.overrideStyleProperties),ur.reify(qr),Lr.styleProperties=qr}_mixinOverrideStyles(Dr,Lr){for(let kr in Lr){let Ur=Lr[kr];(Ur||0===Ur)&&(Dr[kr]=Ur)}}_updateNativeProperties(Dr,Lr){for(let kr in Lr)null===kr?Dr.style.removeProperty(kr):Dr.style.setProperty(kr,Lr[kr])}updateStyles(Dr){this.applyStyle(this._documentOwner,Dr)}_transformCustomStyleForDocument(Dr){let Lr=yo(Dr);go(Lr,kr=>{ko?sr.normalizeRootSelector(kr):sr.documentRule(kr),this.nativeCss&&!this.nativeCssApply&&Tr.transformRule(kr)}),this.nativeCss?Dr.textContent=mo(Lr):this._documentOwnerStyleInfo.styleRules.rules.push(Lr)}_revalidateApplyShim(Dr){if(this.nativeCss&&!this.nativeCssApply){let Lr=yo(Dr);Tr.transformRules(Lr),Dr.textContent=mo(Lr)}}_applyCustomStyleToDocument(Dr){this.nativeCss||ur.applyCustomStyle(Dr,this._documentOwnerStyleInfo.styleProperties)}getComputedStyleValue(Dr,Lr){let kr;if(!this.nativeCss){let Ur=ir.get(Dr)||ir.get(this._styleOwnerForNode(Dr));kr=Ur.styleProperties[Lr]}return kr=kr||window.getComputedStyle(Dr).getPropertyValue(Lr),kr.trim()}setElementClass(Dr,Lr){let kr=Dr.getRootNode(),Ur=Lr?Lr.split(/\s/):[],Hr=kr.host&&kr.host.localName;if(!Hr){var qr=Dr.getAttribute('class');if(qr){let Fr=qr.split(/\s/);for(let jr=0;jr<Fr.length;jr++)if(Fr[jr]===sr.SCOPE_NAME){Hr=Fr[jr+1];break}}}if(Hr&&Ur.push(sr.SCOPE_NAME,Hr),!this.nativeCss){let Fr=ir.get(Dr);Fr&&Fr.scopeSelector&&Ur.push(ur.XSCOPE_NAME,Fr.scopeSelector)}To(Dr,Ur.join(' '))}_styleInfoForNode(Dr){return ir.get(Dr)}}window.ShadyCSS=new xr;let Rr=window.ShadyCSS,Mr=!1,Or=[],wr=null;class Ir extends HTMLElement{static get _customStyles(){return Or}static get processHook(){return wr}static set processHook(Dr){wr=Dr}static get _documentDirty(){return Mr}static findStyles(){for(let Lr,Dr=0;Dr<Or.length;Dr++)if(Lr=Or[Dr],!Lr._style){let kr=Lr.querySelector('style');if(!kr)continue;if(kr.__appliedElement)for(let Hr,Ur=0;Ur<kr.attributes.length;Ur++)Hr=kr.attributes[Ur],kr.__appliedElement.setAttribute(Hr.name,Hr.value);Lr._style=kr.__appliedElement||kr,wr&&wr(Lr._style),Rr._transformCustomStyleForDocument(Lr._style)}}static _revalidateApplyShim(){for(let Lr,Dr=0;Dr<Or.length;Dr++)Lr=Or[Dr],Lr._style&&Rr._revalidateApplyShim(Lr._style)}static applyStyles(){for(let Lr,Dr=0;Dr<Or.length;Dr++)Lr=Or[Dr],Lr._style&&Rr._applyCustomStyleToDocument(Lr._style);Mr=!1}constructor(){super(),Or.push(this),Po()}}window.CustomStyle=Ir,window.customElements.define('custom-style',Ir),function(){'use strict';HTMLImports.whenReady(function(){requestAnimationFrame(function(){window.dispatchEvent(new CustomEvent('WebComponentsReady'))})})}(window.WebComponents),function(){var Lr=document.createElement('style');Lr.textContent='body {transition: opacity ease-in 0.2s; } \nbody[unresolved] {opacity: 0; display: block; overflow: hidden; position: relative; } \n';var kr=document.querySelector('head');kr.insertBefore(Lr,kr.firstChild)}(window.WebComponents)})();
//# sourceMappingURL=webcomponents-lite.js.map