@aegis-framework/pandora 0.6.3 → 0.8.0
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/README.md +236 -29
- package/dist/pandora.browser.js +15 -26
- package/dist/pandora.browser.js.map +38 -37
- package/dist/pandora.js +15 -26
- package/dist/pandora.js.map +37 -36
- package/dist/types/Component.d.ts +112 -18
- package/dist/types/Component.d.ts.map +1 -1
- package/dist/types/Decorators.d.ts +65 -33
- package/dist/types/Decorators.d.ts.map +1 -1
- package/dist/types/Registry.d.ts +51 -13
- package/dist/types/Registry.d.ts.map +1 -1
- package/dist/types/RenderState.d.ts +29 -0
- package/dist/types/RenderState.d.ts.map +1 -0
- package/dist/types/ShadowComponent.d.ts +8 -3
- package/dist/types/ShadowComponent.d.ts.map +1 -1
- package/dist/types/Testing.d.ts +6 -6
- package/dist/types/Testing.d.ts.map +1 -1
- package/dist/types/TypedState.d.ts +1 -1
- package/dist/types/TypedState.d.ts.map +1 -1
- package/dist/types/Types.d.ts +4 -2
- package/dist/types/Types.d.ts.map +1 -1
- package/dist/types/Util.d.ts +142 -62
- package/dist/types/Util.d.ts.map +1 -1
- package/dist/types/browser.d.ts +1 -1
- package/dist/types/browser.d.ts.map +1 -1
- package/dist/types/index.d.ts +20 -17
- package/dist/types/index.d.ts.map +1 -1
- package/package.json +31 -24
package/dist/pandora.js
CHANGED
|
@@ -1,30 +1,19 @@
|
|
|
1
|
-
var
|
|
2
|
-
\f\r]
|
|
3
|
-
\f\r
|
|
4
|
-
|
|
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),L1=m0(_0),H=Symbol.for("lit-noChange"),M=Symbol.for("lit-nothing"),Q2=new WeakMap,p=c.createTreeWalker(c,129),l=L0;function W2(X,$){if(!g0(X)||!X.hasOwnProperty("raw")){let J="invalid template strings array";throw J=`
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
https://github.com/lit/lit/issues/new?template=bug_report.md
|
|
14
|
-
and include information about your build tooling, if any.
|
|
15
|
-
`.trim().replace(/\n */g,`
|
|
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 S=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+S:B+w+(F===-2?G:S)}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),S=/([.?@])?(.*)/.exec(W);q.push({type:v0,index:Y,name:S[2],strings:U,ctor:S[1]==="."?u0:S[1]==="?"?p0:S[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:S0,index:++Y});Z.append(F[W],Z0())}}}else if(Z.nodeType===8)if(Z.data===h0)q.push({type:S0,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===S0)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=S0,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!==L0){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:()=>I,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
|
-
`}Y+=`}
|
|
22
|
-
`}else Y+="\t".repeat(J),Y+=` ${Q}: ${z};
|
|
23
|
-
`}return Y}var I=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;let $=X.trim();if(/^[+-]?(?:0|[1-9]\d*)(?:\.\d+)?$/.test($)){let J=Number($);if(Number.isFinite(J))return J}return X}function o0(X,$,J){if($==="window")return window;if($==="document")return document;if($&&$!=="self")return J?J($):X.querySelector($);return X}class L extends HTMLElement{_children;_connected;_isReady;_hasBeenMounted;_initRenderDone;_renderId;_renderQueued;_lastRenderType;_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(!L._subscribe)return;let J=X;if(J[$.unsubKey])J[$.unsubKey](),J[$.unsubKey]=void 0;J[$.unsubKey]=L._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=L._getGlobalState?.($.stateKey);if(Z!==void 0)J[$.valueKey]=Z}static get observedAttributes(){if(typeof Symbol.metadata<"u"){let $=this[Symbol.metadata]?.[I];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 L&&$._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(L._registryRegister)L._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._initRenderDone&&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(L._onError)L._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}_resetRenderRoot(){this.innerHTML="",this.removeAttribute("data-lit-rendered"),delete this._$litPart$}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._syncListenersAfterRender(),await z0(this.didRender,this);return}let Y=N0(Z)||Z===M?"lit":"string";if(L._hasMiddleware?.("render")&&L._applyMiddleware)Z=L._applyMiddleware("render",this,Z,Y);let Q=N0(Z)||Z===M,z=Q?"lit":"string";if(this._lastRenderType!==void 0&&this._lastRenderType!==z)this._resetRenderRoot();if(Q)this._applyLitRender(Z);else this._applyStringRender(Z.trim());this._lastRenderType=z,this._syncListenersAfterRender(),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(`
|
|
1
|
+
var It=Object.defineProperty;var Nt=(e)=>e;function Ht(e,t){this[e]=Nt.bind(null,t)}var Be=(e,t)=>{for(var n in t)It(e,n,{get:t[n],enumerable:!0,configurable:!0,set:Ht.bind(t,n)})};var bt={};Be(bt,{ATTR_HANDLERS:()=>j,DECORATOR_EFFECTS:()=>F,DECORATOR_TEARDOWNS:()=>W,LISTEN_HANDLERS:()=>H,PENDING_ATTRIBUTE_WRITES:()=>Y,PROP_ATTRIBUTES:()=>A,REACTIVE_FIELDS:()=>v,STYLE_METADATA:()=>ce,SUBSCRIBE_HANDLERS:()=>M,WATCH_HANDLERS:()=>w,addDecoratorEffect:()=>R,addTeardown:()=>Z,callAsync:()=>ue,deserializeCSS:()=>X,findDelegateMatch:()=>je,isTemplateResult:()=>_e,parseAttributeValue:()=>P,reactive:()=>gt,reactiveFields:()=>yt,recordBatchedChange:()=>he,resolveListenerTarget:()=>He,writePendingAttributes:()=>Ne});var Mt={};Be(Mt,{flush:()=>Wn,mount:()=>Kn,resetRegistry:()=>Gn,whenReady:()=>Dt});var Yn={};var Ee=globalThis,Ue=(e)=>e,pe=Ee.trustedTypes,ze=pe?pe.createPolicy("lit-html",{createHTML:(e)=>e}):void 0;var D=`lit$${Math.random().toFixed(9).slice(2)}$`,Te="?"+D,jt=`<${Te}>`,B=document,te=()=>B.createComment(""),ne=(e)=>e===null||typeof e!="object"&&typeof e!="function",$e=Array.isArray,Ye=(e)=>$e(e)||typeof e?.[Symbol.iterator]=="function";var ee=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Fe=/-->/g,We=/>/g,V=RegExp(`>|[
|
|
2
|
+
\f\r](?:([^\\s"'>=/]+)([
|
|
3
|
+
\f\r]*=[
|
|
4
|
+
\f\r]*(?:[^
|
|
5
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),Ge=/'/g,Ke=/"/g,Xe=/^(?:script|style|textarea|title)$/i,Re=(e)=>(t,...n)=>({_$litType$:e,strings:t,values:n}),Vt=Re(1),qt=Re(2),Zn=Re(3),y=Symbol.for("lit-noChange"),f=Symbol.for("lit-nothing"),Qe=new WeakMap,q=B.createTreeWalker(B,129);function Ze(e,t){if(!$e(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return ze!==void 0?ze.createHTML(t):t}var Je=(e,t)=>{let n=e.length-1,s=[],o,i=t===2?"<svg>":t===3?"<math>":"",r=ee;for(let a=0;a<n;a++){let d=e[a],u,l,c=-1,h=0;for(;h<d.length&&(r.lastIndex=h,l=r.exec(d),l!==null);)h=r.lastIndex,r===ee?l[1]==="!--"?r=Fe:l[1]!==void 0?r=We:l[2]!==void 0?(Xe.test(l[2])&&(o=RegExp("</"+l[2],"g")),r=V):l[3]!==void 0&&(r=V):r===V?l[0]===">"?(r=o??ee,c=-1):l[1]===void 0?c=-2:(c=r.lastIndex-l[2].length,u=l[1],r=l[3]===void 0?V:l[3]==='"'?Ke:Ge):r===Ke||r===Ge?r=V:r===Fe||r===We?r=ee:(r=V,o=void 0);let p=r===V&&e[a+1].startsWith("/>")?" ":"";i+=r===ee?d+jt:c>=0?(s.push(u),d.slice(0,c)+"$lit$"+d.slice(c)+D+p):d+D+(c===-2?a:p)}return[Ze(e,i+(e[n]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),s]};class se{constructor({strings:e,_$litType$:t},n){let s;this.parts=[];let o=0,i=0,r=e.length-1,a=this.parts,[d,u]=Je(e,t);if(this.el=se.createElement(d,n),q.currentNode=this.el.content,t===2||t===3){let l=this.el.content.firstChild;l.replaceWith(...l.childNodes)}for(;(s=q.nextNode())!==null&&a.length<r;){if(s.nodeType===1){if(s.hasAttributes())for(let l of s.getAttributeNames())if(l.endsWith("$lit$")){let c=u[i++],h=s.getAttribute(l).split(D),p=/([.?@])?(.*)/.exec(c);a.push({type:1,index:o,name:p[2],strings:h,ctor:p[1]==="."?Le:p[1]==="?"?xe:p[1]==="@"?Pe:K}),s.removeAttribute(l)}else l.startsWith(D)&&(a.push({type:6,index:o}),s.removeAttribute(l));if(Xe.test(s.tagName)){let l=s.textContent.split(D),c=l.length-1;if(c>0){s.textContent=pe?pe.emptyScript:"";for(let h=0;h<c;h++)s.append(l[h],te()),q.nextNode(),a.push({type:2,index:++o});s.append(l[c],te())}}}else if(s.nodeType===8)if(s.data===Te)a.push({type:2,index:o});else{let l=-1;for(;(l=s.data.indexOf(D,l+1))!==-1;)a.push({type:7,index:o}),l+=D.length-1}o++}}static createElement(e,t){let n=B.createElement("template");return n.innerHTML=e,n}}function U(e,t,n=e,s){if(t===y)return t;let o=s!==void 0?n._$Co?.[s]:n._$Cl,i=ne(t)?void 0:t._$litDirective$;return o?.constructor!==i&&(o?._$AO?.(!1),i===void 0?o=void 0:(o=new i(e),o._$AT(e,n,s)),s!==void 0?(n._$Co??=[])[s]=o:n._$Cl=o),o!==void 0&&(t=U(e,o._$AS(e,t.values),o,s)),t}class ke{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){let{el:{content:t},parts:n}=this._$AD,s=(e?.creationScope??B).importNode(t,!0);q.currentNode=s;let o=q.nextNode(),i=0,r=0,a=n[0];for(;a!==void 0;){if(i===a.index){let d;a.type===2?d=new G(o,o.nextSibling,this,e):a.type===1?d=new a.ctor(o,a.name,a.strings,this,e):a.type===6&&(d=new Oe(o,this,e)),this._$AV.push(d),a=n[++r]}i!==a?.index&&(o=q.nextNode(),i++)}return q.currentNode=B,s}p(e){let t=0;for(let n of this._$AV)n!==void 0&&(n.strings!==void 0?(n._$AI(e,n,t),t+=n.strings.length-2):n._$AI(e[t])),t++}}class G{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,t,n,s){this.type=2,this._$AH=f,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=n,this.options=s,this._$Cv=s?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode,t=this._$AM;return t!==void 0&&e?.nodeType===11&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=U(this,e,t),ne(e)?e===f||e==null||e===""?(this._$AH!==f&&this._$AR(),this._$AH=f):e!==this._$AH&&e!==y&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):Ye(e)?this.k(e):this._(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==f&&ne(this._$AH)?this._$AA.nextSibling.data=e:this.T(B.createTextNode(e)),this._$AH=e}$(e){let{values:t,_$litType$:n}=e,s=typeof n=="number"?this._$AC(e):(n.el===void 0&&(n.el=se.createElement(Ze(n.h,n.h[0]),this.options)),n);if(this._$AH?._$AD===s)this._$AH.p(t);else{let o=new ke(s,this),i=o.u(this.options);o.p(t),this.T(i),this._$AH=o}}_$AC(e){let t=Qe.get(e.strings);return t===void 0&&Qe.set(e.strings,t=new se(e)),t}k(e){$e(this._$AH)||(this._$AH=[],this._$AR());let t=this._$AH,n,s=0;for(let o of e)s===t.length?t.push(n=new G(this.O(te()),this.O(te()),this,this.options)):n=t[s],n._$AI(o),s++;s<t.length&&(this._$AR(n&&n._$AB.nextSibling,s),t.length=s)}_$AR(e=this._$AA.nextSibling,t){for(this._$AP?.(!1,!0,t);e!==this._$AB;){let n=Ue(e).nextSibling;Ue(e).remove(),e=n}}setConnected(e){this._$AM===void 0&&(this._$Cv=e,this._$AP?.(e))}}class K{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,t,n,s,o){this.type=1,this._$AH=f,this._$AN=void 0,this.element=e,this.name=t,this._$AM=s,this.options=o,n.length>2||n[0]!==""||n[1]!==""?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=f}_$AI(e,t=this,n,s){let o=this.strings,i=!1;if(o===void 0)e=U(this,e,t,0),i=!ne(e)||e!==this._$AH&&e!==y,i&&(this._$AH=e);else{let r=e,a,d;for(e=o[0],a=0;a<o.length-1;a++)d=U(this,r[n+a],t,a),d===y&&(d=this._$AH[a]),i||=!ne(d)||d!==this._$AH[a],d===f?e=f:e!==f&&(e+=(d??"")+o[a+1]),this._$AH[a]=d}i&&!s&&this.j(e)}j(e){e===f?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}}class Le extends K{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===f?void 0:e}}class xe extends K{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==f)}}class Pe extends K{constructor(e,t,n,s,o){super(e,t,n,s,o),this.type=5}_$AI(e,t=this){if((e=U(this,e,t,0)??f)===y)return;let n=this._$AH,s=e===f&&n!==f||e.capture!==n.capture||e.once!==n.once||e.passive!==n.passive,o=e!==f&&(n===f||s);s&&this.element.removeEventListener(this.name,this,n),o&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,e):this._$AH.handleEvent(e)}}class Oe{constructor(e,t,n){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=n}get _$AU(){return this._$AM._$AU}_$AI(e){U(this,e)}}var et={M:"$lit$",P:D,A:Te,C:1,L:Je,R:ke,D:Ye,V:U,I:G,H:K,N:xe,U:Pe,B:Le,F:Oe},Bt=Ee.litHtmlPolyfillSupport;Bt?.(se,G),(Ee.litHtmlVersions??=[]).push("3.3.3");var z=(e,t,n)=>{let s=n?.renderBefore??t,o=s._$litPart$;if(o===void 0){let i=n?.renderBefore??null;s._$litPart$=o=new G(t.insertBefore(te(),i),i,void 0,n??{})}return o._$AI(e),o};var{I:Ut}=et,tt=(e)=>e,De=(e)=>e===null||typeof e!="object"&&typeof e!="function",zt={HTML:1,SVG:2,MATHML:3},fe=(e,t)=>t===void 0?e?._$litType$!==void 0:e?._$litType$===t,Me=(e)=>e?._$litType$?.h!=null,Ft=(e)=>e?._$litDirective$!==void 0,Wt=(e)=>e?._$litDirective$,oe=(e)=>e.strings===void 0,nt=()=>document.createComment(""),k=(e,t,n)=>{let s=e._$AA.parentNode,o=t===void 0?e._$AB:t._$AA;if(n===void 0){let i=s.insertBefore(nt(),o),r=s.insertBefore(nt(),o);n=new Ut(i,r,e,e.options)}else{let i=n._$AB.nextSibling,r=n._$AM,a=r!==e;if(a){let d;n._$AQ?.(e),n._$AM=e,n._$AP!==void 0&&(d=e._$AU)!==r._$AU&&n._$AP(d)}if(i!==o||a){let d=n._$AA;for(;d!==i;){let u=tt(d).nextSibling;tt(s).insertBefore(d,o),d=u}}}return n},L=(e,t,n=e)=>(e._$AI(t,n),e),Gt={},x=(e,t=Gt)=>e._$AH=t,Q=(e)=>e._$AH,re=(e)=>{e._$AR(),e._$AA.remove()},ie=(e)=>{e._$AR()};var b={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},m=(e)=>(...t)=>({_$litDirective$:e,values:t});class _{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,n){this._$Ct=e,this._$AM=t,this._$Ci=n}_$AS(e,t){return this.update(e,t)}update(e,t){return this.render(...t)}}var ae=(e,t)=>{let n=e._$AN;if(n===void 0)return!1;for(let s of n)s._$AO?.(t,!1),ae(s,t);return!0},me=(e)=>{let t,n;do{if((t=e._$AM)===void 0)break;n=t._$AN,n.delete(e),e=t}while(n?.size===0)},st=(e)=>{for(let t;t=e._$AM;e=t){let n=t._$AN;if(n===void 0)t._$AN=n=new Set;else if(n.has(e))break;n.add(e),Yt(t)}};function Kt(e){this._$AN!==void 0?(me(this),this._$AM=e,st(this)):this._$AM=e}function Qt(e,t=!1,n=0){let s=this._$AH,o=this._$AN;if(o!==void 0&&o.size!==0)if(t)if(Array.isArray(s))for(let i=n;i<s.length;i++)ae(s[i],!1),me(s[i]);else s!=null&&(ae(s,!1),me(s));else ae(this,e)}var Yt=(e)=>{e.type==b.CHILD&&(e._$AP??=Qt,e._$AQ??=Kt)};class I extends _{constructor(){super(...arguments),this._$AN=void 0}_$AT(e,t,n){super._$AT(e,t,n),st(this),this.isConnected=e._$AU}_$AO(e,t=!0){e!==this.isConnected&&(this.isConnected=e,e?this.reconnected?.():this.disconnected?.()),t&&(ae(this,e),me(this))}setValue(e){if(oe(this._$Ct))this._$Ct._$AI(e,this);else{let t=[...this._$Ct._$AH];t[this._$Ci]=e,this._$Ct._$AI(t,this,0)}}disconnected(){}reconnected(){}}var ot=async(e,t)=>{for await(let n of e)if(await t(n)===!1)return};class de{constructor(e){this.G=e}disconnect(){this.G=void 0}reconnect(e){this.G=e}deref(){return this.G}}class le{constructor(){this.Y=void 0,this.Z=void 0}get(){return this.Y}pause(){this.Y??=new Promise((e)=>this.Z=e)}resume(){this.Z?.(),this.Y=this.Z=void 0}}class ye extends I{constructor(){super(...arguments),this._$CK=new de(this),this._$CX=new le}render(e,t){return y}update(e,[t,n]){if(this.isConnected||this.disconnected(),t===this._$CJ)return y;this._$CJ=t;let s=0,{_$CK:o,_$CX:i}=this;return ot(t,async(r)=>{for(;i.get();)await i.get();let a=o.deref();if(a!==void 0){if(a._$CJ!==t)return!1;n!==void 0&&(r=n(r,s)),a.commitValue(r,s),s++}return!0}),y}commitValue(e,t){this.setValue(e)}disconnected(){this._$CK.disconnect(),this._$CX.pause()}reconnected(){this._$CK.reconnect(this),this._$CX.resume()}}var Xt=m(ye);var Zt=m(class extends ye{constructor(e){if(super(e),e.type!==b.CHILD)throw Error("asyncAppend can only be used in child expressions")}update(e,t){return this._$Ctt=e,super.update(e,t)}commitValue(e,t){t===0&&ie(this._$Ctt);let n=k(this._$Ctt);L(n,e)}});var rt=(e)=>Me(e)?e._$litType$.h:e.strings,Jt=m(class extends _{constructor(e){super(e),this.et=new WeakMap}render(e){return[e]}update(e,[t]){let n=fe(this.it)?rt(this.it):null,s=fe(t)?rt(t):null;if(n!==null&&(s===null||n!==s)){let o=Q(e).pop(),i=this.et.get(n);if(i===void 0){let r=document.createDocumentFragment();i=z(f,r),i.setConnected(!1),this.et.set(n,i)}x(i,[o]),k(i,void 0,o)}if(s!==null){if(n===null||n!==s){let o=this.et.get(s);if(o!==void 0){let i=Q(o).pop();ie(e),k(e,void 0,i),x(e,[i])}}this.it=t}else this.it=void 0;return this.render(t)}});var en=(e,t,n)=>{for(let s of t)if(s[0]===e)return(0,s[1])();return n?.()};var tn=m(class extends _{constructor(e){if(super(e),e.type!==b.ATTRIBUTE||e.name!=="class"||e.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(e){return" "+Object.keys(e).filter((t)=>e[t]).join(" ")+" "}update(e,[t]){if(this.st===void 0){this.st=new Set,e.strings!==void 0&&(this.nt=new Set(e.strings.join(" ").split(/\s/).filter((s)=>s!=="")));for(let s in t)t[s]&&!this.nt?.has(s)&&this.st.add(s);return this.render(t)}let n=e.element.classList;for(let s of this.st)s in t||(n.remove(s),this.st.delete(s));for(let s in t){let o=!!t[s];o===this.st.has(s)||this.nt?.has(s)||(o?(n.add(s),this.st.add(s)):(n.remove(s),this.st.delete(s)))}return y}});var nn={},sn=m(class extends _{constructor(){super(...arguments),this.ot=nn}render(e,t){return t()}update(e,[t,n]){if(Array.isArray(t)){if(Array.isArray(this.ot)&&this.ot.length===t.length&&t.every((s,o)=>s===this.ot[o]))return y}else if(this.ot===t)return y;return this.ot=Array.isArray(t)?Array.from(t):t,this.render(t,n)}});var on=(e)=>e??f;function*rn(e,t){let n=typeof t=="function";if(e!==void 0){let s=-1;for(let o of e)s>-1&&(yield n?t(s):t),s++,yield o}}var an=m(class extends _{constructor(){super(...arguments),this.key=f}render(e,t){return this.key=e,t}update(e,[t,n]){return t!==this.key&&(x(e),this.key=t),n}});var dn=m(class extends _{constructor(e){if(super(e),e.type!==b.PROPERTY&&e.type!==b.ATTRIBUTE&&e.type!==b.BOOLEAN_ATTRIBUTE)throw Error("The `live` directive is not allowed on child or event bindings");if(!oe(e))throw Error("`live` bindings can only contain a single expression")}render(e){return e}update(e,[t]){if(t===y||t===f)return t;let{element:n,name:s}=e;if(e.type===b.PROPERTY){if(t===n[s])return y}else if(e.type===b.BOOLEAN_ATTRIBUTE){if(!!t===n.hasAttribute(s))return y}else if(e.type===b.ATTRIBUTE&&n.getAttribute(s)===t+"")return y;return x(e),t}});function*ln(e,t){if(e!==void 0){let n=0;for(let s of e)yield t(s,n++)}}function*cn(e,t,n=1){let s=t===void 0?0:e;t??=e;for(let o=s;n>0?o<t:t<o;o+=n)yield o}var un=()=>new it;class it{}var Ie=new WeakMap,hn=m(class extends I{render(e){return f}update(e,[t]){let n=t!==this.G;return n&&this.rt(void 0),(n||this.lt!==this.ct)&&(this.G=t,this.ht=e.options?.host,this.rt(this.ct=e.element)),f}rt(e){if(this.G!==void 0)if(this.isConnected||(e=void 0),typeof this.G=="function"){let t=this.ht??globalThis,n=Ie.get(t);n===void 0&&(n=new WeakMap,Ie.set(t,n)),n.get(this.G)!==void 0&&this.G.call(this.ht,void 0),n.set(this.G,e),e!==void 0&&this.G.call(this.ht,e)}else this.G.value=e}get lt(){return typeof this.G=="function"?Ie.get(this.ht??globalThis)?.get(this.G):this.G?.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}});var at=(e,t,n)=>{let s=new Map;for(let o=t;o<=n;o++)s.set(e[o],o);return s},pn=m(class extends _{constructor(e){if(super(e),e.type!==b.CHILD)throw Error("repeat() can only be used in text expressions")}dt(e,t,n){let s;n===void 0?n=t:t!==void 0&&(s=t);let o=[],i=[],r=0;for(let a of e)o[r]=s?s(a,r):r,i[r]=n(a,r),r++;return{values:i,keys:o}}render(e,t,n){return this.dt(e,t,n).values}update(e,[t,n,s]){let o=Q(e),{values:i,keys:r}=this.dt(t,n,s);if(!Array.isArray(o))return this.ut=r,i;let a=this.ut??=[],d=[],u,l,c=0,h=o.length-1,p=0,S=i.length-1;for(;c<=h&&p<=S;)if(o[c]===null)c++;else if(o[h]===null)h--;else if(a[c]===r[p])d[p]=L(o[c],i[p]),c++,p++;else if(a[h]===r[S])d[S]=L(o[h],i[S]),h--,S--;else if(a[c]===r[S])d[S]=L(o[c],i[S]),k(e,d[S+1],o[c]),c++,S--;else if(a[h]===r[p])d[p]=L(o[h],i[p]),k(e,o[c],o[h]),h--,p++;else if(u===void 0&&(u=at(r,p,S),l=at(a,c,h)),u.has(a[c]))if(u.has(a[h])){let O=l.get(r[p]),Ae=O!==void 0?o[O]:null;if(Ae===null){let qe=k(e,o[c]);L(qe,i[p]),d[p]=qe}else d[p]=L(Ae,i[p]),k(e,o[c],Ae),o[O]=null;p++}else re(o[h]),h--;else re(o[c]),c++;for(;p<=S;){let O=k(e,d[S+1]);L(O,i[p]),d[p++]=O}for(;c<=h;){let O=o[c++];O!==null&&re(O)}return this.ut=r,x(e,d),y}});var dt="important",fn=" !"+dt,mn=m(class extends _{constructor(e){if(super(e),e.type!==b.ATTRIBUTE||e.name!=="style"||e.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(e){return Object.keys(e).reduce((t,n)=>{let s=e[n];return s==null?t:t+`${n=n.includes("-")?n:n.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${s};`},"")}update(e,[t]){let{style:n}=e.element;if(this.ft===void 0)return this.ft=new Set(Object.keys(t)),this.render(t);for(let s of this.ft)t[s]==null&&(this.ft.delete(s),s.includes("-")?n.removeProperty(s):n[s]=null);for(let s in t){let o=t[s];if(o!=null){this.ft.add(s);let i=typeof o=="string"&&o.endsWith(fn);s.includes("-")||i?n.setProperty(s,i?o.slice(0,-11):o,i?dt:""):n[s]=o}}return y}});var yn=m(class extends _{constructor(e){if(super(e),e.type!==b.CHILD)throw Error("templateContent can only be used in child bindings")}render(e){return this.vt===e?y:(this.vt=e,document.importNode(e.content,!0))}});class N extends _{constructor(e){if(super(e),this.it=f,e.type!==b.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(e){if(e===f||e==null)return this._t=void 0,this.it=e;if(e===y)return e;if(typeof e!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(e===this.it)return this._t;this.it=e;let t=[e];return t.raw=t,this._t={_$litType$:this.constructor.resultType,strings:t,values:[]}}}N.directiveName="unsafeHTML",N.resultType=1;var gn=m(N);class ge extends N{}ge.directiveName="unsafeMath",ge.resultType=3;var bn=m(ge);class be extends N{}be.directiveName="unsafeSVG",be.resultType=2;var _n=m(be);var lt=(e)=>!De(e)&&typeof e.then=="function",ct=1073741823;class ut extends I{constructor(){super(...arguments),this._$Cwt=ct,this._$Cbt=[],this._$CK=new de(this),this._$CX=new le}render(...e){return e.find((t)=>!lt(t))??y}update(e,t){let n=this._$Cbt,s=n.length;this._$Cbt=t;let o=this._$CK,i=this._$CX;this.isConnected||this.disconnected();for(let r=0;r<t.length&&!(r>this._$Cwt);r++){let a=t[r];if(!lt(a))return this._$Cwt=r,a;r<s&&a===n[r]||(this._$Cwt=ct,s=0,Promise.resolve(a).then(async(d)=>{for(;i.get();)await i.get();let u=o.deref();if(u!==void 0){let l=u._$Cbt.indexOf(a);l>-1&&l<u._$Cwt&&(u._$Cwt=l,u.setValue(d))}}))}return y}disconnected(){this._$CK.disconnect(),this._$CX.pause()}reconnected(){this._$CK.reconnect(this),this._$CX.resume()}}var vn=m(ut);function wn(e,t,n){return e?t(e):n?.(e)}var ht=(e,t)=>{let n=t.getAttribute("data-key"),s=null;if(n!==null)s=`[data-key="${CSS.escape(n)}"]`;else if(t.id!=="")s=`#${CSS.escape(t.id)}`;let o=[],i=t;while(!0){let r=i.parentNode;if(r===null)return null;if(o.unshift({index:Array.prototype.indexOf.call(r.children,i),tagName:i.tagName}),r===e)return{selector:s,path:o};i=r}},pt=(e,t)=>{if(t.selector!==null){let s=e.querySelector(t.selector);if(s!==null)return s}let n=e;for(let s of t.path){let o=n.children[s.index];if(o===void 0||o.tagName!==s.tagName)return null;n=o}return n===e?null:n},Sn=(e)=>{if(!(e instanceof HTMLInputElement)&&!(e instanceof HTMLTextAreaElement))return null;if(e.selectionStart===null||e.selectionEnd===null)return null;return{start:e.selectionStart,end:e.selectionEnd,direction:e.selectionDirection??"none"}},Cn=(e)=>{if(e instanceof ShadowRoot)return e.activeElement;let t=document.activeElement;return t!==null&&t!==e&&e.contains(t)?t:null},ft=(e,t)=>{let n=Cn(e),s=n===null?null:ht(e,n),o=n===null?null:Sn(n),i=[];for(let r of t){if(t.delete(r),!e.contains(r)||r.scrollTop===0&&r.scrollLeft===0)continue;let a=ht(e,r);if(a!==null)i.push({locator:a,top:r.scrollTop,left:r.scrollLeft})}return()=>{for(let{locator:a,top:d,left:u}of i){let l=pt(e,a);if(l!==null)l.scrollTop=d,l.scrollLeft=u,t.add(l)}if(s===null||n?.isConnected)return;let r=pt(e,s);if(!(r instanceof HTMLElement||r instanceof SVGElement))return;if(r.focus({preventScroll:!0}),o!==null&&(r instanceof HTMLInputElement||r instanceof HTMLTextAreaElement))try{r.setSelectionRange(o.start,o.end,o.direction)}catch{}}};var A=Symbol("pandora:propAttributes"),F=Symbol("pandora:decoratorEffects"),W=Symbol("pandora:decoratorTeardowns"),w=Symbol("pandora:watchHandlers"),v=Symbol("pandora:reactiveFields"),H=Symbol("pandora:listenHandlers"),ce=Symbol("pandora:styleMetadata"),j=Symbol("pandora:attrHandlers"),M=Symbol("pandora:subscribeHandlers"),Y=Symbol("pandora:pendingAttributeWrites"),mt=new Map,ue=(e,t,...n)=>{try{let s=e.apply(t,n);return s instanceof Promise?s:Promise.resolve(s)}catch(s){return Promise.reject(s)}},_e=(e)=>e!==null&&typeof e==="object"&&("_$litType$"in e),X=(e,t="",n=0)=>{let s=Object.keys(e),o="";for(let i of s){let r=e[i];if(typeof r==="object"&&r!==null){if(t&&!i.startsWith("@"))if(i.startsWith("&"))o+=`${i.replace(/&/g,t)} {
|
|
6
|
+
`;else if(i===":host")o+=`${t} {
|
|
7
|
+
`;else o+=`${t} ${i} {
|
|
8
|
+
`;else o+=`${i} {
|
|
9
|
+
`;let a=Object.keys(r);for(let d of a){o+="\t".repeat(n);let u=r[d];if(typeof u==="object"&&u!==null){let l={};l[d]=u,o+=X(l,t,n+1)}else o+=` ${d}: ${u};
|
|
10
|
+
`}o+=`}
|
|
11
|
+
`}else o+="\t".repeat(n),o+=` ${i}: ${r};
|
|
12
|
+
`}return o},R=(e,t)=>{if(!Object.hasOwn(e,F)){let n=e[F];e[F]=n?[...n]:[]}e[F].push(t)},Z=(e,t)=>{if(!e[W])e[W]=[];e[W].push(t)},Ne=(e)=>{let t=e,n=t[Y];if(n===void 0)return;delete t[Y];for(let s of n.values())s()},yt=(e)=>{let n=e[Symbol.metadata]?.[v];return new Set(n??[])},he=(e,t)=>{let n=e;if(!n._batching||!n._batchedChanges)return!1;let s=n._batchedChanges.find((o)=>o.property===t.property);if(s){if(s.newValue=t.newValue,t.shouldRender)s.shouldRender=!0}else n._batchedChanges.push({...t});return!0},An=(e)=>{let t=mt.get(e);if(!t)t=Symbol(`__pandora_reactive_${e}`),mt.set(e,t);return t},gt=(e,t,n={})=>{let s=An(t),o=n.equals??((r,a)=>r===a),i=n.render!==!1;if(e[s]===void 0)if(n.initialValue!==void 0)e[s]=n.initialValue;else{let r=Object.getOwnPropertyDescriptor(e,t);if(r&&"value"in r)e[s]=r.value}Object.defineProperty(e,t,{get(){return e[s]},set(r){let a=e[s];if(o(a,r))return;if(e[s]=r,n.onChange)n.onChange(r,a);if(he(e,{property:t,oldValue:a,newValue:r,shouldRender:i,source:"reactive"}))return;if(typeof Symbol.metadata<"u"){let u=e.constructor[Symbol.metadata]?.[w];if(u){for(let l of u)if(l.property===t){let c=e[l.methodName];if(typeof c==="function")c.call(e,r,a)}}}if(typeof e.didChange==="function")e.didChange(t,a,r,"reactive");if(i&&typeof e._queueRender==="function")e._queueRender()},enumerable:!0,configurable:!0})},P=(e)=>{if(e===null)return;if(e===""||e==="true")return!0;if(e==="false")return!1;let t=e.trim();if(/^[+-]?(?:0|[1-9]\d*)(?:\.\d+)?$/.test(t)){let n=Number(t);if(Number.isFinite(n))return n}return e},He=(e,t,n)=>{if(t==="window")return window;if(t==="document")return document;if(t&&t!=="self")return n?n(t):e.querySelector(t);return e},En=(e)=>e.nodeType===1,je=(e,t,n)=>{let s=e.currentTarget;if(s===null)return null;let o=typeof s.getRootNode==="function"?s.getRootNode():n.ownerDocument??document,i=new Set([o]);if(s===n&&n.shadowRoot)i.add(n.shadowRoot);for(let r of e.composedPath()){if(En(r)&&i.has(r.getRootNode())&&r.matches(t))return r;if(r===s)break}return null};var ve=new WeakMap,Tn=new Set,$n=(e)=>{let t=Object.keys(e);if(t.length===0)return;let n=e,s=new Map;for(let o of t)s.set(o,n[o]),delete n[o];return s};class g extends HTMLElement{_valuesBeforeUpgrade=$n(this);_scrolledElements=new Set;_connectedAs;_children;_connected;_isReady;_hasBeenMounted;_initRenderDone;_renderId;_renderQueued;_lastRenderType;_style;_batching;_batchedChanges;static _tag;static _template;static keepFocusAndScroll=!1;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(e,t){if(!g._subscribe)return;let n=e;if(n[t.unsubKey])n[t.unsubKey](),n[t.unsubKey]=void 0;n[t.unsubKey]=g._subscribe(t.stateKey,(o)=>{let i=n[t.valueKey];if(i===o)return;if(n[t.valueKey]=o,e.didChange(t.propertyKey,i,o,"consumer"),e.isReady)e._queueRender()});let s=g._getGlobalState?.(t.stateKey);if(s!==void 0)n[t.valueKey]=s}static get observedAttributes(){if(typeof Symbol.metadata<"u"){let t=this[Symbol.metadata]?.[A];if(t?.length)return[...new Set([...this._observedAttributes,...t])]}return this._observedAttributes}static set observedAttributes(e){this._observedAttributes=e}static get tag(){if(typeof this._tag>"u"){let e=this.name,t=e.match(/([A-Z])/g);if(t!==null)for(let n of t)e=e.replace(n,`-${n}`.toLowerCase());this._tag=e.slice(1)}return this._tag}static set tag(e){this._tag=e}static get template(){return this._template}static set template(e){if(this._template=e,e!==void 0)document.querySelectorAll(this.tag).forEach((t)=>{if(t instanceof g&&t._isReady)t.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=[],this._trackScrolling(this)}static connectedInstances(){return ve.get(this)??Tn}_renderRoot(){return this}_trackScrolling(e){e.addEventListener("scroll",(t)=>{if(t.target instanceof Element&&t.target!==this)this._scrolledElements.add(t.target)},{capture:!0,passive:!0})}_assignValuesBeforeUpgrade(){let e=this._valuesBeforeUpgrade;if(e===void 0)return;this._valuesBeforeUpgrade=void 0;let t=this.constructor.tag;for(let[n,s]of e)try{this[n]=s}catch(o){console.warn(`[Pandora] <${t}> was given \`${n}\` before it was defined, and the value couldn't be kept: ${o.message}`)}}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(g._registryRegister)g._registryRegister(this.tag,this);else window.customElements.define(this.tag,this)}get isBatching(){return this._batching}batch(e){this._batching=!0,this._batchedChanges=[];try{e()}finally{this._batching=!1;let t=this._batchedChanges;if(this._batchedChanges=[],t.length>0){let n=!1;for(let{property:s,oldValue:o,newValue:i,shouldRender:r,source:a}of t){if(o===i)continue;if(r)n=!0;if(typeof Symbol.metadata<"u"){let u=this.constructor[Symbol.metadata]?.[w];if(u){for(let l of u)if(l.property===s){let c=this[l.methodName];if(typeof c==="function")c.call(this,i,o)}}}this.didChange(s,o,i,a)}if(n&&this._initRenderDone&&this._connected)this._queueRender()}}}_queueRender(){if(this._renderQueued||!this._connected)return;this._renderQueued=!0,queueMicrotask(()=>{if(this._renderQueued=!1,this._connected)this._render().catch((e)=>{let t=this.constructor.tag;if(g._onError)g._onError(e,this,t,"render");else{let n=this.id?`#${this.id}`:this.className?`.${this.className.split(/\s+/).join(".")}`:"";console.error(`[Pandora] Unhandled render error in <${t}${n}>:`,e,this)}})})}forceRender(){return this._render()}render(){}_applyLitRender(e){if(!this.hasAttribute("data-lit-rendered"))this.innerHTML="",this.setAttribute("data-lit-rendered","");z(e,this,{host:this})}_applyStringRender(e){if(e===""){this.innerHTML="";return}let t=document.createElement("template");t.innerHTML=e;let n=t.content.querySelector("slot");if(n!==null){let s=document.createElement("template");s.innerHTML=this._children,n.replaceWith(s.content),this.innerHTML="",this.appendChild(t.content)}else if(this.innerHTML=e,this._children!==""&&e.indexOf(this._children)===-1)this.innerHTML+=this._children}_resetRenderRoot(){this.innerHTML="",this.removeAttribute("data-lit-rendered"),delete this._$litPart$}async _render(){let e=++this._renderId,t=this.constructor,n=this.render;if(t._template!==void 0)n=()=>{if(typeof t._template==="function")return t._template.call(this,this);return t._template};let s=await ue(n,this);if(e!==this._renderId)return;if(s===void 0||s===null){this._syncListenersAfterRender(),await ue(this.didRender,this);return}let o=_e(s)||s===f?"lit":"string";if(g._hasMiddleware?.("render")&&g._applyMiddleware)s=g._applyMiddleware("render",this,s,o);let i=_e(s)||s===f,r=i?"lit":"string";if(!i&&typeof s!=="string"){let d=Array.isArray(s)?"an array":`a ${typeof s}`;throw TypeError(`[Pandora] <${t.tag}>'s render() returned ${d}. Return a string, an html\`\` template, \`nothing\` (to clear the content) or undefined (to leave it as it is). To render a list, put it in a template: html\`\${items}\`.`)}let a=!i&&t.keepFocusAndScroll?ft(this._renderRoot(),this._scrolledElements):null;if(this._lastRenderType!==void 0&&this._lastRenderType!==r)this._resetRenderRoot();if(i)this._applyLitRender(s);else this._applyStringRender(s.trim()),a?.();this._lastRenderType=r,this._syncListenersAfterRender(),await ue(this.didRender,this)}setStyle(e,t=!1){let n=this.constructor;if(!n._styleSheet)n._styleSheet=new CSSStyleSheet;let s="";if(typeof e==="object"){if(!Object.hasOwn(n,"_sharedStyle"))n._sharedStyle={};if(!t)n._sharedStyle={...n._sharedStyle,...e};else n._sharedStyle={...e};this._style=n._sharedStyle,s=X(n._sharedStyle,n.tag)}else if(typeof e==="string")if(!t)s=Array.from(n._styleSheet.cssRules||[]).map((i)=>i.cssText).join(`
|
|
24
13
|
`)+`
|
|
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=$,L._applyCurrentImplementation?.(this,$),typeof Symbol.metadata<"u"){let Y=this.constructor[Symbol.metadata]?.[g];if(Y)for(let Q of Y)L._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"&&!Object.hasOwn(X,"_styleMetaApplied")){let Y=X[Symbol.metadata]?.[q0];if(Y)X._styleMetaApplied=!0,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}L._onMount?.(this,$),this.emit("pandora:ready",{firstMount:J,tag:$},{bubbles:!0,composed:!0})}catch(J){if(L._onError)L._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,L._onUnmount?.(this,$)}catch(J){if(L._onError)L._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=[];_listenersAttached=!1;_consumedOnceListeners=new Set;_listenerMetadata(){if(typeof Symbol.metadata>"u")return;return this.constructor[Symbol.metadata]?.[y]}static _isDynamicListenerTarget(X){return!!(X&&X!=="self"&&X!=="window"&&X!=="document")}_bindListener(X,$){let J=X.options;if(J?.once&&this._consumedOnceListeners.has($))return!1;let Z=this[X.methodName];if(typeof Z!=="function")return!1;let Y=L._isDynamicListenerTarget(J?.target),Q=o0(this,J?.target,(B)=>this.query(B));if(!Q)return!1;let z=Z.bind(this),q={};if(J?.capture)q.capture=!0;if(J?.passive)q.passive=!0;let G;if(J?.delegate){let B=J.delegate,F=J?.once;G=(W)=>{if(W.target?.closest(B)){if(F)this._consumedOnceListeners.add($),Q.removeEventListener(X.event,G,q),this._activeListeners=this._activeListeners.filter((U)=>U.handler!==G);z(W)}}}else if(J?.once)G=(B)=>{this._consumedOnceListeners.add($),this._activeListeners=this._activeListeners.filter((F)=>F.handler!==G),z(B)},q.once=!0;else G=z;return Q.addEventListener(X.event,G,q),this._activeListeners.push({target:Q,event:X.event,handler:G,options:q,dynamic:Y,index:$}),!0}_attachListeners(){let X=this._listenerMetadata();if(!X)return;X.forEach(($,J)=>this._bindListener($,J))}_refreshDynamicListeners(){let X=[];for(let J of this._activeListeners)if(J.dynamic)J.target.removeEventListener(J.event,J.handler,J.options);else X.push(J);this._activeListeners=X;let $=this._listenerMetadata();if(!$)return;$.forEach((J,Z)=>{if(L._isDynamicListenerTarget(J.options?.target))this._bindListener(J,Z)})}_syncListenersAfterRender(){if(this._listenersAttached)this._refreshDynamicListeners();else this._attachListeners(),this._listenersAttached=!0}_detachListeners(){for(let{target:X,event:$,handler:J,options:Z}of this._activeListeners)X.removeEventListener($,J,Z);this._activeListeners=[],this._listenersAttached=!1,this._consumedOnceListeners.clear()}}var A=L;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(`
|
|
14
|
+
`+e;else s=e,n._sharedStyle={},this._style={};if(n._styleSheet.replaceSync(s),!document.adoptedStyleSheets.includes(n._styleSheet))document.adoptedStyleSheets=[...document.adoptedStyleSheets,n._styleSheet];return n._sharedStyle}on(e,t,n){return this.addEventListener(e,t,n),this}off(e,t,n){return this.removeEventListener(e,t,n),this}once(e,t,n){let s=typeof n==="boolean"?{capture:n,once:!0}:{...n,once:!0};return this.addEventListener(e,t,s),this}emit(e,t,n){let s=new CustomEvent(e,{detail:t,bubbles:!0,cancelable:!0,composed:!0,...n});return this.dispatchEvent(s)}query(e){return this.querySelector(e)}queryAll(e){return this.querySelectorAll(e)}_readyCallbacks;ready(e){if(this._isReady)queueMicrotask(e);else this._readyCallbacks??=[],this._readyCallbacks.push(e)}willMount(){}didMount(){}didRender(){}didReconnect(){}willUnmount(){}didUnmount(){}didChange(e,t,n,s){}_countAsConnected(){let e=this.constructor,t=ve.get(e);if(t===void 0)t=new Set,ve.set(e,t);t.add(this),this._connectedAs=e}_stopCountingAsConnected(){if(this._connectedAs!==void 0)ve.get(this._connectedAs)?.delete(this),this._connectedAs=void 0}async connectedCallback(){let e=this.constructor,t=e.tag;try{if(this._connected=!0,this._countAsConnected(),this.dataset.component=t,g._applyCurrentImplementation?.(this,t),typeof Symbol.metadata<"u"){let o=this.constructor[Symbol.metadata]?.[M];if(o)for(let i of o)g._activateSubscription(this,i)}let n=!this._hasBeenMounted;if(n)this._children=this.innerHTML.trim(),this._assignValuesBeforeUpgrade();if(Ne(this),n&&e._template===void 0){let s=document.querySelector(`template#${t}`);if(s)e._template=s.innerHTML}if(n&&typeof Symbol.metadata<"u"&&!Object.hasOwn(e,"_styleMetaApplied")){let o=e[Symbol.metadata]?.[ce];if(o)e._styleMetaApplied=!0,this.setStyle(o,!0)}if(await this.willMount(),await this._render(),this._initRenderDone=!0,n)await this.didMount();else await this.didReconnect();if(this._hasBeenMounted=!0,this._isReady=!0,this._readyCallbacks){for(let s of this._readyCallbacks)s();this._readyCallbacks=void 0}g._onMount?.(this,t),this.emit("pandora:ready",{firstMount:n,tag:t},{bubbles:!0,composed:!0})}catch(n){if(g._onError)g._onError(n,this,t,"connectedCallback");else throw n}}async disconnectedCallback(){let e=this.constructor,t=e.tag;this._connected=!1,this._isReady=!1,this._stopCountingAsConnected();try{if(this.emit("pandora:unmount",{tag:t},{bubbles:!0,composed:!0}),typeof Symbol.metadata<"u"){let s=e[Symbol.metadata]?.[M];if(s){let o=this;for(let i of s)if(o[i.unsubKey])o[i.unsubKey](),o[i.unsubKey]=void 0}}this._detachListeners(),await this.willUnmount(),await this.didUnmount(),g._onUnmount?.(this,t)}catch(n){if(g._onError)g._onError(n,this,t,"disconnectedCallback");else throw n}}attributeChangedCallback(e,t,n){if(typeof Symbol.metadata>"u")return;let o=this.constructor[Symbol.metadata],i=o?.[j];if(!i)return;let r=this;for(let a of i){if(a.attrName!==e)continue;if(r[a.settingKey])continue;let d=n!==null?P(n):void 0,u=r[a.valueKey];if(a.equals(u,d))continue;r[a.valueKey]=d;let l=o?.[w];if(l){for(let c of l)if(c.property===a.propertyKey){let h=this[c.methodName];if(typeof h==="function")h.call(this,d,u)}}if(this.didChange(a.propertyKey,u,d,"prop-attribute"),a.shouldRender&&this._initRenderDone&&this._connected)this._queueRender()}}_activeListeners=[];_listenersAttached=!1;_consumedOnceListeners=new Set;_listenerMetadata(){if(typeof Symbol.metadata>"u")return;return this.constructor[Symbol.metadata]?.[H]}static _isDynamicListenerTarget(e){return!!(e&&e!=="self"&&e!=="window"&&e!=="document")}_bindListener(e,t){let n=e.options;if(n?.once&&this._consumedOnceListeners.has(t))return!1;let s=this[e.methodName];if(typeof s!=="function")return!1;let o=g._isDynamicListenerTarget(n?.target),i=He(this,n?.target,(u)=>this.query(u));if(!i)return!1;let r=s.bind(this),a={};if(n?.capture)a.capture=!0;if(n?.passive)a.passive=!0;let d;if(n?.delegate){let u=n.delegate,l=n?.once;d=(c)=>{let h=je(c,u,this);if(h){if(l)this._consumedOnceListeners.add(t),i.removeEventListener(e.event,d,a),this._activeListeners=this._activeListeners.filter((p)=>p.handler!==d);r(c,h)}}}else if(n?.once)d=(u)=>{this._consumedOnceListeners.add(t),this._activeListeners=this._activeListeners.filter((l)=>l.handler!==d),r(u)},a.once=!0;else d=r;return i.addEventListener(e.event,d,a),this._activeListeners.push({target:i,event:e.event,handler:d,options:a,dynamic:o,index:t}),!0}_attachListeners(){let e=this._listenerMetadata();if(!e)return;e.forEach((t,n)=>this._bindListener(t,n))}_refreshDynamicListeners(){let e=[];for(let n of this._activeListeners)if(n.dynamic)n.target.removeEventListener(n.event,n.handler,n.options);else e.push(n);this._activeListeners=e;let t=this._listenerMetadata();if(!t)return;t.forEach((n,s)=>{if(g._isDynamicListenerTarget(n.options?.target))this._bindListener(n,s)})}_syncListenersAfterRender(){if(this._listenersAttached)this._refreshDynamicListeners();else this._attachListeners(),this._listenersAttached=!0}_detachListeners(){for(let{target:e,event:t,handler:n,options:s}of this._activeListeners)e.removeEventListener(t,n,s);this._activeListeners=[],this._listenersAttached=!1,this._consumedOnceListeners.clear()}}var C=g;var _t=Symbol("pandora:appliedImpl"),vt=Symbol.for("@aegis-framework/pandora"),wt="0.8.0";class J{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,C._onMount=(e,t)=>this._notifyMount(e,t),C._onUnmount=(e,t)=>this._notifyUnmount(e,t),C._onError=(e,t,n,s)=>this._notifyError(e,t,n,s),C._applyMiddleware=(e,t,n,s)=>this._applyMiddleware(e,t,n,s),C._hasMiddleware=(e)=>this._hasMiddleware(e),C._subscribe=(e,t)=>this.subscribe(e,t),C._getGlobalState=(e)=>this.getState(e),C._applyCurrentImplementation=(e,t)=>{let n=this.implementations[t];if(!n)return;let i=e[_t]??e.constructor;if(n===i)return;this._applyImplementation(e,n,!1)}}static register(e,t){if(this._init(),typeof this.components[e]>"u")this.components[e]=t,this.implementations[e]=t,t.tag=e,window.customElements.define(e,t),this.components[e]._registered=!0,this.log(`Registered: <${e}>`);else throw Error(`[Pandora] <${e}> is already registered. Use Registry.evolve('${e}', NewClass) to swap its implementation.`)}static define(e,t){this.register(e,t)}static getImplementation(e){return this.implementations[e]||this.components[e]}static _applyImplementation(e,t,n=!1){let s=t.prototype,o=Object.getOwnPropertyNames(s),i=e;e[_t]=t;for(let r of o){if(r==="constructor")continue;let a=Object.getOwnPropertyDescriptor(s,r);if(!a)continue;if(typeof a.value==="function")i[r]=a.value.bind(e);else if(a.get||a.set)Object.defineProperty(Object.getPrototypeOf(e),r,a)}try{let r=customElements.get(e.localName)??e.constructor??t,a=Reflect.construct(t,[],r);for(let d of Object.keys(a))if(!(d in i)||i[d]===void 0)i[d]=a[d]}catch(r){console.warn(`[Pandora] Could not construct temp instance of <${t.tag}> for default extraction:`,r)}if(typeof Symbol.metadata<"u"){let r=t[Symbol.metadata];if(r){let a=e.constructor;a[Symbol.metadata]=r}}if(typeof Symbol.metadata<"u"){let a=t[Symbol.metadata]?.[F];if(a?.length){let d=i[W];if(d)for(let u of d)u();i[W]=[];for(let u of a)u(e)}}e._detachListeners()}static evolve(e,t,n=!1){if(typeof this.components[e]>"u")throw Error(`[Pandora] Cannot evolve <${e}>: no component with that tag has been registered.`);this.implementations[e]=t,t._registered=!0;let s=[];for(let[o,i]of Object.entries(this.aliases))if(i===e)s.push(o),this.implementations[o]=t;if(this.log(`Evolved: <${e}>`),n){let o=[e,...s];for(let i of o)document.querySelectorAll(i).forEach((r)=>{if(r instanceof C&&r.isReady)this._applyImplementation(r,t,!0),r.forceRender()})}}static instances(e,t){if(typeof this.components[e]>"u")throw Error(`[Pandora] No component with tag <${e}> has been registered.`);if(typeof t==="function")document.querySelectorAll(e).forEach(t);else return document.querySelectorAll(e)}static instantiate(e,t={}){if(!this.has(e))throw Error(`[Pandora] No component with tag <${e}> has been registered.`);if(!this.components[e]._registered)this.register(e,this.components[e]);let n=document.createElement(this.components[e].tag);for(let[s,o]of Object.entries(t)){if(o===void 0||o===null)continue;if(n[s]=o,Object.getOwnPropertyDescriptor(n,s)?.set!==void 0)continue;if(typeof o==="boolean"){if(o)n.setAttribute(s,"")}else if(typeof o==="string"||typeof o==="number")n.setAttribute(s,String(o))}return n}static has(e){return typeof this.components[e]<"u"}static get(e){return this.components[e]}static setState(e,t){let n=this.state[e];if(this.state[e]=t,this.subscribers[e])this.subscribers[e].forEach((s)=>{s(t,n)})}static getState(e){return this.state[e]}static hasState(e){return e in this.state}static deleteState(e){if(e in this.state){let t=this.state[e];if(delete this.state[e],this.subscribers[e])this.subscribers[e].forEach((n)=>{n(void 0,t)});return!0}return!1}static subscribe(e,t){if(!this.subscribers[e])this.subscribers[e]=new Set;return this.subscribers[e].add(t),()=>{this.unsubscribe(e,t)}}static unsubscribe(e,t){if(this.subscribers[e])this.subscribers[e].delete(t)}static getAllState(){return{...this.state}}static clearState(){let e=Object.keys(this.state);for(let t of e)this.deleteState(t)}static clearSubscriptions(){for(let e of Object.keys(this.subscribers))this.subscribers[e]=new Set}static clearMiddleware(){for(let e of Object.keys(this.middleware))this.middleware[e]=new Set}static get debug(){return this._debug}static set debug(e){this._debug=e}static log(e,t){if(this._debug)if(t!==void 0)console.log(`[Pandora] ${e}`,t);else console.log(`[Pandora] ${e}`)}static list(){return Object.keys(this.components)}static stats(e){if(e){if(!this.has(e))throw Error(`[Pandora] No component with tag <${e}> has been registered.`);return{tag:e,instanceCount:document.querySelectorAll(e).length,isRegistered:this.components[e]?._registered??!1,isLazy:e in this.lazyLoaders}}return this.list().map((t)=>({tag:t,instanceCount:document.querySelectorAll(t).length,isRegistered:this.components[t]?._registered??!1,isLazy:t in this.lazyLoaders}))}static onMount(e){return this._init(),this.mountCallbacks.add(e),()=>this.mountCallbacks.delete(e)}static onUnmount(e){return this._init(),this.unmountCallbacks.add(e),()=>this.unmountCallbacks.delete(e)}static _notifyMount(e,t){this.log(`Mounted: <${t}>`),this.mountCallbacks.forEach((n)=>{try{n(e,t)}catch(s){console.error("[Pandora] Error in onMount callback:",s)}})}static _notifyUnmount(e,t){this.log(`Unmounted: <${t}>`),this.unmountCallbacks.forEach((n)=>{try{n(e,t)}catch(s){console.error("[Pandora] Error in onUnmount callback:",s)}})}static onError(e){return this._init(),this.errorCallbacks.add(e),()=>this.errorCallbacks.delete(e)}static _notifyError(e,t,n,s){if(this.log(`Error in <${n}> during ${s}:`,e),this.errorCallbacks.size===0)throw e;this.errorCallbacks.forEach((o)=>{try{o(e,t,n,s)}catch(i){console.error("[Pandora] Error in onError callback:",i)}})}static alias(e,t){if(!this.has(t))throw Error(`[Pandora] Cannot alias <${e}>: no component with tag <${t}> has been registered.`);if(this.has(e))throw Error(`[Pandora] Cannot alias <${e}>: a component with that tag already exists.`);this.aliases[e]=t;let n=this.getImplementation(t)??this.components[t],s=class extends n{static _tag=e};this.components[e]=s,this.implementations[e]=s,window.customElements.define(e,s),s._registered=!0,this.log(`Created alias: <${e}> -> <${t}>`)}static getOriginalTag(e){return this.aliases[e]}static isAlias(e){return e in this.aliases}static lazy(e,t){if(this._init(),this.has(e))throw Error(`[Pandora] Cannot register lazy <${e}>: a component with that tag already exists.`);this.lazyLoaders[e]=t;let n=J;class s extends C{static _tag=e;_lazyLoaded=!1;async connectedCallback(){await n._loadLazyComponent(e);let o=n.getImplementation(e);if(o&&o!==s)J._applyImplementation(this,o,!1),this._lazyLoaded=!0;await super.connectedCallback()}}this.components[e]=s,window.customElements.define(e,s),this.log(`Registered lazy component: <${e}>`)}static async _loadLazyComponent(e){if(this.lazyLoadPromises[e])return this.lazyLoadPromises[e];if(!(e in this.lazyLoaders))return;let t=this.lazyLoaders[e];return this.log(`Loading lazy component: <${e}>`),this.lazyLoadPromises[e]=(async()=>{try{let n=await t(),s="default"in n?n.default:n;delete this.lazyLoaders[e],this.implementations[e]=s,s._registered=!0,this.log(`Loaded lazy component: <${e}>`)}catch(n){throw console.error(`[Pandora] Failed to load lazy component <${e}>:`,n),n}finally{delete this.lazyLoadPromises[e]}})(),this.lazyLoadPromises[e]}static isLazy(e){return e in this.lazyLoaders}static async preload(e){if(this.isLazy(e))await this._loadLazyComponent(e)}static use(e,t){return this._init(),this.middleware[e].add(t),()=>this.middleware[e].delete(t)}static _applyMiddleware(e,t,n,s){let o=n;return this.middleware[e].forEach((i)=>{try{o=i(t,o,s)}catch(r){console.error(`[Pandora] Error in ${e} middleware:`,r)}}),o}static _hasMiddleware(e){return this.middleware[e].size>0}}C._registryRegister=(e,t)=>J.register(e,t);var Rn=(e,t,n=globalThis)=>{let s=n,o=s[vt];if(o===void 0||o===null)return s[vt]={version:t,registry:e},!0;if(o.registry===e)return!0;let i=o.version===t?`both are version ${t}`:`the first is version ${o.version}, this one is version ${t}`;return console.error(`[Pandora] Two copies of @aegis-framework/pandora are loaded (${i}). Each copy has its own Registry, so components, global state and middleware registered with one are unknown to the other, and a tag both define throws. To fix it, install a single copy (run \`npm ls @aegis-framework/pandora\` and dedupe it), import Pandora only by its package name, and don't load the browser bundle (pandora.browser.js) on a page that also bundles the package.`),!1};Rn(J,wt);var E=J;var kn=new Set(["accessKey","autocapitalize","autocorrect","autofocus","className","contentEditable","dir","draggable","enterKeyHint","hidden","id","inert","innerHTML","innerText","inputMode","lang","nonce","outerHTML","part","popover","role","slot","spellcheck","style","tabIndex","textContent","title","translate","writingSuggestions"]),St=new WeakMap;Symbol.metadata??=Symbol("Symbol.metadata");var T=(e,t)=>{if(typeof t==="object"&&t!==null&&"kind"in t)return;throw TypeError(`[Pandora] @${e} was called as a legacy decorator. Pandora's decorators are standard decorators: remove "experimentalDecorators" from tsconfig.json (or set it to false), and if Babel compiles your code, set @babel/plugin-proposal-decorators to { version: "2023-11" }.`)},Ln=(e,t)=>(n,s)=>{T("Register",s);let o=s.metadata;if(o?.[A]){if(!Object.hasOwn(n,"_observedAttributes"))n._observedAttributes=[];for(let i of o[A])if(!n._observedAttributes.includes(i))n._observedAttributes.push(i)}if(o&&n[Symbol.metadata]===void 0)n[Symbol.metadata]=o;if(n.tag=e,!t?.defer)E.register(e,n);return n},xn=(e)=>(t,n)=>{T("Style",n);let s=n.metadata;return s[ce]=e,t},Pn=(e)=>(t,n)=>{T("Watch",n);let s=String(n.name),o=n.metadata;if(!Object.hasOwn(o,w)){let r=o[w];o[w]=r?[...r]:[]}o[w].push({property:e,methodName:s});let i=!1;n.addInitializer(function(){if(i)return;i=!0;let r=this;queueMicrotask(()=>{if(o[v]?.has(e)||Object.getOwnPropertyDescriptor(r,e)?.set)return;let d=r.constructor?.name||"<anonymous>";console.warn(`[Pandora] @Watch('${e}') on ${d}.${s}(): '${e}' is not reactive. Add @State, @Attribute, @Property, or @Subscribe to '${e}', or call reactive(this, '${e}') in the constructor — otherwise the watcher will never fire.`)})})},Lt=(e,t)=>{if(typeof Symbol.metadata>"u")return[];let s=e.constructor[Symbol.metadata]?.[w];if(!s)return[];let o=[];for(let i of s)if(i.property===t){let r=e[i.methodName];if(typeof r==="function")o.push(r.bind(e))}return o},On=(e)=>{if(kn.has(e)||/^aria[A-Z]/.test(e))return!0;return typeof HTMLElement<"u"&&e in HTMLElement.prototype},Ve=(e,t,n)=>{if(!On(t))return;n.addInitializer(function(){let s=this.constructor,o=St.get(s);if(o===void 0)o=new Set,St.set(s,o);if(o.has(t))return;o.add(t),console.warn(`[Pandora] ${s.name||"A component"}: @${e}() ${t} has the name of the element's own \`${t}\` property and replaces it, so the browser's behavior for \`${t}\` stops working on this element and code that uses \`element.${t}\` gets the field instead. Rename the field.`)})},xt=(e,t,n)=>{let s=Object.getOwnPropertyDescriptor(e,t);if(s&&"value"in s&&s.value!==void 0&&e[n]===void 0)e[n]=s.value},Pt=(e,t)=>{if(!Object.hasOwn(e,j)){let n=e[j];e[j]=n?[...n]:[]}e[j].push(t)},Ct=(e,t,n)=>{if(typeof n==="boolean")if(n)e.setAttribute(t,"");else e.removeAttribute(t);else if(typeof n==="string"||typeof n==="number")e.setAttribute(t,String(n))},we=(e,t,n)=>{if(e.isConnected){Ct(e,t,e[n]);return}let s=e[Y];if(s===void 0)s=new Map,e[Y]=s;s.set(t,()=>{if(!e.hasAttribute(t))Ct(e,t,e[n])})},Se=(e,t,n,s,o,i=!0,r=(a,d)=>a===d)=>{if(xt(e,n,s),Object.defineProperty(e,n,{get(){if(e[s]!==void 0)return e[s];if(e.hasAttribute(t))return P(e.getAttribute(t));return},set(a){let d=e[s];if(e[s]=a,e[o]=!0,a===void 0||a===null)e.removeAttribute(t);else if(typeof a==="string"||typeof a==="number"||typeof a==="boolean")if(typeof a==="boolean")if(a)e.setAttribute(t,"");else e.removeAttribute(t);else e.setAttribute(t,String(a));if(e[o]=!1,!r(d,a)){if(!he(e,{property:n,oldValue:d,newValue:a,shouldRender:i,source:"prop"})){let u=Lt(e,n);for(let l of u)l(a,d);if(e.didChange(n,d,a,"prop"),i&&e._initRenderDone&&e.isConnected)e._queueRender()}}},enumerable:!0,configurable:!0}),e.isConnected&&e.hasAttribute(t))e[s]=P(e.getAttribute(t));Z(e,()=>{delete e[n]})},Ce=(e,t,n,s,o="state",i=(r,a)=>r===a)=>{xt(e,t,n),Object.defineProperty(e,t,{get(){return e[n]},set(r){let a=e[n];if(i(a,r))return;if(e[n]=r,he(e,{property:t,oldValue:a,newValue:r,shouldRender:s,source:o}))return;let d=Lt(e,t);for(let u of d)u(r,a);if(e.didChange(t,a,r,o),s&&e._initRenderDone&&e.isConnected)e._queueRender()},enumerable:!0,configurable:!0}),Z(e,()=>{delete e[t]})},Dn=(e)=>(t,n)=>{T("State",n);let s=String(n.name);Ve("State",s,n);let o=e?.render!==!1,i=Symbol(`__pandora_state_${s}`),r,a=!1,d=n.metadata;if(!Object.hasOwn(d,v)){let u=d[v];d[v]=u?new Set(u):new Set}d[v].add(s),R(d,(u)=>{if(Ce(u,s,i,o),a&&u[i]===void 0)u[i]=r}),n.addInitializer(function(){let u=this,l=u[s];if(Ce(u,s,i,o),l!==void 0){if(u[i]=l,!a)r=l,a=!0}})},Mn=(e)=>(t,n)=>{T("Property",n);let s=String(n.name);Ve("Property",s,n);let o=Symbol(`__pandora_property_${s}`),i=e?.equals??((l,c)=>l===c),r=e?.attribute===!0?s:e?.attribute??!1,a,d=!1,u=n.metadata;if(!Object.hasOwn(u,v)){let l=u[v];u[v]=l?new Set(l):new Set}if(u[v].add(s),r!==!1){let l=Symbol(`__pandora_propSetting_${s}`);if(!Object.hasOwn(u,A)){let c=u[A];u[A]=c?[...c]:[]}if(!u[A].includes(r))u[A].push(r);Pt(u,{attrName:r,propertyKey:s,valueKey:o,settingKey:l,shouldRender:!1,equals:i}),R(u,(c)=>{if(Se(c,r,s,o,l,!1,i),d&&c[o]===void 0)if(c.hasAttribute(r))c[o]=P(c.getAttribute(r));else c[o]=a,we(c,r,s)}),n.addInitializer(function(){let c=this,h=c[s],p=c.hasAttribute(r),S=p?P(c.getAttribute(r)):void 0;if(Se(c,r,s,o,l,!1,i),h!==void 0&&!d)a=h,d=!0;if(p)c[o]=S;else if(h!==void 0)c[o]=h,we(c,r,s)})}else R(u,(l)=>{if(Ce(l,s,o,!1,"property",i),d&&l[o]===void 0)l[o]=a}),n.addInitializer(function(){let l=this,c=l[s];if(Ce(l,s,o,!1,"property",i),c!==void 0){if(l[o]=c,!d)a=c,d=!0}})},In=(e)=>(t,n)=>{T("Attribute",n);let s=String(n.name);Ve("Attribute",s,n);let o,i=!0;if(typeof e==="object")o=s,i=e.render!==!1;else o=e??s;let r=Symbol(`__pandora_attr_${s}`),a=n.metadata;if(!Object.hasOwn(a,v)){let l=a[v];a[v]=l?new Set(l):new Set}a[v].add(s);let d,u=!1;{let l=Symbol(`__pandora_propSetting_${s}`);if(!Object.hasOwn(a,A)){let c=a[A];a[A]=c?[...c]:[]}if(!a[A].includes(o))a[A].push(o);Pt(a,{attrName:o,propertyKey:s,valueKey:r,settingKey:l,shouldRender:i,equals:(c,h)=>c===h}),R(a,(c)=>{if(Se(c,o,s,r,l,i),u&&c[r]===void 0)if(c.hasAttribute(o))c[r]=P(c.getAttribute(o));else c[r]=d,we(c,o,s)}),n.addInitializer(function(){let c=this,h=c[s],p=c.hasAttribute(o),S=p?P(c.getAttribute(o)):void 0;if(Se(c,o,s,r,l,i),h!==void 0&&!u)d=h,u=!0;if(p)c[r]=S;else if(h!==void 0)c[r]=h,we(c,o,s)})}},At=(e,t,n,s,o)=>{if(Object.defineProperty(e,n,{get(){return e[o]},set(i){let r=e[o];if(r===i)return;if(e[o]=i,E.setState(t,i),e.didChange(n,r,i,"consumer"),e.isReady)e._queueRender()},enumerable:!0,configurable:!0}),e.isConnected)C._activateSubscription?.(e,{stateKey:t,propertyKey:n,unsubKey:s,valueKey:o});Z(e,()=>{if(e[s])e[s](),e[s]=void 0;delete e[n]})},Nn=(e)=>(t,n)=>{T("Subscribe",n);let s=String(n.name),o=Symbol(`__pandora_unsub_${s}`),i=Symbol(`__pandora_value_${s}`),r=n.metadata;if(!Object.hasOwn(r,v)){let a=r[v];r[v]=a?new Set(a):new Set}if(r[v].add(s),!Object.hasOwn(r,M)){let a=r[M];r[M]=a?[...a]:[]}r[M].push({stateKey:e,propertyKey:s,unsubKey:o,valueKey:i}),R(r,(a)=>{At(a,e,s,o,i)}),n.addInitializer(function(){At(this,e,s,o,i)})},Et=(e,t,n)=>{Object.defineProperty(e,t,{get(){return e.query(n)},enumerable:!0,configurable:!0})},Hn=(e)=>(t,n)=>{T("Query",n);let s=String(n.name),o=n.metadata;R(o,(i)=>{Et(i,s,e)}),n.addInitializer(function(){Et(this,s,e)})},Tt=(e,t,n)=>{Object.defineProperty(e,t,{get(){return e.queryAll(n)},enumerable:!0,configurable:!0})},jn=(e)=>(t,n)=>{T("QueryAll",n);let s=String(n.name),o=n.metadata;R(o,(i)=>{Tt(i,s,e)}),n.addInitializer(function(){Tt(this,s,e)})},$t=(e,t,n)=>{Object.defineProperty(e,t,{get(){return(e._shadowDOM||e.shadowRoot)?.querySelector(n)??null},enumerable:!0,configurable:!0})},Vn=(e)=>(t,n)=>{T("Slot",n);let s=String(n.name),o=e?`slot[name="${e}"]`:"slot:not([name])",i=n.metadata;R(i,(r)=>{$t(r,s,o)}),n.addInitializer(function(){$t(this,s,o)})},qn=(e,t)=>(n,s)=>{T("Listen",s);let o=String(s.name),i=s.metadata;if(!Object.hasOwn(i,H)){let r=i[H];i[H]=r?[...r]:[]}i[H].push({event:e,methodName:o,options:t})},Rt=(e,t,n,s,o)=>{e[`__invalidate_${t}`]=()=>{e[s]=!1},Object.defineProperty(e,t,{get(){if(!e[s])e[n]=o.call(e),e[s]=!0;return e[n]},enumerable:!0,configurable:!0})},Bn=(...e)=>(t,n)=>{T("Computed",n);let s=String(n.name),o=Symbol(`__pandora_computed_cache_${s}`),i=Symbol(`__pandora_computed_valid_${s}`),r=n.metadata;for(let d of e){if(!Object.hasOwn(r,w)){let u=r[w];r[w]=u?[...u]:[]}r[w].push({property:d,methodName:`__invalidate_${s}`})}let a=t;return R(r,(d)=>{Rt(d,s,o,i,a)}),n.addInitializer(function(){Rt(this,s,o,i,a)}),t},Un=(e)=>(t,n)=>{T("ClassList",n);let s=n.metadata,o=[],i=[];for(let[a,d]of Object.entries(e))if(typeof d==="string"){if(o.push({className:a,propertyName:d}),!Object.hasOwn(s,w)){let l=s[w];s[w]=l?[...l]:[]}let u=`__classlist_${a}_${d}`;s[w].push({property:d,methodName:u}),t.prototype[u]=function(){this.classList.toggle(a,!!this[d])}}else i.push({className:a,conditionFn:d});if(i.length>0){let a=t.prototype.didChange;t.prototype.didChange=function(d,u,l,c){a?.call(this,d,u,l,c);for(let{className:h,conditionFn:p}of i)this.classList.toggle(h,p(this))}}let r=t.prototype.connectedCallback;return t.prototype.connectedCallback=async function(){await r?.call(this);for(let{className:a,propertyName:d}of o)this.classList.toggle(a,!!this[d]);for(let{className:a,conditionFn:d}of i)this.classList.toggle(a,d(this))},t},kt=(e,t,n)=>{Object.defineProperty(e,t,{value:(s)=>e.emit(n,s),writable:!1,enumerable:!0,configurable:!0})},zn=(e)=>(t,n)=>{T("Emitter",n);let s=String(n.name),o=n.metadata;R(o,(i)=>{kt(i,s,e)}),n.addInitializer(function(){kt(this,s,e)})};class Ot extends C{_shadowDOM;static _styleSheet=null;static _sharedStyle={};constructor(){super();this._shadowDOM=this.attachShadow({mode:"open"}),this._trackScrolling(this._shadowDOM)}setStyle(e,t=!1){let n=this.constructor;if(!n._styleSheet)n._styleSheet=new CSSStyleSheet;let s="";if(typeof e==="object"){if(!Object.hasOwn(n,"_sharedStyle"))n._sharedStyle={};if(!t)n._sharedStyle={...n._sharedStyle,...e};else n._sharedStyle={...e};this._style=n._sharedStyle,s=X(n._sharedStyle)}else if(typeof e==="string")if(!t)s=Array.from(n._styleSheet.cssRules||[]).map((i)=>i.cssText).join(`
|
|
26
15
|
`)+`
|
|
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})}_resetRenderRoot(){while(this._shadowDOM.firstChild)this._shadowDOM.firstChild.remove();delete this._shadowDOM._$litPart$}_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(X.localName)??X.constructor??$,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)}}X._detachListeners()}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 b=G0;Symbol.metadata??=Symbol("Symbol.metadata");function jX(X,$){return function(J,Z){let Y=Z.metadata;if(Y?.[I]){if(!Object.hasOwn(J,"_observedAttributes"))J._observedAttributes=[];for(let Q of Y[I])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)b.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 SX=new Set(["hidden","title","slot","style","id","className","tabIndex","dir","lang","draggable","contentEditable","accessKey","innerHTML","outerHTML","textContent","innerText"]);function i0(X,$){if(SX.has($))console.warn(`[Pandora] @${X}('${$}') conflicts with HTMLElement.${$}. This may cause unexpected behavior. Consider renaming to avoid the conflict.`)}function LX(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,I)){let W=B[I];B[I]=W?[...W]:[]}if(!B[I].includes(z))B[I].push(z);I2(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),S=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]=S;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,I)){let W=q[I];q[I]=W?[...W]:[]}if(!q[I].includes(Y))q[I].push(Y);I2(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),S=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]=S;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 I2(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,b.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)=>{S2(Q,Z,X)}),J.addInitializer(function(){S2(this,Z,X)})}}function AX(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 S2(X,$,J){Object.defineProperty(X,$,{get(){return X.query(J)},enumerable:!0,configurable:!0})}function L2(X,$,J){Object.defineProperty(X,$,{get(){return X.queryAll(J)},enumerable:!0,configurable:!0})}function IX(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 bX(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&&!b.hasState(X))b.setState(X,$);return{key:X,get(){return b.getState(X)},set(J){b.setState(X,J)},subscribe(J){return b.subscribe(X,J)},has(){return b.hasState(X)},delete(){b.deleteState(X)}}}var x2={};t0(x2,{whenReady:()=>b2,resetRegistry:()=>wX,mount:()=>fX,flush:()=>KX});async function KX(){await new Promise((X)=>queueMicrotask(X)),await new Promise((X)=>queueMicrotask(X))}function b2(X,$=5000){let J=X;if(J.isReady)return Promise.resolve();return new Promise((Z,Y)=>{let Q=()=>{clearTimeout(q),clearInterval(G),X.removeEventListener("pandora:ready",z)},z=()=>{if(J.isReady)Q(),Z()},q=setTimeout(()=>{Q(),Y(Error(`Component <${X.tagName.toLowerCase()}> did not become ready within ${$}ms`))},$);X.addEventListener("pandora:ready",z);let G=setInterval(z,16)})}function wX(){b.clearState(),b.clearSubscriptions(),b.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 b2(Q),Q}var TX={};var N={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},_=(X)=>(...$)=>({["_$litDirective$"]:X,values:$});class k{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},I0=(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)I0(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),I0(Z[Q]);else if(Z!=null)U0(Z,!1),I0(Z)}else U0(this,X)}var cX=(X)=>{if(X.type==N.CHILD)X._$notifyConnectionChanged??=pX,X._$reparentDisconnectables??=uX};class d extends k{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),I0(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 b0 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=_(b0);class K2 extends b0{constructor(X){super(X);if(X.type!==N.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 k{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 k{constructor(X){super(X);if(X.type!==N.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 k{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 k{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 k{constructor(X){super(X);if(!(X.type===N.PROPERTY||X.type===N.ATTRIBUTE||X.type===N.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===N.PROPERTY){if($===J[Z])return H}else if(X.type===N.BOOLEAN_ATTRIBUTE){if(!!$===J.hasAttribute(Z))return H}else if(X.type===N.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 k{constructor(X){super(X);if(X.type!==N.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,S=Q.length-1;while(W<=O&&U<=S)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[S])G[S]=K(Y[O],Q[S]),O--,S--;else if(q[W]===z[S])G[S]=K(Y[W],Q[S]),R(X,G[S+1],Y[W]),W++,S--;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,S),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<=S){let h=R(X,G[S+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 k{constructor(X){super(X);if(X.type!==N.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 k{constructor(X){super(X);if(X.type!==N.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 k{constructor(X){super(X);if(this._value=M,X.type!==N.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,LX as State,IX as Slot,MX as ShadowComponent,b as Registry,jX as Register,AX as QueryAll,VX as Query,NX as Property,N as PartType,bX as Listen,RX as Emitter,k as Directive,xX as Computed,A as Component,EX as ClassList,kX as Attribute,d as AsyncDirective};
|
|
16
|
+
`+e;else s=e,n._sharedStyle={},this._style={};return n._styleSheet.replaceSync(s),this._shadowDOM.adoptedStyleSheets=[n._styleSheet],n._sharedStyle}_renderRoot(){return this._shadowDOM}_applyLitRender(e){z(e,this._shadowDOM,{host:this})}_resetRenderRoot(){while(this._shadowDOM.firstChild)this._shadowDOM.firstChild.remove();delete this._shadowDOM._$litPart$}_applyStringRender(e){while(this._shadowDOM.firstChild)this._shadowDOM.firstChild.remove();if(e==="")return;let t=document.createElement("template");t.innerHTML=e,this._shadowDOM.appendChild(t.content)}get shadowRoot(){return this._shadowDOM}set shadowRoot(e){throw Error("ShadowComponent shadowRoot can not be overwritten.")}query(e){return this._shadowDOM.querySelector(e)}queryAll(e){return this._shadowDOM.querySelectorAll(e)}}var Fn=Ot;var Wn=async()=>{await new Promise((e)=>queueMicrotask(e)),await new Promise((e)=>queueMicrotask(e))},Dt=(e,t=5000)=>{let n=e;if(n.isReady)return Promise.resolve();return new Promise((s,o)=>{let i=()=>{clearTimeout(a),clearInterval(d),e.removeEventListener("pandora:ready",r)},r=()=>{if(n.isReady)i(),s()},a=setTimeout(()=>{i(),o(Error(`Component <${e.tagName.toLowerCase()}> did not become ready within ${t}ms`))},t);e.addEventListener("pandora:ready",r);let d=setInterval(r,16)})},Gn=()=>{E.clearState(),E.clearSubscriptions(),E.clearMiddleware()},Kn=async(e,t,n)=>{let s=t??document.body,o=document.createElement("div");o.innerHTML=`<${e}>${n??""}</${e}>`;let i=o.firstElementChild;return s.appendChild(i),await Dt(i),i};var Qn=(e,t)=>{if(t!==void 0&&!E.hasState(e))E.setState(e,t);return{key:e,get(){return E.getState(e)},set(n){E.setState(e,n)},subscribe(n){return E.subscribe(e,n)},has(){return E.hasState(e)},delete(){E.deleteState(e)}}};export{I as AsyncDirective,In as Attribute,Un as ClassList,C as Component,Bn as Computed,_ as Directive,zn as Emitter,qn as Listen,b as PartType,Mn as Property,Hn as Query,jn as QueryAll,Ln as Register,E as Registry,Fn as ShadowComponent,Vn as Slot,Dn as State,xn as Style,Nn as Subscribe,zt as TemplateResultType,Yn as Types,bt as Util,wt as VERSION,Pn as Watch,R as addDecoratorEffect,Z as addTeardown,Zt as asyncAppend,Xt as asyncReplace,Jt as cache,en as choose,tn as classMap,ie as clearPart,un as createRef,Qn as createState,m as directive,Q as getCommittedValue,Wt as getDirectiveClass,sn as guard,Vt as html,on as ifDefined,k as insertPart,Me as isCompiledTemplateResult,Ft as isDirectiveResult,De as isPrimitive,oe as isSingleExpression,fe as isTemplateResult,rn as join,an as keyed,dn as live,ln as map,y as noChange,f as nothing,cn as range,gt as reactive,yt as reactiveFields,hn as ref,re as removePart,z as render,pn as repeat,L as setChildPartValue,x as setCommittedValue,mn as styleMap,qt as svg,yn as templateContent,Mt as testing,gn as unsafeHTML,bn as unsafeMathML,_n as unsafeSVG,vn as until,wn as when};
|
|
28
17
|
|
|
29
|
-
//# debugId=
|
|
18
|
+
//# debugId=8CA82B289575A68864756E2164756E21
|
|
30
19
|
//# sourceMappingURL=pandora.js.map
|