@aegis-framework/pandora 0.6.1 → 0.6.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/pandora.js CHANGED
@@ -1,8 +1,8 @@
1
- var aJ=Object.defineProperty;var PJ=(J,X)=>{for(var Z in X)aJ(J,Z,{get:X[Z],enumerable:!0,configurable:!0,set:($)=>X[Z]=()=>$})};var k=globalThis,M=(J)=>{if(!k.emitLitDebugLogEvents)return;k.dispatchEvent(new CustomEvent("lit-debug",{detail:J}))},tJ=0,p;k.litIssuedWarnings??=new Set,p=(J,X)=>{if(X+=J?` See https://lit.dev/msg/${J} for more information.`:"",!k.litIssuedWarnings.has(X)&&!k.litIssuedWarnings.has(J))console.warn(X),k.litIssuedWarnings.add(X)},queueMicrotask(()=>{p("dev-mode","Lit is in dev mode. Not recommended for production!")});var S=k.ShadyDOM?.inUse&&k.ShadyDOM?.noPatch===!0?k.ShadyDOM.wrap:(J)=>J,t=k.trustedTypes,DJ=t?t.createPolicy("lit-html",{createHTML:(J)=>J}):void 0,eJ=(J)=>J,ZJ=(J,X,Z)=>eJ,JX=(J)=>{if(T!==ZJ)throw Error("Attempted to overwrite existing lit-html security policy. setSanitizeDOMValueFactory should be called at most once.");T=J},XX=()=>{T=ZJ},BJ=(J,X,Z)=>{return T(J,X,Z)},bJ="$lit$",N=`lit$${Math.random().toFixed(9).slice(2)}$`,NJ="?"+N,ZX=`<${NJ}>`,E=document,c=()=>E.createComment(""),l=(J)=>J===null||typeof J!="object"&&typeof J!="function",MJ=Array.isArray,$X=(J)=>MJ(J)||typeof J?.[Symbol.iterator]==="function",QJ=`[
2
- \f\r]`,YX=`[^
3
- \f\r"'\`<>=]`,jX=`[^\\s"'>=/]`,u=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,LJ=1,zJ=2,GX=3,IJ=/-->/g,kJ=/>/g,w=new RegExp(`>|${QJ}(?:(${jX}+)(${QJ}*=${QJ}*(?:${YX}|("|')|))|$)`,"g"),QX=0,fJ=1,zX=2,VJ=3,qJ=/'/g,WJ=/"/g,AJ=/^(?:script|style|textarea|title)$/i,qX=1,e=2,JJ=3,UJ=1,XJ=2,WX=3,BX=4,MX=5,FJ=6,UX=7,HJ=(J)=>(X,...Z)=>{if(X.some(($)=>$===void 0))console.warn(`Some template strings are undefined.
4
- This is probably caused by illegal octal escape sequences.`);if(Z.some(($)=>$?._$litStatic$))p("",`Static values 'literal' or 'unsafeStatic' cannot be used as values to non-static templates.
5
- Please use the static 'html' tag function. See https://lit.dev/docs/templates/expressions/#static-expressions`);return{["_$litType$"]:J,strings:X,values:Z}},FX=HJ(qX),HX=HJ(e),yX=HJ(JJ),g=Symbol.for("lit-noChange"),H=Symbol.for("lit-nothing"),SJ=new WeakMap,K=E.createTreeWalker(E,129),T=ZJ;function wJ(J,X){if(!MJ(J)||!J.hasOwnProperty("raw")){let Z="invalid template strings array";throw Z=`
1
+ var r2=Object.defineProperty;var t0=(X,$)=>{for(var J in $)r2(X,J,{get:$[J],enumerable:!0,configurable:!0,set:(Z)=>$[J]=()=>Z})};var x=globalThis,j=(X)=>{if(!x.emitLitDebugLogEvents)return;x.dispatchEvent(new CustomEvent("lit-debug",{detail:X}))},n2=0,J0;x.litIssuedWarnings??=new Set,J0=(X,$)=>{if($+=X?` See https://lit.dev/msg/${X} for more information.`:"",!x.litIssuedWarnings.has($)&&!x.litIssuedWarnings.has(X))console.warn($),x.litIssuedWarnings.add($)},queueMicrotask(()=>{J0("dev-mode","Lit is in dev mode. Not recommended for production!")});var P=x.ShadyDOM?.inUse&&x.ShadyDOM?.noPatch===!0?x.ShadyDOM.wrap:(X)=>X,j0=x.trustedTypes,e0=j0?j0.createPolicy("lit-html",{createHTML:(X)=>X}):void 0,a2=(X)=>X,S0=(X,$,J)=>a2,t2=(X)=>{if(l!==S0)throw Error("Attempted to overwrite existing lit-html security policy. setSanitizeDOMValueFactory should be called at most once.");l=X},e2=()=>{l=S0},T0=(X,$,J)=>{return l(X,$,J)},C0="$lit$",w=`lit$${Math.random().toFixed(9).slice(2)}$`,h0="?"+w,XX=`<${h0}>`,c=document,Z0=()=>c.createComment(""),Y0=(X)=>X===null||typeof X!="object"&&typeof X!="function",g0=Array.isArray,z2=(X)=>g0(X)||typeof X?.[Symbol.iterator]==="function",P0=`[
2
+ \f\r]`,$X=`[^
3
+ \f\r"'\`<>=]`,JX=`[^\\s"'>=/]`,$0=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,X2=1,K0=2,ZX=3,$2=/-->/g,J2=/>/g,v=new RegExp(`>|${P0}(?:(${JX}+)(${P0}*=${P0}*(?:${$X}|("|')|))|$)`,"g"),YX=0,Z2=1,QX=2,Y2=3,w0=/'/g,f0=/"/g,q2=/^(?:script|style|textarea|title)$/i,G2=1,H0=2,_0=3,v0=1,L0=2,zX=3,qX=4,GX=5,y0=6,WX=7,m0=(X)=>($,...J)=>{if($.some((Z)=>Z===void 0))console.warn(`Some template strings are undefined.
4
+ This is probably caused by illegal octal escape sequences.`);if(J.some((Z)=>Z?._$litStatic$))J0("",`Static values 'literal' or 'unsafeStatic' cannot be used as values to non-static templates.
5
+ Please use the static 'html' tag function. See https://lit.dev/docs/templates/expressions/#static-expressions`);return{["_$litType$"]:X,strings:$,values:J}},BX=m0(G2),FX=m0(H0),S1=m0(_0),H=Symbol.for("lit-noChange"),M=Symbol.for("lit-nothing"),Q2=new WeakMap,p=c.createTreeWalker(c,129),l=S0;function W2(X,$){if(!g0(X)||!X.hasOwnProperty("raw")){let J="invalid template strings array";throw J=`
6
6
  Internal Error: expected template strings to be an array
7
7
  with a 'raw' field. Faking a template strings array by
8
8
  calling html or svg like an ordinary function is effectively
@@ -13,18 +13,18 @@ Please use the static 'html' tag function. See https://lit.dev/docs/templates/ex
13
13
  https://github.com/lit/lit/issues/new?template=bug_report.md
14
14
  and include information about your build tooling, if any.
15
15
  `.trim().replace(/\n */g,`
16
- `),Error(Z)}return DJ!==void 0?DJ.createHTML(X):X}var OX=(J,X)=>{let Z=J.length-1,$=[],Y=X===e?"<svg>":X===JJ?"<math>":"",j,G=u;for(let z=0;z<Z;z++){let W=J[z],q=-1,B,U=0,F;while(U<W.length){if(G.lastIndex=U,F=G.exec(W),F===null)break;if(U=G.lastIndex,G===u){if(F[LJ]==="!--")G=IJ;else if(F[LJ]!==void 0)G=kJ;else if(F[zJ]!==void 0){if(AJ.test(F[zJ]))j=new RegExp(`</${F[zJ]}`,"g");G=w}else if(F[GX]!==void 0)throw Error("Bindings in tag names are not supported. Please use static templates instead. See https://lit.dev/docs/templates/expressions/#static-expressions")}else if(G===w)if(F[QX]===">")G=j??u,q=-1;else if(F[fJ]===void 0)q=-2;else q=G.lastIndex-F[zX].length,B=F[fJ],G=F[VJ]===void 0?w:F[VJ]==='"'?WJ:qJ;else if(G===WJ||G===qJ)G=w;else if(G===IJ||G===kJ)G=u;else G=w,j=void 0}console.assert(q===-1||G===w||G===qJ||G===WJ,"unexpected parse state B");let V=G===w&&J[z+1].startsWith("/>")?" ":"";Y+=G===u?W+ZX:q>=0?($.push(B),W.slice(0,q)+bJ+W.slice(q))+N+V:W+N+(q===-2?z:V)}let Q=Y+(J[Z]||"<?>")+(X===e?"</svg>":X===JJ?"</math>":"");return[wJ(J,Q),$]};class i{constructor({strings:J,["_$litType$"]:X},Z){this.parts=[];let $,Y=0,j=0,G=J.length-1,Q=this.parts,[z,W]=OX(J,X);if(this.el=i.createElement(z,Z),K.currentNode=this.el.content,X===e||X===JJ){let q=this.el.content.firstChild;q.replaceWith(...q.childNodes)}while(($=K.nextNode())!==null&&Q.length<G){if($.nodeType===1){{let q=$.localName;if(/^(?:textarea|template)$/i.test(q)&&$.innerHTML.includes(N)){let B=`Expressions are not supported inside \`${q}\` elements. See https://lit.dev/msg/expression-in-${q} for more information.`;if(q==="template")throw Error(B);else p("",B)}}if($.hasAttributes()){for(let q of $.getAttributeNames())if(q.endsWith(bJ)){let B=W[j++],F=$.getAttribute(q).split(N),V=/([.?@])?(.*)/.exec(B);Q.push({type:UJ,index:Y,name:V[2],strings:F,ctor:V[1]==="."?RJ:V[1]==="?"?CJ:V[1]==="@"?KJ:s}),$.removeAttribute(q)}else if(q.startsWith(N))Q.push({type:FJ,index:Y}),$.removeAttribute(q)}if(AJ.test($.tagName)){let q=$.textContent.split(N),B=q.length-1;if(B>0){$.textContent=t?t.emptyScript:"";for(let U=0;U<B;U++)$.append(q[U],c()),K.nextNode(),Q.push({type:XJ,index:++Y});$.append(q[B],c())}}}else if($.nodeType===8)if($.data===NJ)Q.push({type:XJ,index:Y});else{let B=-1;while((B=$.data.indexOf(N,B+1))!==-1)Q.push({type:UX,index:Y}),B+=N.length-1}Y++}if(W.length!==j)throw Error('Detected duplicate attribute bindings. This occurs if your template has duplicate attributes on an element tag. For example "<input ?disabled=${true} ?disabled=${false}>" contains a duplicate "disabled" attribute. The error was detected in the following template: \n`'+J.join("${...}")+"`");M&&M({kind:"template prep",template:this,clonableTemplate:this.el,parts:this.parts,strings:J})}static createElement(J,X){let Z=E.createElement("template");return Z.innerHTML=J,Z}}function d(J,X,Z=J,$){if(X===g)return X;let Y=$!==void 0?Z.__directives?.[$]:Z.__directive,j=l(X)?void 0:X._$litDirective$;if(Y?.constructor!==j){if(Y?._$notifyDirectiveConnectionChanged?.(!1),j===void 0)Y=void 0;else Y=new j(J),Y._$initialize(J,Z,$);if($!==void 0)(Z.__directives??=[])[$]=Y;else Z.__directive=Y}if(Y!==void 0)X=d(J,Y._$resolve(J,X.values),Y,$);return X}class xJ{constructor(J,X){this._$parts=[],this._$disconnectableChildren=void 0,this._$template=J,this._$parent=X}get parentNode(){return this._$parent.parentNode}get _$isConnected(){return this._$parent._$isConnected}_clone(J){let{el:{content:X},parts:Z}=this._$template,$=(J?.creationScope??E).importNode(X,!0);K.currentNode=$;let Y=K.nextNode(),j=0,G=0,Q=Z[0];while(Q!==void 0){if(j===Q.index){let z;if(Q.type===XJ)z=new o(Y,Y.nextSibling,this,J);else if(Q.type===UJ)z=new Q.ctor(Y,Q.name,Q.strings,this,J);else if(Q.type===FJ)z=new EJ(Y,this,J);this._$parts.push(z),Q=Z[++G]}if(j!==Q?.index)Y=K.nextNode(),j++}return K.currentNode=E,$}_update(J){let X=0;for(let Z of this._$parts){if(Z!==void 0)if(M&&M({kind:"set part",part:Z,value:J[X],valueIndex:X,values:J,templateInstance:this}),Z.strings!==void 0)Z._$setValue(J,Z,X),X+=Z.strings.length-2;else Z._$setValue(J[X]);X++}}}class o{get _$isConnected(){return this._$parent?._$isConnected??this.__isConnected}constructor(J,X,Z,$){this.type=XJ,this._$committedValue=H,this._$disconnectableChildren=void 0,this._$startNode=J,this._$endNode=X,this._$parent=Z,this.options=$,this.__isConnected=$?.isConnected??!0,this._textSanitizer=void 0}get parentNode(){let J=S(this._$startNode).parentNode,X=this._$parent;if(X!==void 0&&J?.nodeType===11)J=X.parentNode;return J}get startNode(){return this._$startNode}get endNode(){return this._$endNode}_$setValue(J,X=this){if(this.parentNode===null)throw Error("This `ChildPart` has no `parentNode` and therefore cannot accept a value. This likely means the element containing the part was manipulated in an unsupported way outside of Lit's control such that the part's marker nodes were ejected from DOM. For example, setting the element's `innerHTML` or `textContent` can do this.");if(J=d(this,J,X),l(J)){if(J===H||J==null||J===""){if(this._$committedValue!==H)M&&M({kind:"commit nothing to child",start:this._$startNode,end:this._$endNode,parent:this._$parent,options:this.options}),this._$clear();this._$committedValue=H}else if(J!==this._$committedValue&&J!==g)this._commitText(J)}else if(J._$litType$!==void 0)this._commitTemplateResult(J);else if(J.nodeType!==void 0){if(this.options?.host===J){this._commitText("[probable mistake: rendered a template's host in itself (commonly caused by writing ${this} in a template]"),console.warn("Attempted to render the template host",J,"inside itself. This is almost always a mistake, and in dev mode ","we render some warning text. In production however, we'll ","render it, which will usually result in an error, and sometimes ","in the element disappearing from the DOM.");return}this._commitNode(J)}else if($X(J))this._commitIterable(J);else this._commitText(J)}_insert(J){return S(S(this._$startNode).parentNode).insertBefore(J,this._$endNode)}_commitNode(J){if(this._$committedValue!==J){if(this._$clear(),T!==ZJ){let X=this._$startNode.parentNode?.nodeName;if(X==="STYLE"||X==="SCRIPT"){let Z="Forbidden";if(X==="STYLE")Z="Lit does not support binding inside style nodes. This is a security risk, as style injection attacks can exfiltrate data and spoof UIs. Consider instead using css`...` literals to compose styles, and do dynamic styling with css custom properties, ::parts, <slot>s, and by mutating the DOM rather than stylesheets.";else Z="Lit does not support binding inside script nodes. This is a security risk, as it could allow arbitrary code execution.";throw Error(Z)}}M&&M({kind:"commit node",start:this._$startNode,parent:this._$parent,value:J,options:this.options}),this._$committedValue=this._insert(J)}}_commitText(J){if(this._$committedValue!==H&&l(this._$committedValue)){let X=S(this._$startNode).nextSibling;if(this._textSanitizer===void 0)this._textSanitizer=BJ(X,"data","property");J=this._textSanitizer(J),M&&M({kind:"commit text",node:X,value:J,options:this.options}),X.data=J}else{let X=E.createTextNode("");if(this._commitNode(X),this._textSanitizer===void 0)this._textSanitizer=BJ(X,"data","property");J=this._textSanitizer(J),M&&M({kind:"commit text",node:X,value:J,options:this.options}),X.data=J}this._$committedValue=J}_commitTemplateResult(J){let{values:X,["_$litType$"]:Z}=J,$=typeof Z==="number"?this._$getTemplate(J):(Z.el===void 0&&(Z.el=i.createElement(wJ(Z.h,Z.h[0]),this.options)),Z);if(this._$committedValue?._$template===$)M&&M({kind:"template updating",template:$,instance:this._$committedValue,parts:this._$committedValue._$parts,options:this.options,values:X}),this._$committedValue._update(X);else{let Y=new xJ($,this),j=Y._clone(this.options);M&&M({kind:"template instantiated",template:$,instance:Y,parts:Y._$parts,options:this.options,fragment:j,values:X}),Y._update(X),M&&M({kind:"template instantiated and updated",template:$,instance:Y,parts:Y._$parts,options:this.options,fragment:j,values:X}),this._commitNode(j),this._$committedValue=Y}}_$getTemplate(J){let X=SJ.get(J.strings);if(X===void 0)SJ.set(J.strings,X=new i(J));return X}_commitIterable(J){if(!MJ(this._$committedValue))this._$committedValue=[],this._$clear();let X=this._$committedValue,Z=0,$;for(let Y of J){if(Z===X.length)X.push($=new o(this._insert(c()),this._insert(c()),this,this.options));else $=X[Z];$._$setValue(Y),Z++}if(Z<X.length)this._$clear($&&S($._$endNode).nextSibling,Z),X.length=Z}_$clear(J=S(this._$startNode).nextSibling,X){this._$notifyConnectionChanged?.(!1,!0,X);while(J!==this._$endNode){let Z=S(J).nextSibling;S(J).remove(),J=Z}}setConnected(J){if(this._$parent===void 0)this.__isConnected=J,this._$notifyConnectionChanged?.(J);else throw Error("part.setConnected() may only be called on a RootPart returned from render().")}}class s{get tagName(){return this.element.tagName}get _$isConnected(){return this._$parent._$isConnected}constructor(J,X,Z,$,Y){if(this.type=UJ,this._$committedValue=H,this._$disconnectableChildren=void 0,this.element=J,this.name=X,this._$parent=$,this.options=Y,Z.length>2||Z[0]!==""||Z[1]!=="")this._$committedValue=Array(Z.length-1).fill(new String),this.strings=Z;else this._$committedValue=H;this._sanitizer=void 0}_$setValue(J,X=this,Z,$){let Y=this.strings,j=!1;if(Y===void 0){if(J=d(this,J,X,0),j=!l(J)||J!==this._$committedValue&&J!==g,j)this._$committedValue=J}else{let G=J;J=Y[0];let Q,z;for(Q=0;Q<Y.length-1;Q++){if(z=d(this,G[Z+Q],X,Q),z===g)z=this._$committedValue[Q];if(j||=!l(z)||z!==this._$committedValue[Q],z===H)J=H;else if(J!==H)J+=(z??"")+Y[Q+1];this._$committedValue[Q]=z}}if(j&&!$)this._commitValue(J)}_commitValue(J){if(J===H)S(this.element).removeAttribute(this.name);else{if(this._sanitizer===void 0)this._sanitizer=T(this.element,this.name,"attribute");J=this._sanitizer(J??""),M&&M({kind:"commit attribute",element:this.element,name:this.name,value:J,options:this.options}),S(this.element).setAttribute(this.name,J??"")}}}class RJ extends s{constructor(){super(...arguments);this.type=WX}_commitValue(J){if(this._sanitizer===void 0)this._sanitizer=T(this.element,this.name,"property");J=this._sanitizer(J),M&&M({kind:"commit property",element:this.element,name:this.name,value:J,options:this.options}),this.element[this.name]=J===H?void 0:J}}class CJ extends s{constructor(){super(...arguments);this.type=BX}_commitValue(J){M&&M({kind:"commit boolean attribute",element:this.element,name:this.name,value:!!(J&&J!==H),options:this.options}),S(this.element).toggleAttribute(this.name,!!J&&J!==H)}}class KJ extends s{constructor(J,X,Z,$,Y){super(J,X,Z,$,Y);if(this.type=MX,this.strings!==void 0)throw Error(`A \`<${J.localName}>\` has a \`@${X}=...\` listener with invalid content. Event listeners in templates must have exactly one expression and no surrounding text.`)}_$setValue(J,X=this){if(J=d(this,J,X,0)??H,J===g)return;let Z=this._$committedValue,$=J===H&&Z!==H||J.capture!==Z.capture||J.once!==Z.once||J.passive!==Z.passive,Y=J!==H&&(Z===H||$);if(M&&M({kind:"commit event listener",element:this.element,name:this.name,value:J,options:this.options,removeListener:$,addListener:Y,oldListener:Z}),$)this.element.removeEventListener(this.name,this,Z);if(Y)this.element.addEventListener(this.name,this,J);this._$committedValue=J}handleEvent(J){if(typeof this._$committedValue==="function")this._$committedValue.call(this.options?.host??this.element,J);else this._$committedValue.handleEvent(J)}}class EJ{constructor(J,X,Z){this.element=J,this.type=FJ,this._$disconnectableChildren=void 0,this._$parent=X,this.options=Z}get _$isConnected(){return this._$parent._$isConnected}_$setValue(J){M&&M({kind:"commit to element binding",element:this.element,value:J,options:this.options}),d(this,J)}}var _X=k.litHtmlPolyfillSupportDevMode;_X?.(i,o);(k.litHtmlVersions??=[]).push("3.3.1");if(k.litHtmlVersions.length>1)queueMicrotask(()=>{p("multiple-versions","Multiple versions of Lit loaded. Loading multiple versions is not recommended.")});var x=(J,X,Z)=>{if(X==null)throw TypeError(`The container to render into may not be ${X}`);let $=tJ++,Y=Z?.renderBefore??X,j=Y._$litPart$;if(M&&M({kind:"begin render",id:$,value:J,container:X,options:Z,part:j}),j===void 0){let G=Z?.renderBefore??null;Y._$litPart$=j=new o(X.insertBefore(c(),G),G,void 0,Z??{})}return j._$setValue(J),M&&M({kind:"end render",id:$,value:J,container:X,options:Z,part:j}),j};x.setSanitizer=JX,x.createSanitizer=BJ,x._testOnlyClearSanitizerFactoryDoNotCallOrElse=XX;var vJ={};PJ(vJ,{resolveListenerTarget:()=>OJ,reactive:()=>hJ,parseAttributeValue:()=>b,isTemplateResult:()=>$J,deserializeCSS:()=>m,callAsync:()=>r,addTeardown:()=>y,addDecoratorEffect:()=>f,WATCH_HANDLERS:()=>_,SUBSCRIBE_HANDLERS:()=>A,STYLE_METADATA:()=>n,REACTIVE_FIELDS:()=>P,PROP_ATTRIBUTES:()=>L,LISTEN_HANDLERS:()=>R,DECORATOR_TEARDOWNS:()=>v,DECORATOR_EFFECTS:()=>h,ATTR_HANDLERS:()=>C});function r(J,X,...Z){try{let $=J.apply(X,Z);return $ instanceof Promise?$:Promise.resolve($)}catch($){return Promise.reject($)}}function $J(J){return J!==null&&typeof J==="object"&&"_$litType$"in J}function m(J,X="",Z=0){let $=Object.keys(J),Y="";for(let j of $){let G=J[j];if(typeof G==="object"&&G!==null){if(X&&!j.startsWith("@"))if(j.startsWith("&"))Y+=`${j.replace(/&/g,X)} {
17
- `;else if(j===":host")Y+=`${X} {
18
- `;else Y+=`${X} ${j} {
19
- `;else Y+=`${j} {
20
- `;let Q=Object.keys(G);for(let z of Q){Y+="\t".repeat(Z);let W=G[z];if(typeof W==="object"&&W!==null){let q={};q[z]=W,Y+=m(q,X,Z+1)}else Y+=` ${z}: ${W};
16
+ `),Error(J)}return e0!==void 0?e0.createHTML($):$}var B2=(X,$)=>{let J=X.length-1,Z=[],Y=$===H0?"<svg>":$===_0?"<math>":"",Q,z=$0;for(let G=0;G<J;G++){let B=X[G],F=-1,W,O=0,U;while(O<B.length){if(z.lastIndex=O,U=z.exec(B),U===null)break;if(O=z.lastIndex,z===$0){if(U[X2]==="!--")z=$2;else if(U[X2]!==void 0)z=J2;else if(U[K0]!==void 0){if(q2.test(U[K0]))Q=new RegExp(`</${U[K0]}`,"g");z=v}else if(U[ZX]!==void 0)throw Error("Bindings in tag names are not supported. Please use static templates instead. See https://lit.dev/docs/templates/expressions/#static-expressions")}else if(z===v)if(U[YX]===">")z=Q??$0,F=-1;else if(U[Z2]===void 0)F=-2;else F=z.lastIndex-U[QX].length,W=U[Z2],z=U[Y2]===void 0?v:U[Y2]==='"'?f0:w0;else if(z===f0||z===w0)z=v;else if(z===$2||z===J2)z=$0;else z=v,Q=void 0}console.assert(F===-1||z===v||z===w0||z===f0,"unexpected parse state B");let L=z===v&&X[G+1].startsWith("/>")?" ":"";Y+=z===$0?B+XX:F>=0?(Z.push(W),B.slice(0,F)+C0+B.slice(F))+w+L:B+w+(F===-2?G:L)}let q=Y+(X[J]||"<?>")+($===H0?"</svg>":$===_0?"</math>":"");return[W2(X,q),Z]};class Q0{constructor({strings:X,["_$litType$"]:$},J){this.parts=[];let Z,Y=0,Q=0,z=X.length-1,q=this.parts,[G,B]=B2(X,$);if(this.el=Q0.createElement(G,J),p.currentNode=this.el.content,$===H0||$===_0){let F=this.el.content.firstChild;F.replaceWith(...F.childNodes)}while((Z=p.nextNode())!==null&&q.length<z){if(Z.nodeType===1){{let F=Z.localName;if(/^(?:textarea|template)$/i.test(F)&&Z.innerHTML.includes(w)){let W=`Expressions are not supported inside \`${F}\` elements. See https://lit.dev/msg/expression-in-${F} for more information.`;if(F==="template")throw Error(W);else J0("",W)}}if(Z.hasAttributes()){for(let F of Z.getAttributeNames())if(F.endsWith(C0)){let W=B[Q++],U=Z.getAttribute(F).split(w),L=/([.?@])?(.*)/.exec(W);q.push({type:v0,index:Y,name:L[2],strings:U,ctor:L[1]==="."?u0:L[1]==="?"?p0:L[1]==="@"?c0:n}),Z.removeAttribute(F)}else if(F.startsWith(w))q.push({type:y0,index:Y}),Z.removeAttribute(F)}if(q2.test(Z.tagName)){let F=Z.textContent.split(w),W=F.length-1;if(W>0){Z.textContent=j0?j0.emptyScript:"";for(let O=0;O<W;O++)Z.append(F[O],Z0()),p.nextNode(),q.push({type:L0,index:++Y});Z.append(F[W],Z0())}}}else if(Z.nodeType===8)if(Z.data===h0)q.push({type:L0,index:Y});else{let W=-1;while((W=Z.data.indexOf(w,W+1))!==-1)q.push({type:WX,index:Y}),W+=w.length-1}Y++}if(B.length!==Q)throw Error('Detected duplicate attribute bindings. This occurs if your template has duplicate attributes on an element tag. For example "<input ?disabled=${true} ?disabled=${false}>" contains a duplicate "disabled" attribute. The error was detected in the following template: \n`'+X.join("${...}")+"`");j&&j({kind:"template prep",template:this,clonableTemplate:this.el,parts:this.parts,strings:X})}static createElement(X,$){let J=c.createElement("template");return J.innerHTML=X,J}}function o(X,$,J=X,Z){if($===H)return $;let Y=Z!==void 0?J.__directives?.[Z]:J.__directive,Q=Y0($)?void 0:$._$litDirective$;if(Y?.constructor!==Q){if(Y?._$notifyDirectiveConnectionChanged?.(!1),Q===void 0)Y=void 0;else Y=new Q(X),Y._$initialize(X,J,Z);if(Z!==void 0)(J.__directives??=[])[Z]=Y;else J.__directive=Y}if(Y!==void 0)$=o(X,Y._$resolve(X,$.values),Y,Z);return $}class d0{constructor(X,$){this._$parts=[],this._$disconnectableChildren=void 0,this._$template=X,this._$parent=$}get parentNode(){return this._$parent.parentNode}get _$isConnected(){return this._$parent._$isConnected}_clone(X){let{el:{content:$},parts:J}=this._$template,Z=(X?.creationScope??c).importNode($,!0);p.currentNode=Z;let Y=p.nextNode(),Q=0,z=0,q=J[0];while(q!==void 0){if(Q===q.index){let G;if(q.type===L0)G=new r(Y,Y.nextSibling,this,X);else if(q.type===v0)G=new q.ctor(Y,q.name,q.strings,this,X);else if(q.type===y0)G=new l0(Y,this,X);this._$parts.push(G),q=J[++z]}if(Q!==q?.index)Y=p.nextNode(),Q++}return p.currentNode=c,Z}_update(X){let $=0;for(let J of this._$parts){if(J!==void 0)if(j&&j({kind:"set part",part:J,value:X[$],valueIndex:$,values:X,templateInstance:this}),J.strings!==void 0)J._$setValue(X,J,$),$+=J.strings.length-2;else J._$setValue(X[$]);$++}}}class r{get _$isConnected(){return this._$parent?._$isConnected??this.__isConnected}constructor(X,$,J,Z){this.type=L0,this._$committedValue=M,this._$disconnectableChildren=void 0,this._$startNode=X,this._$endNode=$,this._$parent=J,this.options=Z,this.__isConnected=Z?.isConnected??!0,this._textSanitizer=void 0}get parentNode(){let X=P(this._$startNode).parentNode,$=this._$parent;if($!==void 0&&X?.nodeType===11)X=$.parentNode;return X}get startNode(){return this._$startNode}get endNode(){return this._$endNode}_$setValue(X,$=this){if(this.parentNode===null)throw Error("This `ChildPart` has no `parentNode` and therefore cannot accept a value. This likely means the element containing the part was manipulated in an unsupported way outside of Lit's control such that the part's marker nodes were ejected from DOM. For example, setting the element's `innerHTML` or `textContent` can do this.");if(X=o(this,X,$),Y0(X)){if(X===M||X==null||X===""){if(this._$committedValue!==M)j&&j({kind:"commit nothing to child",start:this._$startNode,end:this._$endNode,parent:this._$parent,options:this.options}),this._$clear();this._$committedValue=M}else if(X!==this._$committedValue&&X!==H)this._commitText(X)}else if(X._$litType$!==void 0)this._commitTemplateResult(X);else if(X.nodeType!==void 0){if(this.options?.host===X){this._commitText("[probable mistake: rendered a template's host in itself (commonly caused by writing ${this} in a template]"),console.warn("Attempted to render the template host",X,"inside itself. This is almost always a mistake, and in dev mode ","we render some warning text. In production however, we'll ","render it, which will usually result in an error, and sometimes ","in the element disappearing from the DOM.");return}this._commitNode(X)}else if(z2(X))this._commitIterable(X);else this._commitText(X)}_insert(X){return P(P(this._$startNode).parentNode).insertBefore(X,this._$endNode)}_commitNode(X){if(this._$committedValue!==X){if(this._$clear(),l!==S0){let $=this._$startNode.parentNode?.nodeName;if($==="STYLE"||$==="SCRIPT"){let J="Forbidden";if($==="STYLE")J="Lit does not support binding inside style nodes. This is a security risk, as style injection attacks can exfiltrate data and spoof UIs. Consider instead using css`...` literals to compose styles, and do dynamic styling with css custom properties, ::parts, <slot>s, and by mutating the DOM rather than stylesheets.";else J="Lit does not support binding inside script nodes. This is a security risk, as it could allow arbitrary code execution.";throw Error(J)}}j&&j({kind:"commit node",start:this._$startNode,parent:this._$parent,value:X,options:this.options}),this._$committedValue=this._insert(X)}}_commitText(X){if(this._$committedValue!==M&&Y0(this._$committedValue)){let $=P(this._$startNode).nextSibling;if(this._textSanitizer===void 0)this._textSanitizer=T0($,"data","property");X=this._textSanitizer(X),j&&j({kind:"commit text",node:$,value:X,options:this.options}),$.data=X}else{let $=c.createTextNode("");if(this._commitNode($),this._textSanitizer===void 0)this._textSanitizer=T0($,"data","property");X=this._textSanitizer(X),j&&j({kind:"commit text",node:$,value:X,options:this.options}),$.data=X}this._$committedValue=X}_commitTemplateResult(X){let{values:$,["_$litType$"]:J}=X,Z=typeof J==="number"?this._$getTemplate(X):(J.el===void 0&&(J.el=Q0.createElement(W2(J.h,J.h[0]),this.options)),J);if(this._$committedValue?._$template===Z)j&&j({kind:"template updating",template:Z,instance:this._$committedValue,parts:this._$committedValue._$parts,options:this.options,values:$}),this._$committedValue._update($);else{let Y=new d0(Z,this),Q=Y._clone(this.options);j&&j({kind:"template instantiated",template:Z,instance:Y,parts:Y._$parts,options:this.options,fragment:Q,values:$}),Y._update($),j&&j({kind:"template instantiated and updated",template:Z,instance:Y,parts:Y._$parts,options:this.options,fragment:Q,values:$}),this._commitNode(Q),this._$committedValue=Y}}_$getTemplate(X){let $=Q2.get(X.strings);if($===void 0)Q2.set(X.strings,$=new Q0(X));return $}_commitIterable(X){if(!g0(this._$committedValue))this._$committedValue=[],this._$clear();let $=this._$committedValue,J=0,Z;for(let Y of X){if(J===$.length)$.push(Z=new r(this._insert(Z0()),this._insert(Z0()),this,this.options));else Z=$[J];Z._$setValue(Y),J++}if(J<$.length)this._$clear(Z&&P(Z._$endNode).nextSibling,J),$.length=J}_$clear(X=P(this._$startNode).nextSibling,$){this._$notifyConnectionChanged?.(!1,!0,$);while(X!==this._$endNode){let J=P(X).nextSibling;P(X).remove(),X=J}}setConnected(X){if(this._$parent===void 0)this.__isConnected=X,this._$notifyConnectionChanged?.(X);else throw Error("part.setConnected() may only be called on a RootPart returned from render().")}}class n{get tagName(){return this.element.tagName}get _$isConnected(){return this._$parent._$isConnected}constructor(X,$,J,Z,Y){if(this.type=v0,this._$committedValue=M,this._$disconnectableChildren=void 0,this.element=X,this.name=$,this._$parent=Z,this.options=Y,J.length>2||J[0]!==""||J[1]!=="")this._$committedValue=Array(J.length-1).fill(new String),this.strings=J;else this._$committedValue=M;this._sanitizer=void 0}_$setValue(X,$=this,J,Z){let Y=this.strings,Q=!1;if(Y===void 0){if(X=o(this,X,$,0),Q=!Y0(X)||X!==this._$committedValue&&X!==H,Q)this._$committedValue=X}else{let z=X;X=Y[0];let q,G;for(q=0;q<Y.length-1;q++){if(G=o(this,z[J+q],$,q),G===H)G=this._$committedValue[q];if(Q||=!Y0(G)||G!==this._$committedValue[q],G===M)X=M;else if(X!==M)X+=(G??"")+Y[q+1];this._$committedValue[q]=G}}if(Q&&!Z)this._commitValue(X)}_commitValue(X){if(X===M)P(this.element).removeAttribute(this.name);else{if(this._sanitizer===void 0)this._sanitizer=l(this.element,this.name,"attribute");X=this._sanitizer(X??""),j&&j({kind:"commit attribute",element:this.element,name:this.name,value:X,options:this.options}),P(this.element).setAttribute(this.name,X??"")}}}class u0 extends n{constructor(){super(...arguments);this.type=zX}_commitValue(X){if(this._sanitizer===void 0)this._sanitizer=l(this.element,this.name,"property");X=this._sanitizer(X),j&&j({kind:"commit property",element:this.element,name:this.name,value:X,options:this.options}),this.element[this.name]=X===M?void 0:X}}class p0 extends n{constructor(){super(...arguments);this.type=qX}_commitValue(X){j&&j({kind:"commit boolean attribute",element:this.element,name:this.name,value:!!(X&&X!==M),options:this.options}),P(this.element).toggleAttribute(this.name,!!X&&X!==M)}}class c0 extends n{constructor(X,$,J,Z,Y){super(X,$,J,Z,Y);if(this.type=GX,this.strings!==void 0)throw Error(`A \`<${X.localName}>\` has a \`@${$}=...\` listener with invalid content. Event listeners in templates must have exactly one expression and no surrounding text.`)}_$setValue(X,$=this){if(X=o(this,X,$,0)??M,X===H)return;let J=this._$committedValue,Z=X===M&&J!==M||X.capture!==J.capture||X.once!==J.once||X.passive!==J.passive,Y=X!==M&&(J===M||Z);if(j&&j({kind:"commit event listener",element:this.element,name:this.name,value:X,options:this.options,removeListener:Z,addListener:Y,oldListener:J}),Z)this.element.removeEventListener(this.name,this,J);if(Y)this.element.addEventListener(this.name,this,X);this._$committedValue=X}handleEvent(X){if(typeof this._$committedValue==="function")this._$committedValue.call(this.options?.host??this.element,X);else this._$committedValue.handleEvent(X)}}class l0{constructor(X,$,J){this.element=X,this.type=y0,this._$disconnectableChildren=void 0,this._$parent=$,this.options=J}get _$isConnected(){return this._$parent._$isConnected}_$setValue(X){j&&j({kind:"commit to element binding",element:this.element,value:X,options:this.options}),o(this,X)}}var F2={_boundAttributeSuffix:C0,_marker:w,_markerMatch:h0,_HTML_RESULT:G2,_getTemplateHtml:B2,_TemplateInstance:d0,_isIterable:z2,_resolveDirective:o,_ChildPart:r,_AttributePart:n,_BooleanAttributePart:p0,_EventPart:c0,_PropertyPart:u0,_ElementPart:l0},UX=x.litHtmlPolyfillSupportDevMode;UX?.(Q0,r);(x.litHtmlVersions??=[]).push("3.3.1");if(x.litHtmlVersions.length>1)queueMicrotask(()=>{J0("multiple-versions","Multiple versions of Lit loaded. Loading multiple versions is not recommended.")});var f=(X,$,J)=>{if($==null)throw TypeError(`The container to render into may not be ${$}`);let Z=n2++,Y=J?.renderBefore??$,Q=Y._$litPart$;if(j&&j({kind:"begin render",id:Z,value:X,container:$,options:J,part:Q}),Q===void 0){let z=J?.renderBefore??null;Y._$litPart$=Q=new r($.insertBefore(Z0(),z),z,void 0,J??{})}return Q._$setValue(X),j&&j({kind:"end render",id:Z,value:X,container:$,options:J,part:Q}),Q};f.setSanitizer=t2,f.createSanitizer=T0,f._testOnlyClearSanitizerFactoryDoNotCallOrElse=e2;var M2={};t0(M2,{resolveListenerTarget:()=>o0,reactive:()=>O2,parseAttributeValue:()=>T,isTemplateResult:()=>N0,deserializeCSS:()=>a,callAsync:()=>z0,addTeardown:()=>t,addDecoratorEffect:()=>E,WATCH_HANDLERS:()=>D,SUBSCRIBE_HANDLERS:()=>g,STYLE_METADATA:()=>q0,REACTIVE_FIELDS:()=>V,PROP_ATTRIBUTES:()=>b,LISTEN_HANDLERS:()=>y,DECORATOR_TEARDOWNS:()=>s,DECORATOR_EFFECTS:()=>i,ATTR_HANDLERS:()=>m});function z0(X,$,...J){try{let Z=X.apply($,J);return Z instanceof Promise?Z:Promise.resolve(Z)}catch(Z){return Promise.reject(Z)}}function N0(X){return X!==null&&typeof X==="object"&&"_$litType$"in X}function a(X,$="",J=0){let Z=Object.keys(X),Y="";for(let Q of Z){let z=X[Q];if(typeof z==="object"&&z!==null){if($&&!Q.startsWith("@"))if(Q.startsWith("&"))Y+=`${Q.replace(/&/g,$)} {
17
+ `;else if(Q===":host")Y+=`${$} {
18
+ `;else Y+=`${$} ${Q} {
19
+ `;else Y+=`${Q} {
20
+ `;let q=Object.keys(z);for(let G of q){Y+="\t".repeat(J);let B=z[G];if(typeof B==="object"&&B!==null){let F={};F[G]=B,Y+=a(F,$,J+1)}else Y+=` ${G}: ${B};
21
21
  `}Y+=`}
22
- `}else Y+="\t".repeat(Z),Y+=` ${j}: ${G};
23
- `}return Y}var L=Symbol("pandora:propAttributes"),h=Symbol("pandora:decoratorEffects"),v=Symbol("pandora:decoratorTeardowns"),_=Symbol("pandora:watchHandlers"),P=Symbol("pandora:reactiveFields"),R=Symbol("pandora:listenHandlers"),n=Symbol("pandora:styleMetadata"),C=Symbol("pandora:attrHandlers"),A=Symbol("pandora:subscribeHandlers");function f(J,X){if(!Object.hasOwn(J,h)){let Z=J[h];J[h]=Z?[...Z]:[]}J[h].push(X)}function y(J,X){if(!J[v])J[v]=[];J[v].push(X)}var TJ=new Map;function PX(J){let X=TJ.get(J);if(!X)X=Symbol(`__pandora_reactive_${J}`),TJ.set(J,X);return X}function hJ(J,X,Z={}){let $=PX(X),Y=Z.equals??((j,G)=>j===G);if(Z.initialValue!==void 0&&J[$]===void 0)J[$]=Z.initialValue;Object.defineProperty(J,X,{get(){return J[$]},set(j){let G=J[$];if(Y(G,j))return;if(J[$]=j,Z.onChange)Z.onChange(j,G);if(typeof Symbol.metadata<"u"){let z=J.constructor[Symbol.metadata]?.[_];if(z){for(let W of z)if(W.property===X){let q=J[W.methodName];if(typeof q==="function")q.call(J,j,G)}}}if(typeof J.didChange==="function")J.didChange(X,G,j,"reactive");if(Z.render!==!1&&typeof J._queueRender==="function")J._queueRender()},enumerable:!0,configurable:!0})}function b(J){if(J===null)return;if(J===""||J==="true")return!0;if(J==="false")return!1;if(!isNaN(Number(J)))return J.includes(".")?parseFloat(J):parseInt(J,10);return J}function OJ(J,X,Z){if(X==="window")return window;if(X==="document")return document;if(X&&X!=="self")return Z?Z(X):J.querySelector(X);return J}class O extends HTMLElement{_children;_connected;_isReady;_hasBeenMounted;_initRenderDone;_renderId;_renderQueued;_style;_batching;_batchedChanges;static _tag;static _template;static _observedAttributes=[];static _styleSheet=null;static _sharedStyle={};static _onMount;static _onUnmount;static _onError;static _applyMiddleware;static _hasMiddleware;static _subscribe;static _getGlobalState;static _applyCurrentImplementation;static _activateSubscription(J,X){if(!O._subscribe)return;let Z=J;if(Z[X.unsubKey])Z[X.unsubKey](),Z[X.unsubKey]=void 0;Z[X.unsubKey]=O._subscribe(X.stateKey,(Y)=>{let j=Z[X.valueKey];if(j===Y)return;if(Z[X.valueKey]=Y,J.didChange(X.propertyKey,j,Y,"consumer"),J.isReady)J._queueRender()});let $=O._getGlobalState?.(X.stateKey);if($!==void 0)Z[X.valueKey]=$}static get observedAttributes(){if(typeof Symbol.metadata<"u"){let X=this[Symbol.metadata]?.[L];if(X?.length)return[...new Set([...this._observedAttributes,...X])]}return this._observedAttributes}static set observedAttributes(J){this._observedAttributes=J}static get tag(){if(typeof this._tag>"u"){let J=this.name,X=J.match(/([A-Z])/g);if(X!==null)for(let Z of X)J=J.replace(Z,`-${Z}`.toLowerCase());this._tag=J.slice(1)}return this._tag}static set tag(J){this._tag=J}static get template(){return this._template}static set template(J){if(this._template=J,J!==void 0)document.querySelectorAll(this.tag).forEach((X)=>{if(X instanceof O&&X._isReady)X.forceRender()})}constructor(){super();this._children="",this._connected=!1,this._isReady=!1,this._hasBeenMounted=!1,this._initRenderDone=!1,this._renderId=0,this._renderQueued=!1,this._style={},this._batching=!1,this._batchedChanges=[]}get slotContent(){return this._children}get isConnected(){return this._connected}get isReady(){return this._isReady}get isFirstMount(){return!this._hasBeenMounted}static _registryRegister;static register(){if(O._registryRegister)O._registryRegister(this.tag,this);else window.customElements.define(this.tag,this)}get isBatching(){return this._batching}batch(J){this._batching=!0,this._batchedChanges=[];try{J()}finally{this._batching=!1;let X=this._batchedChanges;if(this._batchedChanges=[],X.length>0){let Z=!1;for(let{property:$,oldValue:Y,newValue:j,shouldRender:G,source:Q}of X){if(Y===j)continue;if(G)Z=!0;if(typeof Symbol.metadata<"u"){let W=this.constructor[Symbol.metadata]?.[_];if(W){for(let q of W)if(q.property===$){let B=this[q.methodName];if(typeof B==="function")B.call(this,j,Y)}}}this.didChange($,Y,j,Q)}if(Z&&this._connected)this._queueRender()}}}_queueRender(){if(this._renderQueued||!this._connected)return;this._renderQueued=!0,queueMicrotask(()=>{if(this._renderQueued=!1,this._connected)this._render().catch((J)=>{let X=this.constructor.tag;if(O._onError)O._onError(J,this,X,"render");else{let Z=this.id?`#${this.id}`:this.className?`.${this.className.split(/\s+/).join(".")}`:"";console.error(`[Pandora] Unhandled render error in <${X}${Z}>:`,J,this)}})})}forceRender(){return this._render()}render(){}_applyLitRender(J){if(!this.hasAttribute("data-lit-rendered"))this.innerHTML="",this.setAttribute("data-lit-rendered","");x(J,this,{host:this})}_applyStringRender(J){if(J===""){this.innerHTML="";return}let X=document.createElement("template");X.innerHTML=J;let Z=X.content.querySelector("slot");if(Z!==null){let $=document.createElement("template");$.innerHTML=this._children,Z.replaceWith($.content),this.innerHTML="",this.appendChild(X.content)}else if(this.innerHTML=J,this._children!==""&&J.indexOf(this._children)===-1)this.innerHTML+=this._children}async _render(){let J=++this._renderId,X=this.constructor,Z=this.render;if(X._template!==void 0)Z=()=>{if(typeof X._template==="function")return X._template.call(this,this);return X._template};let $=await r(Z,this);if(J!==this._renderId)return;if($===void 0||$===null){this._detachListeners(),this._attachListeners(),await r(this.didRender,this);return}let Y=$J($)||$===H?"lit":"string";if(O._hasMiddleware?.("render")&&O._applyMiddleware)$=O._applyMiddleware("render",this,$,Y);if($J($)||$===H)this._applyLitRender($);else this._applyStringRender($.trim());this._detachListeners(),this._attachListeners(),await r(this.didRender,this)}setStyle(J,X=!1){let Z=this.constructor;if(!Z._styleSheet)Z._styleSheet=new CSSStyleSheet;let $="";if(typeof J==="object"){if(!Object.hasOwn(Z,"_sharedStyle"))Z._sharedStyle={};if(!X)Z._sharedStyle={...Z._sharedStyle,...J};else Z._sharedStyle={...J};this._style=Z._sharedStyle,$=m(Z._sharedStyle,Z.tag)}else if(typeof J==="string")if(!X)$=Array.from(Z._styleSheet.cssRules||[]).map((j)=>j.cssText).join(`
22
+ `}else Y+="\t".repeat(J),Y+=` ${Q}: ${z};
23
+ `}return Y}var b=Symbol("pandora:propAttributes"),i=Symbol("pandora:decoratorEffects"),s=Symbol("pandora:decoratorTeardowns"),D=Symbol("pandora:watchHandlers"),V=Symbol("pandora:reactiveFields"),y=Symbol("pandora:listenHandlers"),q0=Symbol("pandora:styleMetadata"),m=Symbol("pandora:attrHandlers"),g=Symbol("pandora:subscribeHandlers");function E(X,$){if(!Object.hasOwn(X,i)){let J=X[i];X[i]=J?[...J]:[]}X[i].push($)}function t(X,$){if(!X[s])X[s]=[];X[s].push($)}var U2=new Map;function OX(X){let $=U2.get(X);if(!$)$=Symbol(`__pandora_reactive_${X}`),U2.set(X,$);return $}function O2(X,$,J={}){let Z=OX($),Y=J.equals??((Q,z)=>Q===z);if(J.initialValue!==void 0&&X[Z]===void 0)X[Z]=J.initialValue;Object.defineProperty(X,$,{get(){return X[Z]},set(Q){let z=X[Z];if(Y(z,Q))return;if(X[Z]=Q,J.onChange)J.onChange(Q,z);if(typeof Symbol.metadata<"u"){let G=X.constructor[Symbol.metadata]?.[D];if(G){for(let B of G)if(B.property===$){let F=X[B.methodName];if(typeof F==="function")F.call(X,Q,z)}}}if(typeof X.didChange==="function")X.didChange($,z,Q,"reactive");if(J.render!==!1&&typeof X._queueRender==="function")X._queueRender()},enumerable:!0,configurable:!0})}function T(X){if(X===null)return;if(X===""||X==="true")return!0;if(X==="false")return!1;if(!isNaN(Number(X)))return X.includes(".")?parseFloat(X):parseInt(X,10);return X}function o0(X,$,J){if($==="window")return window;if($==="document")return document;if($&&$!=="self")return J?J($):X.querySelector($);return X}class k extends HTMLElement{_children;_connected;_isReady;_hasBeenMounted;_initRenderDone;_renderId;_renderQueued;_style;_batching;_batchedChanges;static _tag;static _template;static _observedAttributes=[];static _styleSheet=null;static _sharedStyle={};static _onMount;static _onUnmount;static _onError;static _applyMiddleware;static _hasMiddleware;static _subscribe;static _getGlobalState;static _applyCurrentImplementation;static _activateSubscription(X,$){if(!k._subscribe)return;let J=X;if(J[$.unsubKey])J[$.unsubKey](),J[$.unsubKey]=void 0;J[$.unsubKey]=k._subscribe($.stateKey,(Y)=>{let Q=J[$.valueKey];if(Q===Y)return;if(J[$.valueKey]=Y,X.didChange($.propertyKey,Q,Y,"consumer"),X.isReady)X._queueRender()});let Z=k._getGlobalState?.($.stateKey);if(Z!==void 0)J[$.valueKey]=Z}static get observedAttributes(){if(typeof Symbol.metadata<"u"){let $=this[Symbol.metadata]?.[b];if($?.length)return[...new Set([...this._observedAttributes,...$])]}return this._observedAttributes}static set observedAttributes(X){this._observedAttributes=X}static get tag(){if(typeof this._tag>"u"){let X=this.name,$=X.match(/([A-Z])/g);if($!==null)for(let J of $)X=X.replace(J,`-${J}`.toLowerCase());this._tag=X.slice(1)}return this._tag}static set tag(X){this._tag=X}static get template(){return this._template}static set template(X){if(this._template=X,X!==void 0)document.querySelectorAll(this.tag).forEach(($)=>{if($ instanceof k&&$._isReady)$.forceRender()})}constructor(){super();this._children="",this._connected=!1,this._isReady=!1,this._hasBeenMounted=!1,this._initRenderDone=!1,this._renderId=0,this._renderQueued=!1,this._style={},this._batching=!1,this._batchedChanges=[]}get slotContent(){return this._children}get isConnected(){return this._connected}get isReady(){return this._isReady}get isFirstMount(){return!this._hasBeenMounted}static _registryRegister;static register(){if(k._registryRegister)k._registryRegister(this.tag,this);else window.customElements.define(this.tag,this)}get isBatching(){return this._batching}batch(X){this._batching=!0,this._batchedChanges=[];try{X()}finally{this._batching=!1;let $=this._batchedChanges;if(this._batchedChanges=[],$.length>0){let J=!1;for(let{property:Z,oldValue:Y,newValue:Q,shouldRender:z,source:q}of $){if(Y===Q)continue;if(z)J=!0;if(typeof Symbol.metadata<"u"){let B=this.constructor[Symbol.metadata]?.[D];if(B){for(let F of B)if(F.property===Z){let W=this[F.methodName];if(typeof W==="function")W.call(this,Q,Y)}}}this.didChange(Z,Y,Q,q)}if(J&&this._connected)this._queueRender()}}}_queueRender(){if(this._renderQueued||!this._connected)return;this._renderQueued=!0,queueMicrotask(()=>{if(this._renderQueued=!1,this._connected)this._render().catch((X)=>{let $=this.constructor.tag;if(k._onError)k._onError(X,this,$,"render");else{let J=this.id?`#${this.id}`:this.className?`.${this.className.split(/\s+/).join(".")}`:"";console.error(`[Pandora] Unhandled render error in <${$}${J}>:`,X,this)}})})}forceRender(){return this._render()}render(){}_applyLitRender(X){if(!this.hasAttribute("data-lit-rendered"))this.innerHTML="",this.setAttribute("data-lit-rendered","");f(X,this,{host:this})}_applyStringRender(X){if(X===""){this.innerHTML="";return}let $=document.createElement("template");$.innerHTML=X;let J=$.content.querySelector("slot");if(J!==null){let Z=document.createElement("template");Z.innerHTML=this._children,J.replaceWith(Z.content),this.innerHTML="",this.appendChild($.content)}else if(this.innerHTML=X,this._children!==""&&X.indexOf(this._children)===-1)this.innerHTML+=this._children}async _render(){let X=++this._renderId,$=this.constructor,J=this.render;if($._template!==void 0)J=()=>{if(typeof $._template==="function")return $._template.call(this,this);return $._template};let Z=await z0(J,this);if(X!==this._renderId)return;if(Z===void 0||Z===null){this._detachListeners(),this._attachListeners(),await z0(this.didRender,this);return}let Y=N0(Z)||Z===M?"lit":"string";if(k._hasMiddleware?.("render")&&k._applyMiddleware)Z=k._applyMiddleware("render",this,Z,Y);if(N0(Z)||Z===M)this._applyLitRender(Z);else this._applyStringRender(Z.trim());this._detachListeners(),this._attachListeners(),await z0(this.didRender,this)}setStyle(X,$=!1){let J=this.constructor;if(!J._styleSheet)J._styleSheet=new CSSStyleSheet;let Z="";if(typeof X==="object"){if(!Object.hasOwn(J,"_sharedStyle"))J._sharedStyle={};if(!$)J._sharedStyle={...J._sharedStyle,...X};else J._sharedStyle={...X};this._style=J._sharedStyle,Z=a(J._sharedStyle,J.tag)}else if(typeof X==="string")if(!$)Z=Array.from(J._styleSheet.cssRules||[]).map((Q)=>Q.cssText).join(`
24
24
  `)+`
25
- `+J;else $=J,Z._sharedStyle={},this._style={};if(Z._styleSheet.replaceSync($),!document.adoptedStyleSheets.includes(Z._styleSheet))document.adoptedStyleSheets=[...document.adoptedStyleSheets,Z._styleSheet];return Z._sharedStyle}on(J,X,Z){return this.addEventListener(J,X,Z),this}off(J,X,Z){return this.removeEventListener(J,X,Z),this}once(J,X,Z){let $=typeof Z==="boolean"?{capture:Z,once:!0}:{...Z,once:!0};return this.addEventListener(J,X,$),this}emit(J,X,Z){let $=new CustomEvent(J,{detail:X,bubbles:!0,cancelable:!0,composed:!0,...Z});return this.dispatchEvent($)}query(J){return this.querySelector(J)}queryAll(J){return this.querySelectorAll(J)}_readyCallbacks;ready(J){if(this._isReady)queueMicrotask(J);else this._readyCallbacks??=[],this._readyCallbacks.push(J)}async willMount(){}async didMount(){}async didRender(){}async didReconnect(){}async willUnmount(){}async didUnmount(){}didChange(J,X,Z,$){}async connectedCallback(){let J=this.constructor,X=J.tag;try{if(this._connected=!0,this.dataset.component=X,O._applyCurrentImplementation?.(this,X),typeof Symbol.metadata<"u"){let Y=this.constructor[Symbol.metadata]?.[A];if(Y)for(let j of Y)O._activateSubscription(this,j)}let Z=!this._hasBeenMounted;if(Z)this._children=this.innerHTML.trim();if(Z&&J._template===void 0){let $=document.querySelector(`template#${X}`);if($)J._template=$.innerHTML}if(Z&&typeof Symbol.metadata<"u"){let Y=J[Symbol.metadata]?.[n];if(Y)this.setStyle(Y,!0)}if(await this.willMount(),await this._render(),this._initRenderDone=!0,Z)await this.didMount();else await this.didReconnect();if(this._hasBeenMounted=!0,this._isReady=!0,this._readyCallbacks){for(let $ of this._readyCallbacks)$();this._readyCallbacks=void 0}O._onMount?.(this,X),this.emit("pandora:ready",{firstMount:Z,tag:X},{bubbles:!0,composed:!0})}catch(Z){if(O._onError)O._onError(Z,this,X,"connectedCallback");else throw Z}}async disconnectedCallback(){let J=this.constructor,X=J.tag;try{if(this.emit("pandora:unmount",{tag:X},{bubbles:!0,composed:!0}),typeof Symbol.metadata<"u"){let $=J[Symbol.metadata]?.[A];if($){let Y=this;for(let j of $)if(Y[j.unsubKey])Y[j.unsubKey](),Y[j.unsubKey]=void 0}}this._detachListeners(),await this.willUnmount(),await this.didUnmount(),this._connected=!1,this._isReady=!1,O._onUnmount?.(this,X)}catch(Z){if(O._onError)O._onError(Z,this,X,"disconnectedCallback");else throw Z}}attributeChangedCallback(J,X,Z){if(typeof Symbol.metadata>"u")return;let Y=this.constructor[Symbol.metadata],j=Y?.[C];if(!j)return;let G=this;for(let Q of j){if(Q.attrName!==J)continue;if(G[Q.settingKey])continue;let z=Z!==null?b(Z):void 0,W=G[Q.valueKey];if(Q.equals(W,z))continue;G[Q.valueKey]=z;let q=Y?.[_];if(q){for(let B of q)if(B.property===Q.propertyKey){let U=this[B.methodName];if(typeof U==="function")U.call(this,z,W)}}if(this.didChange(Q.propertyKey,W,z,"prop-attribute"),Q.shouldRender&&this._initRenderDone&&this._connected)this._queueRender()}}_activeListeners=[];_attachListeners(){if(typeof Symbol.metadata>"u")return;let X=this.constructor[Symbol.metadata]?.[R];if(!X)return;for(let Z of X){let $=this[Z.methodName];if(typeof $!=="function")continue;let Y=$.bind(this),j=Z.options,G=OJ(this,j?.target,(W)=>this.query(W));if(!G)continue;let Q={};if(j?.capture)Q.capture=!0;if(j?.passive)Q.passive=!0;let z;if(j?.delegate){let W=j.delegate,q=j?.once;z=(B)=>{if(B.target?.closest(W)){if(Y(B),q)G.removeEventListener(Z.event,z,Q),this._activeListeners=this._activeListeners.filter((F)=>F.handler!==z)}}}else if(z=Y,j?.once)Q.once=!0;G.addEventListener(Z.event,z,Q),this._activeListeners.push({target:G,event:Z.event,handler:z,options:Q})}}_detachListeners(){for(let{target:J,event:X,handler:Z,options:$}of this._activeListeners)J.removeEventListener(X,Z,$);this._activeListeners=[]}}var D=O;class gJ extends D{_shadowDOM;static _styleSheet=null;static _sharedStyle={};constructor(){super();this._shadowDOM=this.attachShadow({mode:"open"})}setStyle(J,X=!1){let Z=this.constructor;if(!Z._styleSheet)Z._styleSheet=new CSSStyleSheet;let $="";if(typeof J==="object"){if(!Object.hasOwn(Z,"_sharedStyle"))Z._sharedStyle={};if(!X)Z._sharedStyle={...Z._sharedStyle,...J};else Z._sharedStyle={...J};this._style=Z._sharedStyle,$=m(Z._sharedStyle)}else if(typeof J==="string")if(!X)$=Array.from(Z._styleSheet.cssRules||[]).map((j)=>j.cssText).join(`
25
+ `+X;else Z=X,J._sharedStyle={},this._style={};if(J._styleSheet.replaceSync(Z),!document.adoptedStyleSheets.includes(J._styleSheet))document.adoptedStyleSheets=[...document.adoptedStyleSheets,J._styleSheet];return J._sharedStyle}on(X,$,J){return this.addEventListener(X,$,J),this}off(X,$,J){return this.removeEventListener(X,$,J),this}once(X,$,J){let Z=typeof J==="boolean"?{capture:J,once:!0}:{...J,once:!0};return this.addEventListener(X,$,Z),this}emit(X,$,J){let Z=new CustomEvent(X,{detail:$,bubbles:!0,cancelable:!0,composed:!0,...J});return this.dispatchEvent(Z)}query(X){return this.querySelector(X)}queryAll(X){return this.querySelectorAll(X)}_readyCallbacks;ready(X){if(this._isReady)queueMicrotask(X);else this._readyCallbacks??=[],this._readyCallbacks.push(X)}async willMount(){}async didMount(){}async didRender(){}async didReconnect(){}async willUnmount(){}async didUnmount(){}didChange(X,$,J,Z){}async connectedCallback(){let X=this.constructor,$=X.tag;try{if(this._connected=!0,this.dataset.component=$,k._applyCurrentImplementation?.(this,$),typeof Symbol.metadata<"u"){let Y=this.constructor[Symbol.metadata]?.[g];if(Y)for(let Q of Y)k._activateSubscription(this,Q)}let J=!this._hasBeenMounted;if(J)this._children=this.innerHTML.trim();if(J&&X._template===void 0){let Z=document.querySelector(`template#${$}`);if(Z)X._template=Z.innerHTML}if(J&&typeof Symbol.metadata<"u"){let Y=X[Symbol.metadata]?.[q0];if(Y)this.setStyle(Y,!0)}if(await this.willMount(),await this._render(),this._initRenderDone=!0,J)await this.didMount();else await this.didReconnect();if(this._hasBeenMounted=!0,this._isReady=!0,this._readyCallbacks){for(let Z of this._readyCallbacks)Z();this._readyCallbacks=void 0}k._onMount?.(this,$),this.emit("pandora:ready",{firstMount:J,tag:$},{bubbles:!0,composed:!0})}catch(J){if(k._onError)k._onError(J,this,$,"connectedCallback");else throw J}}async disconnectedCallback(){let X=this.constructor,$=X.tag;try{if(this.emit("pandora:unmount",{tag:$},{bubbles:!0,composed:!0}),typeof Symbol.metadata<"u"){let Z=X[Symbol.metadata]?.[g];if(Z){let Y=this;for(let Q of Z)if(Y[Q.unsubKey])Y[Q.unsubKey](),Y[Q.unsubKey]=void 0}}this._detachListeners(),await this.willUnmount(),await this.didUnmount(),this._connected=!1,this._isReady=!1,k._onUnmount?.(this,$)}catch(J){if(k._onError)k._onError(J,this,$,"disconnectedCallback");else throw J}}attributeChangedCallback(X,$,J){if(typeof Symbol.metadata>"u")return;let Y=this.constructor[Symbol.metadata],Q=Y?.[m];if(!Q)return;let z=this;for(let q of Q){if(q.attrName!==X)continue;if(z[q.settingKey])continue;let G=J!==null?T(J):void 0,B=z[q.valueKey];if(q.equals(B,G))continue;z[q.valueKey]=G;let F=Y?.[D];if(F){for(let W of F)if(W.property===q.propertyKey){let O=this[W.methodName];if(typeof O==="function")O.call(this,G,B)}}if(this.didChange(q.propertyKey,B,G,"prop-attribute"),q.shouldRender&&this._initRenderDone&&this._connected)this._queueRender()}}_activeListeners=[];_attachListeners(){if(typeof Symbol.metadata>"u")return;let $=this.constructor[Symbol.metadata]?.[y];if(!$)return;for(let J of $){let Z=this[J.methodName];if(typeof Z!=="function")continue;let Y=Z.bind(this),Q=J.options,z=o0(this,Q?.target,(B)=>this.query(B));if(!z)continue;let q={};if(Q?.capture)q.capture=!0;if(Q?.passive)q.passive=!0;let G;if(Q?.delegate){let B=Q.delegate,F=Q?.once;G=(W)=>{if(W.target?.closest(B)){if(Y(W),F)z.removeEventListener(J.event,G,q),this._activeListeners=this._activeListeners.filter((U)=>U.handler!==G)}}}else if(G=Y,Q?.once)q.once=!0;z.addEventListener(J.event,G,q),this._activeListeners.push({target:z,event:J.event,handler:G,options:q})}}_detachListeners(){for(let{target:X,event:$,handler:J,options:Z}of this._activeListeners)X.removeEventListener($,J,Z);this._activeListeners=[]}}var A=k;class j2 extends A{_shadowDOM;static _styleSheet=null;static _sharedStyle={};constructor(){super();this._shadowDOM=this.attachShadow({mode:"open"})}setStyle(X,$=!1){let J=this.constructor;if(!J._styleSheet)J._styleSheet=new CSSStyleSheet;let Z="";if(typeof X==="object"){if(!Object.hasOwn(J,"_sharedStyle"))J._sharedStyle={};if(!$)J._sharedStyle={...J._sharedStyle,...X};else J._sharedStyle={...X};this._style=J._sharedStyle,Z=a(J._sharedStyle)}else if(typeof X==="string")if(!$)Z=Array.from(J._styleSheet.cssRules||[]).map((Q)=>Q.cssText).join(`
26
26
  `)+`
27
- `+J;else $=J,Z._sharedStyle={},this._style={};return Z._styleSheet.replaceSync($),this._shadowDOM.adoptedStyleSheets=[Z._styleSheet],Z._sharedStyle}_applyLitRender(J){x(J,this._shadowDOM,{host:this})}_applyStringRender(J){while(this._shadowDOM.firstChild)this._shadowDOM.firstChild.remove();if(J==="")return;let X=document.createElement("template");X.innerHTML=J,this._shadowDOM.appendChild(X.content)}get shadowRoot(){return this._shadowDOM}set shadowRoot(J){throw Error("ShadowComponent shadowRoot can not be overwritten.")}query(J){return this._shadowDOM.querySelector(J)}queryAll(J){return this._shadowDOM.querySelectorAll(J)}}var DX=gJ;var dJ=Symbol("pandora:appliedImpl");class a{static _debug=!1;static components={};static implementations={};static state={};static subscribers={};static mountCallbacks=new Set;static unmountCallbacks=new Set;static errorCallbacks=new Set;static aliases={};static lazyLoaders={};static lazyLoadPromises={};static middleware={render:new Set};static _initialized=!1;static _init(){if(this._initialized)return;this._initialized=!0,D._onMount=(J,X)=>this._notifyMount(J,X),D._onUnmount=(J,X)=>this._notifyUnmount(J,X),D._onError=(J,X,Z,$)=>this._notifyError(J,X,Z,$),D._applyMiddleware=(J,X,Z,$)=>this._applyMiddleware(J,X,Z,$),D._hasMiddleware=(J)=>this._hasMiddleware(J),D._subscribe=(J,X)=>this.subscribe(J,X),D._getGlobalState=(J)=>this.getState(J),D._applyCurrentImplementation=(J,X)=>{let Z=this.implementations[X];if(!Z)return;let j=J[dJ]??J.constructor;if(Z===j)return;this._applyImplementation(J,Z,!1)}}static register(J,X){if(this._init(),typeof this.components[J]>"u")this.components[J]=X,this.implementations[J]=X,X.tag=J,window.customElements.define(J,X),this.components[J]._registered=!0,this.log(`Registered: <${J}>`);else throw Error("A component with this tag has already been registered. Use the evolve() function to modify the component.")}static define(J,X){this.register(J,X)}static getImplementation(J){return this.implementations[J]||this.components[J]}static _applyImplementation(J,X,Z=!1){let $=X.prototype,Y=Object.getOwnPropertyNames($),j=J;J[dJ]=X;for(let G of Y){if(G==="constructor")continue;let Q=Object.getOwnPropertyDescriptor($,G);if(!Q)continue;if(typeof Q.value==="function")j[G]=Q.value.bind(J);else if(Q.get||Q.set)Object.defineProperty(Object.getPrototypeOf(J),G,Q)}try{let G=customElements.get(X.tag)??X,Q=Reflect.construct(X,[],G);for(let z of Object.keys(Q))if(!(z in j)||j[z]===void 0)j[z]=Q[z]}catch(G){console.warn(`[Pandora] Could not construct temp instance of <${X.tag}> for default extraction:`,G)}if(typeof Symbol.metadata<"u"){let G=X[Symbol.metadata];if(G){let Q=J.constructor;Q[Symbol.metadata]=G}}if(typeof Symbol.metadata<"u"){let Q=X[Symbol.metadata]?.[h];if(Q?.length){let z=j[v];if(z)for(let W of z)W();j[v]=[];for(let W of Q)W(J)}}}static evolve(J,X,Z=!1){if(typeof this.components[J]>"u")throw Error("No component with this tag has been registered. Cannot Evolve.");this.implementations[J]=X,X._registered=!0;let $=[];for(let[Y,j]of Object.entries(this.aliases))if(j===J)$.push(Y),this.implementations[Y]=X;if(this.log(`Evolved: <${J}>`),Z){let Y=[J,...$];for(let j of Y)document.querySelectorAll(j).forEach((G)=>{if(G instanceof D&&G.isReady)this._applyImplementation(G,X,!0),G.forceRender()})}}static instances(J,X){if(typeof this.components[J]>"u")throw Error("No component with the provided tag has been registered.");if(typeof X==="function")document.querySelectorAll(J).forEach(X);else return document.querySelectorAll(J)}static instantiate(J,X){if(!this.has(J))throw Error(`No component with tag "${J}" has been registered.`);if(!this.components[J]._registered)this.register(J,this.components[J]);let Z=document.createElement(this.components[J].tag);for(let[$,Y]of Object.entries(X)){if(Y===void 0||Y===null)continue;if(Z[$]=Y,Object.getOwnPropertyDescriptor(Z,$)?.set!==void 0)continue;if(typeof Y==="boolean"){if(Y)Z.setAttribute($,"")}else if(typeof Y==="string"||typeof Y==="number")Z.setAttribute($,String(Y))}return Z}static has(J){return typeof this.components[J]<"u"}static get(J){return this.components[J]}static setState(J,X){let Z=this.state[J];if(this.state[J]=X,this.subscribers[J])this.subscribers[J].forEach(($)=>{$(X,Z)})}static getState(J){return this.state[J]}static hasState(J){return J in this.state}static deleteState(J){if(J in this.state){let X=this.state[J];if(delete this.state[J],this.subscribers[J])this.subscribers[J].forEach((Z)=>{Z(void 0,X)});return!0}return!1}static subscribe(J,X){if(!this.subscribers[J])this.subscribers[J]=new Set;return this.subscribers[J].add(X),()=>{this.unsubscribe(J,X)}}static unsubscribe(J,X){if(this.subscribers[J])this.subscribers[J].delete(X)}static getAllState(){return{...this.state}}static clearState(){let J=Object.keys(this.state);for(let X of J)this.deleteState(X)}static clearSubscriptions(){for(let J of Object.keys(this.subscribers))this.subscribers[J]=new Set}static clearMiddleware(){for(let J of Object.keys(this.middleware))this.middleware[J]=new Set}static get debug(){return this._debug}static set debug(J){this._debug=J}static log(J,X){if(this._debug)if(X!==void 0)console.log(`[Pandora] ${J}`,X);else console.log(`[Pandora] ${J}`)}static list(){return Object.keys(this.components)}static stats(J){if(J){if(!this.has(J))throw Error(`No component with tag "${J}" has been registered.`);return{tag:J,instanceCount:document.querySelectorAll(J).length,isRegistered:this.components[J]?._registered??!1,isLazy:J in this.lazyLoaders}}return this.list().map((X)=>({tag:X,instanceCount:document.querySelectorAll(X).length,isRegistered:this.components[X]?._registered??!1,isLazy:X in this.lazyLoaders}))}static onMount(J){return this._init(),this.mountCallbacks.add(J),()=>this.mountCallbacks.delete(J)}static onUnmount(J){return this._init(),this.unmountCallbacks.add(J),()=>this.unmountCallbacks.delete(J)}static _notifyMount(J,X){this.log(`Mounted: <${X}>`),this.mountCallbacks.forEach((Z)=>{try{Z(J,X)}catch($){console.error("[Pandora] Error in onMount callback:",$)}})}static _notifyUnmount(J,X){this.log(`Unmounted: <${X}>`),this.unmountCallbacks.forEach((Z)=>{try{Z(J,X)}catch($){console.error("[Pandora] Error in onUnmount callback:",$)}})}static onError(J){return this._init(),this.errorCallbacks.add(J),()=>this.errorCallbacks.delete(J)}static _notifyError(J,X,Z,$){if(this.log(`Error in <${Z}> during ${$}:`,J),this.errorCallbacks.size===0)throw J;this.errorCallbacks.forEach((Y)=>{try{Y(J,X,Z,$)}catch(j){console.error("[Pandora] Error in onError callback:",j)}})}static alias(J,X){if(!this.has(X))throw Error(`Cannot create alias: no component with tag "${X}" has been registered.`);if(this.has(J))throw Error(`Cannot create alias: a component with tag "${J}" already exists.`);this.aliases[J]=X;let Z=this.getImplementation(X)??this.components[X],$=class extends Z{static _tag=J};this.components[J]=$,this.implementations[J]=$,window.customElements.define(J,$),$._registered=!0,this.log(`Created alias: <${J}> -> <${X}>`)}static getOriginalTag(J){return this.aliases[J]}static isAlias(J){return J in this.aliases}static lazy(J,X){if(this._init(),this.has(J))throw Error(`Cannot register lazy component: a component with tag "${J}" already exists.`);this.lazyLoaders[J]=X;let Z=a;class $ extends D{static _tag=J;_lazyLoaded=!1;async connectedCallback(){await Z._loadLazyComponent(J);let Y=Z.getImplementation(J);if(Y&&Y!==$)a._applyImplementation(this,Y,!1),this._lazyLoaded=!0;await super.connectedCallback()}}this.components[J]=$,window.customElements.define(J,$),this.log(`Registered lazy component: <${J}>`)}static async _loadLazyComponent(J){if(this.lazyLoadPromises[J])return this.lazyLoadPromises[J];if(!(J in this.lazyLoaders))return;let X=this.lazyLoaders[J];return this.log(`Loading lazy component: <${J}>`),this.lazyLoadPromises[J]=(async()=>{try{let Z=await X(),$="default"in Z?Z.default:Z;delete this.lazyLoaders[J],this.implementations[J]=$,$._registered=!0,this.log(`Loaded lazy component: <${J}>`)}catch(Z){throw console.error(`[Pandora] Failed to load lazy component <${J}>:`,Z),Z}finally{delete this.lazyLoadPromises[J]}})(),this.lazyLoadPromises[J]}static isLazy(J){return J in this.lazyLoaders}static async preload(J){if(this.isLazy(J))await this._loadLazyComponent(J)}static use(J,X){return this._init(),this.middleware[J].add(X),()=>this.middleware[J].delete(X)}static _applyMiddleware(J,X,Z,$){let Y=Z;return this.middleware[J].forEach((j)=>{try{Y=j(X,Y,$)}catch(G){console.error(`[Pandora] Error in ${J} middleware:`,G)}}),Y}static _hasMiddleware(J){return this.middleware[J].size>0}}D._registryRegister=(J,X)=>a.register(J,X);var I=a;Symbol.metadata??=Symbol("Symbol.metadata");function LX(J,X){return function(Z,$){let Y=$.metadata;if(Y?.[L]){if(!Object.hasOwn(Z,"_observedAttributes"))Z._observedAttributes=[];for(let j of Y[L])if(!Z._observedAttributes.includes(j))Z._observedAttributes.push(j)}if(Y&&Z[Symbol.metadata]===void 0)Z[Symbol.metadata]=Y;if(Z.tag=J,!X?.defer)I.register(J,Z);return Z}}function IX(J){return function(X,Z){let $=Z.metadata;return $[n]=J,X}}function kX(J){return function(X,Z){let $=String(Z.name),Y=Z.metadata;if(!Object.hasOwn(Y,_)){let G=Y[_];Y[_]=G?[...G]:[]}Y[_].push({property:J,methodName:$});let j=!1;Z.addInitializer(function(){if(j)return;j=!0;let G=Y[P];if(!G||!G.has(J)){let Q=this?.constructor?.name??"<anonymous>";console.warn(`[Pandora] @Watch('${J}') on ${Q}.${$}(): '${J}' has no @State, @Attribute, or @Property decorator. Add one of those decorators to '${J}', or call reactive(this, '${J}') in the constructor — otherwise the watcher will never fire.`)}})}}function iJ(J,X){if(typeof Symbol.metadata>"u")return[];let $=J.constructor[Symbol.metadata]?.[_];if(!$)return[];let Y=[];for(let j of $)if(j.property===X){let G=J[j.methodName];if(typeof G==="function")Y.push(G.bind(J))}return Y}var fX=new Set(["hidden","title","slot","style","id","className","tabIndex","dir","lang","draggable","contentEditable","accessKey","innerHTML","outerHTML","textContent","innerText"]);function _J(J,X){if(fX.has(X))console.warn(`[Pandora] @${J}('${X}') conflicts with HTMLElement.${X}. This may cause unexpected behavior. Consider renaming to avoid the conflict.`)}function VX(J){return function(X,Z){let $=String(Z.name);_J("State",$);let Y=J?.render!==!1,j=Symbol(`__pandora_state_${$}`),G,Q=!1,z=Z.metadata;if(!Object.hasOwn(z,P)){let W=z[P];z[P]=W?new Set(W):new Set}z[P].add($),f(z,(W)=>{if(YJ(W,$,j,Y),Q&&W[j]===void 0)W[j]=G}),Z.addInitializer(function(){let W=this,q=W[$];if(YJ(W,$,j,Y),q!==void 0){if(W[j]=q,!Q)G=q,Q=!0}})}}function YJ(J,X,Z,$,Y="state",j=(G,Q)=>G===Q){oJ(J,X,Z),Object.defineProperty(J,X,{get(){return J[Z]},set(G){let Q=J[Z];if(j(Q,G))return;if(J[Z]=G,J._batching){let W=J._batchedChanges,q=W.find((B)=>B.property===X);if(q){if(q.newValue=G,$)q.shouldRender=!0}else W.push({property:X,oldValue:Q,newValue:G,shouldRender:$,source:Y});return}let z=iJ(J,X);for(let W of z)W(G,Q);if(J.didChange(X,Q,G,Y),$&&J._initRenderDone&&J.isConnected)J._queueRender()},enumerable:!0,configurable:!0}),y(J,()=>{delete J[X]})}function SX(J){return function(X,Z){let $=String(Z.name);_J("Property",$);let Y=Symbol(`__pandora_property_${$}`),j=J?.equals??((q,B)=>q===B),G=J?.attribute??!1,Q,z=!1,W=Z.metadata;if(!Object.hasOwn(W,P)){let q=W[P];W[P]=q?new Set(q):new Set}if(W[P].add($),G!==!1){let q=Symbol(`__pandora_propSetting_${$}`);if(!Object.hasOwn(W,L)){let B=W[L];W[L]=B?[...B]:[]}if(!W[L].includes(G))W[L].push(G);sJ(W,{attrName:G,propertyKey:$,valueKey:Y,settingKey:q,shouldRender:!1,equals:j}),f(W,(B)=>{if(GJ(B,G,$,Y,q,!1,j),z&&B[Y]===void 0)if(B.hasAttribute(G))B[Y]=b(B.getAttribute(G));else B[Y]=Q,jJ(B,G,Q)}),Z.addInitializer(function(){let B=this,U=B[$],F=B.hasAttribute(G),V=F?b(B.getAttribute(G)):void 0;if(GJ(B,G,$,Y,q,!1,j),U!==void 0&&!z)Q=U,z=!0;if(F)B[Y]=V;else if(U!==void 0)B[Y]=U,jJ(B,G,U)})}else f(W,(q)=>{if(YJ(q,$,Y,!1,"property",j),z&&q[Y]===void 0)q[Y]=Q}),Z.addInitializer(function(){let q=this,B=q[$];if(YJ(q,$,Y,!1,"property",j),B!==void 0){if(q[Y]=B,!z)Q=B,z=!0}})}}function bX(J){return function(X,Z){let $=String(Z.name);_J("Attribute",$);let Y,j=!0;if(typeof J==="object")Y=$,j=J.render!==!1;else Y=J??$;let G=Symbol(`__pandora_attr_${$}`),Q=Z.metadata;if(!Object.hasOwn(Q,P)){let q=Q[P];Q[P]=q?new Set(q):new Set}Q[P].add($);let z,W=!1;{let q=Symbol(`__pandora_propSetting_${$}`);if(!Object.hasOwn(Q,L)){let B=Q[L];Q[L]=B?[...B]:[]}if(!Q[L].includes(Y))Q[L].push(Y);sJ(Q,{attrName:Y,propertyKey:$,valueKey:G,settingKey:q,shouldRender:j,equals:(B,U)=>B===U}),f(Q,(B)=>{if(GJ(B,Y,$,G,q,j),W&&B[G]===void 0)if(B.hasAttribute(Y))B[G]=b(B.getAttribute(Y));else B[G]=z,jJ(B,Y,z)}),Z.addInitializer(function(){let B=this,U=B[$],F=B.hasAttribute(Y),V=F?b(B.getAttribute(Y)):void 0;if(GJ(B,Y,$,G,q,j),U!==void 0&&!W)z=U,W=!0;if(F)B[G]=V;else if(U!==void 0)B[G]=U,jJ(B,Y,U)})}}}function oJ(J,X,Z){let $=Object.getOwnPropertyDescriptor(J,X);if($&&"value"in $&&$.value!==void 0&&J[Z]===void 0)J[Z]=$.value}function sJ(J,X){if(!Object.hasOwn(J,C)){let Z=J[C];J[C]=Z?[...Z]:[]}J[C].push(X)}function jJ(J,X,Z){if(typeof Z==="boolean")if(Z)J.setAttribute(X,"");else J.removeAttribute(X);else if(typeof Z==="string"||typeof Z==="number")J.setAttribute(X,String(Z))}function GJ(J,X,Z,$,Y,j=!0,G=(Q,z)=>Q===z){if(oJ(J,Z,$),Object.defineProperty(J,Z,{get(){if(J[$]!==void 0)return J[$];if(J.hasAttribute(X))return b(J.getAttribute(X));return},set(Q){let z=J[$];if(J[$]=Q,J[Y]=!0,Q===void 0||Q===null)J.removeAttribute(X);else if(typeof Q==="string"||typeof Q==="number"||typeof Q==="boolean")if(typeof Q==="boolean")if(Q)J.setAttribute(X,"");else J.removeAttribute(X);else J.setAttribute(X,String(Q));if(J[Y]=!1,!G(z,Q))if(J._batching){let W=J._batchedChanges,q=W.find((B)=>B.property===Z);if(q){if(q.newValue=Q,j)q.shouldRender=!0}else W.push({property:Z,oldValue:z,newValue:Q,shouldRender:j,source:"prop"})}else{let W=iJ(J,Z);for(let q of W)q(Q,z);if(J.didChange(Z,z,Q,"prop"),j&&J._initRenderDone&&J.isConnected)J._queueRender()}},enumerable:!0,configurable:!0}),J.isConnected&&J.hasAttribute(X))J[$]=b(J.getAttribute(X));y(J,()=>{delete J[Z]})}function NX(J){return function(X,Z){let $=String(Z.name),Y=Symbol(`__pandora_unsub_${$}`),j=Symbol(`__pandora_value_${$}`),G=Z.metadata;if(!Object.hasOwn(G,P)){let Q=G[P];G[P]=Q?new Set(Q):new Set}if(G[P].add($),!Object.hasOwn(G,A)){let Q=G[A];G[A]=Q?[...Q]:[]}G[A].push({stateKey:J,propertyKey:$,unsubKey:Y,valueKey:j}),f(G,(Q)=>{mJ(Q,J,$,Y,j)}),Z.addInitializer(function(){mJ(this,J,$,Y,j)})}}function mJ(J,X,Z,$,Y){if(Object.defineProperty(J,Z,{get(){return J[Y]},set(j){let G=J[Y];if(G===j)return;if(J[Y]=j,I.setState(X,j),J.didChange(Z,G,j,"consumer"),J.isReady)J._queueRender()},enumerable:!0,configurable:!0}),J.isConnected)D._activateSubscription?.(J,{stateKey:X,propertyKey:Z,unsubKey:$,valueKey:Y});y(J,()=>{if(J[$])J[$](),J[$]=void 0;delete J[Z]})}function AX(J){return function(X,Z){let $=String(Z.name),Y=Z.metadata;f(Y,(j)=>{yJ(j,$,J)}),Z.addInitializer(function(){yJ(this,$,J)})}}function wX(J){return function(X,Z){let $=String(Z.name),Y=Z.metadata;f(Y,(j)=>{uJ(j,$,J)}),Z.addInitializer(function(){uJ(this,$,J)})}}function yJ(J,X,Z){Object.defineProperty(J,X,{get(){return J.query(Z)},enumerable:!0,configurable:!0})}function uJ(J,X,Z){Object.defineProperty(J,X,{get(){return J.queryAll(Z)},enumerable:!0,configurable:!0})}function xX(J){return function(X,Z){let $=String(Z.name),Y=J?`slot[name="${J}"]`:"slot:not([name])",j=Z.metadata;f(j,(G)=>{pJ(G,$,Y)}),Z.addInitializer(function(){pJ(this,$,Y)})}}function pJ(J,X,Z){Object.defineProperty(J,X,{get(){return(J._shadowDOM||J.shadowRoot)?.querySelector(Z)??null},enumerable:!0,configurable:!0})}function RX(J,X){return function(Z,$){let Y=String($.name),j=$.metadata;if(!Object.hasOwn(j,R)){let G=j[R];j[R]=G?[...G]:[]}j[R].push({event:J,methodName:Y,options:X})}}function CX(...J){return function(X,Z){let $=String(Z.name),Y=Symbol(`__pandora_computed_cache_${$}`),j=Symbol(`__pandora_computed_valid_${$}`),G=Z.metadata;for(let z of J){if(!Object.hasOwn(G,_)){let W=G[_];G[_]=W?[...W]:[]}G[_].push({property:z,methodName:`__invalidate_${$}`})}let Q=X;return f(G,(z)=>{cJ(z,$,Y,j,Q)}),Z.addInitializer(function(){cJ(this,$,Y,j,Q)}),X}}function cJ(J,X,Z,$,Y){J[`__invalidate_${X}`]=()=>{J[$]=!1},Object.defineProperty(J,X,{get(){if(!J[$])J[Z]=Y.call(J),J[$]=!0;return J[Z]},enumerable:!0,configurable:!0})}function KX(J){return function(X,Z){let $=Z.metadata,Y=[],j=[];for(let[Q,z]of Object.entries(J))if(typeof z==="string"){if(Y.push({className:Q,propertyName:z}),!Object.hasOwn($,_)){let q=$[_];$[_]=q?[...q]:[]}let W=`__classlist_${Q}_${z}`;$[_].push({property:z,methodName:W}),X.prototype[W]=function(){this.classList.toggle(Q,!!this[z])}}else j.push({className:Q,conditionFn:z});if(j.length>0){let Q=X.prototype.didChange;X.prototype.didChange=function(z,W,q,B){Q?.call(this,z,W,q,B);for(let{className:U,conditionFn:F}of j)this.classList.toggle(U,F(this))}}let G=X.prototype.connectedCallback;return X.prototype.connectedCallback=async function(){await G?.call(this);for(let{className:Q,propertyName:z}of Y)this.classList.toggle(Q,!!this[z]);for(let{className:Q,conditionFn:z}of j)this.classList.toggle(Q,z(this))},X}}function EX(J){return function(X,Z){let $=String(Z.name),Y=Z.metadata;f(Y,(j)=>{lJ(j,$,J)}),Z.addInitializer(function(){lJ(this,$,J)})}}function lJ(J,X,Z){Object.defineProperty(J,X,{value:($)=>{return J.emit(Z,$)},writable:!1,enumerable:!0,configurable:!0})}function TX(J,X){if(X!==void 0&&!I.hasState(J))I.setState(J,X);return{key:J,get(){return I.getState(J)},set(Z){I.setState(J,Z)},subscribe(Z){return I.subscribe(J,Z)},has(){return I.hasState(J)},delete(){I.deleteState(J)}}}var nJ={};PJ(nJ,{whenReady:()=>rJ,resetRegistry:()=>vX,mount:()=>gX,flush:()=>hX});async function hX(){await new Promise((J)=>queueMicrotask(J)),await new Promise((J)=>queueMicrotask(J))}function rJ(J,X=5000){let Z=J;if(Z.isReady)return Promise.resolve();return new Promise(($,Y)=>{let j=setTimeout(()=>{Y(Error(`Component <${J.tagName.toLowerCase()}> did not become ready within ${X}ms`))},X),G=()=>{if(Z.isReady)clearTimeout(j),$();else requestAnimationFrame(G)};requestAnimationFrame(G)})}function vX(){I.clearState(),I.clearSubscriptions(),I.clearMiddleware()}async function gX(J,X,Z){let $=X??document.body,Y=document.createElement("div");Y.innerHTML=`<${J}>${Z??""}</${J}>`;let j=Y.firstElementChild;return $.appendChild(j),await rJ(j),j}var dX={};export{nJ as testing,HX as svg,x as render,hJ as reactive,H as nothing,g as noChange,FX as html,TX as createState,y as addTeardown,f as addDecoratorEffect,kX as Watch,vJ as Util,dX as Types,NX as Subscribe,IX as Style,VX as State,xX as Slot,DX as ShadowComponent,I as Registry,LX as Register,wX as QueryAll,AX as Query,SX as Property,RX as Listen,EX as Emitter,CX as Computed,D as Component,KX as ClassList,bX as Attribute};
27
+ `+X;else Z=X,J._sharedStyle={},this._style={};return J._styleSheet.replaceSync(Z),this._shadowDOM.adoptedStyleSheets=[J._styleSheet],J._sharedStyle}_applyLitRender(X){f(X,this._shadowDOM,{host:this})}_applyStringRender(X){while(this._shadowDOM.firstChild)this._shadowDOM.firstChild.remove();if(X==="")return;let $=document.createElement("template");$.innerHTML=X,this._shadowDOM.appendChild($.content)}get shadowRoot(){return this._shadowDOM}set shadowRoot(X){throw Error("ShadowComponent shadowRoot can not be overwritten.")}query(X){return this._shadowDOM.querySelector(X)}queryAll(X){return this._shadowDOM.querySelectorAll(X)}}var MX=j2;var H2=Symbol("pandora:appliedImpl");class G0{static _debug=!1;static components={};static implementations={};static state={};static subscribers={};static mountCallbacks=new Set;static unmountCallbacks=new Set;static errorCallbacks=new Set;static aliases={};static lazyLoaders={};static lazyLoadPromises={};static middleware={render:new Set};static _initialized=!1;static _init(){if(this._initialized)return;this._initialized=!0,A._onMount=(X,$)=>this._notifyMount(X,$),A._onUnmount=(X,$)=>this._notifyUnmount(X,$),A._onError=(X,$,J,Z)=>this._notifyError(X,$,J,Z),A._applyMiddleware=(X,$,J,Z)=>this._applyMiddleware(X,$,J,Z),A._hasMiddleware=(X)=>this._hasMiddleware(X),A._subscribe=(X,$)=>this.subscribe(X,$),A._getGlobalState=(X)=>this.getState(X),A._applyCurrentImplementation=(X,$)=>{let J=this.implementations[$];if(!J)return;let Q=X[H2]??X.constructor;if(J===Q)return;this._applyImplementation(X,J,!1)}}static register(X,$){if(this._init(),typeof this.components[X]>"u")this.components[X]=$,this.implementations[X]=$,$.tag=X,window.customElements.define(X,$),this.components[X]._registered=!0,this.log(`Registered: <${X}>`);else throw Error("A component with this tag has already been registered. Use the evolve() function to modify the component.")}static define(X,$){this.register(X,$)}static getImplementation(X){return this.implementations[X]||this.components[X]}static _applyImplementation(X,$,J=!1){let Z=$.prototype,Y=Object.getOwnPropertyNames(Z),Q=X;X[H2]=$;for(let z of Y){if(z==="constructor")continue;let q=Object.getOwnPropertyDescriptor(Z,z);if(!q)continue;if(typeof q.value==="function")Q[z]=q.value.bind(X);else if(q.get||q.set)Object.defineProperty(Object.getPrototypeOf(X),z,q)}try{let z=customElements.get($.tag)??$,q=Reflect.construct($,[],z);for(let G of Object.keys(q))if(!(G in Q)||Q[G]===void 0)Q[G]=q[G]}catch(z){console.warn(`[Pandora] Could not construct temp instance of <${$.tag}> for default extraction:`,z)}if(typeof Symbol.metadata<"u"){let z=$[Symbol.metadata];if(z){let q=X.constructor;q[Symbol.metadata]=z}}if(typeof Symbol.metadata<"u"){let q=$[Symbol.metadata]?.[i];if(q?.length){let G=Q[s];if(G)for(let B of G)B();Q[s]=[];for(let B of q)B(X)}}}static evolve(X,$,J=!1){if(typeof this.components[X]>"u")throw Error("No component with this tag has been registered. Cannot Evolve.");this.implementations[X]=$,$._registered=!0;let Z=[];for(let[Y,Q]of Object.entries(this.aliases))if(Q===X)Z.push(Y),this.implementations[Y]=$;if(this.log(`Evolved: <${X}>`),J){let Y=[X,...Z];for(let Q of Y)document.querySelectorAll(Q).forEach((z)=>{if(z instanceof A&&z.isReady)this._applyImplementation(z,$,!0),z.forceRender()})}}static instances(X,$){if(typeof this.components[X]>"u")throw Error("No component with the provided tag has been registered.");if(typeof $==="function")document.querySelectorAll(X).forEach($);else return document.querySelectorAll(X)}static instantiate(X,$){if(!this.has(X))throw Error(`No component with tag "${X}" has been registered.`);if(!this.components[X]._registered)this.register(X,this.components[X]);let J=document.createElement(this.components[X].tag);for(let[Z,Y]of Object.entries($)){if(Y===void 0||Y===null)continue;if(J[Z]=Y,Object.getOwnPropertyDescriptor(J,Z)?.set!==void 0)continue;if(typeof Y==="boolean"){if(Y)J.setAttribute(Z,"")}else if(typeof Y==="string"||typeof Y==="number")J.setAttribute(Z,String(Y))}return J}static has(X){return typeof this.components[X]<"u"}static get(X){return this.components[X]}static setState(X,$){let J=this.state[X];if(this.state[X]=$,this.subscribers[X])this.subscribers[X].forEach((Z)=>{Z($,J)})}static getState(X){return this.state[X]}static hasState(X){return X in this.state}static deleteState(X){if(X in this.state){let $=this.state[X];if(delete this.state[X],this.subscribers[X])this.subscribers[X].forEach((J)=>{J(void 0,$)});return!0}return!1}static subscribe(X,$){if(!this.subscribers[X])this.subscribers[X]=new Set;return this.subscribers[X].add($),()=>{this.unsubscribe(X,$)}}static unsubscribe(X,$){if(this.subscribers[X])this.subscribers[X].delete($)}static getAllState(){return{...this.state}}static clearState(){let X=Object.keys(this.state);for(let $ of X)this.deleteState($)}static clearSubscriptions(){for(let X of Object.keys(this.subscribers))this.subscribers[X]=new Set}static clearMiddleware(){for(let X of Object.keys(this.middleware))this.middleware[X]=new Set}static get debug(){return this._debug}static set debug(X){this._debug=X}static log(X,$){if(this._debug)if($!==void 0)console.log(`[Pandora] ${X}`,$);else console.log(`[Pandora] ${X}`)}static list(){return Object.keys(this.components)}static stats(X){if(X){if(!this.has(X))throw Error(`No component with tag "${X}" has been registered.`);return{tag:X,instanceCount:document.querySelectorAll(X).length,isRegistered:this.components[X]?._registered??!1,isLazy:X in this.lazyLoaders}}return this.list().map(($)=>({tag:$,instanceCount:document.querySelectorAll($).length,isRegistered:this.components[$]?._registered??!1,isLazy:$ in this.lazyLoaders}))}static onMount(X){return this._init(),this.mountCallbacks.add(X),()=>this.mountCallbacks.delete(X)}static onUnmount(X){return this._init(),this.unmountCallbacks.add(X),()=>this.unmountCallbacks.delete(X)}static _notifyMount(X,$){this.log(`Mounted: <${$}>`),this.mountCallbacks.forEach((J)=>{try{J(X,$)}catch(Z){console.error("[Pandora] Error in onMount callback:",Z)}})}static _notifyUnmount(X,$){this.log(`Unmounted: <${$}>`),this.unmountCallbacks.forEach((J)=>{try{J(X,$)}catch(Z){console.error("[Pandora] Error in onUnmount callback:",Z)}})}static onError(X){return this._init(),this.errorCallbacks.add(X),()=>this.errorCallbacks.delete(X)}static _notifyError(X,$,J,Z){if(this.log(`Error in <${J}> during ${Z}:`,X),this.errorCallbacks.size===0)throw X;this.errorCallbacks.forEach((Y)=>{try{Y(X,$,J,Z)}catch(Q){console.error("[Pandora] Error in onError callback:",Q)}})}static alias(X,$){if(!this.has($))throw Error(`Cannot create alias: no component with tag "${$}" has been registered.`);if(this.has(X))throw Error(`Cannot create alias: a component with tag "${X}" already exists.`);this.aliases[X]=$;let J=this.getImplementation($)??this.components[$],Z=class extends J{static _tag=X};this.components[X]=Z,this.implementations[X]=Z,window.customElements.define(X,Z),Z._registered=!0,this.log(`Created alias: <${X}> -> <${$}>`)}static getOriginalTag(X){return this.aliases[X]}static isAlias(X){return X in this.aliases}static lazy(X,$){if(this._init(),this.has(X))throw Error(`Cannot register lazy component: a component with tag "${X}" already exists.`);this.lazyLoaders[X]=$;let J=G0;class Z extends A{static _tag=X;_lazyLoaded=!1;async connectedCallback(){await J._loadLazyComponent(X);let Y=J.getImplementation(X);if(Y&&Y!==Z)G0._applyImplementation(this,Y,!1),this._lazyLoaded=!0;await super.connectedCallback()}}this.components[X]=Z,window.customElements.define(X,Z),this.log(`Registered lazy component: <${X}>`)}static async _loadLazyComponent(X){if(this.lazyLoadPromises[X])return this.lazyLoadPromises[X];if(!(X in this.lazyLoaders))return;let $=this.lazyLoaders[X];return this.log(`Loading lazy component: <${X}>`),this.lazyLoadPromises[X]=(async()=>{try{let J=await $(),Z="default"in J?J.default:J;delete this.lazyLoaders[X],this.implementations[X]=Z,Z._registered=!0,this.log(`Loaded lazy component: <${X}>`)}catch(J){throw console.error(`[Pandora] Failed to load lazy component <${X}>:`,J),J}finally{delete this.lazyLoadPromises[X]}})(),this.lazyLoadPromises[X]}static isLazy(X){return X in this.lazyLoaders}static async preload(X){if(this.isLazy(X))await this._loadLazyComponent(X)}static use(X,$){return this._init(),this.middleware[X].add($),()=>this.middleware[X].delete($)}static _applyMiddleware(X,$,J,Z){let Y=J;return this.middleware[X].forEach((Q)=>{try{Y=Q($,Y,Z)}catch(z){console.error(`[Pandora] Error in ${X} middleware:`,z)}}),Y}static _hasMiddleware(X){return this.middleware[X].size>0}}A._registryRegister=(X,$)=>G0.register(X,$);var I=G0;Symbol.metadata??=Symbol("Symbol.metadata");function jX(X,$){return function(J,Z){let Y=Z.metadata;if(Y?.[b]){if(!Object.hasOwn(J,"_observedAttributes"))J._observedAttributes=[];for(let Q of Y[b])if(!J._observedAttributes.includes(Q))J._observedAttributes.push(Q)}if(Y&&J[Symbol.metadata]===void 0)J[Symbol.metadata]=Y;if(J.tag=X,!$?.defer)I.register(X,J);return J}}function HX(X){return function($,J){let Z=J.metadata;return Z[q0]=X,$}}function _X(X){return function($,J){let Z=String(J.name),Y=J.metadata;if(!Object.hasOwn(Y,D)){let z=Y[D];Y[D]=z?[...z]:[]}Y[D].push({property:X,methodName:Z});let Q=!1;J.addInitializer(function(){if(Q)return;Q=!0;let z=Y[V];if(!z||!z.has(X)){let q=this?.constructor?.name??"<anonymous>";console.warn(`[Pandora] @Watch('${X}') on ${q}.${Z}(): '${X}' has no @State, @Attribute, or @Property decorator. Add one of those decorators to '${X}', or call reactive(this, '${X}') in the constructor — otherwise the watcher will never fire.`)}})}}function V2(X,$){if(typeof Symbol.metadata>"u")return[];let Z=X.constructor[Symbol.metadata]?.[D];if(!Z)return[];let Y=[];for(let Q of Z)if(Q.property===$){let z=X[Q.methodName];if(typeof z==="function")Y.push(z.bind(X))}return Y}var LX=new Set(["hidden","title","slot","style","id","className","tabIndex","dir","lang","draggable","contentEditable","accessKey","innerHTML","outerHTML","textContent","innerText"]);function i0(X,$){if(LX.has($))console.warn(`[Pandora] @${X}('${$}') conflicts with HTMLElement.${$}. This may cause unexpected behavior. Consider renaming to avoid the conflict.`)}function SX(X){return function($,J){let Z=String(J.name);i0("State",Z);let Y=X?.render!==!1,Q=Symbol(`__pandora_state_${Z}`),z,q=!1,G=J.metadata;if(!Object.hasOwn(G,V)){let B=G[V];G[V]=B?new Set(B):new Set}G[V].add(Z),E(G,(B)=>{if(k0(B,Z,Q,Y),q&&B[Q]===void 0)B[Q]=z}),J.addInitializer(function(){let B=this,F=B[Z];if(k0(B,Z,Q,Y),F!==void 0){if(B[Q]=F,!q)z=F,q=!0}})}}function k0(X,$,J,Z,Y="state",Q=(z,q)=>z===q){A2(X,$,J),Object.defineProperty(X,$,{get(){return X[J]},set(z){let q=X[J];if(Q(q,z))return;if(X[J]=z,X._batching){let B=X._batchedChanges,F=B.find((W)=>W.property===$);if(F){if(F.newValue=z,Z)F.shouldRender=!0}else B.push({property:$,oldValue:q,newValue:z,shouldRender:Z,source:Y});return}let G=V2(X,$);for(let B of G)B(z,q);if(X.didChange($,q,z,Y),Z&&X._initRenderDone&&X.isConnected)X._queueRender()},enumerable:!0,configurable:!0}),t(X,()=>{delete X[$]})}function NX(X){return function($,J){let Z=String(J.name);i0("Property",Z);let Y=Symbol(`__pandora_property_${Z}`),Q=X?.equals??((F,W)=>F===W),z=X?.attribute??!1,q,G=!1,B=J.metadata;if(!Object.hasOwn(B,V)){let F=B[V];B[V]=F?new Set(F):new Set}if(B[V].add(Z),z!==!1){let F=Symbol(`__pandora_propSetting_${Z}`);if(!Object.hasOwn(B,b)){let W=B[b];B[b]=W?[...W]:[]}if(!B[b].includes(z))B[b].push(z);b2(B,{attrName:z,propertyKey:Z,valueKey:Y,settingKey:F,shouldRender:!1,equals:Q}),E(B,(W)=>{if(V0(W,z,Z,Y,F,!1,Q),G&&W[Y]===void 0)if(W.hasAttribute(z))W[Y]=T(W.getAttribute(z));else W[Y]=q,D0(W,z,q)}),J.addInitializer(function(){let W=this,O=W[Z],U=W.hasAttribute(z),L=U?T(W.getAttribute(z)):void 0;if(V0(W,z,Z,Y,F,!1,Q),O!==void 0&&!G)q=O,G=!0;if(U)W[Y]=L;else if(O!==void 0)W[Y]=O,D0(W,z,O)})}else E(B,(F)=>{if(k0(F,Z,Y,!1,"property",Q),G&&F[Y]===void 0)F[Y]=q}),J.addInitializer(function(){let F=this,W=F[Z];if(k0(F,Z,Y,!1,"property",Q),W!==void 0){if(F[Y]=W,!G)q=W,G=!0}})}}function kX(X){return function($,J){let Z=String(J.name);i0("Attribute",Z);let Y,Q=!0;if(typeof X==="object")Y=Z,Q=X.render!==!1;else Y=X??Z;let z=Symbol(`__pandora_attr_${Z}`),q=J.metadata;if(!Object.hasOwn(q,V)){let F=q[V];q[V]=F?new Set(F):new Set}q[V].add(Z);let G,B=!1;{let F=Symbol(`__pandora_propSetting_${Z}`);if(!Object.hasOwn(q,b)){let W=q[b];q[b]=W?[...W]:[]}if(!q[b].includes(Y))q[b].push(Y);b2(q,{attrName:Y,propertyKey:Z,valueKey:z,settingKey:F,shouldRender:Q,equals:(W,O)=>W===O}),E(q,(W)=>{if(V0(W,Y,Z,z,F,Q),B&&W[z]===void 0)if(W.hasAttribute(Y))W[z]=T(W.getAttribute(Y));else W[z]=G,D0(W,Y,G)}),J.addInitializer(function(){let W=this,O=W[Z],U=W.hasAttribute(Y),L=U?T(W.getAttribute(Y)):void 0;if(V0(W,Y,Z,z,F,Q),O!==void 0&&!B)G=O,B=!0;if(U)W[z]=L;else if(O!==void 0)W[z]=O,D0(W,Y,O)})}}}function A2(X,$,J){let Z=Object.getOwnPropertyDescriptor(X,$);if(Z&&"value"in Z&&Z.value!==void 0&&X[J]===void 0)X[J]=Z.value}function b2(X,$){if(!Object.hasOwn(X,m)){let J=X[m];X[m]=J?[...J]:[]}X[m].push($)}function D0(X,$,J){if(typeof J==="boolean")if(J)X.setAttribute($,"");else X.removeAttribute($);else if(typeof J==="string"||typeof J==="number")X.setAttribute($,String(J))}function V0(X,$,J,Z,Y,Q=!0,z=(q,G)=>q===G){if(A2(X,J,Z),Object.defineProperty(X,J,{get(){if(X[Z]!==void 0)return X[Z];if(X.hasAttribute($))return T(X.getAttribute($));return},set(q){let G=X[Z];if(X[Z]=q,X[Y]=!0,q===void 0||q===null)X.removeAttribute($);else if(typeof q==="string"||typeof q==="number"||typeof q==="boolean")if(typeof q==="boolean")if(q)X.setAttribute($,"");else X.removeAttribute($);else X.setAttribute($,String(q));if(X[Y]=!1,!z(G,q))if(X._batching){let B=X._batchedChanges,F=B.find((W)=>W.property===J);if(F){if(F.newValue=q,Q)F.shouldRender=!0}else B.push({property:J,oldValue:G,newValue:q,shouldRender:Q,source:"prop"})}else{let B=V2(X,J);for(let F of B)F(q,G);if(X.didChange(J,G,q,"prop"),Q&&X._initRenderDone&&X.isConnected)X._queueRender()}},enumerable:!0,configurable:!0}),X.isConnected&&X.hasAttribute($))X[Z]=T(X.getAttribute($));t(X,()=>{delete X[J]})}function DX(X){return function($,J){let Z=String(J.name),Y=Symbol(`__pandora_unsub_${Z}`),Q=Symbol(`__pandora_value_${Z}`),z=J.metadata;if(!Object.hasOwn(z,V)){let q=z[V];z[V]=q?new Set(q):new Set}if(z[V].add(Z),!Object.hasOwn(z,g)){let q=z[g];z[g]=q?[...q]:[]}z[g].push({stateKey:X,propertyKey:Z,unsubKey:Y,valueKey:Q}),E(z,(q)=>{_2(q,X,Z,Y,Q)}),J.addInitializer(function(){_2(this,X,Z,Y,Q)})}}function _2(X,$,J,Z,Y){if(Object.defineProperty(X,J,{get(){return X[Y]},set(Q){let z=X[Y];if(z===Q)return;if(X[Y]=Q,I.setState($,Q),X.didChange(J,z,Q,"consumer"),X.isReady)X._queueRender()},enumerable:!0,configurable:!0}),X.isConnected)A._activateSubscription?.(X,{stateKey:$,propertyKey:J,unsubKey:Z,valueKey:Y});t(X,()=>{if(X[Z])X[Z](),X[Z]=void 0;delete X[J]})}function VX(X){return function($,J){let Z=String(J.name),Y=J.metadata;E(Y,(Q)=>{L2(Q,Z,X)}),J.addInitializer(function(){L2(this,Z,X)})}}function AX(X){return function($,J){let Z=String(J.name),Y=J.metadata;E(Y,(Q)=>{S2(Q,Z,X)}),J.addInitializer(function(){S2(this,Z,X)})}}function L2(X,$,J){Object.defineProperty(X,$,{get(){return X.query(J)},enumerable:!0,configurable:!0})}function S2(X,$,J){Object.defineProperty(X,$,{get(){return X.queryAll(J)},enumerable:!0,configurable:!0})}function bX(X){return function($,J){let Z=String(J.name),Y=X?`slot[name="${X}"]`:"slot:not([name])",Q=J.metadata;E(Q,(z)=>{N2(z,Z,Y)}),J.addInitializer(function(){N2(this,Z,Y)})}}function N2(X,$,J){Object.defineProperty(X,$,{get(){return(X._shadowDOM||X.shadowRoot)?.querySelector(J)??null},enumerable:!0,configurable:!0})}function IX(X,$){return function(J,Z){let Y=String(Z.name),Q=Z.metadata;if(!Object.hasOwn(Q,y)){let z=Q[y];Q[y]=z?[...z]:[]}Q[y].push({event:X,methodName:Y,options:$})}}function xX(...X){return function($,J){let Z=String(J.name),Y=Symbol(`__pandora_computed_cache_${Z}`),Q=Symbol(`__pandora_computed_valid_${Z}`),z=J.metadata;for(let G of X){if(!Object.hasOwn(z,D)){let B=z[D];z[D]=B?[...B]:[]}z[D].push({property:G,methodName:`__invalidate_${Z}`})}let q=$;return E(z,(G)=>{k2(G,Z,Y,Q,q)}),J.addInitializer(function(){k2(this,Z,Y,Q,q)}),$}}function k2(X,$,J,Z,Y){X[`__invalidate_${$}`]=()=>{X[Z]=!1},Object.defineProperty(X,$,{get(){if(!X[Z])X[J]=Y.call(X),X[Z]=!0;return X[J]},enumerable:!0,configurable:!0})}function EX(X){return function($,J){let Z=J.metadata,Y=[],Q=[];for(let[q,G]of Object.entries(X))if(typeof G==="string"){if(Y.push({className:q,propertyName:G}),!Object.hasOwn(Z,D)){let F=Z[D];Z[D]=F?[...F]:[]}let B=`__classlist_${q}_${G}`;Z[D].push({property:G,methodName:B}),$.prototype[B]=function(){this.classList.toggle(q,!!this[G])}}else Q.push({className:q,conditionFn:G});if(Q.length>0){let q=$.prototype.didChange;$.prototype.didChange=function(G,B,F,W){q?.call(this,G,B,F,W);for(let{className:O,conditionFn:U}of Q)this.classList.toggle(O,U(this))}}let z=$.prototype.connectedCallback;return $.prototype.connectedCallback=async function(){await z?.call(this);for(let{className:q,propertyName:G}of Y)this.classList.toggle(q,!!this[G]);for(let{className:q,conditionFn:G}of Q)this.classList.toggle(q,G(this))},$}}function RX(X){return function($,J){let Z=String(J.name),Y=J.metadata;E(Y,(Q)=>{D2(Q,Z,X)}),J.addInitializer(function(){D2(this,Z,X)})}}function D2(X,$,J){Object.defineProperty(X,$,{value:(Z)=>{return X.emit(J,Z)},writable:!1,enumerable:!0,configurable:!0})}function PX(X,$){if($!==void 0&&!I.hasState(X))I.setState(X,$);return{key:X,get(){return I.getState(X)},set(J){I.setState(X,J)},subscribe(J){return I.subscribe(X,J)},has(){return I.hasState(X)},delete(){I.deleteState(X)}}}var x2={};t0(x2,{whenReady:()=>I2,resetRegistry:()=>wX,mount:()=>fX,flush:()=>KX});async function KX(){await new Promise((X)=>queueMicrotask(X)),await new Promise((X)=>queueMicrotask(X))}function I2(X,$=5000){let J=X;if(J.isReady)return Promise.resolve();return new Promise((Z,Y)=>{let Q=setTimeout(()=>{Y(Error(`Component <${X.tagName.toLowerCase()}> did not become ready within ${$}ms`))},$),z=()=>{if(J.isReady)clearTimeout(Q),Z();else requestAnimationFrame(z)};requestAnimationFrame(z)})}function wX(){I.clearState(),I.clearSubscriptions(),I.clearMiddleware()}async function fX(X,$,J){let Z=$??document.body,Y=document.createElement("div");Y.innerHTML=`<${X}>${J??""}</${X}>`;let Q=Y.firstElementChild;return Z.appendChild(Q),await I2(Q),Q}var TX={};var S={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},_=(X)=>(...$)=>({["_$litDirective$"]:X,values:$});class N{constructor(X){}get _$isConnected(){return this._$parent._$isConnected}_$initialize(X,$,J){this.__part=X,this._$parent=$,this.__attributeIndex=J}_$resolve(X,$){return this.update(X,$)}update(X,$){return this.render(...$)}}var{_ChildPart:CX}=F2,hX=!0,e=hX&&window.ShadyDOM?.inUse&&window.ShadyDOM?.noPatch===!0?window.ShadyDOM.wrap:(X)=>X,s0=(X)=>X===null||typeof X!="object"&&typeof X!="function",gX={HTML:1,SVG:2,MATHML:3},A0=(X,$)=>$===void 0?X?._$litType$!==void 0:X?._$litType$===$,r0=(X)=>{return X?._$litType$?.h!=null},vX=(X)=>X?._$litDirective$!==void 0,yX=(X)=>X?._$litDirective$,W0=(X)=>X.strings===void 0,E2=()=>document.createComment(""),R=(X,$,J)=>{let Z=e(X._$startNode).parentNode,Y=$===void 0?X._$endNode:$._$startNode;if(J===void 0){let Q=e(Z).insertBefore(E2(),Y),z=e(Z).insertBefore(E2(),Y);J=new CX(Q,z,X,X.options)}else{let Q=e(J._$endNode).nextSibling,z=J._$parent,q=z!==X;if(q){J._$reparentDisconnectables?.(X),J._$parent=X;let G;if(J._$notifyConnectionChanged!==void 0&&(G=X._$isConnected)!==z._$isConnected)J._$notifyConnectionChanged(G)}if(Q!==Y||q){let G=J._$startNode;while(G!==Q){let B=e(G).nextSibling;e(Z).insertBefore(G,Y),G=B}}}return J},K=(X,$,J=X)=>{return X._$setValue($,J),X},mX={},C=(X,$=mX)=>X._$committedValue=$,X0=(X)=>X._$committedValue,B0=(X)=>{X._$clear(),X._$startNode.remove()},F0=(X)=>{X._$clear()};var dX=!0,U0=(X,$)=>{let J=X._$disconnectableChildren;if(J===void 0)return!1;for(let Z of J)Z._$notifyDirectiveConnectionChanged?.($,!1),U0(Z,$);return!0},b0=(X)=>{let $,J;do{if(($=X._$parent)===void 0)break;J=$._$disconnectableChildren,J.delete(X),X=$}while(J?.size===0)},R2=(X)=>{for(let $;$=X._$parent;X=$){let J=$._$disconnectableChildren;if(J===void 0)$._$disconnectableChildren=J=new Set;else if(J.has(X))break;J.add(X),cX($)}};function uX(X){if(this._$disconnectableChildren!==void 0)b0(this),this._$parent=X,R2(this);else this._$parent=X}function pX(X,$=!1,J=0){let Z=this._$committedValue,Y=this._$disconnectableChildren;if(Y===void 0||Y.size===0)return;if($){if(Array.isArray(Z))for(let Q=J;Q<Z.length;Q++)U0(Z[Q],!1),b0(Z[Q]);else if(Z!=null)U0(Z,!1),b0(Z)}else U0(this,X)}var cX=(X)=>{if(X.type==S.CHILD)X._$notifyConnectionChanged??=pX,X._$reparentDisconnectables??=uX};class d extends N{constructor(){super(...arguments);this._$disconnectableChildren=void 0}_$initialize(X,$,J){super._$initialize(X,$,J),R2(this),this.isConnected=X._$isConnected}["_$notifyDirectiveConnectionChanged"](X,$=!0){if(X!==this.isConnected)if(this.isConnected=X,X)this.reconnected?.();else this.disconnected?.();if($)U0(this,X),b0(this)}setValue(X){if(W0(this.__part))this.__part._$setValue(X,this);else{if(dX&&this.__attributeIndex===void 0)throw Error("Expected this.__attributeIndex to be a number");let $=[...this.__part._$committedValue];$[this.__attributeIndex]=X,this.__part._$setValue($,this,0)}}disconnected(){}reconnected(){}}var P2=async(X,$)=>{for await(let J of X)if(await $(J)===!1)return};class O0{constructor(X){this._ref=X}disconnect(){this._ref=void 0}reconnect(X){this._ref=X}deref(){return this._ref}}class M0{constructor(){this._promise=void 0,this._resolve=void 0}get(){return this._promise}pause(){this._promise??=new Promise((X)=>this._resolve=X)}resume(){this._resolve?.(),this._promise=this._resolve=void 0}}class I0 extends d{constructor(){super(...arguments);this.__weakThis=new O0(this),this.__pauser=new M0}render(X,$){return H}update(X,[$,J]){if(!this.isConnected)this.disconnected();if($===this.__value)return H;this.__value=$;let Z=0,{__weakThis:Y,__pauser:Q}=this;return P2($,async(z)=>{while(Q.get())await Q.get();let q=Y.deref();if(q!==void 0){if(q.__value!==$)return!1;if(J!==void 0)z=J(z,Z);q.commitValue(z,Z),Z++}return!0}),H}commitValue(X,$){this.setValue(X)}disconnected(){this.__weakThis.disconnect(),this.__pauser.pause()}reconnected(){this.__weakThis.reconnect(this),this.__pauser.resume()}}var lX=_(I0);class K2 extends I0{constructor(X){super(X);if(X.type!==S.CHILD)throw Error("asyncAppend can only be used in child expressions")}update(X,$){return this.__childPart=X,super.update(X,$)}commitValue(X,$){if($===0)F0(this.__childPart);let J=R(this.__childPart);K(J,X)}}var oX=_(K2);var w2=(X)=>r0(X)?X._$litType$.h:X.strings;class f2 extends N{constructor(X){super(X);this._templateCache=new WeakMap}render(X){return[X]}update(X,[$]){let J=A0(this._value)?w2(this._value):null,Z=A0($)?w2($):null;if(J!==null&&(Z===null||J!==Z)){let Q=X0(X).pop(),z=this._templateCache.get(J);if(z===void 0){let q=document.createDocumentFragment();z=f(M,q),z.setConnected(!1),this._templateCache.set(J,z)}C(z,[Q]),R(z,void 0,Q)}if(Z!==null){if(J===null||J!==Z){let Y=this._templateCache.get(Z);if(Y!==void 0){let z=X0(Y).pop();F0(X),R(X,void 0,z),C(X,[z])}}this._value=$}else this._value=void 0;return this.render($)}}var iX=_(f2);var sX=(X,$,J)=>{for(let Z of $)if(Z[0]===X){let Q=Z[1];return Q()}return J?.()};class T2 extends N{constructor(X){super(X);if(X.type!==S.ATTRIBUTE||X.name!=="class"||X.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(X){return" "+Object.keys(X).filter(($)=>X[$]).join(" ")+" "}update(X,[$]){if(this._previousClasses===void 0){if(this._previousClasses=new Set,X.strings!==void 0)this._staticClasses=new Set(X.strings.join(" ").split(/\s/).filter((Z)=>Z!==""));for(let Z in $)if($[Z]&&!this._staticClasses?.has(Z))this._previousClasses.add(Z);return this.render($)}let J=X.element.classList;for(let Z of this._previousClasses)if(!(Z in $))J.remove(Z),this._previousClasses.delete(Z);for(let Z in $){let Y=!!$[Z];if(Y!==this._previousClasses.has(Z)&&!this._staticClasses?.has(Z))if(Y)J.add(Z),this._previousClasses.add(Z);else J.remove(Z),this._previousClasses.delete(Z)}return H}}var rX=_(T2);var nX={};class C2 extends N{constructor(){super(...arguments);this._previousValue=nX}render(X,$){return $()}update(X,[$,J]){if(Array.isArray($)){if(Array.isArray(this._previousValue)&&this._previousValue.length===$.length&&$.every((Y,Q)=>Y===this._previousValue[Q]))return H}else if(this._previousValue===$)return H;return this._previousValue=Array.isArray($)?Array.from($):$,this.render($,J)}}var aX=_(C2);var tX=(X)=>X??M;function*eX(X,$){let J=typeof $==="function";if(X!==void 0){let Z=-1;for(let Y of X){if(Z>-1)yield J?$(Z):$;Z++,yield Y}}}class h2 extends N{constructor(){super(...arguments);this.key=M}render(X,$){return this.key=X,$}update(X,[$,J]){if($!==this.key)C(X),this.key=$;return J}}var X1=_(h2);class g2 extends N{constructor(X){super(X);if(!(X.type===S.PROPERTY||X.type===S.ATTRIBUTE||X.type===S.BOOLEAN_ATTRIBUTE))throw Error("The `live` directive is not allowed on child or event bindings");if(!W0(X))throw Error("`live` bindings can only contain a single expression")}render(X){return X}update(X,[$]){if($===H||$===M)return $;let{element:J,name:Z}=X;if(X.type===S.PROPERTY){if($===J[Z])return H}else if(X.type===S.BOOLEAN_ATTRIBUTE){if(!!$===J.hasAttribute(Z))return H}else if(X.type===S.ATTRIBUTE){if(J.getAttribute(Z)===String($))return H}return C(X),$}}var $1=_(g2);function*J1(X,$){if(X!==void 0){let J=0;for(let Z of X)yield $(Z,J++)}}function*Z1(X,$,J=1){let Z=$===void 0?0:X;$??=X;for(let Y=Z;J>0?Y<$:$<Y;Y+=J)yield Y}var Y1=()=>new v2;class v2{}var n0=new WeakMap;class y2 extends d{render(X){return M}update(X,[$]){let J=$!==this._ref;if(J&&this._ref!==void 0)this._updateRefValue(void 0);if(J||this._lastElementForRef!==this._element)this._ref=$,this._context=X.options?.host,this._updateRefValue(this._element=X.element);return M}_updateRefValue(X){if(!this.isConnected)X=void 0;if(typeof this._ref==="function"){let $=this._context??globalThis,J=n0.get($);if(J===void 0)J=new WeakMap,n0.set($,J);if(J.get(this._ref)!==void 0)this._ref.call(this._context,void 0);if(J.set(this._ref,X),X!==void 0)this._ref.call(this._context,X)}else this._ref.value=X}get _lastElementForRef(){return typeof this._ref==="function"?n0.get(this._context??globalThis)?.get(this._ref):this._ref?.value}disconnected(){if(this._lastElementForRef===this._element)this._updateRefValue(void 0)}reconnected(){this._updateRefValue(this._element)}}var Q1=_(y2);var m2=(X,$,J)=>{let Z=new Map;for(let Y=$;Y<=J;Y++)Z.set(X[Y],Y);return Z};class d2 extends N{constructor(X){super(X);if(X.type!==S.CHILD)throw Error("repeat() can only be used in text expressions")}_getValuesAndKeys(X,$,J){let Z;if(J===void 0)J=$;else if($!==void 0)Z=$;let Y=[],Q=[],z=0;for(let q of X)Y[z]=Z?Z(q,z):z,Q[z]=J(q,z),z++;return{values:Q,keys:Y}}render(X,$,J){return this._getValuesAndKeys(X,$,J).values}update(X,[$,J,Z]){let Y=X0(X),{values:Q,keys:z}=this._getValuesAndKeys($,J,Z);if(!Array.isArray(Y))return this._itemKeys=z,Q;let q=this._itemKeys??=[],G=[],B,F,W=0,O=Y.length-1,U=0,L=Q.length-1;while(W<=O&&U<=L)if(Y[W]===null)W++;else if(Y[O]===null)O--;else if(q[W]===z[U])G[U]=K(Y[W],Q[U]),W++,U++;else if(q[O]===z[L])G[L]=K(Y[O],Q[L]),O--,L--;else if(q[W]===z[L])G[L]=K(Y[W],Q[L]),R(X,G[L+1],Y[W]),W++,L--;else if(q[O]===z[U])G[U]=K(Y[O],Q[U]),R(X,Y[W],Y[O]),O--,U++;else{if(B===void 0)B=m2(z,U,L),F=m2(q,W,O);if(!B.has(q[W]))B0(Y[W]),W++;else if(!B.has(q[O]))B0(Y[O]),O--;else{let h=F.get(z[U]),R0=h!==void 0?Y[h]:null;if(R0===null){let a0=R(X,Y[W]);K(a0,Q[U]),G[U]=a0}else G[U]=K(R0,Q[U]),R(X,Y[W],R0),Y[h]=null;U++}}while(U<=L){let h=R(X,G[L+1]);K(h,Q[U]),G[U++]=h}while(W<=O){let h=Y[W++];if(h!==null)B0(h)}return this._itemKeys=z,C(X,G),H}}var z1=_(d2);var u2="important",p2=" !"+u2,q1=0-p2.length;class c2 extends N{constructor(X){super(X);if(X.type!==S.ATTRIBUTE||X.name!=="style"||X.strings?.length>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(X){return Object.keys(X).reduce(($,J)=>{let Z=X[J];if(Z==null)return $;return J=J.includes("-")?J:J.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase(),$+`${J}:${Z};`},"")}update(X,[$]){let{style:J}=X.element;if(this._previousStyleProperties===void 0)return this._previousStyleProperties=new Set(Object.keys($)),this.render($);for(let Z of this._previousStyleProperties)if($[Z]==null)if(this._previousStyleProperties.delete(Z),Z.includes("-"))J.removeProperty(Z);else J[Z]=null;for(let Z in $){let Y=$[Z];if(Y!=null){this._previousStyleProperties.add(Z);let Q=typeof Y==="string"&&Y.endsWith(p2);if(Z.includes("-")||Q)J.setProperty(Z,Q?Y.slice(0,q1):Y,Q?u2:"");else J[Z]=Y}}return H}}var G1=_(c2);class l2 extends N{constructor(X){super(X);if(X.type!==S.CHILD)throw Error("templateContent can only be used in child bindings")}render(X){if(this._previousTemplate===X)return H;return this._previousTemplate=X,document.importNode(X.content,!0)}}var W1=_(l2);var B1=1;class u extends N{constructor(X){super(X);if(this._value=M,X.type!==S.CHILD)throw Error(`${this.constructor.directiveName}() can only be used in child bindings`)}render(X){if(X===M||X==null)return this._templateResult=void 0,this._value=X;if(X===H)return X;if(typeof X!="string")throw Error(`${this.constructor.directiveName}() called with a non-string value`);if(X===this._value)return this._templateResult;this._value=X;let $=[X];return $.raw=$,this._templateResult={["_$litType$"]:this.constructor.resultType,strings:$,values:[]}}}u.directiveName="unsafeHTML";u.resultType=B1;var F1=_(u);var U1=2;class x0 extends u{}x0.directiveName="unsafeSVG";x0.resultType=U1;var O1=_(x0);var M1=3;class E0 extends u{}E0.directiveName="unsafeMath";E0.resultType=M1;var j1=_(E0);var o2=(X)=>{return!s0(X)&&typeof X.then==="function"},i2=1073741823;class s2 extends d{constructor(){super(...arguments);this.__lastRenderedIndex=i2,this.__values=[],this.__weakThis=new O0(this),this.__pauser=new M0}render(...X){return X.find(($)=>!o2($))??H}update(X,$){let J=this.__values,Z=J.length;this.__values=$;let Y=this.__weakThis,Q=this.__pauser;if(!this.isConnected)this.disconnected();for(let z=0;z<$.length;z++){if(z>this.__lastRenderedIndex)break;let q=$[z];if(!o2(q))return this.__lastRenderedIndex=z,q;if(z<Z&&q===J[z])continue;this.__lastRenderedIndex=i2,Z=0,Promise.resolve(q).then(async(G)=>{while(Q.get())await Q.get();let B=Y.deref();if(B!==void 0){let F=B.__values.indexOf(q);if(F>-1&&F<B.__lastRenderedIndex)B.__lastRenderedIndex=F,B.setValue(G)}})}return H}disconnected(){this.__weakThis.disconnect(),this.__pauser.pause()}reconnected(){this.__weakThis.reconnect(this),this.__pauser.resume()}}var H1=_(s2);function _1(X,$,J){return X?$(X):J?.(X)}export{_1 as when,H1 as until,O1 as unsafeSVG,j1 as unsafeMathML,F1 as unsafeHTML,x2 as testing,W1 as templateContent,FX as svg,G1 as styleMap,C as setCommittedValue,K as setChildPartValue,z1 as repeat,f as render,B0 as removePart,Q1 as ref,O2 as reactive,Z1 as range,M as nothing,H as noChange,J1 as map,$1 as live,X1 as keyed,eX as join,A0 as isTemplateResult,W0 as isSingleExpression,s0 as isPrimitive,vX as isDirectiveResult,r0 as isCompiledTemplateResult,R as insertPart,tX as ifDefined,BX as html,aX as guard,yX as getDirectiveClass,X0 as getCommittedValue,_ as directive,PX as createState,Y1 as createRef,F0 as clearPart,rX as classMap,sX as choose,iX as cache,lX as asyncReplace,oX as asyncAppend,t as addTeardown,E as addDecoratorEffect,_X as Watch,M2 as Util,TX as Types,gX as TemplateResultType,DX as Subscribe,HX as Style,SX as State,bX as Slot,MX as ShadowComponent,I as Registry,jX as Register,AX as QueryAll,VX as Query,NX as Property,S as PartType,IX as Listen,RX as Emitter,N as Directive,xX as Computed,A as Component,EX as ClassList,kX as Attribute,d as AsyncDirective};
28
28
 
29
- //# debugId=8F205CDDD623363B64756E2164756E21
29
+ //# debugId=8F387BB54411843F64756E2164756E21
30
30
  //# sourceMappingURL=pandora.js.map