regor 1.1.2 → 1.1.4

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 CHANGED
@@ -73,11 +73,11 @@ const template = html`<button @click="count++">
73
73
  const props = ['message']
74
74
 
75
75
  const myComponent = createComponent<MyComponent>(
76
+ template,
76
77
  (head) => ({
77
78
  message: head.props.message,
78
79
  count: ref(0),
79
80
  }),
80
- template,
81
81
  props,
82
82
  )
83
83
 
package/dist/regor.d.ts CHANGED
@@ -15,8 +15,9 @@ export declare class ComponentHead<TProps = Record<any, any>> {
15
15
  * Disable this flag to isolate refs created within the component context.
16
16
  * Default: true */
17
17
  entangle: boolean;
18
- /** disables slot context switch to the parent */
19
- disableSwitch: boolean;
18
+ /** enables slot context switch to the parent
19
+ * Default: false */
20
+ enableSwitch: boolean;
20
21
  /** A callback invoked after auto props get assigned to the component context. */
21
22
  onAutoPropsAssigned?: () => void;
22
23
  constructor(props: TProps, element: Element, ctx: IRegorContext[], start: Comment, end: Comment);
@@ -218,7 +219,7 @@ export interface Scope<TRegorContext> {
218
219
  [ScopeSymbol]: true;
219
220
  }
220
221
  export declare const createApp: <TRegorContext extends IRegorContext>(context: TRegorContext | Scope<TRegorContext>, template?: Template | string, config?: RegorConfig) => App<TRegorContext>;
221
- export declare const createComponent: <TProps = Record<any, any>>(context: (head: ComponentHead<TProps>) => IRegorContext, template: Template | string, options?: CreateComponentOptions | string[]) => Component<TProps>;
222
+ export declare const createComponent: <TProps = Record<any, any>>(template: Template | string, context?: (head: ComponentHead<TProps>) => IRegorContext, options?: CreateComponentOptions | string[]) => Component<TProps>;
222
223
  export declare const toFragment: (json: JSONTemplate | JSONTemplate[], isSVG?: boolean, config?: RegorConfig) => DocumentFragment;
223
224
  export declare const toJsonTemplate: (node: Element | Element[]) => JSONTemplate | JSONTemplate[];
224
225
  export declare const addUnbinder: (node: Node, unbinder: Unbinder) => void;
@@ -1409,8 +1409,9 @@ var ComponentHead = class {
1409
1409
  * Disable this flag to isolate refs created within the component context.
1410
1410
  * Default: true */
1411
1411
  __publicField(this, "entangle", true);
1412
- /** disables slot context switch to the parent */
1413
- __publicField(this, "disableSwitch", false);
1412
+ /** enables slot context switch to the parent
1413
+ * Default: false */
1414
+ __publicField(this, "enableSwitch", false);
1414
1415
  /** A callback invoked after auto props get assigned to the component context. */
1415
1416
  __publicField(this, "onAutoPropsAssigned");
1416
1417
  /**
@@ -1657,7 +1658,7 @@ var ComponentBinder = class {
1657
1658
  compTemplate = null;
1658
1659
  }
1659
1660
  const createSwitchContext = (childNodes2) => {
1660
- if (head.disableSwitch) return;
1661
+ if (!head.enableSwitch) return;
1661
1662
  parser.__scoped(capturedContext, () => {
1662
1663
  parser.__push(componentCtx);
1663
1664
  const props = getProps(slot, parser.__capture());
@@ -4913,7 +4914,7 @@ var toJsonTemplate = (node) => {
4913
4914
  };
4914
4915
 
4915
4916
  // src/app/createComponent.ts
4916
- var createComponent = (context, template, options = {}) => {
4917
+ var createComponent = (template, context = () => ({}), options = {}) => {
4917
4918
  var _a, _b, _c, _d;
4918
4919
  if (isArray(options)) options = { props: options };
4919
4920
  if (isString(template)) template = { template };
@@ -1,3 +1,3 @@
1
- "use strict";var at=Object.defineProperty,no=Object.defineProperties,ro=Object.getOwnPropertyDescriptor,oo=Object.getOwnPropertyDescriptors,so=Object.getOwnPropertyNames,Nn=Object.getOwnPropertySymbols;var Mn=Object.prototype.hasOwnProperty,io=Object.prototype.propertyIsEnumerable;var ct=Math.pow,Gt=(t,e,n)=>e in t?at(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,pt=(t,e)=>{for(var n in e||(e={}))Mn.call(e,n)&&Gt(t,n,e[n]);if(Nn)for(var n of Nn(e))io.call(e,n)&&Gt(t,n,e[n]);return t},Ln=(t,e)=>no(t,oo(e));var ao=(t,e)=>{for(var n in e)at(t,n,{get:e[n],enumerable:!0})},co=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of so(e))!Mn.call(t,o)&&o!==n&&at(t,o,{get:()=>e[o],enumerable:!(r=ro(e,o))||r.enumerable});return t};var po=t=>co(at({},"__esModule",{value:!0}),t);var l=(t,e,n)=>Gt(t,typeof e!="symbol"?e+"":e,n);var vs={};ao(vs,{ComponentHead:()=>$e,RegorConfig:()=>ce,addUnbinder:()=>_,batch:()=>eo,collectRefs:()=>Tt,computeMany:()=>Wr,computeRef:()=>Gr,computed:()=>Kr,createApp:()=>qr,createComponent:()=>zr,endBatch:()=>An,entangle:()=>Ot,flatten:()=>X,getBindData:()=>ge,html:()=>wn,isDeepRef:()=>ke,isRaw:()=>je,isRef:()=>h,markRaw:()=>Jr,observe:()=>S,observeMany:()=>Yr,observerCount:()=>Zr,onMounted:()=>to,onUnmounted:()=>J,pause:()=>Ft,persist:()=>Qr,raw:()=>Xr,ref:()=>xe,removeNode:()=>$,resume:()=>qt,silence:()=>bt,sref:()=>W,startBatch:()=>On,toFragment:()=>Ie,toJsonTemplate:()=>Ge,trigger:()=>z,unbind:()=>se,unref:()=>H,useScope:()=>wt,warningHandler:()=>Xe,watchEffect:()=>Me});module.exports=po(vs);var B=t=>typeof t=="function",P=t=>typeof t=="string",kn=t=>typeof t=="undefined",te=t=>t==null||typeof t=="undefined",q=t=>typeof t!="string"||!(t!=null&&t.trim()),fo=Object.prototype.toString,Jt=t=>fo.call(t),he=t=>Jt(t)==="[object Map]",Z=t=>Jt(t)==="[object Set]",Qt=t=>Jt(t)==="[object Date]",Qe=t=>typeof t=="symbol",E=Array.isArray,N=t=>t!==null&&typeof t=="object";var In={0:"createApp can't find root element. You must define either a valid `selector` or an `element`. Example: createApp({}, {selector: '#app', html: '...'})",1:t=>`Component template cannot be found. selector: ${t} .`,2:"Use composables in scope. usage: useScope(() => new MyApp()).",3:t=>`${t} requires ref source argument`,4:"computed is readonly.",5:"persist requires a string key."},U=(t,...e)=>{let n=In[t];return new Error(B(n)?n.call(In,...e):n)};var Ue=Symbol(":regor");var ge=t=>{let e=t[Ue];if(e)return e;let n={unbinders:[],data:{}};return t[Ue]=n,n};var _=(t,e)=>{ge(t).unbinders.push(e)};var ft=[],Dn=()=>{let t={onMounted:[],onUnmounted:[]};return ft.push(t),t},Oe=t=>{let e=ft[ft.length-1];if(!e&&!t)throw U(2);return e},Un=t=>{let e=Oe();return t&&Yt(t),ft.pop(),e},Xt=Symbol("csp"),Yt=t=>{let e=t,n=e[Xt];if(n){let r=Oe();if(n===r)return;r.onMounted.length>0&&n.onMounted.push(...r.onMounted),r.onUnmounted.length>0&&n.onUnmounted.push(...r.onUnmounted);return}e[Xt]=Oe()},mt=t=>t[Xt];var J=(t,e)=>{var n;(n=Oe(e))==null||n.onUnmounted.push(t)};var lt=Symbol("ref"),Q=Symbol("sref"),ut=Symbol("raw");var h=t=>(t==null?void 0:t[Q])===1;var S=(t,e,n)=>{if(!h(t))throw U(3,"observe");n&&e(t());let o=t(void 0,void 0,0,e);return J(o,!0),o};var se=t=>{let e=[t];for(;e.length>0;){let n=e.shift();mo(n);let r=n.childNodes;if(r)for(let o of r)e.push(o)}},mo=t=>{let e=t[Ue];if(e){for(let n of e.unbinders)n();e.unbinders.splice(0),delete t[Ue]}};var $=t=>{t.remove(),setTimeout(()=>se(t),1)};var Hn={8:t=>`Model binding requires a ref at ${t.outerHTML}`,7:t=>`Model binding is not supported on ${t.tagName} element at ${t.outerHTML}`,0:(t,e)=>`${t} binding expression is missing at ${e.outerHTML}`,1:(t,e,n)=>`invalid ${t} expression: ${e} at ${n.outerHTML}`,2:(t,e)=>`${t} requires object expression at ${e.outerHTML}`,3:(t,e)=>`${t} binder: key is empty on ${e.outerHTML}.`,4:(t,e,n,r)=>({msg:`Failed setting prop "${t}" on <${e.toLowerCase()}>: value ${n} is invalid.`,args:[r]}),5:(t,e)=>`${t} binding missing event type at ${e.outerHTML}`,6:(t,e)=>({msg:t,args:[e]})},D=(t,...e)=>{let n=Hn[t],r=B(n)?n.call(Hn,...e):n,o=Xe.warning;o&&(P(r)?o(r):o(r,...r.args))},Xe={warning:console.warn};var yt={},dt={},_n=1,Bn=t=>{let e=(_n++).toString();return yt[e]=t,dt[e]=0,e},Zt=t=>{dt[t]+=1},en=t=>{--dt[t]===0&&(delete yt[t],delete dt[t])},Pn=t=>yt[t],tn=()=>_n!==1&&Object.keys(yt).length>0,Ye="r-switch",lo=t=>{let e=t.filter(r=>Ae(r)).map(r=>[...r.querySelectorAll("[r-switch]")].map(o=>o.getAttribute(Ye))),n=new Set;return e.forEach(r=>{r.forEach(o=>o&&n.add(o))}),[...n]},He=(t,e)=>{if(!tn())return;let n=lo(e);n.length!==0&&(n.forEach(Zt),_(t,()=>{n.forEach(en)}))};var nn=(t,e,n,r)=>{let o=[];for(let s of t){let i=s.cloneNode(!0);n.insertBefore(i,r),o.push(i)}Te(e,o)},rn=Symbol("r-if"),jn=Symbol("r-else"),Vn=t=>t[jn]===1,ht=class{constructor(e){l(this,"p");l(this,"P");l(this,"q");l(this,"K");l(this,"z");l(this,"b");l(this,"T");this.p=e,this.P=e.o.f.if,this.q=Be(e.o.f.if),this.K=e.o.f.else,this.z=e.o.f.elseif,this.b=e.o.f.for,this.T=e.o.f.pre}qe(e,n){let r=e.parentElement;for(;r!==null&&r!==document.documentElement;){if(r.hasAttribute(n))return!0;r=r.parentElement}return!1}N(e){let n=e.hasAttribute(this.P),r=be(e,this.q);for(let o of r)this.x(o);return n}W(e){return e[rn]?!0:(e[rn]=!0,be(e,this.q).forEach(n=>n[rn]=!0),!1)}x(e){if(e.hasAttribute(this.T)||this.W(e)||this.qe(e,this.b))return;let n=e.getAttribute(this.P);if(!n){D(0,this.P,e);return}e.removeAttribute(this.P),this.k(e,n)}B(e,n,r){let o=_e(e),s=e.parentNode,i=document.createComment(`__begin__ :${n}${r!=null?r:""}`);s.insertBefore(i,e),He(i,o),o.forEach(c=>{$(c)}),e.remove(),n!=="if"&&(e[jn]=1);let a=document.createComment(`__end__ :${n}${r!=null?r:""}`);return s.insertBefore(a,i.nextSibling),{nodes:o,parent:s,commentBegin:i,commentEnd:a}}pe(e,n){if(!e)return[];let r=e.nextElementSibling;if(e.hasAttribute(this.K)){e.removeAttribute(this.K);let{nodes:o,parent:s,commentBegin:i,commentEnd:a}=this.B(e,"else");return[{mount:()=>{nn(o,this.p,s,a)},unmount:()=>{fe(i,a)},isTrue:()=>!0,isMounted:!1}]}else{let o=e.getAttribute(this.z);if(!o)return[];e.removeAttribute(this.z);let{nodes:s,parent:i,commentBegin:a,commentEnd:c}=this.B(e,"elseif",` => ${o} `),p=this.p.h.C(o),f=p.value,m=this.pe(r,n),u=[];_(a,()=>{p.stop();for(let C of u)C();u.length=0});let d=S(f,n);return u.push(d),[{mount:()=>{nn(s,this.p,i,c)},unmount:()=>{fe(a,c)},isTrue:()=>!!f()[0],isMounted:!1}].concat(m)}}k(e,n){let r=e.nextElementSibling,{nodes:o,parent:s,commentBegin:i,commentEnd:a}=this.B(e,"if",` => ${n} `),c=this.p.h.C(n),p=c.value,f=!1,m=this.p.h,u=m.V(),y=()=>{m.v(u,()=>{if(p()[0])f||(nn(o,this.p,s,a),f=!0),d.forEach(b=>{b.unmount(),b.isMounted=!1});else{fe(i,a),f=!1;let b=!1;for(let I of d)!b&&I.isTrue()?(I.isMounted||(I.mount(),I.isMounted=!0),b=!0):(I.unmount(),I.isMounted=!1)}})},d=this.pe(r,y),C=[];_(i,()=>{c.stop();for(let b of C)b();C.length=0}),y();let x=S(p,y);C.push(x)}};var _e=t=>{let e=ie(t)?t.content.childNodes:[t];return Array.from(e).filter(n=>{let r=n==null?void 0:n.tagName;return r!=="SCRIPT"&&r!=="STYLE"})},Te=(t,e)=>{for(let n of e)!Vn(n)&&t.G(n)},be=(t,e)=>{var r;let n=t.querySelectorAll(e);return(r=t.matches)!=null&&r.call(t,e)?[t,...n]:n},ie=t=>t instanceof HTMLTemplateElement,Ae=t=>t.nodeType===Node.ELEMENT_NODE,Ze=t=>t.nodeType===Node.ELEMENT_NODE,$n=t=>t instanceof HTMLSlotElement,me=t=>ie(t)?t.content.childNodes:t.childNodes,fe=(t,e)=>{let n=t.nextSibling;for(;n!=null&&n!==e;){let r=n.nextSibling;$(n),n=r}},Ee=(t,e)=>{Object.defineProperty(t,"value",{get(){return t()},set(n){if(e)throw new Error("value is readonly.");return t(n)},enumerable:!0,configurable:!1})},Fn=(t,e)=>{if(!t)return!1;if(t.startsWith("["))return t.substring(1,t.length-1);let n=e.length;return t.startsWith(e)?t.substring(n,t.length-n):!1},Be=t=>`[${CSS.escape(t)}]`,gt=(t,e)=>(t.startsWith("@")&&(t=e.f.on+":"+t.slice(1)),t.includes("[")&&(t=t.replace(/[[\]]/g,e.f.dynamic)),t),on=t=>{let e=Object.create(null);return n=>e[n]||(e[n]=t(n))},uo=/-(\w)/g,j=on(t=>t&&t.replace(uo,(e,n)=>n?n.toUpperCase():"")),yo=/\B([A-Z])/g,Pe=on(t=>t&&t.replace(yo,"-$1").toLowerCase()),et=on(t=>t&&t.charAt(0).toUpperCase()+t.slice(1));var ne=[],qn=t=>{var e;ne.length!==0&&((e=ne[ne.length-1])==null||e.add(t))},Me=t=>{if(!t)return()=>{};let e={stop:()=>{}};return ho(t,e),J(()=>e.stop(),!0),e.stop},ho=(t,e)=>{if(!t)return;let n=[],r=!1,o=()=>{for(let s of n)s();n=[],r=!0};e.stop=o;try{let s=new Set;if(ne.push(s),t(i=>n.push(i)),r)return;for(let i of[...s]){let a=S(i,()=>{o(),Me(t)});n.push(a)}}finally{ne.pop()}},bt=t=>{let e=ne.length,n=e>0&&ne[e-1];try{return n&&ne.push(null),t()}finally{n&&ne.pop()}},Tt=t=>{try{let e=new Set;return ne.push(e),{value:t(),refs:[...e]}}finally{ne.pop()}};var je=t=>!!t&&t[ut]===1;var z=(t,e,n)=>{if(!h(t))return;let r=t;if(r(void 0,e,1),!n)return;let o=r();if(o){if(E(o)||Z(o))for(let s of o)z(s,e,!0);else if(he(o))for(let s of o)z(s[0],e,!0),z(s[1],e,!0);if(N(o))for(let s in o)z(o[s],e,!0)}};function go(t,e,n){Object.defineProperty(t,e,{value:n,enumerable:!1,writable:!0,configurable:!0})}var Ve=(t,e,n)=>{n.forEach(function(r){let o=t[r];go(e,r,function(...i){let a=o.apply(this,i),c=this[Q];for(let p of c)z(p);return a})})},Et=(t,e)=>{Object.defineProperty(t,Symbol.toStringTag,{value:e,writable:!1,enumerable:!1,configurable:!0})};var zn=Array.prototype,sn=Object.create(zn),bo=["push","pop","shift","unshift","splice","sort","reverse"];Ve(zn,sn,bo);var Kn=Map.prototype,Ct=Object.create(Kn),To=["set","clear","delete"];Et(Ct,"Map");Ve(Kn,Ct,To);var Wn=Set.prototype,Rt=Object.create(Wn),Eo=["add","clear","delete"];Et(Rt,"Set");Ve(Wn,Rt,Eo);var ae={},W=t=>{if(h(t)||je(t))return t;let e={auto:!0,_value:t},n=c=>N(c)?Q in c?!0:E(c)?(Object.setPrototypeOf(c,sn),!0):Z(c)?(Object.setPrototypeOf(c,Rt),!0):he(c)?(Object.setPrototypeOf(c,Ct),!0):!1:!1,r=n(t),o=new Set,s=(c,p)=>{if(ae.stack&&ae.stack.length){ae.stack[ae.stack.length-1].add(a);return}o.size!==0&&bt(()=>{for(let f of[...o.keys()])o.has(f)&&f(c,p)})},i=c=>{let p=c[Q];p||(c[Q]=p=new Set),p.add(a)},a=(...c)=>{if(!(2 in c)){let f=c[0],m=c[1];return 0 in c?e._value===f||h(f)&&(f=f(),e._value===f)?f:(n(f)&&i(f),e._value=f,e.auto&&s(f,m),e._value):(qn(a),e._value)}switch(c[2]){case 0:{let f=c[3];if(!f)return()=>{};let m=u=>{o.delete(u)};return o.add(f),()=>{m(f)}}case 1:{let f=c[1],m=e._value;s(m,f);break}case 2:return o.size;case 3:{e.auto=!1;break}case 4:e.auto=!0}return e._value};return a[Q]=1,Ee(a,!1),r&&i(t),a};var H=t=>h(t)?t():t;var tt=class{constructor(e){l(this,"E",[]);l(this,"H",new Map);l(this,"J");this.J=e}get S(){return this.E.length}Q(e){let n=this.J(e.value);n!==void 0&&this.H.set(n,e)}X(e){var r;let n=this.J((r=this.E[e])==null?void 0:r.value);n!==void 0&&this.H.delete(n)}static Ke(e,n){return{items:[],index:e,value:n,order:-1}}w(e){e.order=this.S,this.E.push(e),this.Q(e)}ze(e,n){let r=this.S;for(let o=e;o<r;++o)this.E[o].order=o+1;n.order=e,this.E.splice(e,0,n),this.Q(n)}I(e){return this.E[e]}Y(e,n){this.X(e),this.E[e]=n,this.Q(n),n.order=e}ce(e){this.X(e),this.E.splice(e,1);let n=this.S;for(let r=e;r<n;++r)this.E[r].order=r}fe(e){let n=this.S;for(let r=e;r<n;++r)this.X(r);this.E.splice(e)}Rt(e){return this.H.has(e)}We(e){var r;let n=this.H.get(e);return(r=n==null?void 0:n.order)!=null?r:-1}};var an=Symbol("r-for"),vt=class vt{constructor(e){l(this,"p");l(this,"b");l(this,"Z");l(this,"T");this.p=e,this.b=e.o.f.for,this.Z=Be(this.b),this.T=e.o.f.pre}N(e){let n=e.hasAttribute(this.b),r=be(e,this.Z);for(let o of r)this.Ge(o);return n}W(e){return e[an]?!0:(e[an]=!0,be(e,this.Z).forEach(n=>n[an]=!0),!1)}Ge(e){if(e.hasAttribute(this.T)||this.W(e))return;let n=e.getAttribute(this.b);if(!n){D(0,this.b,e);return}e.removeAttribute(this.b),this.Je(e,n)}le(e){return te(e)?[]:(B(e)&&(e=e()),Symbol.iterator in Object(e)?e:typeof e=="number"?(r=>({*[Symbol.iterator](){for(let o=1;o<=r;o++)yield o}}))(e):Object.entries(e))}Je(e,n){var it;let r=this.Qe(n);if(!(r!=null&&r.list)){D(1,this.b,n,e);return}let o=this.p.o.f.key,s=this.p.o.f.keyBind,i=(it=e.getAttribute(o))!=null?it:e.getAttribute(s);e.removeAttribute(o),e.removeAttribute(s);let a=i?v=>{var A;return H((A=H(v))==null?void 0:A[i])}:v=>v,c=(v,A)=>a(v)===a(A),p=_e(e),f=e.parentNode;if(!f)return;let m=`${this.b} => ${n}`,u=new Comment(`__begin__ ${m}`);f.insertBefore(u,e),He(u,p),p.forEach(v=>{$(v)}),e.remove();let y=new Comment(`__end__ ${m}`);f.insertBefore(y,u.nextSibling);let d=this.p,C=d.h,k=C.V(),x=(v,A,K)=>{let w=r.createContext(A,v),Y=tt.Ke(w.index,A);return C.v(k,()=>{C.w(w.ctx);let re=K.previousSibling,De=[];for(let g of p){let M=g.cloneNode(!0);f.insertBefore(M,K),De.push(M)}for(Te(d,De),re=re.nextSibling;re!==K;)Y.items.push(re),re=re.nextSibling}),Y},b=(v,A)=>{let K=O.I(v).items,w=K[K.length-1].nextSibling;for(let Y of K)$(Y);O.Y(v,x(v,A,w))},I=(v,A)=>{O.w(x(v,A,y))},V=v=>{for(let A of O.I(v).items)$(A)},ee=v=>{let A=O.S;for(let K=v;K<A;++K)O.I(K).index(K)},Je=v=>{let A=O.S;B(v)&&(v=v());let K=H(v[0]);if(E(K)&&K.length===0){fe(u,y),O.fe(0);return}let w=0,Y=Number.MAX_SAFE_INTEGER,re=A,De=this.p.o.forGrowThreshold,g=()=>O.S<re+De;for(let T of this.le(v[0])){let F=()=>{if(w<A){let G=O.I(w++);if(c(G.value,T))return;let R=O.We(a(T));if(R>=w&&R-w<10){if(--w,Y=Math.min(Y,w),V(w),O.ce(w),--A,R>w+1)for(let L=w;L<R-1&&L<A&&!c(O.I(w).value,T);)++L,V(w),O.ce(w),--A;F();return}g()?(O.ze(w-1,x(w,T,O.I(w-1).items[0])),Y=Math.min(Y,w-1),++A):b(w-1,T)}else I(w++,T)};F()}let M=w;for(A=O.S;w<A;)V(w++);O.fe(M),ee(Y)},Kt=()=>{ye=S(ot,Je)},rt=()=>{de.stop(),ye()},de=C.C(r.list),ot=de.value,ye,st=0,O=new tt(a);for(let v of this.le(ot()[0]))O.w(x(st++,v,y));_(u,rt),Kt()}Qe(e){var c,p;let n=vt.Xe.exec(e);if(!n)return;let r=(n[1]+((c=n[2])!=null?c:"")).split(",").map(f=>f.trim()),o=r.length>1?r.length-1:-1,s=o!==-1&&(r[o]==="index"||(p=r[o])!=null&&p.startsWith("#"))?r[o]:"";s&&r.splice(o,1);let i=n[3];if(!i||r.length===0)return;let a=/[{[]/.test(e);return{list:i,createContext:(f,m)=>{let u={},y=H(f);if(!a&&r.length===1)u[r[0]]=f;else if(E(y)){let C=0;for(let k of r)u[k]=y[C++]}else for(let C of r)u[C]=y[C];let d={ctx:u,index:W(-1)};return s&&(d.index=u[s.startsWith("#")?s.substring(1):s]=W(m)),d}}}};l(vt,"Xe",/\{?\[?\(?([^)}\]]+)\)?\]?\}?([^)]+)?\s+\b(?:in|of)\b\s+(.*)\s*$/);var xt=vt;var Co=(t,e)=>{for(let n of t){let r=n.cloneNode(!0);e.appendChild(r)}},St=class{constructor(e){l(this,"p");l(this,"D");l(this,"ue");this.p=e,this.D=e.o.f.is,this.ue=Be(this.D)+", [is]"}N(e){let n=e.hasAttribute(this.D),r=be(e,this.ue);for(let o of r)this.x(o);return n}x(e){let n=e.getAttribute(this.D);if(!n){if(n=e.getAttribute("is"),!n||!n.startsWith("regor:"))return;n=`'${n.slice(6)}'`,e.removeAttribute("is")}e.removeAttribute(this.D),this.k(e,n)}B(e,n){let r=_e(e),o=e.parentNode,s=document.createComment(`__begin__ dynamic ${n!=null?n:""}`);o.insertBefore(s,e),He(s,r),r.forEach(a=>{$(a)}),e.remove();let i=document.createComment(`__end__ dynamic ${n!=null?n:""}`);return o.insertBefore(i,s.nextSibling),{nodes:r,parent:o,commentBegin:s,commentEnd:i}}k(e,n){let{nodes:r,parent:o,commentBegin:s,commentEnd:i}=this.B(e,` => ${n} `),a=this.p.h.C(n),c=a.value,p=this.p.h,f=p.V(),m={name:""},u=ie(e)?r:[...r[0].childNodes],y=()=>{p.v(f,()=>{var I;let x=c()[0];if(N(x)&&(x.name?x=x.name:x=(I=Object.entries(p.me()).filter(V=>V[1]===x)[0])==null?void 0:I[0]),!P(x)||q(x)){fe(s,i);return}if(m.name===x)return;fe(s,i);let b=document.createElement(x);for(let V of e.getAttributeNames())V!==this.D&&b.setAttribute(V,e.getAttribute(V));Co(u,b),o.insertBefore(b,i),this.p.G(b),m.name=x})},d=[];_(s,()=>{a.stop();for(let x of d)x();d.length=0}),y();let k=S(c,y);d.push(k)}};var Gn={collectRefObj:!0,onBind:(t,e)=>S(e.value,()=>{let r=e.value(),o=e.context,s=r[0];if(N(s))for(let i of Object.entries(s)){let a=i[0],c=i[1],p=o[a];p!==c&&(h(p)?p(c):o[a]=c)}},!0)};var Jn={collectRefObj:!0,once:!0,onBind:(t,e)=>{let n=e.value(),r=e.context,o=n[0];if(!N(o))return()=>{};for(let s of Object.entries(o)){let i=s[0],a=s[1],c=r[i];c!==a&&(h(c)?c(a):r[i]=a)}return()=>{}}};var Ce=t=>{var n,r;let e=(n=mt(t))==null?void 0:n.onUnmounted;e==null||e.forEach(o=>{o()}),(r=t.unmounted)==null||r.call(t)};var $e=class{constructor(e,n,r,o,s){l(this,"props");l(this,"start");l(this,"end");l(this,"ctx");l(this,"autoProps",!0);l(this,"entangle",!0);l(this,"disableSwitch",!1);l(this,"onAutoPropsAssigned");l(this,"de");l(this,"emit",(e,n)=>{this.de.dispatchEvent(new CustomEvent(e,{detail:n}))});this.props=e,this.de=n,this.ctx=r,this.start=o,this.end=s}unmount(){let e=this.start.nextSibling,n=this.end;for(;e&&e!==n;)$(e),e=e.nextSibling;Ce(this)}};var cn=Symbol("scope"),wt=t=>{try{Dn();let e=t();Yt(e);let n={context:e,unmount:()=>Ce(e),[cn]:1};return n[cn]=1,n}finally{Un()}},Qn=t=>N(t)?cn in t:!1;var Ot=(t,e)=>{if(t===e)return()=>{};let n=S(t,o=>e(o)),r=S(e,o=>t(o));return e(t()),()=>{n(),r()}};var At=t=>{var n,r;let e=(n=mt(t))==null?void 0:n.onMounted;e==null||e.forEach(o=>{o()}),(r=t.mounted)==null||r.call(t)};var Xn={collectRefObj:!0,onBind:(t,e,n,r,o,s)=>{if(!r)return()=>{};let i=j(r);return S(e.value,()=>{var m;let c=(m=e.refs[0])!=null?m:e.value()[0],p=e.context,f=p[r];f!==c&&(h(f)?f(c):p[i]=c)},!0)}};var Nt=class{constructor(e){l(this,"p");l(this,"ye");this.p=e,this.ye=e.o.f.inherit}N(e){this.Ye(e)}Ye(e){var f;let n=this.p,r=n.h,o=n.o.he,s=n.o.ge,i=r.me(),a=[...o.keys(),...Object.keys(i),...[...o.keys()].map(Pe),...[...Object.keys(i)].map(Pe)].join(",");if(q(a))return;let c=e.querySelectorAll(a),p=(f=e.matches)!=null&&f.call(e,a)?[e,...c]:c;for(let m of p){if(m.hasAttribute(n.T))continue;let u=m.parentNode;if(!u)continue;let y=m.nextSibling,d=j(m.tagName).toUpperCase(),C=i[d],k=C!=null?C:s.get(d);if(!k)continue;let x=k.template;if(!x)continue;let b=m.parentElement;if(!b)continue;let I=new Comment(" begin component: "+m.tagName),V=new Comment(" end component: "+m.tagName);b.insertBefore(I,m),m.remove();let ee=n.o.f.props,Je=n.o.f.propsOnce,Kt=n.o.f.bind,rt=(g,M)=>{let T={},F=g.hasAttribute(ee),G=g.hasAttribute(Je);return r.v(M,()=>{r.w(T),F&&n.x(Gn,g,ee),G&&n.x(Jn,g,Je);let R=k.props;if(!R||R.length===0)return;R=R.map(j);for(let Se of R.concat(R.map(Pe))){let pe=g.getAttribute(Se);pe!==null&&(T[j(Se)]=pe,g.removeAttribute(Se))}let L=n.ee.be(g,!1);for(let[Se,pe]of L.entries()){let[we,Wt]=pe.te;Wt&&R.includes(j(Wt))&&(we!=="."&&we!==":"&&we!==Kt||n.x(Xn,g,Se,!0,Wt,pe.ne))}}),T},de=[...r.V()],ot=()=>{var F;let g=rt(m,de),M=new $e(g,m,de,I,V),T=wt(()=>{var G;return(G=k.context(M))!=null?G:{}}).context;if(M.autoProps){for(let[G,R]of Object.entries(g))if(G in T){let L=T[G];if(L===R)continue;M.entangle&&h(L)&&h(R)?_(I,Ot(R,L)):h(L)?L(R):T[G]=H(R)}else T[G]=R;(F=M.onAutoPropsAssigned)==null||F.call(M)}return{componentCtx:T,head:M}},{componentCtx:ye,head:st}=ot(),O=[...me(x)],it=O.length,v=m.childNodes.length===0,A=g=>{let M=g.parentElement;if(v){for(let R of[...g.childNodes])M.insertBefore(R,g);return}let T=g.name;q(T)&&(T=g.getAttributeNames().filter(R=>R.startsWith("#"))[0],q(T)?T="default":T=T.substring(1));let F=m.querySelector(`template[name='${T}'], template[\\#${T}]`);!F&&T==="default"&&(F=m.querySelector("template:not([name])"),F&&F.getAttributeNames().filter(R=>R.startsWith("#")).length>0&&(F=null));let G=R=>{st.disableSwitch||r.v(de,()=>{r.w(ye);let L=rt(g,r.V());r.v(de,()=>{r.w(L);let Se=r.V(),pe=Bn(Se);for(let we of R)Ae(we)&&(we.setAttribute(Ye,pe),Zt(pe),_(we,()=>{en(pe)}))})})};if(F){let R=[...me(F)];for(let L of R)M.insertBefore(L,g);G(R)}else{if(T!=="default"){for(let L of[...me(g)])M.insertBefore(L,g);return}let R=[...me(m)].filter(L=>!ie(L));for(let L of R)M.insertBefore(L,g);G(R)}},K=g=>{if(!Ae(g))return;let M=g.querySelectorAll("slot");if($n(g)){A(g),g.remove();return}for(let T of M)A(T),T.remove()};(()=>{for(let g=0;g<it;++g)O[g]=O[g].cloneNode(!0),u.insertBefore(O[g],y),K(O[g])})(),b.insertBefore(V,y);let Y=()=>{if(!k.inheritAttrs)return;let g=O.filter(T=>T.nodeType===Node.ELEMENT_NODE);g.length>1&&(g=g.filter(T=>T.hasAttribute(this.ye)));let M=g[0];if(M)for(let T of m.getAttributeNames()){if(T===ee||T===Je)continue;let F=m.getAttribute(T);if(T==="class")M.classList.add(...F.split(" "));else if(T==="style"){let G=M.style,R=m.style;for(let L of R)G.setProperty(L,R.getPropertyValue(L))}else M.setAttribute(gt(T,n.o),F)}},re=()=>{for(let g of m.getAttributeNames())!g.startsWith("@")&&!g.startsWith(n.o.f.on)&&m.removeAttribute(g)},De=()=>{Y(),re(),r.w(ye),n.Te(m,!1),ye.$emit=st.emit,Te(n,O),_(m,()=>{Ce(ye)}),_(I,()=>{se(m)}),At(ye)};r.v(de,De)}}};var pn=class{constructor(e){l(this,"xe");l(this,"te",[]);l(this,"ne",[]);l(this,"Ee",[]);this.xe=e,this.C()}C(){let e=this.xe,n=e.startsWith(".");n&&(e=":"+e.slice(1));let r=e.indexOf("."),o=this.te=(r<0?e:e.substring(0,r)).split(/[:@]/);if(q(o[0])&&(o[0]=n?".":e[0]),r>=0){let s=this.ne=e.slice(r+1).split(".");if(s.includes("camel")){let i=o.length-1;o[i]=j(o[i])}s.includes("prop")&&(o[0]=".")}}},Mt=class{constructor(e){l(this,"p");l(this,"Re");this.p=e,this.Re=e.o.Ze()}be(e,n){let r=new Map;if(!Ze(e))return r;let o=this.Re,s=a=>{let c=a.getAttributeNames().filter(p=>o.some(f=>p.startsWith(f)));for(let p of c)r.has(p)||r.set(p,new pn(p)),r.get(p).Ee.push(a)};if(s(e),!n)return r;let i=e.querySelectorAll("*");for(let a of i)s(a);return r}};var Lt={};var kt=class{constructor(e){l(this,"h");l(this,"Ce");l(this,"ve");l(this,"Se");l(this,"we");l(this,"ee");l(this,"o");l(this,"T");l(this,"Oe");this.h=e,this.o=e.o,this.ve=new xt(this),this.Ce=new ht(this),this.Se=new St(this),this.we=new Nt(this),this.ee=new Mt(this),this.T=this.o.f.pre,this.Oe=this.o.f.dynamic}et(e){let n=ie(e)?[e]:e.querySelectorAll("template");for(let r of n){if(r.hasAttribute(this.T))continue;let o=r.parentNode;if(!o)continue;let s=r.nextSibling;if(r.remove(),!r.content)continue;let i=[...r.content.childNodes];for(let a of i)o.insertBefore(a,s);Te(this,i)}}G(e){e.nodeType!==Node.ELEMENT_NODE||e.hasAttribute(this.T)||this.Ce.N(e)||this.ve.N(e)||this.Se.N(e)||(this.we.N(e),this.et(e),this.Te(e,!0))}Te(e,n){var s;let r=this.ee.be(e,n),o=this.o._;for(let[i,a]of r.entries()){let[c,p]=a.te,f=(s=o[i])!=null?s:o[c];if(!f){console.error("directive not found:",c);continue}a.Ee.forEach(m=>{this.x(f,m,i,!1,p,a.ne)})}}x(e,n,r,o,s,i){if(n.hasAttribute(this.T))return;let a=n.getAttribute(r);n.removeAttribute(r);let c=p=>{let f=p.getAttribute(Ye);return f||(p.parentElement?c(p.parentElement):null)};if(tn()){let p=c(n);if(p){this.h.v(Pn(p),()=>{this.k(e,n,a,s,i)});return}}this.k(e,n,a,s,i)}tt(e,n,r){if(e!==Lt)return!1;if(q(r))return!0;let o=document.querySelector(r);if(o){let s=n.parentElement;if(!s)return!0;let i=new Comment(`teleported => '${r}'`);s.insertBefore(i,n),n.teleportedFrom=i,i.teleportedTo=n,_(i,()=>{$(n)}),o.appendChild(n)}return!0}k(e,n,r,o,s){var k;if(n.nodeType!==Node.ELEMENT_NODE||r==null||this.tt(e,n,r))return;let i=this.h.C(r,e.isLazy,e.isLazyKey,e.collectRefObj,e.once),a=[];_(n,()=>{i.stop(),f==null||f.stop();for(let x of a)x();a.length=0});let p=Fn(o,this.Oe),f;p&&(f=this.h.C(j(p),void 0,void 0,void 0,e.once));let m,u=()=>(m=i.value(),m),y,d=()=>f?(y=f.value()[0],y):(y=o,o),C=()=>{if(!e.onChange)return;let x=S(i.value,b=>{var ee;let I=m,V=y;(ee=e.onChange)==null||ee.call(e,n,u(),I,d(),V,s)});if(a.push(x),f){let b=S(f.value,I=>{var ee;let V=y;(ee=e.onChange)==null||ee.call(e,n,u(),V,d(),V,s)});a.push(b)}};e.once||C(),e.onBind&&a.push(e.onBind(n,i,r,o,f,s)),(k=e.onChange)==null||k.call(e,n,u(),void 0,d(),void 0,s)}};var Ro=9,xo=10,vo=13,So=32,Re=46,It=44,wo=39,Oo=34,Dt=40,Fe=41,Ut=91,Ht=93,fn=63,Ao=59,Yn=58,No=123,_t=125,ln=43,Mo=45,Zn=96,er=47,Lo=92,tr=[2,3],nr=[ln,Mo],cr={"-":1,"!":1,"~":1,"+":1,new:1},pr={"=":2.5,"*=":2.5,"**=":2.5,"/=":2.5,"%=":2.5,"+=":2.5,"-=":2.5,"<<=":2.5,">>=":2.5,">>>=":2.5,"&=":2.5,"^=":2.5,"|=":2.5},ze=Ln(pt({"=>":2},pr),{"||":3,"??":3,"&&":4,"|":5,"^":6,"&":7,"==":8,"!=":8,"===":8,"!==":8,"<":9,">":9,"<=":9,">=":9,in:9,"<<":10,">>":10,">>>":10,"+":11,"-":11,"*":12,"/":12,"%":12,"**":13}),fr=Object.keys(pr),ko=new Set(fr),Bt=new Set;Bt.add("=>");fr.forEach(t=>Bt.add(t));var Io=new Set(["$","_"]),rr={true:!0,false:!1,null:null},Do="this";function mr(t){return Math.max(0,...Object.keys(t).map(e=>e.length))}var Uo=mr(cr),Ho=mr(ze),Ke="Expected ",Le="Unexpected ",dn="Unclosed ",_o=Ke+":",or=Ke+"expression",Bo="missing }",Po=Le+"object property",jo=dn+"(",sr=Ke+"comma",ir=Le+"token ",Vo=Le+"period",mn=Ke+"expression after ",$o="missing unaryOp argument",Fo=dn+"[",qo=Ke+"exponent (",zo="Variable names cannot start with a number (",Ko=dn+'quote after "';var qe=t=>t>=48&&t<=57,ar=t=>ze[t]||0,un=class{constructor(e){l(this,"nt",{0:[this.rt],1:[this.ot,this.st,this.it],2:[this.at,this.pt,this.ct,this.Ae,this.ft],3:[this.lt,this.ut,this.mt]});l(this,"r");l(this,"e");this.r=e,this.e=0}get M(){return this.r.charAt(this.e)}get l(){return this.r.charCodeAt(this.e)}u(e){return this.r.charCodeAt(this.e)===e}U(e){let n=String.fromCharCode(e);return e>=65&&e<=90||e>=97&&e<=122||e>=128&&!(n in ze)||Io.has(n)}re(e){return this.U(e)||qe(e)}i(e){return new Error(`${e} at character ${this.e}`)}L(e,n,r){let o=this.nt[e];if(!o)return r;let s={node:r},i=a=>{a.call(this,s)};return n===0?o.forEach(i):o.find(i),s.node}y(){let e=this.l,n=this.r,r=this.e;for(;e===So||e===Ro||e===xo||e===vo;)e=n.charCodeAt(++r);this.e=r}parse(){let e=this.oe();return e.length===1?e[0]:{type:0,body:e}}oe(e){let n=[];for(;this.e<this.r.length;){let r=this.l;if(r===Ao||r===It)this.e++;else{let o=this.O();if(o)n.push(o);else if(this.e<this.r.length){if(r===e)break;throw this.i(Le+'"'+this.M+'"')}}}return n}O(){var n;let e=(n=this.L(0,1))!=null?n:this.Ne();return this.y(),this.L(1,0,e)}se(){this.y();let e=this.e,n=this.r,r=n.substr(e,Ho),o=r.length;for(;o>0;){if(r in ze&&(!this.U(this.l)||e+r.length<n.length&&!this.re(n.charCodeAt(e+r.length))))return e+=o,this.e=e,r;r=r.substr(0,--o)}return!1}Ne(){let e,n,r,o,s,i,a,c;if(s=this.j(),!s||(n=this.se(),!n))return s;if(o={value:n,prec:ar(n),right_a:Bt.has(n)},i=this.j(),!i)throw this.i(mn+n);let p=[s,o,i];for(;n=this.se();){if(r=ar(n),r===0){this.e-=n.length;break}o={value:n,prec:r,right_a:Bt.has(n)},c=n;let f=m=>o.right_a&&m.right_a?r>m.prec:r<=m.prec;for(;p.length>2&&f(p[p.length-2]);)i=p.pop(),n=p.pop().value,s=p.pop(),e={type:8,operator:n,left:s,right:i},p.push(e);if(e=this.j(),!e)throw this.i(mn+c);p.push(o,e)}for(a=p.length-1,e=p[a];a>1;)e={type:8,operator:p[a-1].value,left:p[a-2],right:e},a-=2;return e}j(){let e,n,r;if(this.y(),r=this.L(2,1),r)return this.L(3,0,r);let o=this.l;if(qe(o)||o===Re)return this.dt();if(o===wo||o===Oo)r=this.yt();else if(o===Ut)r=this.ht();else{for(e=this.r.substr(this.e,Uo),n=e.length;n>0;){if(Object.prototype.hasOwnProperty.call(cr,e)&&(!this.U(this.l)||this.e+e.length<this.r.length&&!this.re(this.r.charCodeAt(this.e+e.length)))){this.e+=n;let s=this.j();if(!s)throw this.i($o);return this.L(3,0,{type:7,operator:e,argument:s})}e=e.substr(0,--n)}this.U(o)?(r=this.ie(),r.name in rr?r={type:4,value:rr[r.name],raw:r.name}:r.name===Do&&(r={type:5})):o===Dt&&(r=this.gt())}return r?(r=this.$(r),this.L(3,0,r)):this.L(3,0,!1)}$(e){this.y();let n=this.l;for(;n===Re||n===Ut||n===Dt||n===fn;){let r;if(n===fn){if(this.r.charCodeAt(this.e+1)!==Re)break;r=!0,this.e+=2,this.y(),n=this.l}if(this.e++,n===Ut){if(e={type:3,computed:!0,object:e,property:this.O()},this.y(),n=this.l,n!==Ht)throw this.i(Fo);this.e++}else n===Dt?e={type:6,arguments:this.Me(Fe),callee:e}:(n===Re||r)&&(r&&this.e--,this.y(),e={type:3,computed:!1,object:e,property:this.ie()});r&&(e.optional=!0),this.y(),n=this.l}return e}dt(){let e="",n;for(;qe(this.l);)e+=this.r.charAt(this.e++);if(this.u(Re))for(e+=this.r.charAt(this.e++);qe(this.l);)e+=this.r.charAt(this.e++);if(n=this.M,n==="e"||n==="E"){for(e+=this.r.charAt(this.e++),n=this.M,(n==="+"||n==="-")&&(e+=this.r.charAt(this.e++));qe(this.l);)e+=this.r.charAt(this.e++);if(!qe(this.r.charCodeAt(this.e-1)))throw this.i(qo+e+this.M+")")}let r=this.l;if(this.U(r))throw this.i(zo+e+this.M+")");if(r===Re||e.length===1&&e.charCodeAt(0)===Re)throw this.i(Vo);return{type:4,value:parseFloat(e),raw:e}}yt(){let e="",n=this.e,r=this.r.charAt(this.e++),o=!1;for(;this.e<this.r.length;){let s=this.r.charAt(this.e++);if(s===r){o=!0;break}else if(s==="\\")switch(s=this.r.charAt(this.e++),s){case"n":e+=`
1
+ "use strict";var at=Object.defineProperty,no=Object.defineProperties,ro=Object.getOwnPropertyDescriptor,oo=Object.getOwnPropertyDescriptors,so=Object.getOwnPropertyNames,Nn=Object.getOwnPropertySymbols;var Mn=Object.prototype.hasOwnProperty,io=Object.prototype.propertyIsEnumerable;var ct=Math.pow,Gt=(t,e,n)=>e in t?at(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,pt=(t,e)=>{for(var n in e||(e={}))Mn.call(e,n)&&Gt(t,n,e[n]);if(Nn)for(var n of Nn(e))io.call(e,n)&&Gt(t,n,e[n]);return t},Ln=(t,e)=>no(t,oo(e));var ao=(t,e)=>{for(var n in e)at(t,n,{get:e[n],enumerable:!0})},co=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of so(e))!Mn.call(t,o)&&o!==n&&at(t,o,{get:()=>e[o],enumerable:!(r=ro(e,o))||r.enumerable});return t};var po=t=>co(at({},"__esModule",{value:!0}),t);var l=(t,e,n)=>Gt(t,typeof e!="symbol"?e+"":e,n);var vs={};ao(vs,{ComponentHead:()=>$e,RegorConfig:()=>ce,addUnbinder:()=>_,batch:()=>eo,collectRefs:()=>Tt,computeMany:()=>Wr,computeRef:()=>Gr,computed:()=>Kr,createApp:()=>qr,createComponent:()=>zr,endBatch:()=>An,entangle:()=>Ot,flatten:()=>X,getBindData:()=>ge,html:()=>wn,isDeepRef:()=>ke,isRaw:()=>je,isRef:()=>h,markRaw:()=>Jr,observe:()=>S,observeMany:()=>Yr,observerCount:()=>Zr,onMounted:()=>to,onUnmounted:()=>J,pause:()=>Ft,persist:()=>Qr,raw:()=>Xr,ref:()=>xe,removeNode:()=>$,resume:()=>qt,silence:()=>bt,sref:()=>W,startBatch:()=>On,toFragment:()=>Ie,toJsonTemplate:()=>Ge,trigger:()=>z,unbind:()=>se,unref:()=>H,useScope:()=>wt,warningHandler:()=>Xe,watchEffect:()=>Me});module.exports=po(vs);var B=t=>typeof t=="function",P=t=>typeof t=="string",kn=t=>typeof t=="undefined",te=t=>t==null||typeof t=="undefined",q=t=>typeof t!="string"||!(t!=null&&t.trim()),fo=Object.prototype.toString,Jt=t=>fo.call(t),he=t=>Jt(t)==="[object Map]",Z=t=>Jt(t)==="[object Set]",Qt=t=>Jt(t)==="[object Date]",Qe=t=>typeof t=="symbol",E=Array.isArray,N=t=>t!==null&&typeof t=="object";var In={0:"createApp can't find root element. You must define either a valid `selector` or an `element`. Example: createApp({}, {selector: '#app', html: '...'})",1:t=>`Component template cannot be found. selector: ${t} .`,2:"Use composables in scope. usage: useScope(() => new MyApp()).",3:t=>`${t} requires ref source argument`,4:"computed is readonly.",5:"persist requires a string key."},U=(t,...e)=>{let n=In[t];return new Error(B(n)?n.call(In,...e):n)};var Ue=Symbol(":regor");var ge=t=>{let e=t[Ue];if(e)return e;let n={unbinders:[],data:{}};return t[Ue]=n,n};var _=(t,e)=>{ge(t).unbinders.push(e)};var ft=[],Dn=()=>{let t={onMounted:[],onUnmounted:[]};return ft.push(t),t},Oe=t=>{let e=ft[ft.length-1];if(!e&&!t)throw U(2);return e},Un=t=>{let e=Oe();return t&&Yt(t),ft.pop(),e},Xt=Symbol("csp"),Yt=t=>{let e=t,n=e[Xt];if(n){let r=Oe();if(n===r)return;r.onMounted.length>0&&n.onMounted.push(...r.onMounted),r.onUnmounted.length>0&&n.onUnmounted.push(...r.onUnmounted);return}e[Xt]=Oe()},mt=t=>t[Xt];var J=(t,e)=>{var n;(n=Oe(e))==null||n.onUnmounted.push(t)};var lt=Symbol("ref"),Q=Symbol("sref"),ut=Symbol("raw");var h=t=>(t==null?void 0:t[Q])===1;var S=(t,e,n)=>{if(!h(t))throw U(3,"observe");n&&e(t());let o=t(void 0,void 0,0,e);return J(o,!0),o};var se=t=>{let e=[t];for(;e.length>0;){let n=e.shift();mo(n);let r=n.childNodes;if(r)for(let o of r)e.push(o)}},mo=t=>{let e=t[Ue];if(e){for(let n of e.unbinders)n();e.unbinders.splice(0),delete t[Ue]}};var $=t=>{t.remove(),setTimeout(()=>se(t),1)};var Hn={8:t=>`Model binding requires a ref at ${t.outerHTML}`,7:t=>`Model binding is not supported on ${t.tagName} element at ${t.outerHTML}`,0:(t,e)=>`${t} binding expression is missing at ${e.outerHTML}`,1:(t,e,n)=>`invalid ${t} expression: ${e} at ${n.outerHTML}`,2:(t,e)=>`${t} requires object expression at ${e.outerHTML}`,3:(t,e)=>`${t} binder: key is empty on ${e.outerHTML}.`,4:(t,e,n,r)=>({msg:`Failed setting prop "${t}" on <${e.toLowerCase()}>: value ${n} is invalid.`,args:[r]}),5:(t,e)=>`${t} binding missing event type at ${e.outerHTML}`,6:(t,e)=>({msg:t,args:[e]})},D=(t,...e)=>{let n=Hn[t],r=B(n)?n.call(Hn,...e):n,o=Xe.warning;o&&(P(r)?o(r):o(r,...r.args))},Xe={warning:console.warn};var yt={},dt={},_n=1,Bn=t=>{let e=(_n++).toString();return yt[e]=t,dt[e]=0,e},Zt=t=>{dt[t]+=1},en=t=>{--dt[t]===0&&(delete yt[t],delete dt[t])},Pn=t=>yt[t],tn=()=>_n!==1&&Object.keys(yt).length>0,Ye="r-switch",lo=t=>{let e=t.filter(r=>Ae(r)).map(r=>[...r.querySelectorAll("[r-switch]")].map(o=>o.getAttribute(Ye))),n=new Set;return e.forEach(r=>{r.forEach(o=>o&&n.add(o))}),[...n]},He=(t,e)=>{if(!tn())return;let n=lo(e);n.length!==0&&(n.forEach(Zt),_(t,()=>{n.forEach(en)}))};var nn=(t,e,n,r)=>{let o=[];for(let s of t){let i=s.cloneNode(!0);n.insertBefore(i,r),o.push(i)}Te(e,o)},rn=Symbol("r-if"),jn=Symbol("r-else"),Vn=t=>t[jn]===1,ht=class{constructor(e){l(this,"p");l(this,"P");l(this,"q");l(this,"K");l(this,"z");l(this,"b");l(this,"T");this.p=e,this.P=e.o.f.if,this.q=Be(e.o.f.if),this.K=e.o.f.else,this.z=e.o.f.elseif,this.b=e.o.f.for,this.T=e.o.f.pre}qe(e,n){let r=e.parentElement;for(;r!==null&&r!==document.documentElement;){if(r.hasAttribute(n))return!0;r=r.parentElement}return!1}N(e){let n=e.hasAttribute(this.P),r=be(e,this.q);for(let o of r)this.x(o);return n}W(e){return e[rn]?!0:(e[rn]=!0,be(e,this.q).forEach(n=>n[rn]=!0),!1)}x(e){if(e.hasAttribute(this.T)||this.W(e)||this.qe(e,this.b))return;let n=e.getAttribute(this.P);if(!n){D(0,this.P,e);return}e.removeAttribute(this.P),this.k(e,n)}B(e,n,r){let o=_e(e),s=e.parentNode,i=document.createComment(`__begin__ :${n}${r!=null?r:""}`);s.insertBefore(i,e),He(i,o),o.forEach(c=>{$(c)}),e.remove(),n!=="if"&&(e[jn]=1);let a=document.createComment(`__end__ :${n}${r!=null?r:""}`);return s.insertBefore(a,i.nextSibling),{nodes:o,parent:s,commentBegin:i,commentEnd:a}}pe(e,n){if(!e)return[];let r=e.nextElementSibling;if(e.hasAttribute(this.K)){e.removeAttribute(this.K);let{nodes:o,parent:s,commentBegin:i,commentEnd:a}=this.B(e,"else");return[{mount:()=>{nn(o,this.p,s,a)},unmount:()=>{fe(i,a)},isTrue:()=>!0,isMounted:!1}]}else{let o=e.getAttribute(this.z);if(!o)return[];e.removeAttribute(this.z);let{nodes:s,parent:i,commentBegin:a,commentEnd:c}=this.B(e,"elseif",` => ${o} `),p=this.p.h.C(o),f=p.value,m=this.pe(r,n),u=[];_(a,()=>{p.stop();for(let C of u)C();u.length=0});let d=S(f,n);return u.push(d),[{mount:()=>{nn(s,this.p,i,c)},unmount:()=>{fe(a,c)},isTrue:()=>!!f()[0],isMounted:!1}].concat(m)}}k(e,n){let r=e.nextElementSibling,{nodes:o,parent:s,commentBegin:i,commentEnd:a}=this.B(e,"if",` => ${n} `),c=this.p.h.C(n),p=c.value,f=!1,m=this.p.h,u=m.V(),y=()=>{m.v(u,()=>{if(p()[0])f||(nn(o,this.p,s,a),f=!0),d.forEach(b=>{b.unmount(),b.isMounted=!1});else{fe(i,a),f=!1;let b=!1;for(let I of d)!b&&I.isTrue()?(I.isMounted||(I.mount(),I.isMounted=!0),b=!0):(I.unmount(),I.isMounted=!1)}})},d=this.pe(r,y),C=[];_(i,()=>{c.stop();for(let b of C)b();C.length=0}),y();let x=S(p,y);C.push(x)}};var _e=t=>{let e=ie(t)?t.content.childNodes:[t];return Array.from(e).filter(n=>{let r=n==null?void 0:n.tagName;return r!=="SCRIPT"&&r!=="STYLE"})},Te=(t,e)=>{for(let n of e)!Vn(n)&&t.G(n)},be=(t,e)=>{var r;let n=t.querySelectorAll(e);return(r=t.matches)!=null&&r.call(t,e)?[t,...n]:n},ie=t=>t instanceof HTMLTemplateElement,Ae=t=>t.nodeType===Node.ELEMENT_NODE,Ze=t=>t.nodeType===Node.ELEMENT_NODE,$n=t=>t instanceof HTMLSlotElement,me=t=>ie(t)?t.content.childNodes:t.childNodes,fe=(t,e)=>{let n=t.nextSibling;for(;n!=null&&n!==e;){let r=n.nextSibling;$(n),n=r}},Ee=(t,e)=>{Object.defineProperty(t,"value",{get(){return t()},set(n){if(e)throw new Error("value is readonly.");return t(n)},enumerable:!0,configurable:!1})},Fn=(t,e)=>{if(!t)return!1;if(t.startsWith("["))return t.substring(1,t.length-1);let n=e.length;return t.startsWith(e)?t.substring(n,t.length-n):!1},Be=t=>`[${CSS.escape(t)}]`,gt=(t,e)=>(t.startsWith("@")&&(t=e.f.on+":"+t.slice(1)),t.includes("[")&&(t=t.replace(/[[\]]/g,e.f.dynamic)),t),on=t=>{let e=Object.create(null);return n=>e[n]||(e[n]=t(n))},uo=/-(\w)/g,j=on(t=>t&&t.replace(uo,(e,n)=>n?n.toUpperCase():"")),yo=/\B([A-Z])/g,Pe=on(t=>t&&t.replace(yo,"-$1").toLowerCase()),et=on(t=>t&&t.charAt(0).toUpperCase()+t.slice(1));var ne=[],qn=t=>{var e;ne.length!==0&&((e=ne[ne.length-1])==null||e.add(t))},Me=t=>{if(!t)return()=>{};let e={stop:()=>{}};return ho(t,e),J(()=>e.stop(),!0),e.stop},ho=(t,e)=>{if(!t)return;let n=[],r=!1,o=()=>{for(let s of n)s();n=[],r=!0};e.stop=o;try{let s=new Set;if(ne.push(s),t(i=>n.push(i)),r)return;for(let i of[...s]){let a=S(i,()=>{o(),Me(t)});n.push(a)}}finally{ne.pop()}},bt=t=>{let e=ne.length,n=e>0&&ne[e-1];try{return n&&ne.push(null),t()}finally{n&&ne.pop()}},Tt=t=>{try{let e=new Set;return ne.push(e),{value:t(),refs:[...e]}}finally{ne.pop()}};var je=t=>!!t&&t[ut]===1;var z=(t,e,n)=>{if(!h(t))return;let r=t;if(r(void 0,e,1),!n)return;let o=r();if(o){if(E(o)||Z(o))for(let s of o)z(s,e,!0);else if(he(o))for(let s of o)z(s[0],e,!0),z(s[1],e,!0);if(N(o))for(let s in o)z(o[s],e,!0)}};function go(t,e,n){Object.defineProperty(t,e,{value:n,enumerable:!1,writable:!0,configurable:!0})}var Ve=(t,e,n)=>{n.forEach(function(r){let o=t[r];go(e,r,function(...i){let a=o.apply(this,i),c=this[Q];for(let p of c)z(p);return a})})},Et=(t,e)=>{Object.defineProperty(t,Symbol.toStringTag,{value:e,writable:!1,enumerable:!1,configurable:!0})};var zn=Array.prototype,sn=Object.create(zn),bo=["push","pop","shift","unshift","splice","sort","reverse"];Ve(zn,sn,bo);var Kn=Map.prototype,Ct=Object.create(Kn),To=["set","clear","delete"];Et(Ct,"Map");Ve(Kn,Ct,To);var Wn=Set.prototype,Rt=Object.create(Wn),Eo=["add","clear","delete"];Et(Rt,"Set");Ve(Wn,Rt,Eo);var ae={},W=t=>{if(h(t)||je(t))return t;let e={auto:!0,_value:t},n=c=>N(c)?Q in c?!0:E(c)?(Object.setPrototypeOf(c,sn),!0):Z(c)?(Object.setPrototypeOf(c,Rt),!0):he(c)?(Object.setPrototypeOf(c,Ct),!0):!1:!1,r=n(t),o=new Set,s=(c,p)=>{if(ae.stack&&ae.stack.length){ae.stack[ae.stack.length-1].add(a);return}o.size!==0&&bt(()=>{for(let f of[...o.keys()])o.has(f)&&f(c,p)})},i=c=>{let p=c[Q];p||(c[Q]=p=new Set),p.add(a)},a=(...c)=>{if(!(2 in c)){let f=c[0],m=c[1];return 0 in c?e._value===f||h(f)&&(f=f(),e._value===f)?f:(n(f)&&i(f),e._value=f,e.auto&&s(f,m),e._value):(qn(a),e._value)}switch(c[2]){case 0:{let f=c[3];if(!f)return()=>{};let m=u=>{o.delete(u)};return o.add(f),()=>{m(f)}}case 1:{let f=c[1],m=e._value;s(m,f);break}case 2:return o.size;case 3:{e.auto=!1;break}case 4:e.auto=!0}return e._value};return a[Q]=1,Ee(a,!1),r&&i(t),a};var H=t=>h(t)?t():t;var tt=class{constructor(e){l(this,"E",[]);l(this,"H",new Map);l(this,"J");this.J=e}get S(){return this.E.length}Q(e){let n=this.J(e.value);n!==void 0&&this.H.set(n,e)}X(e){var r;let n=this.J((r=this.E[e])==null?void 0:r.value);n!==void 0&&this.H.delete(n)}static Ke(e,n){return{items:[],index:e,value:n,order:-1}}w(e){e.order=this.S,this.E.push(e),this.Q(e)}ze(e,n){let r=this.S;for(let o=e;o<r;++o)this.E[o].order=o+1;n.order=e,this.E.splice(e,0,n),this.Q(n)}I(e){return this.E[e]}Y(e,n){this.X(e),this.E[e]=n,this.Q(n),n.order=e}ce(e){this.X(e),this.E.splice(e,1);let n=this.S;for(let r=e;r<n;++r)this.E[r].order=r}fe(e){let n=this.S;for(let r=e;r<n;++r)this.X(r);this.E.splice(e)}Rt(e){return this.H.has(e)}We(e){var r;let n=this.H.get(e);return(r=n==null?void 0:n.order)!=null?r:-1}};var an=Symbol("r-for"),vt=class vt{constructor(e){l(this,"p");l(this,"b");l(this,"Z");l(this,"T");this.p=e,this.b=e.o.f.for,this.Z=Be(this.b),this.T=e.o.f.pre}N(e){let n=e.hasAttribute(this.b),r=be(e,this.Z);for(let o of r)this.Ge(o);return n}W(e){return e[an]?!0:(e[an]=!0,be(e,this.Z).forEach(n=>n[an]=!0),!1)}Ge(e){if(e.hasAttribute(this.T)||this.W(e))return;let n=e.getAttribute(this.b);if(!n){D(0,this.b,e);return}e.removeAttribute(this.b),this.Je(e,n)}le(e){return te(e)?[]:(B(e)&&(e=e()),Symbol.iterator in Object(e)?e:typeof e=="number"?(r=>({*[Symbol.iterator](){for(let o=1;o<=r;o++)yield o}}))(e):Object.entries(e))}Je(e,n){var it;let r=this.Qe(n);if(!(r!=null&&r.list)){D(1,this.b,n,e);return}let o=this.p.o.f.key,s=this.p.o.f.keyBind,i=(it=e.getAttribute(o))!=null?it:e.getAttribute(s);e.removeAttribute(o),e.removeAttribute(s);let a=i?v=>{var A;return H((A=H(v))==null?void 0:A[i])}:v=>v,c=(v,A)=>a(v)===a(A),p=_e(e),f=e.parentNode;if(!f)return;let m=`${this.b} => ${n}`,u=new Comment(`__begin__ ${m}`);f.insertBefore(u,e),He(u,p),p.forEach(v=>{$(v)}),e.remove();let y=new Comment(`__end__ ${m}`);f.insertBefore(y,u.nextSibling);let d=this.p,C=d.h,k=C.V(),x=(v,A,K)=>{let w=r.createContext(A,v),Y=tt.Ke(w.index,A);return C.v(k,()=>{C.w(w.ctx);let re=K.previousSibling,De=[];for(let g of p){let M=g.cloneNode(!0);f.insertBefore(M,K),De.push(M)}for(Te(d,De),re=re.nextSibling;re!==K;)Y.items.push(re),re=re.nextSibling}),Y},b=(v,A)=>{let K=O.I(v).items,w=K[K.length-1].nextSibling;for(let Y of K)$(Y);O.Y(v,x(v,A,w))},I=(v,A)=>{O.w(x(v,A,y))},V=v=>{for(let A of O.I(v).items)$(A)},ee=v=>{let A=O.S;for(let K=v;K<A;++K)O.I(K).index(K)},Je=v=>{let A=O.S;B(v)&&(v=v());let K=H(v[0]);if(E(K)&&K.length===0){fe(u,y),O.fe(0);return}let w=0,Y=Number.MAX_SAFE_INTEGER,re=A,De=this.p.o.forGrowThreshold,g=()=>O.S<re+De;for(let T of this.le(v[0])){let F=()=>{if(w<A){let G=O.I(w++);if(c(G.value,T))return;let R=O.We(a(T));if(R>=w&&R-w<10){if(--w,Y=Math.min(Y,w),V(w),O.ce(w),--A,R>w+1)for(let L=w;L<R-1&&L<A&&!c(O.I(w).value,T);)++L,V(w),O.ce(w),--A;F();return}g()?(O.ze(w-1,x(w,T,O.I(w-1).items[0])),Y=Math.min(Y,w-1),++A):b(w-1,T)}else I(w++,T)};F()}let M=w;for(A=O.S;w<A;)V(w++);O.fe(M),ee(Y)},Kt=()=>{ye=S(ot,Je)},rt=()=>{de.stop(),ye()},de=C.C(r.list),ot=de.value,ye,st=0,O=new tt(a);for(let v of this.le(ot()[0]))O.w(x(st++,v,y));_(u,rt),Kt()}Qe(e){var c,p;let n=vt.Xe.exec(e);if(!n)return;let r=(n[1]+((c=n[2])!=null?c:"")).split(",").map(f=>f.trim()),o=r.length>1?r.length-1:-1,s=o!==-1&&(r[o]==="index"||(p=r[o])!=null&&p.startsWith("#"))?r[o]:"";s&&r.splice(o,1);let i=n[3];if(!i||r.length===0)return;let a=/[{[]/.test(e);return{list:i,createContext:(f,m)=>{let u={},y=H(f);if(!a&&r.length===1)u[r[0]]=f;else if(E(y)){let C=0;for(let k of r)u[k]=y[C++]}else for(let C of r)u[C]=y[C];let d={ctx:u,index:W(-1)};return s&&(d.index=u[s.startsWith("#")?s.substring(1):s]=W(m)),d}}}};l(vt,"Xe",/\{?\[?\(?([^)}\]]+)\)?\]?\}?([^)]+)?\s+\b(?:in|of)\b\s+(.*)\s*$/);var xt=vt;var Co=(t,e)=>{for(let n of t){let r=n.cloneNode(!0);e.appendChild(r)}},St=class{constructor(e){l(this,"p");l(this,"D");l(this,"ue");this.p=e,this.D=e.o.f.is,this.ue=Be(this.D)+", [is]"}N(e){let n=e.hasAttribute(this.D),r=be(e,this.ue);for(let o of r)this.x(o);return n}x(e){let n=e.getAttribute(this.D);if(!n){if(n=e.getAttribute("is"),!n||!n.startsWith("regor:"))return;n=`'${n.slice(6)}'`,e.removeAttribute("is")}e.removeAttribute(this.D),this.k(e,n)}B(e,n){let r=_e(e),o=e.parentNode,s=document.createComment(`__begin__ dynamic ${n!=null?n:""}`);o.insertBefore(s,e),He(s,r),r.forEach(a=>{$(a)}),e.remove();let i=document.createComment(`__end__ dynamic ${n!=null?n:""}`);return o.insertBefore(i,s.nextSibling),{nodes:r,parent:o,commentBegin:s,commentEnd:i}}k(e,n){let{nodes:r,parent:o,commentBegin:s,commentEnd:i}=this.B(e,` => ${n} `),a=this.p.h.C(n),c=a.value,p=this.p.h,f=p.V(),m={name:""},u=ie(e)?r:[...r[0].childNodes],y=()=>{p.v(f,()=>{var I;let x=c()[0];if(N(x)&&(x.name?x=x.name:x=(I=Object.entries(p.me()).filter(V=>V[1]===x)[0])==null?void 0:I[0]),!P(x)||q(x)){fe(s,i);return}if(m.name===x)return;fe(s,i);let b=document.createElement(x);for(let V of e.getAttributeNames())V!==this.D&&b.setAttribute(V,e.getAttribute(V));Co(u,b),o.insertBefore(b,i),this.p.G(b),m.name=x})},d=[];_(s,()=>{a.stop();for(let x of d)x();d.length=0}),y();let k=S(c,y);d.push(k)}};var Gn={collectRefObj:!0,onBind:(t,e)=>S(e.value,()=>{let r=e.value(),o=e.context,s=r[0];if(N(s))for(let i of Object.entries(s)){let a=i[0],c=i[1],p=o[a];p!==c&&(h(p)?p(c):o[a]=c)}},!0)};var Jn={collectRefObj:!0,once:!0,onBind:(t,e)=>{let n=e.value(),r=e.context,o=n[0];if(!N(o))return()=>{};for(let s of Object.entries(o)){let i=s[0],a=s[1],c=r[i];c!==a&&(h(c)?c(a):r[i]=a)}return()=>{}}};var Ce=t=>{var n,r;let e=(n=mt(t))==null?void 0:n.onUnmounted;e==null||e.forEach(o=>{o()}),(r=t.unmounted)==null||r.call(t)};var $e=class{constructor(e,n,r,o,s){l(this,"props");l(this,"start");l(this,"end");l(this,"ctx");l(this,"autoProps",!0);l(this,"entangle",!0);l(this,"enableSwitch",!1);l(this,"onAutoPropsAssigned");l(this,"de");l(this,"emit",(e,n)=>{this.de.dispatchEvent(new CustomEvent(e,{detail:n}))});this.props=e,this.de=n,this.ctx=r,this.start=o,this.end=s}unmount(){let e=this.start.nextSibling,n=this.end;for(;e&&e!==n;)$(e),e=e.nextSibling;Ce(this)}};var cn=Symbol("scope"),wt=t=>{try{Dn();let e=t();Yt(e);let n={context:e,unmount:()=>Ce(e),[cn]:1};return n[cn]=1,n}finally{Un()}},Qn=t=>N(t)?cn in t:!1;var Ot=(t,e)=>{if(t===e)return()=>{};let n=S(t,o=>e(o)),r=S(e,o=>t(o));return e(t()),()=>{n(),r()}};var At=t=>{var n,r;let e=(n=mt(t))==null?void 0:n.onMounted;e==null||e.forEach(o=>{o()}),(r=t.mounted)==null||r.call(t)};var Xn={collectRefObj:!0,onBind:(t,e,n,r,o,s)=>{if(!r)return()=>{};let i=j(r);return S(e.value,()=>{var m;let c=(m=e.refs[0])!=null?m:e.value()[0],p=e.context,f=p[r];f!==c&&(h(f)?f(c):p[i]=c)},!0)}};var Nt=class{constructor(e){l(this,"p");l(this,"ye");this.p=e,this.ye=e.o.f.inherit}N(e){this.Ye(e)}Ye(e){var f;let n=this.p,r=n.h,o=n.o.he,s=n.o.ge,i=r.me(),a=[...o.keys(),...Object.keys(i),...[...o.keys()].map(Pe),...[...Object.keys(i)].map(Pe)].join(",");if(q(a))return;let c=e.querySelectorAll(a),p=(f=e.matches)!=null&&f.call(e,a)?[e,...c]:c;for(let m of p){if(m.hasAttribute(n.T))continue;let u=m.parentNode;if(!u)continue;let y=m.nextSibling,d=j(m.tagName).toUpperCase(),C=i[d],k=C!=null?C:s.get(d);if(!k)continue;let x=k.template;if(!x)continue;let b=m.parentElement;if(!b)continue;let I=new Comment(" begin component: "+m.tagName),V=new Comment(" end component: "+m.tagName);b.insertBefore(I,m),m.remove();let ee=n.o.f.props,Je=n.o.f.propsOnce,Kt=n.o.f.bind,rt=(g,M)=>{let T={},F=g.hasAttribute(ee),G=g.hasAttribute(Je);return r.v(M,()=>{r.w(T),F&&n.x(Gn,g,ee),G&&n.x(Jn,g,Je);let R=k.props;if(!R||R.length===0)return;R=R.map(j);for(let Se of R.concat(R.map(Pe))){let pe=g.getAttribute(Se);pe!==null&&(T[j(Se)]=pe,g.removeAttribute(Se))}let L=n.ee.be(g,!1);for(let[Se,pe]of L.entries()){let[we,Wt]=pe.te;Wt&&R.includes(j(Wt))&&(we!=="."&&we!==":"&&we!==Kt||n.x(Xn,g,Se,!0,Wt,pe.ne))}}),T},de=[...r.V()],ot=()=>{var F;let g=rt(m,de),M=new $e(g,m,de,I,V),T=wt(()=>{var G;return(G=k.context(M))!=null?G:{}}).context;if(M.autoProps){for(let[G,R]of Object.entries(g))if(G in T){let L=T[G];if(L===R)continue;M.entangle&&h(L)&&h(R)?_(I,Ot(R,L)):h(L)?L(R):T[G]=H(R)}else T[G]=R;(F=M.onAutoPropsAssigned)==null||F.call(M)}return{componentCtx:T,head:M}},{componentCtx:ye,head:st}=ot(),O=[...me(x)],it=O.length,v=m.childNodes.length===0,A=g=>{let M=g.parentElement;if(v){for(let R of[...g.childNodes])M.insertBefore(R,g);return}let T=g.name;q(T)&&(T=g.getAttributeNames().filter(R=>R.startsWith("#"))[0],q(T)?T="default":T=T.substring(1));let F=m.querySelector(`template[name='${T}'], template[\\#${T}]`);!F&&T==="default"&&(F=m.querySelector("template:not([name])"),F&&F.getAttributeNames().filter(R=>R.startsWith("#")).length>0&&(F=null));let G=R=>{st.enableSwitch&&r.v(de,()=>{r.w(ye);let L=rt(g,r.V());r.v(de,()=>{r.w(L);let Se=r.V(),pe=Bn(Se);for(let we of R)Ae(we)&&(we.setAttribute(Ye,pe),Zt(pe),_(we,()=>{en(pe)}))})})};if(F){let R=[...me(F)];for(let L of R)M.insertBefore(L,g);G(R)}else{if(T!=="default"){for(let L of[...me(g)])M.insertBefore(L,g);return}let R=[...me(m)].filter(L=>!ie(L));for(let L of R)M.insertBefore(L,g);G(R)}},K=g=>{if(!Ae(g))return;let M=g.querySelectorAll("slot");if($n(g)){A(g),g.remove();return}for(let T of M)A(T),T.remove()};(()=>{for(let g=0;g<it;++g)O[g]=O[g].cloneNode(!0),u.insertBefore(O[g],y),K(O[g])})(),b.insertBefore(V,y);let Y=()=>{if(!k.inheritAttrs)return;let g=O.filter(T=>T.nodeType===Node.ELEMENT_NODE);g.length>1&&(g=g.filter(T=>T.hasAttribute(this.ye)));let M=g[0];if(M)for(let T of m.getAttributeNames()){if(T===ee||T===Je)continue;let F=m.getAttribute(T);if(T==="class")M.classList.add(...F.split(" "));else if(T==="style"){let G=M.style,R=m.style;for(let L of R)G.setProperty(L,R.getPropertyValue(L))}else M.setAttribute(gt(T,n.o),F)}},re=()=>{for(let g of m.getAttributeNames())!g.startsWith("@")&&!g.startsWith(n.o.f.on)&&m.removeAttribute(g)},De=()=>{Y(),re(),r.w(ye),n.Te(m,!1),ye.$emit=st.emit,Te(n,O),_(m,()=>{Ce(ye)}),_(I,()=>{se(m)}),At(ye)};r.v(de,De)}}};var pn=class{constructor(e){l(this,"xe");l(this,"te",[]);l(this,"ne",[]);l(this,"Ee",[]);this.xe=e,this.C()}C(){let e=this.xe,n=e.startsWith(".");n&&(e=":"+e.slice(1));let r=e.indexOf("."),o=this.te=(r<0?e:e.substring(0,r)).split(/[:@]/);if(q(o[0])&&(o[0]=n?".":e[0]),r>=0){let s=this.ne=e.slice(r+1).split(".");if(s.includes("camel")){let i=o.length-1;o[i]=j(o[i])}s.includes("prop")&&(o[0]=".")}}},Mt=class{constructor(e){l(this,"p");l(this,"Re");this.p=e,this.Re=e.o.Ze()}be(e,n){let r=new Map;if(!Ze(e))return r;let o=this.Re,s=a=>{let c=a.getAttributeNames().filter(p=>o.some(f=>p.startsWith(f)));for(let p of c)r.has(p)||r.set(p,new pn(p)),r.get(p).Ee.push(a)};if(s(e),!n)return r;let i=e.querySelectorAll("*");for(let a of i)s(a);return r}};var Lt={};var kt=class{constructor(e){l(this,"h");l(this,"Ce");l(this,"ve");l(this,"Se");l(this,"we");l(this,"ee");l(this,"o");l(this,"T");l(this,"Oe");this.h=e,this.o=e.o,this.ve=new xt(this),this.Ce=new ht(this),this.Se=new St(this),this.we=new Nt(this),this.ee=new Mt(this),this.T=this.o.f.pre,this.Oe=this.o.f.dynamic}et(e){let n=ie(e)?[e]:e.querySelectorAll("template");for(let r of n){if(r.hasAttribute(this.T))continue;let o=r.parentNode;if(!o)continue;let s=r.nextSibling;if(r.remove(),!r.content)continue;let i=[...r.content.childNodes];for(let a of i)o.insertBefore(a,s);Te(this,i)}}G(e){e.nodeType!==Node.ELEMENT_NODE||e.hasAttribute(this.T)||this.Ce.N(e)||this.ve.N(e)||this.Se.N(e)||(this.we.N(e),this.et(e),this.Te(e,!0))}Te(e,n){var s;let r=this.ee.be(e,n),o=this.o._;for(let[i,a]of r.entries()){let[c,p]=a.te,f=(s=o[i])!=null?s:o[c];if(!f){console.error("directive not found:",c);continue}a.Ee.forEach(m=>{this.x(f,m,i,!1,p,a.ne)})}}x(e,n,r,o,s,i){if(n.hasAttribute(this.T))return;let a=n.getAttribute(r);n.removeAttribute(r);let c=p=>{let f=p.getAttribute(Ye);return f||(p.parentElement?c(p.parentElement):null)};if(tn()){let p=c(n);if(p){this.h.v(Pn(p),()=>{this.k(e,n,a,s,i)});return}}this.k(e,n,a,s,i)}tt(e,n,r){if(e!==Lt)return!1;if(q(r))return!0;let o=document.querySelector(r);if(o){let s=n.parentElement;if(!s)return!0;let i=new Comment(`teleported => '${r}'`);s.insertBefore(i,n),n.teleportedFrom=i,i.teleportedTo=n,_(i,()=>{$(n)}),o.appendChild(n)}return!0}k(e,n,r,o,s){var k;if(n.nodeType!==Node.ELEMENT_NODE||r==null||this.tt(e,n,r))return;let i=this.h.C(r,e.isLazy,e.isLazyKey,e.collectRefObj,e.once),a=[];_(n,()=>{i.stop(),f==null||f.stop();for(let x of a)x();a.length=0});let p=Fn(o,this.Oe),f;p&&(f=this.h.C(j(p),void 0,void 0,void 0,e.once));let m,u=()=>(m=i.value(),m),y,d=()=>f?(y=f.value()[0],y):(y=o,o),C=()=>{if(!e.onChange)return;let x=S(i.value,b=>{var ee;let I=m,V=y;(ee=e.onChange)==null||ee.call(e,n,u(),I,d(),V,s)});if(a.push(x),f){let b=S(f.value,I=>{var ee;let V=y;(ee=e.onChange)==null||ee.call(e,n,u(),V,d(),V,s)});a.push(b)}};e.once||C(),e.onBind&&a.push(e.onBind(n,i,r,o,f,s)),(k=e.onChange)==null||k.call(e,n,u(),void 0,d(),void 0,s)}};var Ro=9,xo=10,vo=13,So=32,Re=46,It=44,wo=39,Oo=34,Dt=40,Fe=41,Ut=91,Ht=93,fn=63,Ao=59,Yn=58,No=123,_t=125,ln=43,Mo=45,Zn=96,er=47,Lo=92,tr=[2,3],nr=[ln,Mo],cr={"-":1,"!":1,"~":1,"+":1,new:1},pr={"=":2.5,"*=":2.5,"**=":2.5,"/=":2.5,"%=":2.5,"+=":2.5,"-=":2.5,"<<=":2.5,">>=":2.5,">>>=":2.5,"&=":2.5,"^=":2.5,"|=":2.5},ze=Ln(pt({"=>":2},pr),{"||":3,"??":3,"&&":4,"|":5,"^":6,"&":7,"==":8,"!=":8,"===":8,"!==":8,"<":9,">":9,"<=":9,">=":9,in:9,"<<":10,">>":10,">>>":10,"+":11,"-":11,"*":12,"/":12,"%":12,"**":13}),fr=Object.keys(pr),ko=new Set(fr),Bt=new Set;Bt.add("=>");fr.forEach(t=>Bt.add(t));var Io=new Set(["$","_"]),rr={true:!0,false:!1,null:null},Do="this";function mr(t){return Math.max(0,...Object.keys(t).map(e=>e.length))}var Uo=mr(cr),Ho=mr(ze),Ke="Expected ",Le="Unexpected ",dn="Unclosed ",_o=Ke+":",or=Ke+"expression",Bo="missing }",Po=Le+"object property",jo=dn+"(",sr=Ke+"comma",ir=Le+"token ",Vo=Le+"period",mn=Ke+"expression after ",$o="missing unaryOp argument",Fo=dn+"[",qo=Ke+"exponent (",zo="Variable names cannot start with a number (",Ko=dn+'quote after "';var qe=t=>t>=48&&t<=57,ar=t=>ze[t]||0,un=class{constructor(e){l(this,"nt",{0:[this.rt],1:[this.ot,this.st,this.it],2:[this.at,this.pt,this.ct,this.Ae,this.ft],3:[this.lt,this.ut,this.mt]});l(this,"r");l(this,"e");this.r=e,this.e=0}get M(){return this.r.charAt(this.e)}get l(){return this.r.charCodeAt(this.e)}u(e){return this.r.charCodeAt(this.e)===e}U(e){let n=String.fromCharCode(e);return e>=65&&e<=90||e>=97&&e<=122||e>=128&&!(n in ze)||Io.has(n)}re(e){return this.U(e)||qe(e)}i(e){return new Error(`${e} at character ${this.e}`)}L(e,n,r){let o=this.nt[e];if(!o)return r;let s={node:r},i=a=>{a.call(this,s)};return n===0?o.forEach(i):o.find(i),s.node}y(){let e=this.l,n=this.r,r=this.e;for(;e===So||e===Ro||e===xo||e===vo;)e=n.charCodeAt(++r);this.e=r}parse(){let e=this.oe();return e.length===1?e[0]:{type:0,body:e}}oe(e){let n=[];for(;this.e<this.r.length;){let r=this.l;if(r===Ao||r===It)this.e++;else{let o=this.O();if(o)n.push(o);else if(this.e<this.r.length){if(r===e)break;throw this.i(Le+'"'+this.M+'"')}}}return n}O(){var n;let e=(n=this.L(0,1))!=null?n:this.Ne();return this.y(),this.L(1,0,e)}se(){this.y();let e=this.e,n=this.r,r=n.substr(e,Ho),o=r.length;for(;o>0;){if(r in ze&&(!this.U(this.l)||e+r.length<n.length&&!this.re(n.charCodeAt(e+r.length))))return e+=o,this.e=e,r;r=r.substr(0,--o)}return!1}Ne(){let e,n,r,o,s,i,a,c;if(s=this.j(),!s||(n=this.se(),!n))return s;if(o={value:n,prec:ar(n),right_a:Bt.has(n)},i=this.j(),!i)throw this.i(mn+n);let p=[s,o,i];for(;n=this.se();){if(r=ar(n),r===0){this.e-=n.length;break}o={value:n,prec:r,right_a:Bt.has(n)},c=n;let f=m=>o.right_a&&m.right_a?r>m.prec:r<=m.prec;for(;p.length>2&&f(p[p.length-2]);)i=p.pop(),n=p.pop().value,s=p.pop(),e={type:8,operator:n,left:s,right:i},p.push(e);if(e=this.j(),!e)throw this.i(mn+c);p.push(o,e)}for(a=p.length-1,e=p[a];a>1;)e={type:8,operator:p[a-1].value,left:p[a-2],right:e},a-=2;return e}j(){let e,n,r;if(this.y(),r=this.L(2,1),r)return this.L(3,0,r);let o=this.l;if(qe(o)||o===Re)return this.dt();if(o===wo||o===Oo)r=this.yt();else if(o===Ut)r=this.ht();else{for(e=this.r.substr(this.e,Uo),n=e.length;n>0;){if(Object.prototype.hasOwnProperty.call(cr,e)&&(!this.U(this.l)||this.e+e.length<this.r.length&&!this.re(this.r.charCodeAt(this.e+e.length)))){this.e+=n;let s=this.j();if(!s)throw this.i($o);return this.L(3,0,{type:7,operator:e,argument:s})}e=e.substr(0,--n)}this.U(o)?(r=this.ie(),r.name in rr?r={type:4,value:rr[r.name],raw:r.name}:r.name===Do&&(r={type:5})):o===Dt&&(r=this.gt())}return r?(r=this.$(r),this.L(3,0,r)):this.L(3,0,!1)}$(e){this.y();let n=this.l;for(;n===Re||n===Ut||n===Dt||n===fn;){let r;if(n===fn){if(this.r.charCodeAt(this.e+1)!==Re)break;r=!0,this.e+=2,this.y(),n=this.l}if(this.e++,n===Ut){if(e={type:3,computed:!0,object:e,property:this.O()},this.y(),n=this.l,n!==Ht)throw this.i(Fo);this.e++}else n===Dt?e={type:6,arguments:this.Me(Fe),callee:e}:(n===Re||r)&&(r&&this.e--,this.y(),e={type:3,computed:!1,object:e,property:this.ie()});r&&(e.optional=!0),this.y(),n=this.l}return e}dt(){let e="",n;for(;qe(this.l);)e+=this.r.charAt(this.e++);if(this.u(Re))for(e+=this.r.charAt(this.e++);qe(this.l);)e+=this.r.charAt(this.e++);if(n=this.M,n==="e"||n==="E"){for(e+=this.r.charAt(this.e++),n=this.M,(n==="+"||n==="-")&&(e+=this.r.charAt(this.e++));qe(this.l);)e+=this.r.charAt(this.e++);if(!qe(this.r.charCodeAt(this.e-1)))throw this.i(qo+e+this.M+")")}let r=this.l;if(this.U(r))throw this.i(zo+e+this.M+")");if(r===Re||e.length===1&&e.charCodeAt(0)===Re)throw this.i(Vo);return{type:4,value:parseFloat(e),raw:e}}yt(){let e="",n=this.e,r=this.r.charAt(this.e++),o=!1;for(;this.e<this.r.length;){let s=this.r.charAt(this.e++);if(s===r){o=!0;break}else if(s==="\\")switch(s=this.r.charAt(this.e++),s){case"n":e+=`
2
2
  `;break;case"r":e+="\r";break;case"t":e+=" ";break;case"b":e+="\b";break;case"f":e+="\f";break;case"v":e+="\v";break;default:e+=s}else e+=s}if(!o)throw this.i(Ko+e+'"');return{type:4,value:e,raw:this.r.substring(n,this.e)}}ie(){let e=this.l,n=this.e;if(this.U(e))this.e++;else throw this.i(Le+this.M);for(;this.e<this.r.length&&(e=this.l,this.re(e));)this.e++;return{type:2,name:this.r.slice(n,this.e)}}Me(e){let n=[],r=!1,o=0;for(;this.e<this.r.length;){this.y();let s=this.l;if(s===e){if(r=!0,this.e++,e===Fe&&o&&o>=n.length)throw this.i(ir+String.fromCharCode(e));break}else if(s===It){if(this.e++,o++,o!==n.length){if(e===Fe)throw this.i(ir+",");if(e===Ht)for(let i=n.length;i<o;i++)n.push(null)}}else{if(n.length!==o&&o!==0)throw this.i(sr);{let i=this.O();if(!i||i.type===0)throw this.i(sr);n.push(i)}}}if(!r)throw this.i(Ke+String.fromCharCode(e));return n}gt(){this.e++;let e=this.oe(Fe);if(this.u(Fe))return this.e++,e.length===1?e[0]:e.length?{type:1,expressions:e}:!1;throw this.i(jo)}ht(){return this.e++,{type:9,elements:this.Me(Ht)}}at(e){if(this.u(No)){this.e++;let n=[];for(;!isNaN(this.l);){if(this.y(),this.u(_t)){this.e++,e.node=this.$({type:10,properties:n});return}let r=this.O();if(!r)break;if(this.y(),r.type===2&&(this.u(It)||this.u(_t)))n.push({type:12,computed:!1,key:r,value:r,shorthand:!0});else if(this.u(Yn)){this.e++;let o=this.O();if(!o)throw this.i(Po);let s=r.type===9;n.push({type:12,computed:s,key:s?r.elements[0]:r,value:o,shorthand:!1}),this.y()}else r&&n.push(r);this.u(It)&&this.e++}throw this.i(Bo)}}pt(e){let n=this.l;if(nr.some(r=>r===n&&r===this.r.charCodeAt(this.e+1))){this.e+=2;let r=e.node={type:13,operator:n===ln?"++":"--",argument:this.$(this.ie()),prefix:!0};if(!r.argument||!tr.includes(r.argument.type))throw this.i(Le+r.operator)}}ut(e){if(e.node){let n=this.l;if(nr.some(r=>r===n&&r===this.r.charCodeAt(this.e+1))){if(!tr.includes(e.node.type))throw this.i(Le+e.node.operator);this.e+=2,e.node={type:13,operator:n===ln?"++":"--",argument:e.node,prefix:!1}}}}ct(e){[0,1,2].every(n=>this.r.charCodeAt(this.e+n)===Re)&&(this.e+=3,e.node={type:14,argument:this.O()})}it(e){if(e.node&&this.u(fn)){this.e++;let n=e.node,r=this.O();if(!r)throw this.i(or);if(this.y(),this.u(Yn)){this.e++;let o=this.O();if(!o)throw this.i(or);if(e.node={type:11,test:n,consequent:r,alternate:o},n.operator&&ze[n.operator]<=.9){let s=n;for(;s.right.operator&&ze[s.right.operator]<=.9;)s=s.right;e.node.test=s.right,s.right=e.node,e.node=n}}else throw this.i(_o)}}rt(e){if(this.y(),this.u(Dt)){let n=this.e;if(this.e++,this.y(),this.u(Fe)){this.e++;let r=this.se();if(r==="=>"){let o=this.Ne();if(!o)throw this.i(mn+r);e.node={type:15,params:null,body:o};return}}this.e=n}}ot(e){this.Le(e.node)}Le(e){e&&(Object.values(e).forEach(n=>{n&&typeof n=="object"&&this.Le(n)}),e.operator==="=>"&&(e.type=15,e.params=e.left?[e.left]:null,e.body=e.right,e.params&&e.params[0].type===1&&(e.params=e.params[0].expressions),delete e.left,delete e.right,delete e.operator))}st(e){e.node&&this.F(e.node)}F(e){ko.has(e.operator)?(e.type=16,this.F(e.left),this.F(e.right)):e.operator||Object.values(e).forEach(n=>{n&&typeof n=="object"&&this.F(n)})}mt(e){if(!e.node)return;let n=e.node.type;(n===2||n===3)&&this.u(Zn)&&(e.node={type:17,tag:e.node,quasi:this.Ae(e)})}Ae(e){if(!this.u(Zn))return;let n={type:19,quasis:[],expressions:[]},r="",o="",s=!1,i=this.r.length,a=()=>n.quasis.push({type:18,value:{raw:o,cooked:r},tail:s});for(;this.e<i;){let c=this.r.charAt(++this.e);if(c==="`")return this.e+=1,s=!0,a(),e.node=n,n;if(c==="$"&&this.r.charAt(this.e+1)==="{"){if(this.e+=2,a(),o="",r="",n.expressions.push(...this.oe(_t)),!this.u(_t))throw this.i("unclosed ${")}else if(c==="\\")switch(o+=c,c=this.r.charAt(++this.e),o+=c,c){case"n":r+=`
3
- `;break;case"r":r+="\r";break;case"t":r+=" ";break;case"b":r+="\b";break;case"f":r+="\f";break;case"v":r+="\v";break;default:r+=c}else r+=c,o+=c}throw this.i("Unclosed `")}lt(e){var o;let n=e.node;if(!n||n.operator!=="new"||!n.argument)return;if(!n.argument||![6,3].includes(n.argument.type))throw this.i("Expected new function()");e.node=n.argument;let r=e.node;for(;r.type===3||r.type===6&&((o=r==null?void 0:r.callee)==null?void 0:o.type)===3;)r=r.type===3?r.object:r.callee.object;r.type=20}ft(e){if(!this.u(er))return;let n=++this.e,r=!1;for(;this.e<this.r.length;){if(this.l===er&&!r){let o=this.r.slice(n,this.e),s="";for(;++this.e<this.r.length;){let a=this.l;if(a>=97&&a<=122||a>=65&&a<=90||a>=48&&a<=57)s+=this.M;else break}let i;try{i=new RegExp(o,s)}catch(a){throw this.i(a.message)}return e.node={type:4,value:i,raw:this.r.slice(n-1,this.e)},e.node=this.$(e.node),e.node}this.u(Ut)?r=!0:r&&this.u(Ht)&&(r=!1),this.e+=this.u(Lo)?2:1}throw this.i("Unclosed Regex")}},lr=t=>new un(t).parse();var Wo={"=>":(t,e)=>{},"=":(t,e)=>{},"*=":(t,e)=>{},"**=":(t,e)=>{},"/=":(t,e)=>{},"%=":(t,e)=>{},"+=":(t,e)=>{},"-=":(t,e)=>{},"<<=":(t,e)=>{},">>=":(t,e)=>{},">>>=":(t,e)=>{},"&=":(t,e)=>{},"^=":(t,e)=>{},"|=":(t,e)=>{},"||":(t,e)=>t()||e(),"??":(t,e)=>{var n;return(n=t())!=null?n:e()},"&&":(t,e)=>t()&&e(),"|":(t,e)=>t|e,"^":(t,e)=>t^e,"&":(t,e)=>t&e,"==":(t,e)=>t==e,"!=":(t,e)=>t!=e,"===":(t,e)=>t===e,"!==":(t,e)=>t!==e,"<":(t,e)=>t<e,">":(t,e)=>t>e,"<=":(t,e)=>t<=e,">=":(t,e)=>t>=e,in:(t,e)=>t in e,"<<":(t,e)=>t<<e,">>":(t,e)=>t>>e,">>>":(t,e)=>t>>>e,"+":(t,e)=>t+e,"-":(t,e)=>t-e,"*":(t,e)=>t*e,"/":(t,e)=>t/e,"%":(t,e)=>t%e,"**":(t,e)=>ct(t,e)},Go={"-":t=>-t,"+":t=>+t,"!":t=>!t,"~":t=>~t,new:t=>t},hr=t=>{if(!(t!=null&&t.some(yr)))return t;let e=[];return t.forEach(n=>yr(n)?e.push(...n):e.push(n)),e},ur=(...t)=>hr(t),yn=(t,e)=>{if(!t)return e;let n=Object.create(e!=null?e:{});return n.$event=t,n},Jo={"++":(t,e)=>{let n=t[e];if(h(n)){let r=n();return n(++r),r}return++t[e]},"--":(t,e)=>{let n=t[e];if(h(n)){let r=n();return n(--r),r}return--t[e]}},Qo={"++":(t,e)=>{let n=t[e];if(h(n)){let r=n();return n(r+1),r}return t[e]++},"--":(t,e)=>{let n=t[e];if(h(n)){let r=n();return n(r-1),r}return t[e]--}},dr={"=":(t,e,n)=>{let r=t[e];return h(r)?r(n):t[e]=n},"+=":(t,e,n)=>{let r=t[e];return h(r)?r(r()+n):t[e]+=n},"-=":(t,e,n)=>{let r=t[e];return h(r)?r(r()-n):t[e]-=n},"*=":(t,e,n)=>{let r=t[e];return h(r)?r(r()*n):t[e]*=n},"/=":(t,e,n)=>{let r=t[e];return h(r)?r(r()/n):t[e]/=n},"%=":(t,e,n)=>{let r=t[e];return h(r)?r(r()%n):t[e]%=n},"**=":(t,e,n)=>{let r=t[e];return h(r)?r(ct(r(),n)):t[e]=ct(t[e],n)},"<<=":(t,e,n)=>{let r=t[e];return h(r)?r(r()<<n):t[e]<<=n},">>=":(t,e,n)=>{let r=t[e];return h(r)?r(r()>>n):t[e]>>=n},">>>=":(t,e,n)=>{let r=t[e];return h(r)?r(r()>>>n):t[e]>>>=n},"|=":(t,e,n)=>{let r=t[e];return h(r)?r(r()|n):t[e]|=n},"&=":(t,e,n)=>{let r=t[e];return h(r)?r(r()&n):t[e]&=n},"^=":(t,e,n)=>{let r=t[e];return h(r)?r(r()^n):t[e]^=n}},Pt=(t,e)=>B(t)?t.bind(e):t,hn=class{constructor(e,n,r,o,s){l(this,"m");l(this,"ke");l(this,"Ve");l(this,"Ie");l(this,"A");l(this,"De");l(this,"Ue");this.m=E(e)?e:[e],this.ke=n,this.Ve=r,this.Ie=o,this.Ue=!!s}Pe(e,n){if(n&&e in n)return n;for(let r of this.m)if(e in r)return r}2(e,n,r){let o=e.name;if(o==="$root")return this.m[this.m.length-1];if(o==="$parent")return this.m[1];if(o==="$ctx")return[...this.m];if(r&&o in r)return this.A=r[o],Pt(H(r[o]),r);for(let i of this.m)if(o in i)return this.A=i[o],Pt(H(i[o]),i);let s=this.ke;if(s&&o in s)return this.A=s[o],Pt(H(s[o]),s)}5(e,n,r){return this.m[0]}0(e,n,r){return this.Be(n,r,ur,...e.body)}1(e,n,r){return this.R(n,r,(...o)=>o.pop(),...e.expressions)}3(e,n,r){let{obj:o,key:s}=this.ae(e,n,r),i=o==null?void 0:o[s];return this.A=i,Pt(H(i),o)}4(e,n,r){return e.value}6(e,n,r){let o=(i,...a)=>B(i)?i(...hr(a)):i,s=this.R(++n,r,o,e.callee,...e.arguments);return this.A=s,s}7(e,n,r){return this.R(n,r,Go[e.operator],e.argument)}8(e,n,r){let o=Wo[e.operator];switch(e.operator){case"||":case"&&":case"??":return o(()=>this.g(e.left,n,r),()=>this.g(e.right,n,r))}return this.R(n,r,o,e.left,e.right)}9(e,n,r){return this.Be(++n,r,ur,...e.elements)}10(e,n,r){let o={},s=(...i)=>{i.forEach(a=>{Object.assign(o,a)})};return this.R(++n,r,s,...e.properties),o}11(e,n,r){return this.R(n,r,o=>this.g(o?e.consequent:e.alternate,n,r),e.test)}12(e,n,r){var f;let o={},s=m=>(m==null?void 0:m.type)!==15,i=(f=this.Ie)!=null?f:()=>!1,a=n===0&&this.Ue,c=m=>this.He(a,e.key,n,yn(m,r)),p=m=>this.He(a,e.value,n,yn(m,r));if(e.shorthand){let m=e.key.name;o[m]=s(e.key)&&i(m,n)?c:c()}else if(e.computed){let m=H(c());o[m]=s(e.value)&&i(m,n)?p:p()}else{let m=e.key.type===4?e.key.value:e.key.name;o[m]=s(e.value)&&i(m,n)?()=>p:p()}return o}ae(e,n,r){let o=this.g(e.object,n,r),s=e.computed?this.g(e.property,n,r):e.property.name;return{obj:o,key:s}}13(e,n,r){let o=e.argument,s=e.operator,i=e.prefix?Jo:Qo;if(o.type===2){let a=o.name,c=this.Pe(a,r);return te(c)?void 0:i[s](c,a)}if(o.type===3){let{obj:a,key:c}=this.ae(o,n,r);return i[s](a,c)}}16(e,n,r){let o=e.left,s=e.operator;if(o.type===2){let i=o.name,a=this.Pe(i,r);if(te(a))return;let c=this.g(e.right,n,r);return dr[s](a,i,c)}if(o.type===3){let{obj:i,key:a}=this.ae(o,n,r),c=this.g(e.right,n,r);return dr[s](i,a,c)}}14(e,n,r){let o=this.g(e.argument,n,r);return E(o)&&(o.s=gr),o}17(e,n,r){return this[6]({type:6,callee:e.tag,arguments:[{type:9,elements:e.quasi.quasis},...e.quasi.expressions]},n,r)}19(e,n,r){let o=(...s)=>s.reduce((i,a,c)=>i+=a+e.quasis[c+1].value.cooked,e.quasis[0].value.cooked);return this.R(n,r,o,...e.expressions)}18(e,n,r){return e.value.cooked}20(e,n,r){let o=(s,...i)=>new s(...i);return this.R(n,r,o,e.callee,...e.arguments)}15(e,n,r){return(...o)=>{let s=Object.create(r!=null?r:{}),i=e.params;if(i){let a=0;for(let c of i)s[c.name]=o[a++]}return this.g(e.body,n,s)}}g(e,n,r){let o=H(this[e.type](e,n,r));return this.De=e.type,o}He(e,n,r,o){let s=this.g(n,r,o);return e&&this._e()?this.A:s}_e(){let e=this.De;return(e===2||e===3||e===6)&&h(this.A)}eval(e,n){let{value:r,refs:o}=Tt(()=>this.g(e,-1,n)),s={value:r,refs:o};return this._e()&&(s.ref=this.A),s}R(e,n,r,...o){let s=o.map(i=>i&&this.g(i,e,n));return r(...s)}Be(e,n,r,...o){let s=this.Ve;if(!s)return this.R(e,n,r,...o);let i=o.map((a,c)=>a&&(a.type!==15&&s(c,e)?p=>this.g(a,e,yn(p,n)):this.g(a,e,n)));return r(...i)}},gr=Symbol("s"),yr=t=>(t==null?void 0:t.s)===gr,br=(t,e,n,r,o,s,i)=>new hn(e,n,r,o,i).eval(t,s);var Tr={},jt=class{constructor(e,n){l(this,"m");l(this,"o");l(this,"je",[]);this.m=e,this.o=n}w(e){this.m=[e,...this.m]}me(){return this.m.map(n=>n.components).filter(n=>!!n).reverse().reduce((n,r)=>{for(let[o,s]of Object.entries(r))n[o.toUpperCase()]=s;return n},{})}C(e,n,r,o,s){var y;let i=W([]),a=[],c=()=>{for(let d of a)d();a.length=0},p={value:i,stop:c,refs:[],context:this.m[0]};if(q(e))return p;let f=this.o.globalContext,m=[],u=(d,C,k,x)=>{try{let b=br(d,C,f,n,r,x,o);return k&&m.push(...b.refs),{value:b.value,refs:b.refs,ref:b.ref}}catch(b){D(6,`evaluation error: ${e}`,b)}return{value:void 0,refs:[]}};try{let d=(y=Tr[e])!=null?y:lr("["+e+"]");Tr[e]=d;let C=this.m,k=()=>{m.splice(0),c();let x=d.elements.map((b,I)=>n!=null&&n(I,-1)?{value:V=>u(b,C,!1,{$event:V}).value,refs:[]}:u(b,C,!0));if(!s)for(let b of m){let I=S(b,k);a.push(I)}i(x.map(b=>b.value)),p.refs=x.map(b=>b.ref)};k()}catch(d){D(6,`parse error: ${e}`,d)}return p}V(){return this.m}Y(e){this.je.push(this.m),this.m=e}v(e,n){try{this.Y(e),n()}finally{this.bt()}}bt(){var e;this.m=(e=this.je.pop())!=null?e:[]}};var Er="http://www.w3.org/1999/xlink",Xo={itemscope:2,allowfullscreen:2,formnovalidate:2,ismap:2,nomodule:2,novalidate:2,readonly:2,async:1,autofocus:1,autoplay:1,controls:1,default:1,defer:1,disabled:1,hidden:1,inert:1,loop:1,open:1,required:1,reversed:1,scoped:1,seamless:1,checked:1,muted:1,multiple:1,selected:1};function Yo(t){return!!t||t===""}var gn={onChange:(t,e,n,r,o,s)=>{var a;if(r){s&&s.includes("camel")&&(r=j(r)),Vt(t,r,e[0],o);return}let i=e.length;for(let c=0;c<i;++c){let p=e[c];if(E(p)){let f=(a=n==null?void 0:n[c])==null?void 0:a[0],m=p[0],u=p[1];Vt(t,m,u,f)}else if(N(p))for(let f of Object.entries(p)){let m=f[0],u=f[1],y=n==null?void 0:n[c],d=y&&m in y?m:void 0;Vt(t,m,u,d)}else{let f=n==null?void 0:n[c],m=e[c++],u=e[c];Vt(t,m,u,f)}}}},Vt=(t,e,n,r)=>{if(r&&r!==e&&t.removeAttribute(r),te(e)){D(3,name,t);return}if(!P(e)){D(6,`Attribute key is not string at ${t.outerHTML}`,e);return}if(e.startsWith("xlink:")){te(n)?t.removeAttributeNS(Er,e.slice(6,e.length)):t.setAttributeNS(Er,e,n);return}let o=e in Xo;te(n)||o&&!Yo(n)?t.removeAttribute(e):t.setAttribute(e,o?"":n)};var bn={onChange:(t,e,n)=>{let r=e.length;for(let o=0;o<r;++o){let s=e[o],i=n==null?void 0:n[o];if(E(s)){let a=s.length;for(let c=0;c<a;++c)Cr(t,s[c],i==null?void 0:i[c])}else Cr(t,s,i)}}},Cr=(t,e,n)=>{let r=t.classList,o=P(e),s=P(n);if(e&&!o){if(n&&!s)for(let i in n)(!(i in e)||!e[i])&&r.remove(i);for(let i in e)e[i]&&r.add(i)}else o?n!==e&&(s&&r.remove(...n.trim().split(/\s+/)),r.add(...e.trim().split(/\s+/))):n&&s&&r.remove(...n.trim().split(/\s+/))};var Rr={onChange:(t,e)=>{let[n,r]=e;B(r)?r(t,n):t.innerHTML=n==null?void 0:n.toString()}};function Zo(t,e){if(t.length!==e.length)return!1;let n=!0;for(let r=0;n&&r<t.length;r++)n=le(t[r],e[r]);return n}function le(t,e){if(t===e)return!0;let n=Qt(t),r=Qt(e);if(n||r)return n&&r?t.getTime()===e.getTime():!1;if(n=Qe(t),r=Qe(e),n||r)return t===e;if(n=E(t),r=E(e),n||r)return n&&r?Zo(t,e):!1;if(n=N(t),r=N(e),n||r){if(!n||!r)return!1;let o=Object.keys(t).length,s=Object.keys(e).length;if(o!==s)return!1;for(let i in t){let a=t.hasOwnProperty(i),c=e.hasOwnProperty(i);if(a&&!c||!a&&c||!le(t[i],e[i]))return!1}}return String(t)===String(e)}function $t(t,e){return t.findIndex(n=>le(n,e))}var xr=t=>{let e=parseFloat(t);return isNaN(e)?t:e};var Ft=t=>{if(!h(t))throw U(3,"pause");t(void 0,void 0,3)};var qt=t=>{if(!h(t))throw U(3,"resume");t(void 0,void 0,4)};var Sr={onChange:(t,e)=>{es(t,e[0])},onBind:(t,e,n,r,o,s)=>ts(t,e,s)},es=(t,e)=>{let n=Nr(t);if(n&&wr(t))E(e)?e=$t(e,ue(t))>-1:Z(e)?e=e.has(ue(t)):e=as(t,e),t.checked=e;else if(n&&Or(t))t.checked=le(e,ue(t));else if(n||Mr(t))Ar(t)?t.value!==(e==null?void 0:e.toString())&&(t.value=e):t.value!==e&&(t.value=e);else if(Lr(t)){let r=t.options,o=r.length,s=t.multiple;for(let i=0;i<o;i++){let a=r[i],c=ue(a);if(s)E(e)?a.selected=$t(e,c)>-1:a.selected=e.has(c);else if(le(ue(a),e)){t.selectedIndex!==i&&(t.selectedIndex=i);return}}!s&&t.selectedIndex!==-1&&(t.selectedIndex=-1)}else D(7,t)},nt=t=>(h(t)&&(t=t()),B(t)&&(t=t()),t?P(t)?{trim:t.includes("trim"),lazy:t.includes("lazy"),number:t.includes("number"),int:t.includes("int")}:{trim:!!t.trim,lazy:!!t.lazy,number:!!t.number,int:!!t.int}:{trim:!1,lazy:!1,number:!1,int:!1}),wr=t=>t.type==="checkbox",Or=t=>t.type==="radio",Ar=t=>t.type==="number"||t.type==="range",Nr=t=>t.tagName==="INPUT",Mr=t=>t.tagName==="TEXTAREA",Lr=t=>t.tagName==="SELECT",ts=(t,e,n)=>{let r=e.value,o=nt(n==null?void 0:n.join(",")),s=nt(r()[1]),i={int:o.int||s.int,lazy:o.lazy||s.lazy,number:o.number||s.number,trim:o.trim||s.trim},a=e.refs[0];if(!a)return D(8,t),()=>{};let c=Nr(t);return c&&wr(t)?rs(t,a):c&&Or(t)?cs(t,a):c||Mr(t)?ns(t,i,a,r):Lr(t)?ps(t,a,r):(D(7,t),()=>{})},vr=/[.,' ·٫]/,ns=(t,e,n,r)=>{let s=e.lazy?"change":"input",i=Ar(t),a=()=>{!e.trim&&!nt(r()[1]).trim||(t.value=t.value.trim())},c=u=>{let y=u.target;y.composing=1},p=u=>{let y=u.target;y.composing&&(y.composing=0,y.dispatchEvent(new Event(s)))},f=()=>{t.removeEventListener(s,m),t.removeEventListener("change",a),t.removeEventListener("compositionstart",c),t.removeEventListener("compositionend",p),t.removeEventListener("change",p)},m=u=>{let y=u.target;if(!y||y.composing)return;let d=y.value,C=nt(r()[1]);if(i||C.number||C.int){if(C.int)d=parseInt(d);else{if(vr.test(d[d.length-1])&&d.split(vr).length===2){if(d+="0",d=parseFloat(d),isNaN(d))d="";else if(n()===d)return}d=parseFloat(d)}isNaN(d)&&(d=""),t.value=d}else C.trim&&(d=d.trim());n(d)};return t.addEventListener(s,m),t.addEventListener("change",a),t.addEventListener("compositionstart",c),t.addEventListener("compositionend",p),t.addEventListener("change",p),f},rs=(t,e)=>{let n="change",r=()=>{t.removeEventListener(n,o)},o=()=>{let s=ue(t),i=t.checked,a=e();if(E(a)){let c=$t(a,s),p=c!==-1;i&&!p?a.push(s):!i&&p&&a.splice(c,1)}else Z(a)?i?a.add(s):a.delete(s):e(is(t,i))};return t.addEventListener(n,o),r},ue=t=>"_value"in t?t._value:t.value,kr="trueValue",os="falseValue",Ir="true-value",ss="false-value",is=(t,e)=>{let n=e?kr:os;if(n in t)return t[n];let r=e?Ir:ss;return t.hasAttribute(r)?t.getAttribute(r):e},as=(t,e)=>{if(kr in t)return le(e,t.trueValue);let r=Ir;return t.hasAttribute(r)?le(e,t.getAttribute(r)):le(e,!0)},cs=(t,e)=>{let n="change",r=()=>{t.removeEventListener(n,o)},o=()=>{let s=ue(t);e(s)};return t.addEventListener(n,o),r},ps=(t,e,n)=>{let r="change",o=()=>{t.removeEventListener(r,s)},s=()=>{let a=nt(n()[1]).number,c=Array.prototype.filter.call(t.options,p=>p.selected).map(p=>a?xr(ue(p)):ue(p));if(t.multiple){let p=e();try{if(Ft(e),Z(p)){p.clear();for(let f of c)p.add(f)}else E(p)?(p.splice(0),p.push(...c)):e(c)}finally{qt(e),z(e)}}else e(c[0])};return t.addEventListener(r,s),o};var fs=["stop","prevent","capture","self","once","left","right","middle","passive"],ms=t=>{let e={};if(q(t))return;let n=t.split(",");for(let r of fs)e[r]=n.includes(r);return e},En={isLazy:(t,e)=>e===-1&&t%2===0,isLazyKey:(t,e)=>e===0&&!t.endsWith("_flags"),once:!1,collectRefObj:!0,onBind:(t,e,n,r,o,s)=>{var f,m;if(o){let u=e.value(),y=H(o.value()[0]);return P(y)?Tn(t,j(y),()=>e.value()[0],(f=s==null?void 0:s.join(","))!=null?f:u[1]):()=>{}}else if(r){let u=e.value();return Tn(t,j(r),()=>e.value()[0],(m=s==null?void 0:s.join(","))!=null?m:u[1])}let i=[],a=()=>{i.forEach(u=>u())},c=e.value(),p=c.length;for(let u=0;u<p;++u){let y=c[u];if(B(y)&&(y=y()),N(y))for(let d of Object.entries(y)){let C=d[0],k=()=>{let b=e.value()[u];return B(b)&&(b=b()),b=b[C],B(b)&&(b=b()),b},x=y[C+"_flags"];i.push(Tn(t,C,k,x))}else D(2,name,t)}return a}},ls=(t,e)=>{if(t.startsWith("keydown")||t.startsWith("keyup")||t.startsWith("keypress")){e!=null||(e="");let n=t.split(".").concat(e.split(","));t=n[0];let r=n[1],o=n.includes("ctrl"),s=n.includes("shift"),i=n.includes("alt"),a=n.includes("meta"),c=p=>!(o&&!p.ctrlKey||s&&!p.shiftKey||i&&!p.altKey||a&&!p.metaKey);return r?[t,p=>c(p)?p.key.toUpperCase()===r.toUpperCase():!1]:[t,c]}return[t,n=>!0]},Tn=(t,e,n,r)=>{if(q(e))return D(5,name,t),()=>{};let o=ms(r),s=o?{capture:o.capture,passive:o.passive,once:o.once}:void 0,i;[e,i]=ls(e,r);let a=f=>{if(!i(f)||!n&&e==="submit"&&(o!=null&&o.prevent))return;let m=n(f);B(m)&&(m=m(f)),B(m)&&m(f)},c=()=>{t.removeEventListener(e,p,s)},p=f=>{if(!o){a(f);return}try{if(o.left&&f.button!==0||o.middle&&f.button!==1||o.right&&f.button!==2||o.self&&f.target!==t)return;o.stop&&f.stopPropagation(),o.prevent&&f.preventDefault(),a(f)}finally{o.once&&c()}};return t.addEventListener(e,p,s),c};var Dr={onChange:(t,e,n,r,o,s)=>{if(r){s&&s.includes("camel")&&(r=j(r)),We(t,r,e[0]);return}let i=e.length;for(let a=0;a<i;++a){let c=e[a];if(E(c)){let p=c[0],f=c[1];We(t,p,f)}else if(N(c))for(let p of Object.entries(c)){let f=p[0],m=p[1];We(t,f,m)}else{let p=e[a++],f=e[a];We(t,p,f)}}}};function us(t){return!!t||t===""}var We=(t,e,n)=>{if(te(e)){D(3,name,t);return}if(e==="innerHTML"||e==="textContent"){let s=[...t.childNodes];setTimeout(()=>s.forEach(se),1),t[e]=n!=null?n:"";return}let r=t.tagName;if(e==="value"&&r!=="PROGRESS"&&!r.includes("-")){t._value=n;let s=r==="OPTION"?t.getAttribute("value"):t.value,i=n!=null?n:"";s!==i&&(t.value=i),n==null&&t.removeAttribute(e);return}let o=!1;if(n===""||n==null){let s=typeof t[e];s==="boolean"?n=us(n):n==null&&s==="string"?(n="",o=!0):s==="number"&&(n=0,o=!0)}try{t[e]=n}catch(s){o||D(4,e,r,n,s)}o&&t.removeAttribute(e)};var Ur={once:!0,onBind:(t,e,n)=>{let r=e.value()[0],o=E(r),s=e.refs[0];return o?r.push(t):s?s==null||s(t):e.context[n]=t,()=>{if(o){let i=r.indexOf(t);i!==-1&&r.splice(i,1)}else s==null||s(null)}}};var Hr={onChange:(t,e)=>{let n=ge(t).data,r=n._ord;kn(r)&&(r=n._ord=t.style.display),!!e[0]?t.style.display=r:t.style.display="none"}};var xn={onChange:(t,e,n)=>{let r=e.length;for(let o=0;o<r;++o){let s=e[o],i=n==null?void 0:n[o];if(E(s)){let a=s.length;for(let c=0;c<a;++c)_r(t,s[c],i==null?void 0:i[c])}else _r(t,s,i)}}},_r=(t,e,n)=>{let r=t.style,o=P(e);if(e&&!o){if(n&&!P(n))for(let s in n)e[s]==null&&Rn(r,s,"");for(let s in e)Rn(r,s,e[s])}else{let s=r.display;if(o?n!==e&&(r.cssText=e):n&&t.removeAttribute("style"),"_ord"in ge(t).data)return;r.display=s}},Br=/\s*!important$/;function Rn(t,e,n){if(E(n))n.forEach(r=>{Rn(t,e,r)});else if(n==null&&(n=""),e.startsWith("--"))t.setProperty(e,n);else{let r=ds(t,e);Br.test(n)?t.setProperty(Pe(r),n.replace(Br,""),"important"):t[r]=n}}var Pr=["Webkit","Moz","ms"],Cn={};function ds(t,e){let n=Cn[e];if(n)return n;let r=j(e);if(r!=="filter"&&r in t)return Cn[e]=r;r=et(r);for(let o=0;o<Pr.length;o++){let s=Pr[o]+r;if(s in t)return Cn[e]=s}return e}var X=t=>jr(H(t)),jr=(t,e=new WeakMap)=>{if(!t||!N(t))return t;if(E(t))return t.map(X);if(Z(t)){let r=new Set;for(let o of t.keys())r.add(X(o));return r}if(he(t)){let r=new Map;for(let o of t)r.set(X(o[0]),X(o[1]));return r}if(e.has(t))return H(e.get(t));let n=pt({},t);e.set(t,n);for(let r of Object.entries(n))n[r[0]]=jr(H(r[1]),e);return n};var Vr={onChange:(t,e)=>{var r;let n=e[0];t.textContent=Z(n)?JSON.stringify(X([...n])):he(n)?JSON.stringify(X([...n])):N(n)?JSON.stringify(X(n)):(r=n==null?void 0:n.toString())!=null?r:""}};var $r={onChange:(t,e)=>{We(t,"value",e[0])}};var ke=t=>(t==null?void 0:t[lt])===1;var xe=t=>{if(je(t))return t;let e;if(h(t)?(e=t,t=e()):e=W(t),t instanceof Node||t instanceof Date||t instanceof RegExp||t instanceof Promise||t instanceof Error)return e;if(e[lt]=1,E(t)){let n=t.length;for(let r=0;r<n;++r){let o=t[r];ke(o)||(t[r]=xe(o))}return e}if(!N(t))return e;for(let n of Object.entries(t)){let r=n[1];if(ke(r))continue;let o=n[0];Qe(o)||(t[o]=null,t[o]=xe(r))}return e};var ve=class ve{constructor(e){l(this,"_",{});l(this,"f",{});l(this,"Ze",()=>Object.keys(this._).filter(e=>e.length===1||!e.startsWith(":")));l(this,"he",new Map);l(this,"ge",new Map);l(this,"forGrowThreshold",10);l(this,"globalContext");l(this,"useInterpolation",!0);if(this.setDirectives("r-"),e){this.globalContext=e;return}this.globalContext=this.xt()}static getDefault(){var e;return(e=ve.$e)!=null?e:ve.$e=new ve}xt(){let e={},n=globalThis;for(let r of ve.Tt.split(","))e[r]=n[r];return e.ref=xe,e.sref=W,e.flatten=X,e}addComponent(...e){for(let n of e){if(!n.defaultName){Xe.warning("Registered component's default name is not defined",n);continue}this.he.set(et(n.defaultName),n),this.ge.set(et(n.defaultName).toLocaleUpperCase(),n)}}setDirectives(e){this._={".":Dr,":":gn,"@":En,[`${e}on`]:En,[`${e}bind`]:gn,[`${e}html`]:Rr,[`${e}text`]:Vr,[`${e}show`]:Hr,[`${e}model`]:Sr,":style":xn,[`${e}bind:style`]:xn,":class":bn,[`${e}bind:class`]:bn,":ref":Ur,":value":$r,teleport:Lt},this.f={for:`${e}for`,if:`${e}if`,else:`${e}else`,elseif:`${e}else-if`,pre:`${e}pre`,inherit:`${e}inherit`,text:`${e}text`,props:":props",propsOnce:":props-once",bind:`${e}bind`,on:`${e}on`,keyBind:":key",key:"key",is:":is",teleport:`${e}teleport`,dynamic:"_d_"}}updateDirectives(e){e(this._,this.f)}};l(ve,"$e"),l(ve,"Tt","Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console");var ce=ve;var zt=(t,e)=>{if(!t)return;let n=(e!=null?e:ce.getDefault()).f;for(let r of gs(t,n.pre))hs(r,n.text)},ys=/({{[^]*?}})/g,hs=(t,e)=>{var i;let n=t.textContent;if(!n)return;let r=ys,o=n.split(r);if(o.length<=1)return;if(((i=t.parentElement)==null?void 0:i.childNodes.length)===1&&o.length===3){let a=o[1];if(q(o[0])&&q(o[2])&&a.startsWith("{{")&&a.endsWith("}}")){let c=t.parentElement;c.setAttribute(e,a.substring(2,a.length-2)),c.innerText="";return}}let s=document.createDocumentFragment();for(let a of o)if(a.startsWith("{{")&&a.endsWith("}}")){let c=document.createElement("span");c.setAttribute(e,a.substring(2,a.length-2)),s.appendChild(c)}else s.appendChild(document.createTextNode(a));t.replaceWith(s)},gs=(t,e)=>{let n=[],r=o=>{var s,i;if(o.nodeType===Node.TEXT_NODE)(s=o.textContent)!=null&&s.includes("{{")&&n.push(o);else{if((i=o==null?void 0:o.hasAttribute)!=null&&i.call(o,e))return;for(let a of me(o))r(a)}};return r(t),n};var bs="svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistantLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view",Ts=new Set(bs.toUpperCase().split(",")),Es="http://www.w3.org/2000/svg",Fr=(t,e)=>{ie(t)?t.content.appendChild(e):t.appendChild(e)},vn=(t,e,n,r)=>{var i;let o=t.t;if(o){let a=n&&Ts.has(o.toUpperCase())?document.createElementNS(Es,o.toLowerCase()):document.createElement(o),c=t.a;if(c)for(let f of Object.entries(c)){let m=f[0],u=f[1];m.startsWith("#")&&(u=m.substring(1),m="name"),a.setAttribute(gt(m,r),u)}let p=t.c;if(p)for(let f of p)vn(f,a,n,r);Fr(e,a);return}let s=t.d;if(s){let a;switch((i=t.n)!=null?i:Node.TEXT_NODE){case Node.COMMENT_NODE:a=document.createComment(s);break;case Node.TEXT_NODE:a=document.createTextNode(s);break}if(a)Fr(e,a);else throw new Error("unsupported node type.")}},Ie=(t,e,n)=>{n!=null||(n=ce.getDefault());let r=document.createDocumentFragment();if(!E(t))return vn(t,r,!!e,n),r;for(let o of t)vn(o,r,!!e,n);return r};var qr=(t,e={selector:"#app"},n)=>{P(e)&&(e={selector:"#app",template:e}),Qn(t)&&(t=t.context);let r=e.element?e.element:e.selector?document.querySelector(e.selector):null;if(!r||!Ae(r))throw U(0);n||(n=ce.getDefault());let o=()=>{for(let a of[...r.childNodes])$(a)},s=a=>{for(let c of a)r.appendChild(c)};if(e.template){let a=document.createRange().createContextualFragment(e.template);o(),s(a.childNodes),e.element=a}else if(e.json){let a=Ie(e.json,e.isSVG,n);o(),s(a.childNodes)}return n.useInterpolation&&zt(r,n),new Sn(t,r,n).x(),_(r,()=>{Ce(t)}),At(t),{context:t,unmount:()=>{$(r)},unbind:()=>{se(r)}}},Sn=class{constructor(e,n,r){l(this,"Et");l(this,"Fe");l(this,"o");l(this,"h");l(this,"p");this.Et=e,this.Fe=n,this.o=r,this.h=new jt([e],r),this.p=new kt(this.h)}x(){this.p.G(this.Fe)}};var Ge=t=>{if(E(t))return t.map(o=>Ge(o));let e={};if(t.tagName)e.t=t.tagName;else return t.nodeType===Node.COMMENT_NODE&&(e.n=Node.COMMENT_NODE),t.textContent&&(e.d=t.textContent),e;let n=t.getAttributeNames();n.length>0&&(e.a=Object.fromEntries(n.map(o=>[o,t.getAttribute(o)])));let r=me(t);return r.length>0&&(e.c=[...r].map(o=>Ge(o))),e};var zr=(t,e,n={})=>{var s,i,a,c;E(n)&&(n={props:n}),P(e)&&(e={template:e});let r=!1;if(e.element){let p=e.element;p.remove(),e.element=p}else if(e.selector){let p=document.querySelector(e.selector);if(!p)throw U(1,e.selector);p.remove(),e.element=p}else if(e.template){let p=document.createRange().createContextualFragment(e.template);e.element=p}else e.json&&(e.element=Ie(e.json,e.isSVG,n.config),r=!0);e.element||(e.element=document.createDocumentFragment()),((s=n.useInterpolation)==null||s)&&zt(e.element);let o=e.element;if(!r&&(((a=e.isSVG)!=null?a:Ze(o)&&((i=o.hasAttribute)!=null&&i.call(o,"isSVG")))||Ze(o)&&o.querySelector("[isSVG]"))){let p=e.element.content,f=p?[...p.childNodes]:[...o.childNodes],m=Ge(f);e.element=Ie(m,!0,n.config)}return{context:t,template:e.element,inheritAttrs:(c=n.inheritAttrs)!=null?c:!0,props:n.props,defaultName:n.defaultName}};var Kr=t=>{let e,n={},r=(...o)=>{if(o.length<=2&&0 in o)throw U(4);return e&&!n.isStopped?e(...o):(e=Cs(t,n),e(...o))};return r[Q]=1,Ee(r,!0),r.stop=()=>{var o,s;return(s=(o=n.ref)==null?void 0:o.stop)==null?void 0:s.call(o)},J(()=>r.stop(),!0),r},Cs=(t,e)=>{var s;let n=(s=e.ref)!=null?s:W(null);e.ref=n,e.isStopped=!1;let r=0,o=Me(()=>{if(r>0){o(),e.isStopped=!0,z(n);return}n(t()),++r});return n.stop=o,n};var Wr=(t,e)=>{let n={},r,o=(...s)=>{if(s.length<=2&&0 in s)throw U(4);return r&&!n.isStopped?r(...s):(r=Rs(t,e,n),r(...s))};return o[Q]=1,Ee(o,!0),o.stop=()=>{var s,i;return(i=(s=n.ref)==null?void 0:s.stop)==null?void 0:i.call(s)},J(()=>o.stop(),!0),o},Rs=(t,e,n)=>{var a;let r=(a=n.ref)!=null?a:W(null);n.ref=r,n.isStopped=!1;let o=0,s=c=>{if(o>0){r.stop(),n.isStopped=!0,z(r);return}r(e(...t.map(p=>p()))),++o},i=[];for(let c of t){let p=S(c,s);i.push(p)}return s(null),r.stop=()=>{i.forEach(c=>{c()})},r};var Gr=(t,e)=>{let n={},r,o=(...s)=>{if(s.length<=2&&0 in s)throw U(4);return r&&!n.isStopped?r(...s):(r=xs(t,e,n),r(...s))};return o[Q]=1,Ee(o,!0),o.stop=()=>{var s,i;return(i=(s=n.ref)==null?void 0:s.stop)==null?void 0:i.call(s)},J(()=>o.stop(),!0),o},xs=(t,e,n)=>{var s;let r=(s=n.ref)!=null?s:W(null);n.ref=r,n.isStopped=!1;let o=0;return r.stop=S(t,i=>{if(o>0){r.stop(),n.isStopped=!0,z(r);return}r(e(i)),++o},!0),r};var Jr=t=>(t[ut]=1,t);var Qr=(t,e)=>{if(!e)throw U(5);let r=ke(t)?xe:a=>a,o=()=>localStorage.setItem(e,JSON.stringify(X(t()))),s=localStorage.getItem(e);if(s!=null)try{t(r(JSON.parse(s)))}catch(a){D(6,`persist: failed to parse data for key ${e}`,a),o()}else o();let i=Me(o);return J(i,!0),t};var wn=(t,...e)=>{let n="",r=t,o=e,s=r.length,i=o.length;for(let a=0;a<s;++a)n+=r[a],a<i&&(n+=o[a]);return n},Xr=wn;var Yr=(t,e,n)=>{let r=[],o=()=>{e(t.map(i=>i()))};for(let i of t)r.push(S(i,o));n&&o();let s=()=>{for(let i of r)i()};return J(s,!0),s};var Zr=t=>{if(!h(t))throw U(3,"observerCount");return t(void 0,void 0,2)};var eo=t=>{On();try{t()}finally{An()}},On=()=>{ae.stack||(ae.stack=[]),ae.stack.push(new Set)},An=()=>{let t=ae.stack;if(!t||t.length===0)return;let e=t.pop();if(t.length){let n=t[t.length-1];for(let r of e)n.add(r);return}delete ae.stack;for(let n of e)try{z(n)}catch(r){console.error(r)}};var to=t=>{var e;(e=Oe())==null||e.onMounted.push(t)};
3
+ `;break;case"r":r+="\r";break;case"t":r+=" ";break;case"b":r+="\b";break;case"f":r+="\f";break;case"v":r+="\v";break;default:r+=c}else r+=c,o+=c}throw this.i("Unclosed `")}lt(e){var o;let n=e.node;if(!n||n.operator!=="new"||!n.argument)return;if(!n.argument||![6,3].includes(n.argument.type))throw this.i("Expected new function()");e.node=n.argument;let r=e.node;for(;r.type===3||r.type===6&&((o=r==null?void 0:r.callee)==null?void 0:o.type)===3;)r=r.type===3?r.object:r.callee.object;r.type=20}ft(e){if(!this.u(er))return;let n=++this.e,r=!1;for(;this.e<this.r.length;){if(this.l===er&&!r){let o=this.r.slice(n,this.e),s="";for(;++this.e<this.r.length;){let a=this.l;if(a>=97&&a<=122||a>=65&&a<=90||a>=48&&a<=57)s+=this.M;else break}let i;try{i=new RegExp(o,s)}catch(a){throw this.i(a.message)}return e.node={type:4,value:i,raw:this.r.slice(n-1,this.e)},e.node=this.$(e.node),e.node}this.u(Ut)?r=!0:r&&this.u(Ht)&&(r=!1),this.e+=this.u(Lo)?2:1}throw this.i("Unclosed Regex")}},lr=t=>new un(t).parse();var Wo={"=>":(t,e)=>{},"=":(t,e)=>{},"*=":(t,e)=>{},"**=":(t,e)=>{},"/=":(t,e)=>{},"%=":(t,e)=>{},"+=":(t,e)=>{},"-=":(t,e)=>{},"<<=":(t,e)=>{},">>=":(t,e)=>{},">>>=":(t,e)=>{},"&=":(t,e)=>{},"^=":(t,e)=>{},"|=":(t,e)=>{},"||":(t,e)=>t()||e(),"??":(t,e)=>{var n;return(n=t())!=null?n:e()},"&&":(t,e)=>t()&&e(),"|":(t,e)=>t|e,"^":(t,e)=>t^e,"&":(t,e)=>t&e,"==":(t,e)=>t==e,"!=":(t,e)=>t!=e,"===":(t,e)=>t===e,"!==":(t,e)=>t!==e,"<":(t,e)=>t<e,">":(t,e)=>t>e,"<=":(t,e)=>t<=e,">=":(t,e)=>t>=e,in:(t,e)=>t in e,"<<":(t,e)=>t<<e,">>":(t,e)=>t>>e,">>>":(t,e)=>t>>>e,"+":(t,e)=>t+e,"-":(t,e)=>t-e,"*":(t,e)=>t*e,"/":(t,e)=>t/e,"%":(t,e)=>t%e,"**":(t,e)=>ct(t,e)},Go={"-":t=>-t,"+":t=>+t,"!":t=>!t,"~":t=>~t,new:t=>t},hr=t=>{if(!(t!=null&&t.some(yr)))return t;let e=[];return t.forEach(n=>yr(n)?e.push(...n):e.push(n)),e},ur=(...t)=>hr(t),yn=(t,e)=>{if(!t)return e;let n=Object.create(e!=null?e:{});return n.$event=t,n},Jo={"++":(t,e)=>{let n=t[e];if(h(n)){let r=n();return n(++r),r}return++t[e]},"--":(t,e)=>{let n=t[e];if(h(n)){let r=n();return n(--r),r}return--t[e]}},Qo={"++":(t,e)=>{let n=t[e];if(h(n)){let r=n();return n(r+1),r}return t[e]++},"--":(t,e)=>{let n=t[e];if(h(n)){let r=n();return n(r-1),r}return t[e]--}},dr={"=":(t,e,n)=>{let r=t[e];return h(r)?r(n):t[e]=n},"+=":(t,e,n)=>{let r=t[e];return h(r)?r(r()+n):t[e]+=n},"-=":(t,e,n)=>{let r=t[e];return h(r)?r(r()-n):t[e]-=n},"*=":(t,e,n)=>{let r=t[e];return h(r)?r(r()*n):t[e]*=n},"/=":(t,e,n)=>{let r=t[e];return h(r)?r(r()/n):t[e]/=n},"%=":(t,e,n)=>{let r=t[e];return h(r)?r(r()%n):t[e]%=n},"**=":(t,e,n)=>{let r=t[e];return h(r)?r(ct(r(),n)):t[e]=ct(t[e],n)},"<<=":(t,e,n)=>{let r=t[e];return h(r)?r(r()<<n):t[e]<<=n},">>=":(t,e,n)=>{let r=t[e];return h(r)?r(r()>>n):t[e]>>=n},">>>=":(t,e,n)=>{let r=t[e];return h(r)?r(r()>>>n):t[e]>>>=n},"|=":(t,e,n)=>{let r=t[e];return h(r)?r(r()|n):t[e]|=n},"&=":(t,e,n)=>{let r=t[e];return h(r)?r(r()&n):t[e]&=n},"^=":(t,e,n)=>{let r=t[e];return h(r)?r(r()^n):t[e]^=n}},Pt=(t,e)=>B(t)?t.bind(e):t,hn=class{constructor(e,n,r,o,s){l(this,"m");l(this,"ke");l(this,"Ve");l(this,"Ie");l(this,"A");l(this,"De");l(this,"Ue");this.m=E(e)?e:[e],this.ke=n,this.Ve=r,this.Ie=o,this.Ue=!!s}Pe(e,n){if(n&&e in n)return n;for(let r of this.m)if(e in r)return r}2(e,n,r){let o=e.name;if(o==="$root")return this.m[this.m.length-1];if(o==="$parent")return this.m[1];if(o==="$ctx")return[...this.m];if(r&&o in r)return this.A=r[o],Pt(H(r[o]),r);for(let i of this.m)if(o in i)return this.A=i[o],Pt(H(i[o]),i);let s=this.ke;if(s&&o in s)return this.A=s[o],Pt(H(s[o]),s)}5(e,n,r){return this.m[0]}0(e,n,r){return this.Be(n,r,ur,...e.body)}1(e,n,r){return this.R(n,r,(...o)=>o.pop(),...e.expressions)}3(e,n,r){let{obj:o,key:s}=this.ae(e,n,r),i=o==null?void 0:o[s];return this.A=i,Pt(H(i),o)}4(e,n,r){return e.value}6(e,n,r){let o=(i,...a)=>B(i)?i(...hr(a)):i,s=this.R(++n,r,o,e.callee,...e.arguments);return this.A=s,s}7(e,n,r){return this.R(n,r,Go[e.operator],e.argument)}8(e,n,r){let o=Wo[e.operator];switch(e.operator){case"||":case"&&":case"??":return o(()=>this.g(e.left,n,r),()=>this.g(e.right,n,r))}return this.R(n,r,o,e.left,e.right)}9(e,n,r){return this.Be(++n,r,ur,...e.elements)}10(e,n,r){let o={},s=(...i)=>{i.forEach(a=>{Object.assign(o,a)})};return this.R(++n,r,s,...e.properties),o}11(e,n,r){return this.R(n,r,o=>this.g(o?e.consequent:e.alternate,n,r),e.test)}12(e,n,r){var f;let o={},s=m=>(m==null?void 0:m.type)!==15,i=(f=this.Ie)!=null?f:()=>!1,a=n===0&&this.Ue,c=m=>this.He(a,e.key,n,yn(m,r)),p=m=>this.He(a,e.value,n,yn(m,r));if(e.shorthand){let m=e.key.name;o[m]=s(e.key)&&i(m,n)?c:c()}else if(e.computed){let m=H(c());o[m]=s(e.value)&&i(m,n)?p:p()}else{let m=e.key.type===4?e.key.value:e.key.name;o[m]=s(e.value)&&i(m,n)?()=>p:p()}return o}ae(e,n,r){let o=this.g(e.object,n,r),s=e.computed?this.g(e.property,n,r):e.property.name;return{obj:o,key:s}}13(e,n,r){let o=e.argument,s=e.operator,i=e.prefix?Jo:Qo;if(o.type===2){let a=o.name,c=this.Pe(a,r);return te(c)?void 0:i[s](c,a)}if(o.type===3){let{obj:a,key:c}=this.ae(o,n,r);return i[s](a,c)}}16(e,n,r){let o=e.left,s=e.operator;if(o.type===2){let i=o.name,a=this.Pe(i,r);if(te(a))return;let c=this.g(e.right,n,r);return dr[s](a,i,c)}if(o.type===3){let{obj:i,key:a}=this.ae(o,n,r),c=this.g(e.right,n,r);return dr[s](i,a,c)}}14(e,n,r){let o=this.g(e.argument,n,r);return E(o)&&(o.s=gr),o}17(e,n,r){return this[6]({type:6,callee:e.tag,arguments:[{type:9,elements:e.quasi.quasis},...e.quasi.expressions]},n,r)}19(e,n,r){let o=(...s)=>s.reduce((i,a,c)=>i+=a+e.quasis[c+1].value.cooked,e.quasis[0].value.cooked);return this.R(n,r,o,...e.expressions)}18(e,n,r){return e.value.cooked}20(e,n,r){let o=(s,...i)=>new s(...i);return this.R(n,r,o,e.callee,...e.arguments)}15(e,n,r){return(...o)=>{let s=Object.create(r!=null?r:{}),i=e.params;if(i){let a=0;for(let c of i)s[c.name]=o[a++]}return this.g(e.body,n,s)}}g(e,n,r){let o=H(this[e.type](e,n,r));return this.De=e.type,o}He(e,n,r,o){let s=this.g(n,r,o);return e&&this._e()?this.A:s}_e(){let e=this.De;return(e===2||e===3||e===6)&&h(this.A)}eval(e,n){let{value:r,refs:o}=Tt(()=>this.g(e,-1,n)),s={value:r,refs:o};return this._e()&&(s.ref=this.A),s}R(e,n,r,...o){let s=o.map(i=>i&&this.g(i,e,n));return r(...s)}Be(e,n,r,...o){let s=this.Ve;if(!s)return this.R(e,n,r,...o);let i=o.map((a,c)=>a&&(a.type!==15&&s(c,e)?p=>this.g(a,e,yn(p,n)):this.g(a,e,n)));return r(...i)}},gr=Symbol("s"),yr=t=>(t==null?void 0:t.s)===gr,br=(t,e,n,r,o,s,i)=>new hn(e,n,r,o,i).eval(t,s);var Tr={},jt=class{constructor(e,n){l(this,"m");l(this,"o");l(this,"je",[]);this.m=e,this.o=n}w(e){this.m=[e,...this.m]}me(){return this.m.map(n=>n.components).filter(n=>!!n).reverse().reduce((n,r)=>{for(let[o,s]of Object.entries(r))n[o.toUpperCase()]=s;return n},{})}C(e,n,r,o,s){var y;let i=W([]),a=[],c=()=>{for(let d of a)d();a.length=0},p={value:i,stop:c,refs:[],context:this.m[0]};if(q(e))return p;let f=this.o.globalContext,m=[],u=(d,C,k,x)=>{try{let b=br(d,C,f,n,r,x,o);return k&&m.push(...b.refs),{value:b.value,refs:b.refs,ref:b.ref}}catch(b){D(6,`evaluation error: ${e}`,b)}return{value:void 0,refs:[]}};try{let d=(y=Tr[e])!=null?y:lr("["+e+"]");Tr[e]=d;let C=this.m,k=()=>{m.splice(0),c();let x=d.elements.map((b,I)=>n!=null&&n(I,-1)?{value:V=>u(b,C,!1,{$event:V}).value,refs:[]}:u(b,C,!0));if(!s)for(let b of m){let I=S(b,k);a.push(I)}i(x.map(b=>b.value)),p.refs=x.map(b=>b.ref)};k()}catch(d){D(6,`parse error: ${e}`,d)}return p}V(){return this.m}Y(e){this.je.push(this.m),this.m=e}v(e,n){try{this.Y(e),n()}finally{this.bt()}}bt(){var e;this.m=(e=this.je.pop())!=null?e:[]}};var Er="http://www.w3.org/1999/xlink",Xo={itemscope:2,allowfullscreen:2,formnovalidate:2,ismap:2,nomodule:2,novalidate:2,readonly:2,async:1,autofocus:1,autoplay:1,controls:1,default:1,defer:1,disabled:1,hidden:1,inert:1,loop:1,open:1,required:1,reversed:1,scoped:1,seamless:1,checked:1,muted:1,multiple:1,selected:1};function Yo(t){return!!t||t===""}var gn={onChange:(t,e,n,r,o,s)=>{var a;if(r){s&&s.includes("camel")&&(r=j(r)),Vt(t,r,e[0],o);return}let i=e.length;for(let c=0;c<i;++c){let p=e[c];if(E(p)){let f=(a=n==null?void 0:n[c])==null?void 0:a[0],m=p[0],u=p[1];Vt(t,m,u,f)}else if(N(p))for(let f of Object.entries(p)){let m=f[0],u=f[1],y=n==null?void 0:n[c],d=y&&m in y?m:void 0;Vt(t,m,u,d)}else{let f=n==null?void 0:n[c],m=e[c++],u=e[c];Vt(t,m,u,f)}}}},Vt=(t,e,n,r)=>{if(r&&r!==e&&t.removeAttribute(r),te(e)){D(3,name,t);return}if(!P(e)){D(6,`Attribute key is not string at ${t.outerHTML}`,e);return}if(e.startsWith("xlink:")){te(n)?t.removeAttributeNS(Er,e.slice(6,e.length)):t.setAttributeNS(Er,e,n);return}let o=e in Xo;te(n)||o&&!Yo(n)?t.removeAttribute(e):t.setAttribute(e,o?"":n)};var bn={onChange:(t,e,n)=>{let r=e.length;for(let o=0;o<r;++o){let s=e[o],i=n==null?void 0:n[o];if(E(s)){let a=s.length;for(let c=0;c<a;++c)Cr(t,s[c],i==null?void 0:i[c])}else Cr(t,s,i)}}},Cr=(t,e,n)=>{let r=t.classList,o=P(e),s=P(n);if(e&&!o){if(n&&!s)for(let i in n)(!(i in e)||!e[i])&&r.remove(i);for(let i in e)e[i]&&r.add(i)}else o?n!==e&&(s&&r.remove(...n.trim().split(/\s+/)),r.add(...e.trim().split(/\s+/))):n&&s&&r.remove(...n.trim().split(/\s+/))};var Rr={onChange:(t,e)=>{let[n,r]=e;B(r)?r(t,n):t.innerHTML=n==null?void 0:n.toString()}};function Zo(t,e){if(t.length!==e.length)return!1;let n=!0;for(let r=0;n&&r<t.length;r++)n=le(t[r],e[r]);return n}function le(t,e){if(t===e)return!0;let n=Qt(t),r=Qt(e);if(n||r)return n&&r?t.getTime()===e.getTime():!1;if(n=Qe(t),r=Qe(e),n||r)return t===e;if(n=E(t),r=E(e),n||r)return n&&r?Zo(t,e):!1;if(n=N(t),r=N(e),n||r){if(!n||!r)return!1;let o=Object.keys(t).length,s=Object.keys(e).length;if(o!==s)return!1;for(let i in t){let a=t.hasOwnProperty(i),c=e.hasOwnProperty(i);if(a&&!c||!a&&c||!le(t[i],e[i]))return!1}}return String(t)===String(e)}function $t(t,e){return t.findIndex(n=>le(n,e))}var xr=t=>{let e=parseFloat(t);return isNaN(e)?t:e};var Ft=t=>{if(!h(t))throw U(3,"pause");t(void 0,void 0,3)};var qt=t=>{if(!h(t))throw U(3,"resume");t(void 0,void 0,4)};var Sr={onChange:(t,e)=>{es(t,e[0])},onBind:(t,e,n,r,o,s)=>ts(t,e,s)},es=(t,e)=>{let n=Nr(t);if(n&&wr(t))E(e)?e=$t(e,ue(t))>-1:Z(e)?e=e.has(ue(t)):e=as(t,e),t.checked=e;else if(n&&Or(t))t.checked=le(e,ue(t));else if(n||Mr(t))Ar(t)?t.value!==(e==null?void 0:e.toString())&&(t.value=e):t.value!==e&&(t.value=e);else if(Lr(t)){let r=t.options,o=r.length,s=t.multiple;for(let i=0;i<o;i++){let a=r[i],c=ue(a);if(s)E(e)?a.selected=$t(e,c)>-1:a.selected=e.has(c);else if(le(ue(a),e)){t.selectedIndex!==i&&(t.selectedIndex=i);return}}!s&&t.selectedIndex!==-1&&(t.selectedIndex=-1)}else D(7,t)},nt=t=>(h(t)&&(t=t()),B(t)&&(t=t()),t?P(t)?{trim:t.includes("trim"),lazy:t.includes("lazy"),number:t.includes("number"),int:t.includes("int")}:{trim:!!t.trim,lazy:!!t.lazy,number:!!t.number,int:!!t.int}:{trim:!1,lazy:!1,number:!1,int:!1}),wr=t=>t.type==="checkbox",Or=t=>t.type==="radio",Ar=t=>t.type==="number"||t.type==="range",Nr=t=>t.tagName==="INPUT",Mr=t=>t.tagName==="TEXTAREA",Lr=t=>t.tagName==="SELECT",ts=(t,e,n)=>{let r=e.value,o=nt(n==null?void 0:n.join(",")),s=nt(r()[1]),i={int:o.int||s.int,lazy:o.lazy||s.lazy,number:o.number||s.number,trim:o.trim||s.trim},a=e.refs[0];if(!a)return D(8,t),()=>{};let c=Nr(t);return c&&wr(t)?rs(t,a):c&&Or(t)?cs(t,a):c||Mr(t)?ns(t,i,a,r):Lr(t)?ps(t,a,r):(D(7,t),()=>{})},vr=/[.,' ·٫]/,ns=(t,e,n,r)=>{let s=e.lazy?"change":"input",i=Ar(t),a=()=>{!e.trim&&!nt(r()[1]).trim||(t.value=t.value.trim())},c=u=>{let y=u.target;y.composing=1},p=u=>{let y=u.target;y.composing&&(y.composing=0,y.dispatchEvent(new Event(s)))},f=()=>{t.removeEventListener(s,m),t.removeEventListener("change",a),t.removeEventListener("compositionstart",c),t.removeEventListener("compositionend",p),t.removeEventListener("change",p)},m=u=>{let y=u.target;if(!y||y.composing)return;let d=y.value,C=nt(r()[1]);if(i||C.number||C.int){if(C.int)d=parseInt(d);else{if(vr.test(d[d.length-1])&&d.split(vr).length===2){if(d+="0",d=parseFloat(d),isNaN(d))d="";else if(n()===d)return}d=parseFloat(d)}isNaN(d)&&(d=""),t.value=d}else C.trim&&(d=d.trim());n(d)};return t.addEventListener(s,m),t.addEventListener("change",a),t.addEventListener("compositionstart",c),t.addEventListener("compositionend",p),t.addEventListener("change",p),f},rs=(t,e)=>{let n="change",r=()=>{t.removeEventListener(n,o)},o=()=>{let s=ue(t),i=t.checked,a=e();if(E(a)){let c=$t(a,s),p=c!==-1;i&&!p?a.push(s):!i&&p&&a.splice(c,1)}else Z(a)?i?a.add(s):a.delete(s):e(is(t,i))};return t.addEventListener(n,o),r},ue=t=>"_value"in t?t._value:t.value,kr="trueValue",os="falseValue",Ir="true-value",ss="false-value",is=(t,e)=>{let n=e?kr:os;if(n in t)return t[n];let r=e?Ir:ss;return t.hasAttribute(r)?t.getAttribute(r):e},as=(t,e)=>{if(kr in t)return le(e,t.trueValue);let r=Ir;return t.hasAttribute(r)?le(e,t.getAttribute(r)):le(e,!0)},cs=(t,e)=>{let n="change",r=()=>{t.removeEventListener(n,o)},o=()=>{let s=ue(t);e(s)};return t.addEventListener(n,o),r},ps=(t,e,n)=>{let r="change",o=()=>{t.removeEventListener(r,s)},s=()=>{let a=nt(n()[1]).number,c=Array.prototype.filter.call(t.options,p=>p.selected).map(p=>a?xr(ue(p)):ue(p));if(t.multiple){let p=e();try{if(Ft(e),Z(p)){p.clear();for(let f of c)p.add(f)}else E(p)?(p.splice(0),p.push(...c)):e(c)}finally{qt(e),z(e)}}else e(c[0])};return t.addEventListener(r,s),o};var fs=["stop","prevent","capture","self","once","left","right","middle","passive"],ms=t=>{let e={};if(q(t))return;let n=t.split(",");for(let r of fs)e[r]=n.includes(r);return e},En={isLazy:(t,e)=>e===-1&&t%2===0,isLazyKey:(t,e)=>e===0&&!t.endsWith("_flags"),once:!1,collectRefObj:!0,onBind:(t,e,n,r,o,s)=>{var f,m;if(o){let u=e.value(),y=H(o.value()[0]);return P(y)?Tn(t,j(y),()=>e.value()[0],(f=s==null?void 0:s.join(","))!=null?f:u[1]):()=>{}}else if(r){let u=e.value();return Tn(t,j(r),()=>e.value()[0],(m=s==null?void 0:s.join(","))!=null?m:u[1])}let i=[],a=()=>{i.forEach(u=>u())},c=e.value(),p=c.length;for(let u=0;u<p;++u){let y=c[u];if(B(y)&&(y=y()),N(y))for(let d of Object.entries(y)){let C=d[0],k=()=>{let b=e.value()[u];return B(b)&&(b=b()),b=b[C],B(b)&&(b=b()),b},x=y[C+"_flags"];i.push(Tn(t,C,k,x))}else D(2,name,t)}return a}},ls=(t,e)=>{if(t.startsWith("keydown")||t.startsWith("keyup")||t.startsWith("keypress")){e!=null||(e="");let n=t.split(".").concat(e.split(","));t=n[0];let r=n[1],o=n.includes("ctrl"),s=n.includes("shift"),i=n.includes("alt"),a=n.includes("meta"),c=p=>!(o&&!p.ctrlKey||s&&!p.shiftKey||i&&!p.altKey||a&&!p.metaKey);return r?[t,p=>c(p)?p.key.toUpperCase()===r.toUpperCase():!1]:[t,c]}return[t,n=>!0]},Tn=(t,e,n,r)=>{if(q(e))return D(5,name,t),()=>{};let o=ms(r),s=o?{capture:o.capture,passive:o.passive,once:o.once}:void 0,i;[e,i]=ls(e,r);let a=f=>{if(!i(f)||!n&&e==="submit"&&(o!=null&&o.prevent))return;let m=n(f);B(m)&&(m=m(f)),B(m)&&m(f)},c=()=>{t.removeEventListener(e,p,s)},p=f=>{if(!o){a(f);return}try{if(o.left&&f.button!==0||o.middle&&f.button!==1||o.right&&f.button!==2||o.self&&f.target!==t)return;o.stop&&f.stopPropagation(),o.prevent&&f.preventDefault(),a(f)}finally{o.once&&c()}};return t.addEventListener(e,p,s),c};var Dr={onChange:(t,e,n,r,o,s)=>{if(r){s&&s.includes("camel")&&(r=j(r)),We(t,r,e[0]);return}let i=e.length;for(let a=0;a<i;++a){let c=e[a];if(E(c)){let p=c[0],f=c[1];We(t,p,f)}else if(N(c))for(let p of Object.entries(c)){let f=p[0],m=p[1];We(t,f,m)}else{let p=e[a++],f=e[a];We(t,p,f)}}}};function us(t){return!!t||t===""}var We=(t,e,n)=>{if(te(e)){D(3,name,t);return}if(e==="innerHTML"||e==="textContent"){let s=[...t.childNodes];setTimeout(()=>s.forEach(se),1),t[e]=n!=null?n:"";return}let r=t.tagName;if(e==="value"&&r!=="PROGRESS"&&!r.includes("-")){t._value=n;let s=r==="OPTION"?t.getAttribute("value"):t.value,i=n!=null?n:"";s!==i&&(t.value=i),n==null&&t.removeAttribute(e);return}let o=!1;if(n===""||n==null){let s=typeof t[e];s==="boolean"?n=us(n):n==null&&s==="string"?(n="",o=!0):s==="number"&&(n=0,o=!0)}try{t[e]=n}catch(s){o||D(4,e,r,n,s)}o&&t.removeAttribute(e)};var Ur={once:!0,onBind:(t,e,n)=>{let r=e.value()[0],o=E(r),s=e.refs[0];return o?r.push(t):s?s==null||s(t):e.context[n]=t,()=>{if(o){let i=r.indexOf(t);i!==-1&&r.splice(i,1)}else s==null||s(null)}}};var Hr={onChange:(t,e)=>{let n=ge(t).data,r=n._ord;kn(r)&&(r=n._ord=t.style.display),!!e[0]?t.style.display=r:t.style.display="none"}};var xn={onChange:(t,e,n)=>{let r=e.length;for(let o=0;o<r;++o){let s=e[o],i=n==null?void 0:n[o];if(E(s)){let a=s.length;for(let c=0;c<a;++c)_r(t,s[c],i==null?void 0:i[c])}else _r(t,s,i)}}},_r=(t,e,n)=>{let r=t.style,o=P(e);if(e&&!o){if(n&&!P(n))for(let s in n)e[s]==null&&Rn(r,s,"");for(let s in e)Rn(r,s,e[s])}else{let s=r.display;if(o?n!==e&&(r.cssText=e):n&&t.removeAttribute("style"),"_ord"in ge(t).data)return;r.display=s}},Br=/\s*!important$/;function Rn(t,e,n){if(E(n))n.forEach(r=>{Rn(t,e,r)});else if(n==null&&(n=""),e.startsWith("--"))t.setProperty(e,n);else{let r=ds(t,e);Br.test(n)?t.setProperty(Pe(r),n.replace(Br,""),"important"):t[r]=n}}var Pr=["Webkit","Moz","ms"],Cn={};function ds(t,e){let n=Cn[e];if(n)return n;let r=j(e);if(r!=="filter"&&r in t)return Cn[e]=r;r=et(r);for(let o=0;o<Pr.length;o++){let s=Pr[o]+r;if(s in t)return Cn[e]=s}return e}var X=t=>jr(H(t)),jr=(t,e=new WeakMap)=>{if(!t||!N(t))return t;if(E(t))return t.map(X);if(Z(t)){let r=new Set;for(let o of t.keys())r.add(X(o));return r}if(he(t)){let r=new Map;for(let o of t)r.set(X(o[0]),X(o[1]));return r}if(e.has(t))return H(e.get(t));let n=pt({},t);e.set(t,n);for(let r of Object.entries(n))n[r[0]]=jr(H(r[1]),e);return n};var Vr={onChange:(t,e)=>{var r;let n=e[0];t.textContent=Z(n)?JSON.stringify(X([...n])):he(n)?JSON.stringify(X([...n])):N(n)?JSON.stringify(X(n)):(r=n==null?void 0:n.toString())!=null?r:""}};var $r={onChange:(t,e)=>{We(t,"value",e[0])}};var ke=t=>(t==null?void 0:t[lt])===1;var xe=t=>{if(je(t))return t;let e;if(h(t)?(e=t,t=e()):e=W(t),t instanceof Node||t instanceof Date||t instanceof RegExp||t instanceof Promise||t instanceof Error)return e;if(e[lt]=1,E(t)){let n=t.length;for(let r=0;r<n;++r){let o=t[r];ke(o)||(t[r]=xe(o))}return e}if(!N(t))return e;for(let n of Object.entries(t)){let r=n[1];if(ke(r))continue;let o=n[0];Qe(o)||(t[o]=null,t[o]=xe(r))}return e};var ve=class ve{constructor(e){l(this,"_",{});l(this,"f",{});l(this,"Ze",()=>Object.keys(this._).filter(e=>e.length===1||!e.startsWith(":")));l(this,"he",new Map);l(this,"ge",new Map);l(this,"forGrowThreshold",10);l(this,"globalContext");l(this,"useInterpolation",!0);if(this.setDirectives("r-"),e){this.globalContext=e;return}this.globalContext=this.xt()}static getDefault(){var e;return(e=ve.$e)!=null?e:ve.$e=new ve}xt(){let e={},n=globalThis;for(let r of ve.Tt.split(","))e[r]=n[r];return e.ref=xe,e.sref=W,e.flatten=X,e}addComponent(...e){for(let n of e){if(!n.defaultName){Xe.warning("Registered component's default name is not defined",n);continue}this.he.set(et(n.defaultName),n),this.ge.set(et(n.defaultName).toLocaleUpperCase(),n)}}setDirectives(e){this._={".":Dr,":":gn,"@":En,[`${e}on`]:En,[`${e}bind`]:gn,[`${e}html`]:Rr,[`${e}text`]:Vr,[`${e}show`]:Hr,[`${e}model`]:Sr,":style":xn,[`${e}bind:style`]:xn,":class":bn,[`${e}bind:class`]:bn,":ref":Ur,":value":$r,teleport:Lt},this.f={for:`${e}for`,if:`${e}if`,else:`${e}else`,elseif:`${e}else-if`,pre:`${e}pre`,inherit:`${e}inherit`,text:`${e}text`,props:":props",propsOnce:":props-once",bind:`${e}bind`,on:`${e}on`,keyBind:":key",key:"key",is:":is",teleport:`${e}teleport`,dynamic:"_d_"}}updateDirectives(e){e(this._,this.f)}};l(ve,"$e"),l(ve,"Tt","Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console");var ce=ve;var zt=(t,e)=>{if(!t)return;let n=(e!=null?e:ce.getDefault()).f;for(let r of gs(t,n.pre))hs(r,n.text)},ys=/({{[^]*?}})/g,hs=(t,e)=>{var i;let n=t.textContent;if(!n)return;let r=ys,o=n.split(r);if(o.length<=1)return;if(((i=t.parentElement)==null?void 0:i.childNodes.length)===1&&o.length===3){let a=o[1];if(q(o[0])&&q(o[2])&&a.startsWith("{{")&&a.endsWith("}}")){let c=t.parentElement;c.setAttribute(e,a.substring(2,a.length-2)),c.innerText="";return}}let s=document.createDocumentFragment();for(let a of o)if(a.startsWith("{{")&&a.endsWith("}}")){let c=document.createElement("span");c.setAttribute(e,a.substring(2,a.length-2)),s.appendChild(c)}else s.appendChild(document.createTextNode(a));t.replaceWith(s)},gs=(t,e)=>{let n=[],r=o=>{var s,i;if(o.nodeType===Node.TEXT_NODE)(s=o.textContent)!=null&&s.includes("{{")&&n.push(o);else{if((i=o==null?void 0:o.hasAttribute)!=null&&i.call(o,e))return;for(let a of me(o))r(a)}};return r(t),n};var bs="svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistantLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view",Ts=new Set(bs.toUpperCase().split(",")),Es="http://www.w3.org/2000/svg",Fr=(t,e)=>{ie(t)?t.content.appendChild(e):t.appendChild(e)},vn=(t,e,n,r)=>{var i;let o=t.t;if(o){let a=n&&Ts.has(o.toUpperCase())?document.createElementNS(Es,o.toLowerCase()):document.createElement(o),c=t.a;if(c)for(let f of Object.entries(c)){let m=f[0],u=f[1];m.startsWith("#")&&(u=m.substring(1),m="name"),a.setAttribute(gt(m,r),u)}let p=t.c;if(p)for(let f of p)vn(f,a,n,r);Fr(e,a);return}let s=t.d;if(s){let a;switch((i=t.n)!=null?i:Node.TEXT_NODE){case Node.COMMENT_NODE:a=document.createComment(s);break;case Node.TEXT_NODE:a=document.createTextNode(s);break}if(a)Fr(e,a);else throw new Error("unsupported node type.")}},Ie=(t,e,n)=>{n!=null||(n=ce.getDefault());let r=document.createDocumentFragment();if(!E(t))return vn(t,r,!!e,n),r;for(let o of t)vn(o,r,!!e,n);return r};var qr=(t,e={selector:"#app"},n)=>{P(e)&&(e={selector:"#app",template:e}),Qn(t)&&(t=t.context);let r=e.element?e.element:e.selector?document.querySelector(e.selector):null;if(!r||!Ae(r))throw U(0);n||(n=ce.getDefault());let o=()=>{for(let a of[...r.childNodes])$(a)},s=a=>{for(let c of a)r.appendChild(c)};if(e.template){let a=document.createRange().createContextualFragment(e.template);o(),s(a.childNodes),e.element=a}else if(e.json){let a=Ie(e.json,e.isSVG,n);o(),s(a.childNodes)}return n.useInterpolation&&zt(r,n),new Sn(t,r,n).x(),_(r,()=>{Ce(t)}),At(t),{context:t,unmount:()=>{$(r)},unbind:()=>{se(r)}}},Sn=class{constructor(e,n,r){l(this,"Et");l(this,"Fe");l(this,"o");l(this,"h");l(this,"p");this.Et=e,this.Fe=n,this.o=r,this.h=new jt([e],r),this.p=new kt(this.h)}x(){this.p.G(this.Fe)}};var Ge=t=>{if(E(t))return t.map(o=>Ge(o));let e={};if(t.tagName)e.t=t.tagName;else return t.nodeType===Node.COMMENT_NODE&&(e.n=Node.COMMENT_NODE),t.textContent&&(e.d=t.textContent),e;let n=t.getAttributeNames();n.length>0&&(e.a=Object.fromEntries(n.map(o=>[o,t.getAttribute(o)])));let r=me(t);return r.length>0&&(e.c=[...r].map(o=>Ge(o))),e};var zr=(t,e=()=>({}),n={})=>{var s,i,a,c;E(n)&&(n={props:n}),P(t)&&(t={template:t});let r=!1;if(t.element){let p=t.element;p.remove(),t.element=p}else if(t.selector){let p=document.querySelector(t.selector);if(!p)throw U(1,t.selector);p.remove(),t.element=p}else if(t.template){let p=document.createRange().createContextualFragment(t.template);t.element=p}else t.json&&(t.element=Ie(t.json,t.isSVG,n.config),r=!0);t.element||(t.element=document.createDocumentFragment()),((s=n.useInterpolation)==null||s)&&zt(t.element);let o=t.element;if(!r&&(((a=t.isSVG)!=null?a:Ze(o)&&((i=o.hasAttribute)!=null&&i.call(o,"isSVG")))||Ze(o)&&o.querySelector("[isSVG]"))){let p=t.element.content,f=p?[...p.childNodes]:[...o.childNodes],m=Ge(f);t.element=Ie(m,!0,n.config)}return{context:e,template:t.element,inheritAttrs:(c=n.inheritAttrs)!=null?c:!0,props:n.props,defaultName:n.defaultName}};var Kr=t=>{let e,n={},r=(...o)=>{if(o.length<=2&&0 in o)throw U(4);return e&&!n.isStopped?e(...o):(e=Cs(t,n),e(...o))};return r[Q]=1,Ee(r,!0),r.stop=()=>{var o,s;return(s=(o=n.ref)==null?void 0:o.stop)==null?void 0:s.call(o)},J(()=>r.stop(),!0),r},Cs=(t,e)=>{var s;let n=(s=e.ref)!=null?s:W(null);e.ref=n,e.isStopped=!1;let r=0,o=Me(()=>{if(r>0){o(),e.isStopped=!0,z(n);return}n(t()),++r});return n.stop=o,n};var Wr=(t,e)=>{let n={},r,o=(...s)=>{if(s.length<=2&&0 in s)throw U(4);return r&&!n.isStopped?r(...s):(r=Rs(t,e,n),r(...s))};return o[Q]=1,Ee(o,!0),o.stop=()=>{var s,i;return(i=(s=n.ref)==null?void 0:s.stop)==null?void 0:i.call(s)},J(()=>o.stop(),!0),o},Rs=(t,e,n)=>{var a;let r=(a=n.ref)!=null?a:W(null);n.ref=r,n.isStopped=!1;let o=0,s=c=>{if(o>0){r.stop(),n.isStopped=!0,z(r);return}r(e(...t.map(p=>p()))),++o},i=[];for(let c of t){let p=S(c,s);i.push(p)}return s(null),r.stop=()=>{i.forEach(c=>{c()})},r};var Gr=(t,e)=>{let n={},r,o=(...s)=>{if(s.length<=2&&0 in s)throw U(4);return r&&!n.isStopped?r(...s):(r=xs(t,e,n),r(...s))};return o[Q]=1,Ee(o,!0),o.stop=()=>{var s,i;return(i=(s=n.ref)==null?void 0:s.stop)==null?void 0:i.call(s)},J(()=>o.stop(),!0),o},xs=(t,e,n)=>{var s;let r=(s=n.ref)!=null?s:W(null);n.ref=r,n.isStopped=!1;let o=0;return r.stop=S(t,i=>{if(o>0){r.stop(),n.isStopped=!0,z(r);return}r(e(i)),++o},!0),r};var Jr=t=>(t[ut]=1,t);var Qr=(t,e)=>{if(!e)throw U(5);let r=ke(t)?xe:a=>a,o=()=>localStorage.setItem(e,JSON.stringify(X(t()))),s=localStorage.getItem(e);if(s!=null)try{t(r(JSON.parse(s)))}catch(a){D(6,`persist: failed to parse data for key ${e}`,a),o()}else o();let i=Me(o);return J(i,!0),t};var wn=(t,...e)=>{let n="",r=t,o=e,s=r.length,i=o.length;for(let a=0;a<s;++a)n+=r[a],a<i&&(n+=o[a]);return n},Xr=wn;var Yr=(t,e,n)=>{let r=[],o=()=>{e(t.map(i=>i()))};for(let i of t)r.push(S(i,o));n&&o();let s=()=>{for(let i of r)i()};return J(s,!0),s};var Zr=t=>{if(!h(t))throw U(3,"observerCount");return t(void 0,void 0,2)};var eo=t=>{On();try{t()}finally{An()}},On=()=>{ae.stack||(ae.stack=[]),ae.stack.push(new Set)},An=()=>{let t=ae.stack;if(!t||t.length===0)return;let e=t.pop();if(t.length){let n=t[t.length-1];for(let r of e)n.add(r);return}delete ae.stack;for(let n of e)try{z(n)}catch(r){console.error(r)}};var to=t=>{var e;(e=Oe())==null||e.onMounted.push(t)};
@@ -1346,8 +1346,9 @@ var ComponentHead = class {
1346
1346
  * Disable this flag to isolate refs created within the component context.
1347
1347
  * Default: true */
1348
1348
  __publicField(this, "entangle", true);
1349
- /** disables slot context switch to the parent */
1350
- __publicField(this, "disableSwitch", false);
1349
+ /** enables slot context switch to the parent
1350
+ * Default: false */
1351
+ __publicField(this, "enableSwitch", false);
1351
1352
  /** A callback invoked after auto props get assigned to the component context. */
1352
1353
  __publicField(this, "onAutoPropsAssigned");
1353
1354
  /**
@@ -1594,7 +1595,7 @@ var ComponentBinder = class {
1594
1595
  compTemplate = null;
1595
1596
  }
1596
1597
  const createSwitchContext = (childNodes2) => {
1597
- if (head.disableSwitch) return;
1598
+ if (!head.enableSwitch) return;
1598
1599
  parser.__scoped(capturedContext, () => {
1599
1600
  parser.__push(componentCtx);
1600
1601
  const props = getProps(slot, parser.__capture());
@@ -4850,7 +4851,7 @@ var toJsonTemplate = (node) => {
4850
4851
  };
4851
4852
 
4852
4853
  // src/app/createComponent.ts
4853
- var createComponent = (context, template, options = {}) => {
4854
+ var createComponent = (template, context = () => ({}), options = {}) => {
4854
4855
  var _a, _b, _c, _d;
4855
4856
  if (isArray(options)) options = { props: options };
4856
4857
  if (isString(template)) template = { template };