@aegis-framework/pandora 0.4.1 → 0.5.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/dist/pandora.js CHANGED
@@ -1,8 +1,8 @@
1
- var SJ=Object.defineProperty;var DJ=(J,X)=>{for(var Y in X)SJ(J,Y,{get:X[Y],enumerable:!0,configurable:!0,set:(Z)=>X[Y]=()=>Z})};var f=globalThis,H=(J)=>{if(!f.emitLitDebugLogEvents)return;f.dispatchEvent(new CustomEvent("lit-debug",{detail:J}))},KJ=0,x;f.litIssuedWarnings??=new Set,x=(J,X)=>{if(X+=J?` See https://lit.dev/msg/${J} for more information.`:"",!f.litIssuedWarnings.has(X)&&!f.litIssuedWarnings.has(J))console.warn(X),f.litIssuedWarnings.add(X)},queueMicrotask(()=>{x("dev-mode","Lit is in dev mode. Not recommended for production!")});var O=f.ShadyDOM?.inUse&&f.ShadyDOM?.noPatch===!0?f.ShadyDOM.wrap:(J)=>J,v=f.trustedTypes,XJ=v?v.createPolicy("lit-html",{createHTML:(J)=>J}):void 0,RJ=(J)=>J,u=(J,X,Y)=>RJ,AJ=(J)=>{if(L!==u)throw Error("Attempted to overwrite existing lit-html security policy. setSanitizeDOMValueFactory should be called at most once.");L=J},EJ=()=>{L=u},l=(J,X,Y)=>{return L(J,X,Y)},QJ="$lit$",S=`lit$${Math.random().toFixed(9).slice(2)}$`,BJ="?"+S,NJ=`<${BJ}>`,N=document,w=()=>N.createComment(""),b=(J)=>J===null||typeof J!="object"&&typeof J!="function",n=Array.isArray,LJ=(J)=>n(J)||typeof J?.[Symbol.iterator]==="function",i=`[
1
+ var fJ=Object.defineProperty;var DJ=(J,X)=>{for(var Y in X)fJ(J,Y,{get:X[Y],enumerable:!0,configurable:!0,set:(Z)=>X[Y]=()=>Z})};var O=globalThis,H=(J)=>{if(!O.emitLitDebugLogEvents)return;O.dispatchEvent(new CustomEvent("lit-debug",{detail:J}))},KJ=0,x;O.litIssuedWarnings??=new Set,x=(J,X)=>{if(X+=J?` See https://lit.dev/msg/${J} for more information.`:"",!O.litIssuedWarnings.has(X)&&!O.litIssuedWarnings.has(J))console.warn(X),O.litIssuedWarnings.add(X)},queueMicrotask(()=>{x("dev-mode","Lit is in dev mode. Not recommended for production!")});var S=O.ShadyDOM?.inUse&&O.ShadyDOM?.noPatch===!0?O.ShadyDOM.wrap:(J)=>J,v=O.trustedTypes,XJ=v?v.createPolicy("lit-html",{createHTML:(J)=>J}):void 0,RJ=(J)=>J,u=(J,X,Y)=>RJ,AJ=(J)=>{if(L!==u)throw Error("Attempted to overwrite existing lit-html security policy. setSanitizeDOMValueFactory should be called at most once.");L=J},EJ=()=>{L=u},l=(J,X,Y)=>{return L(J,X,Y)},QJ="$lit$",f=`lit$${Math.random().toFixed(9).slice(2)}$`,BJ="?"+f,NJ=`<${BJ}>`,N=document,w=()=>N.createComment(""),b=(J)=>J===null||typeof J!="object"&&typeof J!="function",n=Array.isArray,LJ=(J)=>n(J)||typeof J?.[Symbol.iterator]==="function",i=`[
2
2
  \f\r]`,VJ=`[^
3
3
  \f\r"'\`<>=]`,IJ=`[^\\s"'>=/]`,h=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,YJ=1,s=2,PJ=3,ZJ=/-->/g,$J=/>/g,K=new RegExp(`>|${i}(?:(${IJ}+)(${i}*=${i}*(?:${VJ}|("|')|))|$)`,"g"),TJ=0,qJ=1,CJ=2,WJ=3,o=/'/g,r=/"/g,HJ=/^(?:script|style|textarea|title)$/i,hJ=1,c=2,g=3,a=1,p=2,xJ=3,wJ=4,bJ=5,t=6,kJ=7,e=(J)=>(X,...Y)=>{if(X.some((Z)=>Z===void 0))console.warn(`Some template strings are undefined.
4
4
  This is probably caused by illegal octal escape sequences.`);if(Y.some((Z)=>Z?._$litStatic$))x("",`Static values 'literal' or 'unsafeStatic' cannot be used as values to non-static templates.
5
- Please use the static 'html' tag function. See https://lit.dev/docs/templates/expressions/#static-expressions`);return{["_$litType$"]:J,strings:X,values:Y}},yJ=e(hJ),dJ=e(c),rJ=e(g),I=Symbol.for("lit-noChange"),M=Symbol.for("lit-nothing"),GJ=new WeakMap,E=N.createTreeWalker(N,129),L=u;function FJ(J,X){if(!n(J)||!J.hasOwnProperty("raw")){let Y="invalid template strings array";throw Y=`
5
+ Please use the static 'html' tag function. See https://lit.dev/docs/templates/expressions/#static-expressions`);return{["_$litType$"]:J,strings:X,values:Y}},yJ=e(hJ),dJ=e(c),rJ=e(g),I=Symbol.for("lit-noChange"),U=Symbol.for("lit-nothing"),GJ=new WeakMap,E=N.createTreeWalker(N,129),L=u;function FJ(J,X){if(!n(J)||!J.hasOwnProperty("raw")){let Y="invalid template strings array";throw Y=`
6
6
  Internal Error: expected template strings to be an array
7
7
  with a 'raw' field. Faking a template strings array by
8
8
  calling html or svg like an ordinary function is effectively
@@ -13,17 +13,17 @@ Please use the static 'html' tag function. See https://lit.dev/docs/templates/ex
13
13
  https://github.com/lit/lit/issues/new?template=bug_report.md
14
14
  and include information about your build tooling, if any.
15
15
  `.trim().replace(/\n */g,`
16
- `),Error(Y)}return XJ!==void 0?XJ.createHTML(X):X}var mJ=(J,X)=>{let Y=J.length-1,Z=[],$=X===c?"<svg>":X===g?"<math>":"",q,W=h;for(let Q=0;Q<Y;Q++){let F=J[Q],B=-1,_,D=0,z;while(D<F.length){if(W.lastIndex=D,z=W.exec(F),z===null)break;if(D=W.lastIndex,W===h){if(z[YJ]==="!--")W=ZJ;else if(z[YJ]!==void 0)W=$J;else if(z[s]!==void 0){if(HJ.test(z[s]))q=new RegExp(`</${z[s]}`,"g");W=K}else if(z[PJ]!==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(W===K)if(z[TJ]===">")W=q??h,B=-1;else if(z[qJ]===void 0)B=-2;else B=W.lastIndex-z[CJ].length,_=z[qJ],W=z[WJ]===void 0?K:z[WJ]==='"'?r:o;else if(W===r||W===o)W=K;else if(W===ZJ||W===$J)W=h;else W=K,q=void 0}console.assert(B===-1||W===K||W===o||W===r,"unexpected parse state B");let A=W===K&&J[Q+1].startsWith("/>")?" ":"";$+=W===h?F+NJ:B>=0?(Z.push(_),F.slice(0,B)+QJ+F.slice(B))+S+A:F+S+(B===-2?Q:A)}let G=$+(J[Y]||"<?>")+(X===c?"</svg>":X===g?"</math>":"");return[FJ(J,G),Z]};class k{constructor({strings:J,["_$litType$"]:X},Y){this.parts=[];let Z,$=0,q=0,W=J.length-1,G=this.parts,[Q,F]=mJ(J,X);if(this.el=k.createElement(Q,Y),E.currentNode=this.el.content,X===c||X===g){let B=this.el.content.firstChild;B.replaceWith(...B.childNodes)}while((Z=E.nextNode())!==null&&G.length<W){if(Z.nodeType===1){{let B=Z.localName;if(/^(?:textarea|template)$/i.test(B)&&Z.innerHTML.includes(S)){let _=`Expressions are not supported inside \`${B}\` elements. See https://lit.dev/msg/expression-in-${B} for more information.`;if(B==="template")throw Error(_);else x("",_)}}if(Z.hasAttributes()){for(let B of Z.getAttributeNames())if(B.endsWith(QJ)){let _=F[q++],z=Z.getAttribute(B).split(S),A=/([.?@])?(.*)/.exec(_);G.push({type:a,index:$,name:A[2],strings:z,ctor:A[1]==="."?UJ:A[1]==="?"?zJ:A[1]==="@"?_J:d}),Z.removeAttribute(B)}else if(B.startsWith(S))G.push({type:t,index:$}),Z.removeAttribute(B)}if(HJ.test(Z.tagName)){let B=Z.textContent.split(S),_=B.length-1;if(_>0){Z.textContent=v?v.emptyScript:"";for(let D=0;D<_;D++)Z.append(B[D],w()),E.nextNode(),G.push({type:p,index:++$});Z.append(B[_],w())}}}else if(Z.nodeType===8)if(Z.data===BJ)G.push({type:p,index:$});else{let _=-1;while((_=Z.data.indexOf(S,_+1))!==-1)G.push({type:kJ,index:$}),_+=S.length-1}$++}if(F.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`'+J.join("${...}")+"`");H&&H({kind:"template prep",template:this,clonableTemplate:this.el,parts:this.parts,strings:J})}static createElement(J,X){let Y=N.createElement("template");return Y.innerHTML=J,Y}}function P(J,X,Y=J,Z){if(X===I)return X;let $=Z!==void 0?Y.__directives?.[Z]:Y.__directive,q=b(X)?void 0:X._$litDirective$;if($?.constructor!==q){if($?._$notifyDirectiveConnectionChanged?.(!1),q===void 0)$=void 0;else $=new q(J),$._$initialize(J,Y,Z);if(Z!==void 0)(Y.__directives??=[])[Z]=$;else Y.__directive=$}if($!==void 0)X=P(J,$._$resolve(J,X.values),$,Z);return X}class MJ{constructor(J,X){this._$parts=[],this._$disconnectableChildren=void 0,this._$template=J,this._$parent=X}get parentNode(){return this._$parent.parentNode}get _$isConnected(){return this._$parent._$isConnected}_clone(J){let{el:{content:X},parts:Y}=this._$template,Z=(J?.creationScope??N).importNode(X,!0);E.currentNode=Z;let $=E.nextNode(),q=0,W=0,G=Y[0];while(G!==void 0){if(q===G.index){let Q;if(G.type===p)Q=new y($,$.nextSibling,this,J);else if(G.type===a)Q=new G.ctor($,G.name,G.strings,this,J);else if(G.type===t)Q=new jJ($,this,J);this._$parts.push(Q),G=Y[++W]}if(q!==G?.index)$=E.nextNode(),q++}return E.currentNode=N,Z}_update(J){let X=0;for(let Y of this._$parts){if(Y!==void 0)if(H&&H({kind:"set part",part:Y,value:J[X],valueIndex:X,values:J,templateInstance:this}),Y.strings!==void 0)Y._$setValue(J,Y,X),X+=Y.strings.length-2;else Y._$setValue(J[X]);X++}}}class y{get _$isConnected(){return this._$parent?._$isConnected??this.__isConnected}constructor(J,X,Y,Z){this.type=p,this._$committedValue=M,this._$disconnectableChildren=void 0,this._$startNode=J,this._$endNode=X,this._$parent=Y,this.options=Z,this.__isConnected=Z?.isConnected??!0,this._textSanitizer=void 0}get parentNode(){let J=O(this._$startNode).parentNode,X=this._$parent;if(X!==void 0&&J?.nodeType===11)J=X.parentNode;return J}get startNode(){return this._$startNode}get endNode(){return this._$endNode}_$setValue(J,X=this){if(this.parentNode===null)throw Error("This `ChildPart` has no `parentNode` and therefore cannot accept a value. This likely means the element containing the part was manipulated in an unsupported way outside of Lit's control such that the part's marker nodes were ejected from DOM. For example, setting the element's `innerHTML` or `textContent` can do this.");if(J=P(this,J,X),b(J)){if(J===M||J==null||J===""){if(this._$committedValue!==M)H&&H({kind:"commit nothing to child",start:this._$startNode,end:this._$endNode,parent:this._$parent,options:this.options}),this._$clear();this._$committedValue=M}else if(J!==this._$committedValue&&J!==I)this._commitText(J)}else if(J._$litType$!==void 0)this._commitTemplateResult(J);else if(J.nodeType!==void 0){if(this.options?.host===J){this._commitText("[probable mistake: rendered a template's host in itself (commonly caused by writing ${this} in a template]"),console.warn("Attempted to render the template host",J,"inside itself. This is almost always a mistake, and in dev mode ","we render some warning text. In production however, we'll ","render it, which will usually result in an error, and sometimes ","in the element disappearing from the DOM.");return}this._commitNode(J)}else if(LJ(J))this._commitIterable(J);else this._commitText(J)}_insert(J){return O(O(this._$startNode).parentNode).insertBefore(J,this._$endNode)}_commitNode(J){if(this._$committedValue!==J){if(this._$clear(),L!==u){let X=this._$startNode.parentNode?.nodeName;if(X==="STYLE"||X==="SCRIPT"){let Y="Forbidden";if(X==="STYLE")Y="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 Y="Lit does not support binding inside script nodes. This is a security risk, as it could allow arbitrary code execution.";throw Error(Y)}}H&&H({kind:"commit node",start:this._$startNode,parent:this._$parent,value:J,options:this.options}),this._$committedValue=this._insert(J)}}_commitText(J){if(this._$committedValue!==M&&b(this._$committedValue)){let X=O(this._$startNode).nextSibling;if(this._textSanitizer===void 0)this._textSanitizer=l(X,"data","property");J=this._textSanitizer(J),H&&H({kind:"commit text",node:X,value:J,options:this.options}),X.data=J}else{let X=N.createTextNode("");if(this._commitNode(X),this._textSanitizer===void 0)this._textSanitizer=l(X,"data","property");J=this._textSanitizer(J),H&&H({kind:"commit text",node:X,value:J,options:this.options}),X.data=J}this._$committedValue=J}_commitTemplateResult(J){let{values:X,["_$litType$"]:Y}=J,Z=typeof Y==="number"?this._$getTemplate(J):(Y.el===void 0&&(Y.el=k.createElement(FJ(Y.h,Y.h[0]),this.options)),Y);if(this._$committedValue?._$template===Z)H&&H({kind:"template updating",template:Z,instance:this._$committedValue,parts:this._$committedValue._$parts,options:this.options,values:X}),this._$committedValue._update(X);else{let $=new MJ(Z,this),q=$._clone(this.options);H&&H({kind:"template instantiated",template:Z,instance:$,parts:$._$parts,options:this.options,fragment:q,values:X}),$._update(X),H&&H({kind:"template instantiated and updated",template:Z,instance:$,parts:$._$parts,options:this.options,fragment:q,values:X}),this._commitNode(q),this._$committedValue=$}}_$getTemplate(J){let X=GJ.get(J.strings);if(X===void 0)GJ.set(J.strings,X=new k(J));return X}_commitIterable(J){if(!n(this._$committedValue))this._$committedValue=[],this._$clear();let X=this._$committedValue,Y=0,Z;for(let $ of J){if(Y===X.length)X.push(Z=new y(this._insert(w()),this._insert(w()),this,this.options));else Z=X[Y];Z._$setValue($),Y++}if(Y<X.length)this._$clear(Z&&O(Z._$endNode).nextSibling,Y),X.length=Y}_$clear(J=O(this._$startNode).nextSibling,X){this._$notifyConnectionChanged?.(!1,!0,X);while(J!==this._$endNode){let Y=O(J).nextSibling;O(J).remove(),J=Y}}setConnected(J){if(this._$parent===void 0)this.__isConnected=J,this._$notifyConnectionChanged?.(J);else throw Error("part.setConnected() may only be called on a RootPart returned from render().")}}class d{get tagName(){return this.element.tagName}get _$isConnected(){return this._$parent._$isConnected}constructor(J,X,Y,Z,$){if(this.type=a,this._$committedValue=M,this._$disconnectableChildren=void 0,this.element=J,this.name=X,this._$parent=Z,this.options=$,Y.length>2||Y[0]!==""||Y[1]!=="")this._$committedValue=Array(Y.length-1).fill(new String),this.strings=Y;else this._$committedValue=M;this._sanitizer=void 0}_$setValue(J,X=this,Y,Z){let $=this.strings,q=!1;if($===void 0){if(J=P(this,J,X,0),q=!b(J)||J!==this._$committedValue&&J!==I,q)this._$committedValue=J}else{let W=J;J=$[0];let G,Q;for(G=0;G<$.length-1;G++){if(Q=P(this,W[Y+G],X,G),Q===I)Q=this._$committedValue[G];if(q||=!b(Q)||Q!==this._$committedValue[G],Q===M)J=M;else if(J!==M)J+=(Q??"")+$[G+1];this._$committedValue[G]=Q}}if(q&&!Z)this._commitValue(J)}_commitValue(J){if(J===M)O(this.element).removeAttribute(this.name);else{if(this._sanitizer===void 0)this._sanitizer=L(this.element,this.name,"attribute");J=this._sanitizer(J??""),H&&H({kind:"commit attribute",element:this.element,name:this.name,value:J,options:this.options}),O(this.element).setAttribute(this.name,J??"")}}}class UJ extends d{constructor(){super(...arguments);this.type=xJ}_commitValue(J){if(this._sanitizer===void 0)this._sanitizer=L(this.element,this.name,"property");J=this._sanitizer(J),H&&H({kind:"commit property",element:this.element,name:this.name,value:J,options:this.options}),this.element[this.name]=J===M?void 0:J}}class zJ extends d{constructor(){super(...arguments);this.type=wJ}_commitValue(J){H&&H({kind:"commit boolean attribute",element:this.element,name:this.name,value:!!(J&&J!==M),options:this.options}),O(this.element).toggleAttribute(this.name,!!J&&J!==M)}}class _J extends d{constructor(J,X,Y,Z,$){super(J,X,Y,Z,$);if(this.type=bJ,this.strings!==void 0)throw Error(`A \`<${J.localName}>\` has a \`@${X}=...\` listener with invalid content. Event listeners in templates must have exactly one expression and no surrounding text.`)}_$setValue(J,X=this){if(J=P(this,J,X,0)??M,J===I)return;let Y=this._$committedValue,Z=J===M&&Y!==M||J.capture!==Y.capture||J.once!==Y.once||J.passive!==Y.passive,$=J!==M&&(Y===M||Z);if(H&&H({kind:"commit event listener",element:this.element,name:this.name,value:J,options:this.options,removeListener:Z,addListener:$,oldListener:Y}),Z)this.element.removeEventListener(this.name,this,Y);if($)this.element.addEventListener(this.name,this,J);this._$committedValue=J}handleEvent(J){if(typeof this._$committedValue==="function")this._$committedValue.call(this.options?.host??this.element,J);else this._$committedValue.handleEvent(J)}}class jJ{constructor(J,X,Y){this.element=J,this.type=t,this._$disconnectableChildren=void 0,this._$parent=X,this.options=Y}get _$isConnected(){return this._$parent._$isConnected}_$setValue(J){H&&H({kind:"commit to element binding",element:this.element,value:J,options:this.options}),P(this,J)}}var vJ=f.litHtmlPolyfillSupportDevMode;vJ?.(k,y);(f.litHtmlVersions??=[]).push("3.3.1");if(f.litHtmlVersions.length>1)queueMicrotask(()=>{x("multiple-versions","Multiple versions of Lit loaded. Loading multiple versions is not recommended.")});var R=(J,X,Y)=>{if(X==null)throw TypeError(`The container to render into may not be ${X}`);let Z=KJ++,$=Y?.renderBefore??X,q=$._$litPart$;if(H&&H({kind:"begin render",id:Z,value:J,container:X,options:Y,part:q}),q===void 0){let W=Y?.renderBefore??null;$._$litPart$=q=new y(X.insertBefore(w(),W),W,void 0,Y??{})}return q._$setValue(J),H&&H({kind:"end render",id:Z,value:J,container:X,options:Y,part:q}),q};R.setSanitizer=AJ,R.createSanitizer=l,R._testOnlyClearSanitizerFactoryDoNotCallOrElse=EJ;var fJ={};DJ(fJ,{isTemplateResult:()=>V,deserializeCSS:()=>T,callAsync:()=>m});function m(J,X,...Y){try{let Z=J.apply(X,Y);return Z instanceof Promise?Z:Promise.resolve(Z)}catch(Z){return Promise.reject(Z)}}function V(J){return J!==null&&typeof J==="object"&&"_$litType$"in J}function T(J,X="",Y=0){let Z=Object.keys(J),$="";for(let q of Z){let W=J[q];if(typeof W==="object"&&W!==null){if(X&&!q.startsWith("@"))if(q.startsWith("&"))$+=`${q.replace(/&/g,X)} {
16
+ `),Error(Y)}return XJ!==void 0?XJ.createHTML(X):X}var mJ=(J,X)=>{let Y=J.length-1,Z=[],$=X===c?"<svg>":X===g?"<math>":"",q,W=h;for(let Q=0;Q<Y;Q++){let F=J[Q],B=-1,_,D=0,M;while(D<F.length){if(W.lastIndex=D,M=W.exec(F),M===null)break;if(D=W.lastIndex,W===h){if(M[YJ]==="!--")W=ZJ;else if(M[YJ]!==void 0)W=$J;else if(M[s]!==void 0){if(HJ.test(M[s]))q=new RegExp(`</${M[s]}`,"g");W=K}else if(M[PJ]!==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(W===K)if(M[TJ]===">")W=q??h,B=-1;else if(M[qJ]===void 0)B=-2;else B=W.lastIndex-M[CJ].length,_=M[qJ],W=M[WJ]===void 0?K:M[WJ]==='"'?r:o;else if(W===r||W===o)W=K;else if(W===ZJ||W===$J)W=h;else W=K,q=void 0}console.assert(B===-1||W===K||W===o||W===r,"unexpected parse state B");let A=W===K&&J[Q+1].startsWith("/>")?" ":"";$+=W===h?F+NJ:B>=0?(Z.push(_),F.slice(0,B)+QJ+F.slice(B))+f+A:F+f+(B===-2?Q:A)}let G=$+(J[Y]||"<?>")+(X===c?"</svg>":X===g?"</math>":"");return[FJ(J,G),Z]};class k{constructor({strings:J,["_$litType$"]:X},Y){this.parts=[];let Z,$=0,q=0,W=J.length-1,G=this.parts,[Q,F]=mJ(J,X);if(this.el=k.createElement(Q,Y),E.currentNode=this.el.content,X===c||X===g){let B=this.el.content.firstChild;B.replaceWith(...B.childNodes)}while((Z=E.nextNode())!==null&&G.length<W){if(Z.nodeType===1){{let B=Z.localName;if(/^(?:textarea|template)$/i.test(B)&&Z.innerHTML.includes(f)){let _=`Expressions are not supported inside \`${B}\` elements. See https://lit.dev/msg/expression-in-${B} for more information.`;if(B==="template")throw Error(_);else x("",_)}}if(Z.hasAttributes()){for(let B of Z.getAttributeNames())if(B.endsWith(QJ)){let _=F[q++],M=Z.getAttribute(B).split(f),A=/([.?@])?(.*)/.exec(_);G.push({type:a,index:$,name:A[2],strings:M,ctor:A[1]==="."?zJ:A[1]==="?"?MJ:A[1]==="@"?_J:d}),Z.removeAttribute(B)}else if(B.startsWith(f))G.push({type:t,index:$}),Z.removeAttribute(B)}if(HJ.test(Z.tagName)){let B=Z.textContent.split(f),_=B.length-1;if(_>0){Z.textContent=v?v.emptyScript:"";for(let D=0;D<_;D++)Z.append(B[D],w()),E.nextNode(),G.push({type:p,index:++$});Z.append(B[_],w())}}}else if(Z.nodeType===8)if(Z.data===BJ)G.push({type:p,index:$});else{let _=-1;while((_=Z.data.indexOf(f,_+1))!==-1)G.push({type:kJ,index:$}),_+=f.length-1}$++}if(F.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`'+J.join("${...}")+"`");H&&H({kind:"template prep",template:this,clonableTemplate:this.el,parts:this.parts,strings:J})}static createElement(J,X){let Y=N.createElement("template");return Y.innerHTML=J,Y}}function P(J,X,Y=J,Z){if(X===I)return X;let $=Z!==void 0?Y.__directives?.[Z]:Y.__directive,q=b(X)?void 0:X._$litDirective$;if($?.constructor!==q){if($?._$notifyDirectiveConnectionChanged?.(!1),q===void 0)$=void 0;else $=new q(J),$._$initialize(J,Y,Z);if(Z!==void 0)(Y.__directives??=[])[Z]=$;else Y.__directive=$}if($!==void 0)X=P(J,$._$resolve(J,X.values),$,Z);return X}class UJ{constructor(J,X){this._$parts=[],this._$disconnectableChildren=void 0,this._$template=J,this._$parent=X}get parentNode(){return this._$parent.parentNode}get _$isConnected(){return this._$parent._$isConnected}_clone(J){let{el:{content:X},parts:Y}=this._$template,Z=(J?.creationScope??N).importNode(X,!0);E.currentNode=Z;let $=E.nextNode(),q=0,W=0,G=Y[0];while(G!==void 0){if(q===G.index){let Q;if(G.type===p)Q=new y($,$.nextSibling,this,J);else if(G.type===a)Q=new G.ctor($,G.name,G.strings,this,J);else if(G.type===t)Q=new jJ($,this,J);this._$parts.push(Q),G=Y[++W]}if(q!==G?.index)$=E.nextNode(),q++}return E.currentNode=N,Z}_update(J){let X=0;for(let Y of this._$parts){if(Y!==void 0)if(H&&H({kind:"set part",part:Y,value:J[X],valueIndex:X,values:J,templateInstance:this}),Y.strings!==void 0)Y._$setValue(J,Y,X),X+=Y.strings.length-2;else Y._$setValue(J[X]);X++}}}class y{get _$isConnected(){return this._$parent?._$isConnected??this.__isConnected}constructor(J,X,Y,Z){this.type=p,this._$committedValue=U,this._$disconnectableChildren=void 0,this._$startNode=J,this._$endNode=X,this._$parent=Y,this.options=Z,this.__isConnected=Z?.isConnected??!0,this._textSanitizer=void 0}get parentNode(){let J=S(this._$startNode).parentNode,X=this._$parent;if(X!==void 0&&J?.nodeType===11)J=X.parentNode;return J}get startNode(){return this._$startNode}get endNode(){return this._$endNode}_$setValue(J,X=this){if(this.parentNode===null)throw Error("This `ChildPart` has no `parentNode` and therefore cannot accept a value. This likely means the element containing the part was manipulated in an unsupported way outside of Lit's control such that the part's marker nodes were ejected from DOM. For example, setting the element's `innerHTML` or `textContent` can do this.");if(J=P(this,J,X),b(J)){if(J===U||J==null||J===""){if(this._$committedValue!==U)H&&H({kind:"commit nothing to child",start:this._$startNode,end:this._$endNode,parent:this._$parent,options:this.options}),this._$clear();this._$committedValue=U}else if(J!==this._$committedValue&&J!==I)this._commitText(J)}else if(J._$litType$!==void 0)this._commitTemplateResult(J);else if(J.nodeType!==void 0){if(this.options?.host===J){this._commitText("[probable mistake: rendered a template's host in itself (commonly caused by writing ${this} in a template]"),console.warn("Attempted to render the template host",J,"inside itself. This is almost always a mistake, and in dev mode ","we render some warning text. In production however, we'll ","render it, which will usually result in an error, and sometimes ","in the element disappearing from the DOM.");return}this._commitNode(J)}else if(LJ(J))this._commitIterable(J);else this._commitText(J)}_insert(J){return S(S(this._$startNode).parentNode).insertBefore(J,this._$endNode)}_commitNode(J){if(this._$committedValue!==J){if(this._$clear(),L!==u){let X=this._$startNode.parentNode?.nodeName;if(X==="STYLE"||X==="SCRIPT"){let Y="Forbidden";if(X==="STYLE")Y="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 Y="Lit does not support binding inside script nodes. This is a security risk, as it could allow arbitrary code execution.";throw Error(Y)}}H&&H({kind:"commit node",start:this._$startNode,parent:this._$parent,value:J,options:this.options}),this._$committedValue=this._insert(J)}}_commitText(J){if(this._$committedValue!==U&&b(this._$committedValue)){let X=S(this._$startNode).nextSibling;if(this._textSanitizer===void 0)this._textSanitizer=l(X,"data","property");J=this._textSanitizer(J),H&&H({kind:"commit text",node:X,value:J,options:this.options}),X.data=J}else{let X=N.createTextNode("");if(this._commitNode(X),this._textSanitizer===void 0)this._textSanitizer=l(X,"data","property");J=this._textSanitizer(J),H&&H({kind:"commit text",node:X,value:J,options:this.options}),X.data=J}this._$committedValue=J}_commitTemplateResult(J){let{values:X,["_$litType$"]:Y}=J,Z=typeof Y==="number"?this._$getTemplate(J):(Y.el===void 0&&(Y.el=k.createElement(FJ(Y.h,Y.h[0]),this.options)),Y);if(this._$committedValue?._$template===Z)H&&H({kind:"template updating",template:Z,instance:this._$committedValue,parts:this._$committedValue._$parts,options:this.options,values:X}),this._$committedValue._update(X);else{let $=new UJ(Z,this),q=$._clone(this.options);H&&H({kind:"template instantiated",template:Z,instance:$,parts:$._$parts,options:this.options,fragment:q,values:X}),$._update(X),H&&H({kind:"template instantiated and updated",template:Z,instance:$,parts:$._$parts,options:this.options,fragment:q,values:X}),this._commitNode(q),this._$committedValue=$}}_$getTemplate(J){let X=GJ.get(J.strings);if(X===void 0)GJ.set(J.strings,X=new k(J));return X}_commitIterable(J){if(!n(this._$committedValue))this._$committedValue=[],this._$clear();let X=this._$committedValue,Y=0,Z;for(let $ of J){if(Y===X.length)X.push(Z=new y(this._insert(w()),this._insert(w()),this,this.options));else Z=X[Y];Z._$setValue($),Y++}if(Y<X.length)this._$clear(Z&&S(Z._$endNode).nextSibling,Y),X.length=Y}_$clear(J=S(this._$startNode).nextSibling,X){this._$notifyConnectionChanged?.(!1,!0,X);while(J!==this._$endNode){let Y=S(J).nextSibling;S(J).remove(),J=Y}}setConnected(J){if(this._$parent===void 0)this.__isConnected=J,this._$notifyConnectionChanged?.(J);else throw Error("part.setConnected() may only be called on a RootPart returned from render().")}}class d{get tagName(){return this.element.tagName}get _$isConnected(){return this._$parent._$isConnected}constructor(J,X,Y,Z,$){if(this.type=a,this._$committedValue=U,this._$disconnectableChildren=void 0,this.element=J,this.name=X,this._$parent=Z,this.options=$,Y.length>2||Y[0]!==""||Y[1]!=="")this._$committedValue=Array(Y.length-1).fill(new String),this.strings=Y;else this._$committedValue=U;this._sanitizer=void 0}_$setValue(J,X=this,Y,Z){let $=this.strings,q=!1;if($===void 0){if(J=P(this,J,X,0),q=!b(J)||J!==this._$committedValue&&J!==I,q)this._$committedValue=J}else{let W=J;J=$[0];let G,Q;for(G=0;G<$.length-1;G++){if(Q=P(this,W[Y+G],X,G),Q===I)Q=this._$committedValue[G];if(q||=!b(Q)||Q!==this._$committedValue[G],Q===U)J=U;else if(J!==U)J+=(Q??"")+$[G+1];this._$committedValue[G]=Q}}if(q&&!Z)this._commitValue(J)}_commitValue(J){if(J===U)S(this.element).removeAttribute(this.name);else{if(this._sanitizer===void 0)this._sanitizer=L(this.element,this.name,"attribute");J=this._sanitizer(J??""),H&&H({kind:"commit attribute",element:this.element,name:this.name,value:J,options:this.options}),S(this.element).setAttribute(this.name,J??"")}}}class zJ extends d{constructor(){super(...arguments);this.type=xJ}_commitValue(J){if(this._sanitizer===void 0)this._sanitizer=L(this.element,this.name,"property");J=this._sanitizer(J),H&&H({kind:"commit property",element:this.element,name:this.name,value:J,options:this.options}),this.element[this.name]=J===U?void 0:J}}class MJ extends d{constructor(){super(...arguments);this.type=wJ}_commitValue(J){H&&H({kind:"commit boolean attribute",element:this.element,name:this.name,value:!!(J&&J!==U),options:this.options}),S(this.element).toggleAttribute(this.name,!!J&&J!==U)}}class _J extends d{constructor(J,X,Y,Z,$){super(J,X,Y,Z,$);if(this.type=bJ,this.strings!==void 0)throw Error(`A \`<${J.localName}>\` has a \`@${X}=...\` listener with invalid content. Event listeners in templates must have exactly one expression and no surrounding text.`)}_$setValue(J,X=this){if(J=P(this,J,X,0)??U,J===I)return;let Y=this._$committedValue,Z=J===U&&Y!==U||J.capture!==Y.capture||J.once!==Y.once||J.passive!==Y.passive,$=J!==U&&(Y===U||Z);if(H&&H({kind:"commit event listener",element:this.element,name:this.name,value:J,options:this.options,removeListener:Z,addListener:$,oldListener:Y}),Z)this.element.removeEventListener(this.name,this,Y);if($)this.element.addEventListener(this.name,this,J);this._$committedValue=J}handleEvent(J){if(typeof this._$committedValue==="function")this._$committedValue.call(this.options?.host??this.element,J);else this._$committedValue.handleEvent(J)}}class jJ{constructor(J,X,Y){this.element=J,this.type=t,this._$disconnectableChildren=void 0,this._$parent=X,this.options=Y}get _$isConnected(){return this._$parent._$isConnected}_$setValue(J){H&&H({kind:"commit to element binding",element:this.element,value:J,options:this.options}),P(this,J)}}var vJ=O.litHtmlPolyfillSupportDevMode;vJ?.(k,y);(O.litHtmlVersions??=[]).push("3.3.1");if(O.litHtmlVersions.length>1)queueMicrotask(()=>{x("multiple-versions","Multiple versions of Lit loaded. Loading multiple versions is not recommended.")});var R=(J,X,Y)=>{if(X==null)throw TypeError(`The container to render into may not be ${X}`);let Z=KJ++,$=Y?.renderBefore??X,q=$._$litPart$;if(H&&H({kind:"begin render",id:Z,value:J,container:X,options:Y,part:q}),q===void 0){let W=Y?.renderBefore??null;$._$litPart$=q=new y(X.insertBefore(w(),W),W,void 0,Y??{})}return q._$setValue(J),H&&H({kind:"end render",id:Z,value:J,container:X,options:Y,part:q}),q};R.setSanitizer=AJ,R.createSanitizer=l,R._testOnlyClearSanitizerFactoryDoNotCallOrElse=EJ;var OJ={};DJ(OJ,{isTemplateResult:()=>V,deserializeCSS:()=>T,callAsync:()=>m});function m(J,X,...Y){try{let Z=J.apply(X,Y);return Z instanceof Promise?Z:Promise.resolve(Z)}catch(Z){return Promise.reject(Z)}}function V(J){return J!==null&&typeof J==="object"&&"_$litType$"in J}function T(J,X="",Y=0){let Z=Object.keys(J),$="";for(let q of Z){let W=J[q];if(typeof W==="object"&&W!==null){if(X&&!q.startsWith("@"))if(q.startsWith("&"))$+=`${q.replace(/&/g,X)} {
17
17
  `;else $+=`${X} ${q} {
18
18
  `;else $+=`${q} {
19
19
  `;let G=Object.keys(W);for(let Q of G){$+="\t".repeat(Y);let F=W[Q];if(typeof F==="object"&&F!==null){let B={};B[Q]=F,$+=T(B,X,Y+1)}else $+=` ${Q}: ${F};
20
20
  `}$+=`}
21
21
  `}else $+="\t".repeat(Y),$+=` ${q}: ${W};
22
- `}return $}class U extends HTMLElement{_children;_state;_props;_ready;_connected;_isReady;_style;static _tag;static _template;static _observedAttributes=[];static _onMount;static _onUnmount;static _onError;static _applyMiddleware;static _hasMiddleware;static get observedAttributes(){return this._observedAttributes}static set observedAttributes(J){this._observedAttributes=J}static get tag(){if(typeof this._tag>"u"){let J=this.name,X=J.match(/([A-Z])/g);if(X!==null)for(let Y of X)J=J.replace(Y,`-${Y}`.toLowerCase());this._tag=J.slice(1)}return this._tag}static set tag(J){this._tag=J}static template(J=null,X=null){if(J!==null)this._template=J,document.querySelectorAll(this.tag).forEach((Y)=>{if(Y instanceof U&&Y._isReady)Y.forceRender()});else{if(typeof this._template==="function")return this._template.call(X,X);return this._template}}constructor(){super();this._children=this.innerHTML.trim(),this._state={},this._props={},this._ready=[],this._connected=!1,this._isReady=!1,this._style={}}get width(){return parseInt(getComputedStyle(this).width.replace("px",""))}set width(J){this.style.width=typeof J==="number"?`${J}px`:J}get height(){return parseInt(getComputedStyle(this).height.replace("px",""))}set height(J){this.style.height=typeof J==="number"?`${J}px`:J}get static(){return this.constructor}set static(J){throw Error("Component static properties cannot be reassigned.")}get props(){return new Proxy(this._props,{get:(J,X)=>{if(X in J)return J[X];if(this.hasAttribute(X)){let Y=this.getAttribute(X);if(typeof Y==="string"){if(Y==="false")Y=!1;else if(Y==="true"||Y==="")Y=!0;else if(!isNaN(Number(Y)))Y=Y.includes(".")?parseFloat(Y):parseInt(Y)}return Y}return},set:()=>{throw Error("Component props should be set using the `setProps` function.")}})}set props(J){if(!this._connected)this._props={...this._props,...J};else throw Error("Component props cannot be directly assigned. Use the `setProps` function instead.")}get state(){return new Proxy(this._state,{get:(J,X)=>J[X],set:(J,X,Y)=>{if(!this._connected)return J[X]=Y,!0;else throw Error("Component state should be set using the `setState` function instead.")}})}set state(J){if(!this._connected)this._state={...this._state,...J};else throw Error("Component state should be set using the `setState` function instead.")}get dom(){return this}set dom(J){throw Error("Component DOM can not be overwritten.")}get slotContent(){return this._children}get isConnected(){return this._connected}get isReady(){return this._isReady}static register(){window.customElements.define(this.tag,this)}template(J=null){return this.constructor.template(J,this)}static _styleSheet=null;setStyle(J,X=!1){let Y=this.constructor;if(!Y._styleSheet)Y._styleSheet=new CSSStyleSheet;let Z="";if(typeof J==="object"){if(!X)this._style={...this._style,...J};else this._style={...J};Z=T(this._style,Y.tag)}else if(typeof J==="string")if(!X)Z=Array.from(Y._styleSheet.cssRules||[]).map((q)=>q.cssText).join(`
22
+ `}return $}class z extends HTMLElement{_children;_state;_props;_ready;_connected;_isReady;_style;_updatingProps;_renderId;_propsProxy;_stateProxy;_hasBeenMounted;static _tag;static _template;static _observedAttributes=[];static _onMount;static _onUnmount;static _onError;static _applyMiddleware;static _hasMiddleware;static get observedAttributes(){return this._observedAttributes}static set observedAttributes(J){this._observedAttributes=J}static get tag(){if(typeof this._tag>"u"){let J=this.name,X=J.match(/([A-Z])/g);if(X!==null)for(let Y of X)J=J.replace(Y,`-${Y}`.toLowerCase());this._tag=J.slice(1)}return this._tag}static set tag(J){this._tag=J}static template(J=null,X=null){if(J!==null)this._template=J,document.querySelectorAll(this.tag).forEach((Y)=>{if(Y instanceof z&&Y._isReady)Y.forceRender()});else{if(typeof this._template==="function")return this._template.call(X,X);return this._template}}constructor(){super();this._children="",this._state={},this._props={},this._ready=[],this._connected=!1,this._isReady=!1,this._style={},this._updatingProps=!1,this._renderId=0,this._propsProxy=null,this._stateProxy=null,this._hasBeenMounted=!1}get width(){return parseInt(getComputedStyle(this).width.replace("px",""))}set width(J){this.style.width=typeof J==="number"?`${J}px`:J}get height(){return parseInt(getComputedStyle(this).height.replace("px",""))}set height(J){this.style.height=typeof J==="number"?`${J}px`:J}get static(){return this.constructor}set static(J){throw Error("Component static properties cannot be reassigned.")}get props(){if(!this._propsProxy)this._propsProxy=new Proxy(this._props,{get:(J,X)=>{if(X in J&&typeof J[X]<"u")return J[X];if(this.hasAttribute(X)){let Y=this.getAttribute(X);if(typeof Y==="string"){if(Y==="false")Y=!1;else if(Y==="true"||Y==="")Y=!0;else if(!isNaN(Number(Y)))Y=Y.includes(".")?parseFloat(Y):parseInt(Y)}return Y}return},set:()=>{throw Error("Component props should be set using the `setProps` function.")}});return this._propsProxy}set props(J){if(!this._connected)this._props={...this._props,...J},this._propsProxy=null;else throw Error("Component props cannot be directly assigned. Use the `setProps` function instead.")}get state(){if(!this._stateProxy)this._stateProxy=new Proxy(this._state,{get:(J,X)=>J[X],set:(J,X,Y)=>{if(!this._connected)return J[X]=Y,!0;else throw Error("Component state should be set using the `setState` function instead.")}});return this._stateProxy}set state(J){if(!this._connected)this._state={...this._state,...J},this._stateProxy=null;else throw Error("Component state should be set using the `setState` function instead.")}get dom(){return this}set dom(J){throw Error("Component DOM can not be overwritten.")}get slotContent(){return this._children}get isConnected(){return this._connected}get isReady(){return this._isReady}get isFirstMount(){return!this._hasBeenMounted}static register(){window.customElements.define(this.tag,this)}template(J=null){return this.constructor.template(J,this)}static _styleSheet=null;setStyle(J,X=!1){let Y=this.constructor;if(!Y._styleSheet)Y._styleSheet=new CSSStyleSheet;let Z="";if(typeof J==="object"){if(!X)this._style={...this._style,...J};else this._style={...J};Z=T(this._style,Y.tag)}else if(typeof J==="string")if(!X)Z=Array.from(Y._styleSheet.cssRules||[]).map((q)=>q.cssText).join(`
23
23
  `)+`
24
- `+J;else Z=J;if(Y._styleSheet.replaceSync(Z),!document.adoptedStyleSheets.includes(Y._styleSheet))document.adoptedStyleSheets=[...document.adoptedStyleSheets,Y._styleSheet];return this._style}setState(J){let X=J;if(U._hasMiddleware?.("state")&&U._applyMiddleware)X=U._applyMiddleware("state",this,J);let Y={...this._state};this._state={...this._state,...X};for(let Z of Object.keys(X))this.updateCallback(Z,Y[Z],this._state[Z],"state",Y,this._state)}setProps(J){let X=J;if(U._hasMiddleware?.("props")&&U._applyMiddleware)X=U._applyMiddleware("props",this,J);let Y={...this._props};this._props={...this._props,...X};for(let Z of Object.keys(X))this.updateCallback(Z,Y[Z],this._props[Z],"props",Y,this._props);this._setPropAttributes(!0)}_setPropAttributes(J=!1){for(let[X,Y]of Object.entries(this._props)){let Z=typeof Y;if(Z==="string"||Z==="number"||Z==="boolean")if(J)this.setAttribute(X,String(Y));else this._props[X]=this.props[X],this.setAttribute(X,String(this.props[X]))}}on(J,X,Y){return this.addEventListener(J,X,Y),this}off(J,X,Y){return this.removeEventListener(J,X,Y),this}once(J,X,Y){let Z=typeof Y==="boolean"?{capture:Y,once:!0}:{...Y,once:!0};return this.addEventListener(J,X,Z),this}emit(J,X,Y){let Z=new CustomEvent(J,{detail:X,bubbles:!0,cancelable:!0,composed:!0,...Y});return this.dispatchEvent(Z)}query(J){return this.dom.querySelector(J)}queryAll(J){return this.dom.querySelectorAll(J)}async willUpdate(J,X,Y,Z,$,q){}async update(J,X,Y,Z,$,q){}async didUpdate(J,X,Y,Z,$,q){}async onStateUpdate(J,X,Y,Z,$){}async onPropsUpdate(J,X,Y,Z,$){}async willMount(){}async didMount(){}async willUnmount(){}async unmount(){}async didUnmount(){}forceRender(){return this._render()}render(){return""}async _render(){let J=this.render;if(this.constructor._template!==void 0)J=()=>this.template();let X=await m(J,this),Y=V(X)||X===M?"lit":"string";if(U._hasMiddleware?.("render")&&U._applyMiddleware)X=U._applyMiddleware("render",this,X,Y);if(V(X)||X===M){if(!this.hasAttribute("data-lit-rendered"))this.innerHTML="",this.setAttribute("data-lit-rendered","");R(X,this,{host:this});return}let Z=X.trim();if(Z==="")return;let $=this.dom.querySelector("slot");if($!==null)$.replaceWith(Z);else if(this.innerHTML=Z,this._children!==""&&Z.indexOf(this._children)===-1)this.innerHTML+=this._children}async connectedCallback(){let J=this.static.tag;try{if(this._connected=!0,this.dataset.component=J,typeof this.static._template>"u"){let Y=document.querySelector(`template#${J}`);if(Y!==null)this.template(Y.innerHTML);else this.static._template=void 0}this._setPropAttributes(!1),await this.willMount(),await this._render(),await this.didMount(),this._isReady=!0;let X=[...this._ready];this._ready=[];for(let Y of X)Y.call(this);if(U._onMount)U._onMount(this,J)}catch(X){if(U._onError)U._onError(X,this,J,"connectedCallback");else throw X}}ready(J){if(this._ready.push(J),this._isReady)J.call(this)}async disconnectedCallback(){let J=this.static.tag;try{if(await this.willUnmount(),await this.unmount(),await this.didUnmount(),this._connected=!1,U._onUnmount)U._onUnmount(this,J)}catch(X){if(U._onError)U._onError(X,this,J,"disconnectedCallback");else throw X}}async updateCallback(J,X,Y,Z="props",$={},q={}){if(await this.willUpdate(Z,J,X,Y,$,q),await this.update(Z,J,X,Y,$,q),Z==="state")await this.onStateUpdate(J,X,Y,$,q);else if(Z==="props"||Z==="attribute")await this.onPropsUpdate(J,X,Y,$,q);await this.didUpdate(Z,J,X,Y,$,q)}attributeChangedCallback(J,X,Y){if(X!==Y)this.updateCallback(J,X,Y,"attribute")}}var j=U;class OJ extends j{_shadowDOM;static _styleSheet=null;constructor(){super();this._shadowDOM=this.attachShadow({mode:"open"})}setStyle(J,X=!1){let Y=this.constructor;if(!Y._styleSheet)Y._styleSheet=new CSSStyleSheet;let Z="";if(typeof J==="object"){if(!X)this._style={...this._style,...J};else this._style={...J};Z=T(this._style)}else if(typeof J==="string")if(!X)Z=Array.from(Y._styleSheet.cssRules||[]).map((q)=>q.cssText).join(`
24
+ `+J;else Z=J;if(Y._styleSheet.replaceSync(Z),!document.adoptedStyleSheets.includes(Y._styleSheet))document.adoptedStyleSheets=[...document.adoptedStyleSheets,Y._styleSheet];return this._style}setState(J){let X=J;if(z._hasMiddleware?.("state")&&z._applyMiddleware)X=z._applyMiddleware("state",this,J);let Y={...this._state};this._state={...this._state,...X},this._stateProxy=null;for(let Z of Object.keys(X))this.updateCallback(Z,Y[Z],this._state[Z],"state",Y,this._state)}setProps(J){let X=J;if(z._hasMiddleware?.("props")&&z._applyMiddleware)X=z._applyMiddleware("props",this,J);let Y={...this._props};this._props={...this._props,...X},this._propsProxy=null;for(let Z of Object.keys(X))this.updateCallback(Z,Y[Z],this._props[Z],"props",Y,this._props);this._updatingProps=!0,this._setPropAttributes(!0),this._updatingProps=!1}_setPropAttributes(J=!1){for(let[X,Y]of Object.entries(this._props)){let Z=typeof Y;if(Z==="string"||Z==="number"||Z==="boolean")if(J)this.setAttribute(X,String(Y));else this._props[X]=this.props[X],this.setAttribute(X,String(this.props[X]))}}on(J,X,Y){return this.addEventListener(J,X,Y),this}off(J,X,Y){return this.removeEventListener(J,X,Y),this}once(J,X,Y){let Z=typeof Y==="boolean"?{capture:Y,once:!0}:{...Y,once:!0};return this.addEventListener(J,X,Z),this}emit(J,X,Y){let Z=new CustomEvent(J,{detail:X,bubbles:!0,cancelable:!0,composed:!0,...Y});return this.dispatchEvent(Z)}query(J){return this.dom.querySelector(J)}queryAll(J){return this.dom.querySelectorAll(J)}async willUpdate(J,X,Y,Z,$,q){}async update(J,X,Y,Z,$,q){}async didUpdate(J,X,Y,Z,$,q){}async onStateUpdate(J,X,Y,Z,$){}async onPropsUpdate(J,X,Y,Z,$){}async willMount(){}async didMount(){}async didReconnect(){}async willUnmount(){}async unmount(){}async didUnmount(){}forceRender(){return this._render()}render(){return""}async _render(){let J=++this._renderId,X=this.render;if(this.constructor._template!==void 0)X=()=>this.template();let Y=await m(X,this);if(J!==this._renderId)return;let Z=V(Y)||Y===U?"lit":"string";if(z._hasMiddleware?.("render")&&z._applyMiddleware)Y=z._applyMiddleware("render",this,Y,Z);if(V(Y)||Y===U){if(!this.hasAttribute("data-lit-rendered"))this.innerHTML="",this.setAttribute("data-lit-rendered","");R(Y,this,{host:this});return}let $=Y.trim();if($==="")return;let q=this.dom.querySelector("slot");if(q!==null){let W=document.createElement("template");W.innerHTML=$,q.replaceWith(W.content)}else if(this.innerHTML=$,this._children!==""&&$.indexOf(this._children)===-1)this.innerHTML+=this._children}async connectedCallback(){let J=this.static.tag;try{if(this._connected=!0,this.dataset.component=J,typeof this.static._template>"u"){let Z=document.querySelector(`template#${J}`);if(Z!==null)this.template(Z.innerHTML);else this.static._template=void 0}let X=!this._hasBeenMounted;if(X)this._children=this.innerHTML.trim();if(this._setPropAttributes(!1),await this.willMount(),await this._render(),X)await this.didMount();else await this.didReconnect();this._isReady=!0,this._hasBeenMounted=!0;let Y=[...this._ready];this._ready=[];for(let Z of Y)Z.call(this);if(z._onMount)z._onMount(this,J)}catch(X){if(z._onError)z._onError(X,this,J,"connectedCallback");else throw X}}ready(J){if(this._isReady)J.call(this);else this._ready.push(J)}async disconnectedCallback(){let J=this.static.tag;try{if(await this.willUnmount(),await this.unmount(),await this.didUnmount(),this._connected=!1,this._isReady=!1,this._ready=[],z._onUnmount)z._onUnmount(this,J)}catch(X){if(z._onError)z._onError(X,this,J,"disconnectedCallback");else throw X}}async updateCallback(J,X,Y,Z="props",$={},q={}){if(await this.willUpdate(Z,J,X,Y,$,q),await this.update(Z,J,X,Y,$,q),Z==="state")await this.onStateUpdate(J,X,Y,$,q);else if(Z==="props"||Z==="attribute")await this.onPropsUpdate(J,X,Y,$,q);await this.didUpdate(Z,J,X,Y,$,q)}attributeChangedCallback(J,X,Y){if(X!==Y&&!this._updatingProps)this.updateCallback(J,X,Y,"attribute")}}var j=z;class SJ extends j{_shadowDOM;static _styleSheet=null;constructor(){super();this._shadowDOM=this.attachShadow({mode:"open"})}setStyle(J,X=!1){let Y=this.constructor;if(!Y._styleSheet)Y._styleSheet=new CSSStyleSheet;let Z="";if(typeof J==="object"){if(!X)this._style={...this._style,...J};else this._style={...J};Z=T(this._style)}else if(typeof J==="string")if(!X)Z=Array.from(Y._styleSheet.cssRules||[]).map((q)=>q.cssText).join(`
25
25
  `)+`
26
- `+J;else Z=J;return Y._styleSheet.replaceSync(Z),this._shadowDOM.adoptedStyleSheets=[Y._styleSheet],this._style}async _render(){let J=this.render;if(this.constructor._template!==void 0)J=()=>this.template();let X=await m(J,this),Y=V(X)||X===M?"lit":"string";if(j._hasMiddleware?.("render")&&j._applyMiddleware)X=j._applyMiddleware("render",this,X,Y);if(V(X)||X===M){R(X,this._shadowDOM,{host:this});return}let Z=X.trim(),$=Array.from(this._shadowDOM.childNodes);for(let W of $)W.remove();if(Z==="")return;let q=document.createElement("template");q.innerHTML=Z,this._shadowDOM.appendChild(q.content)}get dom(){throw Error("ShadowComponent DOM can not be accessed. Use the `shadowRoot` property instead.")}set dom(J){throw Error("ShadowComponent DOM can not be overwritten.")}get shadowRoot(){return this._shadowDOM}set shadowRoot(J){throw Error("ShadowComponent shadowRoot can not be overwritten.")}query(J){return this._shadowDOM.querySelector(J)}queryAll(J){return this._shadowDOM.querySelectorAll(J)}}var cJ=OJ;class JJ{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 middleware={props:new Set,state:new Set,render:new Set};static _initialized=!1;static _init(){if(this._initialized)return;this._initialized=!0,j._onMount=(J,X)=>this._notifyMount(J,X),j._onUnmount=(J,X)=>this._notifyUnmount(J,X),j._onError=(J,X,Y,Z)=>this._notifyError(J,X,Y,Z),j._applyMiddleware=(J,X,Y,Z)=>this._applyMiddleware(J,X,Y,Z),j._hasMiddleware=(J)=>this._hasMiddleware(J)}static register(J,X){if(this._init(),typeof this.components[J]>"u")this.components[J]=X,this.implementations[J]=X,X._tag=J,window.customElements.define(J,X),this.components[J]._registered=!0,this.log(`Registered: <${J}>`);else throw Error("A component with this tag has already been registered. Use the evolve() function to modify the component.")}static getImplementation(J){return this.implementations[J]||this.components[J]}static evolve(J,X,Y=!1){if(typeof this.components[J]>"u")throw Error("No component with this tag has been registered. Cannot Evolve.");if(this.implementations[J]=X,X._registered=!0,this.log(`Evolved: <${J}>`),Y){let Z=X.prototype,$=Object.getOwnPropertyNames(Z),q=Object.create(Z);try{X.call(q)}catch{}document.querySelectorAll(J).forEach((W)=>{if(W instanceof j&&W.isReady){let G=W;for(let Q of $)if(Q!=="constructor"&&typeof Z[Q]==="function"){let F=Z[Q];G[Q]=F.bind(W)}if(q._state){let Q=G._state||{},F=q._state;for(let B of Object.keys(F))if(!(B in Q))Q[B]=F[B];G._state=Q}if(q._props){let Q=G._props||{},F=q._props;for(let B of Object.keys(F))if(!(B in Q))Q[B]=F[B];G._props=Q}W.forceRender()}})}}static instances(J,X){if(typeof this.components[J]<"u")if(typeof X==="function")document.querySelectorAll(J).forEach(X);else return document.querySelectorAll(J);else throw Error("No component with the provided tag has been registered.")}static instantiate(J,X){if(!this.has(J))throw Error(`No component with tag "${J}" has been registered.`);if(!this.components[J]._registered)this.register(J,this.components[J]);let Y=document.createElement(this.components[J].tag);return Y.setProps(X),Y}static has(J){return typeof this.components[J]<"u"}static get(J){return this.components[J]}static setState(J,X){let Y=this.state[J];if(this.state[J]=X,this.subscribers[J])this.subscribers[J].forEach((Z)=>{Z(X,Y)})}static getState(J){return this.state[J]}static hasState(J){return J in this.state}static deleteState(J){if(J in this.state){let X=this.state[J];if(delete this.state[J],this.subscribers[J])this.subscribers[J].forEach((Y)=>{Y(void 0,X)});return!0}return!1}static subscribe(J,X){if(!this.subscribers[J])this.subscribers[J]=new Set;return this.subscribers[J].add(X),()=>{this.unsubscribe(J,X)}}static unsubscribe(J,X){if(this.subscribers[J])this.subscribers[J].delete(X)}static getAllState(){return{...this.state}}static clearState(){let J=Object.keys(this.state);for(let X of J)this.deleteState(X)}static get debug(){return this._debug}static set debug(J){this._debug=J}static log(J,X){if(this._debug)if(X!==void 0)console.log(`[Pandora] ${J}`,X);else console.log(`[Pandora] ${J}`)}static list(){return Object.keys(this.components)}static stats(J){if(J){if(!this.has(J))throw Error(`No component with tag "${J}" has been registered.`);return{tag:J,instanceCount:document.querySelectorAll(J).length,isRegistered:this.components[J]?._registered??!1,isLazy:J in this.lazyLoaders}}return this.list().map((X)=>({tag:X,instanceCount:document.querySelectorAll(X).length,isRegistered:this.components[X]?._registered??!1,isLazy:X in this.lazyLoaders}))}static onMount(J){return this._init(),this.mountCallbacks.add(J),()=>this.mountCallbacks.delete(J)}static onUnmount(J){return this._init(),this.unmountCallbacks.add(J),()=>this.unmountCallbacks.delete(J)}static _notifyMount(J,X){this.log(`Mounted: <${X}>`),this.mountCallbacks.forEach((Y)=>{try{Y(J,X)}catch(Z){console.error("[Pandora] Error in onMount callback:",Z)}})}static _notifyUnmount(J,X){this.log(`Unmounted: <${X}>`),this.unmountCallbacks.forEach((Y)=>{try{Y(J,X)}catch(Z){console.error("[Pandora] Error in onUnmount callback:",Z)}})}static onError(J){return this._init(),this.errorCallbacks.add(J),()=>this.errorCallbacks.delete(J)}static _notifyError(J,X,Y,Z){if(this.log(`Error in <${Y}> during ${Z}:`,J),this.errorCallbacks.size===0)throw J;this.errorCallbacks.forEach(($)=>{try{$(J,X,Y,Z)}catch(q){console.error("[Pandora] Error in onError callback:",q)}})}static alias(J,X){if(!this.has(X))throw Error(`Cannot create alias: no component with tag "${X}" has been registered.`);if(this.has(J))throw Error(`Cannot create alias: a component with tag "${J}" already exists.`);this.aliases[J]=X;let Y=this.components[X],Z=class extends Y{static _tag=J};this.components[J]=Z,window.customElements.define(J,Z),this.log(`Created alias: <${J}> -> <${X}>`)}static getOriginalTag(J){return this.aliases[J]}static isAlias(J){return J in this.aliases}static lazy(J,X){if(this._init(),this.has(J))throw Error(`Cannot register lazy component: a component with tag "${J}" already exists.`);this.lazyLoaders[J]=X;let Y=JJ;class Z extends j{static _tag=J;_lazyLoaded=!1;async connectedCallback(){await Y._loadLazyComponent(J);let $=Y.getImplementation(J);if($&&$!==Z){let q=$.prototype,W=Object.getOwnPropertyNames(q),G=this;for(let F of W)if(F!=="constructor"&&typeof q[F]==="function"){let B=q[F];G[F]=B.bind(this)}let Q=Object.create(q);try{$.call(Q)}catch{}if(Q._state)G._state={...Q._state};if(Q._props)G._props={...Q._props};this._lazyLoaded=!0}await super.connectedCallback()}}this.components[J]=Z,window.customElements.define(J,Z),this.log(`Registered lazy component: <${J}>`)}static async _loadLazyComponent(J){if(!(J in this.lazyLoaders))return;let X=this.lazyLoaders[J];this.log(`Loading lazy component: <${J}>`);try{let Y=await X(),Z="default"in Y?Y.default:Y;delete this.lazyLoaders[J],this.implementations[J]=Z,Z._registered=!0,this.log(`Loaded lazy component: <${J}>`)}catch(Y){throw console.error(`[Pandora] Failed to load lazy component <${J}>:`,Y),Y}}static isLazy(J){return J in this.lazyLoaders}static async preload(J){if(this.isLazy(J))await this._loadLazyComponent(J)}static use(J,X){return this._init(),this.middleware[J].add(X),()=>this.middleware[J].delete(X)}static _applyMiddleware(J,X,Y,Z){let $=Y;return this.middleware[J].forEach((q)=>{try{$=q(X,$,Z)}catch(W){console.error(`[Pandora] Error in ${J} middleware:`,W)}}),$}static _hasMiddleware(J){return this.middleware[J].size>0}}var C=JJ;function gJ(J){return function(X){return C.register(J,X),X}}function pJ(J){return function(X,Y){let{connectedCallback:Z,disconnectedCallback:$}=X,q=Symbol(`__pandora_unsub_${Y}`),W=Symbol(`__pandora_value_${Y}`);X.connectedCallback=async function(){this[q]=C.subscribe(J,(Q)=>{if(this[W]=Q,this._isReady)this.forceRender()});let G=C.getState(J);if(G!==void 0)this[W]=G;if(Z)await Z.call(this)},X.disconnectedCallback=async function(){if(this[q])this[q](),this[q]=void 0;if($)await $.call(this)},Object.defineProperty(X,Y,{get:function(){return this[W]},set:function(G){if(this[W]===G)return;if(this[W]=G,C.setState(J,G),this._isReady)this.forceRender()},enumerable:!0,configurable:!0})}}function uJ(J){return function(X,Y){let Z=J||Y,$=Symbol(`__pandora_prop_${Y}`);if(!X.constructor._observedAttributes)X.constructor._observedAttributes=[];if(!X.constructor._observedAttributes.includes(Z))X.constructor._observedAttributes.push(Z);Object.defineProperty(X,Y,{get:function(){if(this[$]!==void 0)return this[$];if(this.hasAttribute(Z)){let q=this.getAttribute(Z);return iJ(q)}return},set:function(q){if(this[$]=q,typeof q==="string"||typeof q==="number"||typeof q==="boolean")if(typeof q==="boolean")if(q)this.setAttribute(Z,"");else this.removeAttribute(Z);else this.setAttribute(Z,String(q))},enumerable:!0,configurable:!0})}}function iJ(J){if(J===null)return;if(J===""||J==="true")return!0;if(J==="false")return!1;if(!isNaN(Number(J)))return J.includes(".")?parseFloat(J):parseInt(J,10);return J}var sJ={};export{dJ as svg,R as render,M as nothing,I as noChange,yJ as html,fJ as Util,sJ as Types,cJ as ShadowComponent,C as Registry,gJ as Register,uJ as Prop,pJ as Consumer,j as Component};
26
+ `+J;else Z=J;return Y._styleSheet.replaceSync(Z),this._shadowDOM.adoptedStyleSheets=[Y._styleSheet],this._style}async _render(){let J=++this._renderId,X=this.render;if(this.constructor._template!==void 0)X=()=>this.template();let Y=await m(X,this);if(J!==this._renderId)return;let Z=V(Y)||Y===U?"lit":"string";if(j._hasMiddleware?.("render")&&j._applyMiddleware)Y=j._applyMiddleware("render",this,Y,Z);if(V(Y)||Y===U){R(Y,this._shadowDOM,{host:this});return}let $=Y.trim(),q=Array.from(this._shadowDOM.childNodes);for(let G of q)G.remove();if($==="")return;let W=document.createElement("template");W.innerHTML=$,this._shadowDOM.appendChild(W.content)}get dom(){throw Error("ShadowComponent DOM can not be accessed. Use the `shadowRoot` property instead.")}set dom(J){throw Error("ShadowComponent DOM can not be overwritten.")}get shadowRoot(){return this._shadowDOM}set shadowRoot(J){throw Error("ShadowComponent shadowRoot can not be overwritten.")}query(J){return this._shadowDOM.querySelector(J)}queryAll(J){return this._shadowDOM.querySelectorAll(J)}}var cJ=SJ;class JJ{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 middleware={props:new Set,state:new Set,render:new Set};static _initialized=!1;static _init(){if(this._initialized)return;this._initialized=!0,j._onMount=(J,X)=>this._notifyMount(J,X),j._onUnmount=(J,X)=>this._notifyUnmount(J,X),j._onError=(J,X,Y,Z)=>this._notifyError(J,X,Y,Z),j._applyMiddleware=(J,X,Y,Z)=>this._applyMiddleware(J,X,Y,Z),j._hasMiddleware=(J)=>this._hasMiddleware(J)}static register(J,X){if(this._init(),typeof this.components[J]>"u")this.components[J]=X,this.implementations[J]=X,X._tag=J,window.customElements.define(J,X),this.components[J]._registered=!0,this.log(`Registered: <${J}>`);else throw Error("A component with this tag has already been registered. Use the evolve() function to modify the component.")}static getImplementation(J){return this.implementations[J]||this.components[J]}static evolve(J,X,Y=!1){if(typeof this.components[J]>"u")throw Error("No component with this tag has been registered. Cannot Evolve.");if(this.implementations[J]=X,X._registered=!0,this.log(`Evolved: <${J}>`),Y){let Z=X.prototype,$=Object.getOwnPropertyNames(Z),q={};try{q=Reflect.construct(X,[],X)}catch(W){this.log(`Could not extract defaults for <${J}> during evolve:`,W)}document.querySelectorAll(J).forEach((W)=>{if(W instanceof j&&W.isReady){let G=W;for(let Q of $)if(Q!=="constructor"&&typeof Z[Q]==="function"){let F=Z[Q];G[Q]=F.bind(W)}if(q._state){let Q=G._state||{},F=q._state;for(let B of Object.keys(F))if(!(B in Q))Q[B]=F[B];G._state=Q}if(q._props){let Q=G._props||{},F=q._props;for(let B of Object.keys(F))if(!(B in Q))Q[B]=F[B];G._props=Q}W.forceRender()}})}}static instances(J,X){if(typeof this.components[J]<"u")if(typeof X==="function")document.querySelectorAll(J).forEach(X);else return document.querySelectorAll(J);else throw Error("No component with the provided tag has been registered.")}static instantiate(J,X){if(!this.has(J))throw Error(`No component with tag "${J}" has been registered.`);if(!this.components[J]._registered)this.register(J,this.components[J]);let Y=document.createElement(this.components[J].tag);return Y.setProps(X),Y}static has(J){return typeof this.components[J]<"u"}static get(J){return this.components[J]}static setState(J,X){let Y=this.state[J];if(this.state[J]=X,this.subscribers[J])this.subscribers[J].forEach((Z)=>{Z(X,Y)})}static getState(J){return this.state[J]}static hasState(J){return J in this.state}static deleteState(J){if(J in this.state){let X=this.state[J];if(delete this.state[J],this.subscribers[J])this.subscribers[J].forEach((Y)=>{Y(void 0,X)});return!0}return!1}static subscribe(J,X){if(!this.subscribers[J])this.subscribers[J]=new Set;return this.subscribers[J].add(X),()=>{this.unsubscribe(J,X)}}static unsubscribe(J,X){if(this.subscribers[J])this.subscribers[J].delete(X)}static getAllState(){return{...this.state}}static clearState(){let J=Object.keys(this.state);for(let X of J)this.deleteState(X)}static get debug(){return this._debug}static set debug(J){this._debug=J}static log(J,X){if(this._debug)if(X!==void 0)console.log(`[Pandora] ${J}`,X);else console.log(`[Pandora] ${J}`)}static list(){return Object.keys(this.components)}static stats(J){if(J){if(!this.has(J))throw Error(`No component with tag "${J}" has been registered.`);return{tag:J,instanceCount:document.querySelectorAll(J).length,isRegistered:this.components[J]?._registered??!1,isLazy:J in this.lazyLoaders}}return this.list().map((X)=>({tag:X,instanceCount:document.querySelectorAll(X).length,isRegistered:this.components[X]?._registered??!1,isLazy:X in this.lazyLoaders}))}static onMount(J){return this._init(),this.mountCallbacks.add(J),()=>this.mountCallbacks.delete(J)}static onUnmount(J){return this._init(),this.unmountCallbacks.add(J),()=>this.unmountCallbacks.delete(J)}static _notifyMount(J,X){this.log(`Mounted: <${X}>`),this.mountCallbacks.forEach((Y)=>{try{Y(J,X)}catch(Z){console.error("[Pandora] Error in onMount callback:",Z)}})}static _notifyUnmount(J,X){this.log(`Unmounted: <${X}>`),this.unmountCallbacks.forEach((Y)=>{try{Y(J,X)}catch(Z){console.error("[Pandora] Error in onUnmount callback:",Z)}})}static onError(J){return this._init(),this.errorCallbacks.add(J),()=>this.errorCallbacks.delete(J)}static _notifyError(J,X,Y,Z){if(this.log(`Error in <${Y}> during ${Z}:`,J),this.errorCallbacks.size===0)throw J;this.errorCallbacks.forEach(($)=>{try{$(J,X,Y,Z)}catch(q){console.error("[Pandora] Error in onError callback:",q)}})}static alias(J,X){if(!this.has(X))throw Error(`Cannot create alias: no component with tag "${X}" has been registered.`);if(this.has(J))throw Error(`Cannot create alias: a component with tag "${J}" already exists.`);this.aliases[J]=X;let Y=this.components[X],Z=class extends Y{static _tag=J};this.components[J]=Z,window.customElements.define(J,Z),this.log(`Created alias: <${J}> -> <${X}>`)}static getOriginalTag(J){return this.aliases[J]}static isAlias(J){return J in this.aliases}static lazy(J,X){if(this._init(),this.has(J))throw Error(`Cannot register lazy component: a component with tag "${J}" already exists.`);this.lazyLoaders[J]=X;let Y=JJ;class Z extends j{static _tag=J;_lazyLoaded=!1;async connectedCallback(){await Y._loadLazyComponent(J);let $=Y.getImplementation(J);if($&&$!==Z){let q=$.prototype,W=Object.getOwnPropertyNames(q),G=this;for(let F of W)if(F!=="constructor"&&typeof q[F]==="function"){let B=q[F];G[F]=B.bind(this)}let Q={};try{Q=Reflect.construct($,[],$)}catch(F){Y.log(`Could not extract defaults for lazy <${J}>:`,F)}if(Q._state)G._state={...Q._state};if(Q._props)G._props={...Q._props};this._lazyLoaded=!0}await super.connectedCallback()}}this.components[J]=Z,window.customElements.define(J,Z),this.log(`Registered lazy component: <${J}>`)}static async _loadLazyComponent(J){if(!(J in this.lazyLoaders))return;let X=this.lazyLoaders[J];this.log(`Loading lazy component: <${J}>`);try{let Y=await X(),Z="default"in Y?Y.default:Y;delete this.lazyLoaders[J],this.implementations[J]=Z,Z._registered=!0,this.log(`Loaded lazy component: <${J}>`)}catch(Y){throw console.error(`[Pandora] Failed to load lazy component <${J}>:`,Y),Y}}static isLazy(J){return J in this.lazyLoaders}static async preload(J){if(this.isLazy(J))await this._loadLazyComponent(J)}static use(J,X){return this._init(),this.middleware[J].add(X),()=>this.middleware[J].delete(X)}static _applyMiddleware(J,X,Y,Z){let $=Y;return this.middleware[J].forEach((q)=>{try{$=q(X,$,Z)}catch(W){console.error(`[Pandora] Error in ${J} middleware:`,W)}}),$}static _hasMiddleware(J){return this.middleware[J].size>0}}var C=JJ;function gJ(J){return function(X){return C.register(J,X),X}}function pJ(J){return function(X,Y){let{connectedCallback:Z,disconnectedCallback:$}=X,q=Symbol(`__pandora_unsub_${Y}`),W=Symbol(`__pandora_value_${Y}`);X.connectedCallback=async function(){this[q]=C.subscribe(J,(Q)=>{if(this[W]===Q)return;if(this[W]=Q,this._isReady)this.forceRender()});let G=C.getState(J);if(G!==void 0)this[W]=G;if(Z)await Z.call(this)},X.disconnectedCallback=async function(){if(this[q])this[q](),this[q]=void 0;if($)await $.call(this)},Object.defineProperty(X,Y,{get:function(){return this[W]},set:function(G){if(this[W]===G)return;if(this[W]=G,C.setState(J,G),this._isReady)this.forceRender()},enumerable:!0,configurable:!0})}}function uJ(J){return function(X,Y){let Z=J||Y,$=Symbol(`__pandora_prop_${Y}`);if(!Object.hasOwn(X.constructor,"_observedAttributes"))X.constructor._observedAttributes=[];if(!X.constructor._observedAttributes.includes(Z))X.constructor._observedAttributes.push(Z);Object.defineProperty(X,Y,{get:function(){if(this[$]!==void 0)return this[$];if(this.hasAttribute(Z)){let q=this.getAttribute(Z);return iJ(q)}return},set:function(q){if(this[$]=q,typeof q==="string"||typeof q==="number"||typeof q==="boolean")if(typeof q==="boolean")if(q)this.setAttribute(Z,"");else this.removeAttribute(Z);else this.setAttribute(Z,String(q))},enumerable:!0,configurable:!0})}}function iJ(J){if(J===null)return;if(J===""||J==="true")return!0;if(J==="false")return!1;if(!isNaN(Number(J)))return J.includes(".")?parseFloat(J):parseInt(J,10);return J}var sJ={};export{dJ as svg,R as render,U as nothing,I as noChange,yJ as html,OJ as Util,sJ as Types,cJ as ShadowComponent,C as Registry,gJ as Register,uJ as Prop,pJ as Consumer,j as Component};
27
27
 
28
- //# debugId=62536D9123A3B07464756E2164756E21
28
+ //# debugId=2FCD9DA4978383ED64756E2164756E21
29
29
  //# sourceMappingURL=pandora.js.map