regor 1.2.4 → 1.2.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/regor.d.ts CHANGED
@@ -76,7 +76,7 @@ export type FlattenRef<TRef> = TRef extends Array<infer V1> ? Array<FlattenRef<V
76
76
  export type Flat<TValueType> = Equals<RefParam<TValueType>, FlattenRef<TValueType>> extends true ? RefParam<TValueType> : FlattenRef<TValueType>;
77
77
  export type ObserveCallback<TValueType> = (newValue: TValueType, eventSource?: any) => void;
78
78
  export type StopObserving = () => void;
79
- export declare interface IRegorContext extends Record<any, any> {
79
+ export declare interface IRegorContext extends Record<string, unknown> {
80
80
  components?: Record<string, Component>;
81
81
  mounted?: () => void;
82
82
  unmounted?: () => void;
@@ -759,6 +759,19 @@ var propsOnceDirective = {
759
759
  }
760
760
  };
761
761
 
762
+ // src/reactivity/entangle.ts
763
+ var entangle = (r1, r2) => {
764
+ if (r1 === r2) return () => {
765
+ };
766
+ const stop1 = observe(r1, (v) => r2(v));
767
+ const stop2 = observe(r2, (v) => r1(v));
768
+ r2(r1());
769
+ return () => {
770
+ stop1();
771
+ stop2();
772
+ };
773
+ };
774
+
762
775
  // src/directives/single-prop.ts
763
776
  var singlePropDirective = {
764
777
  collectRefObj: true,
@@ -766,39 +779,43 @@ var singlePropDirective = {
766
779
  if (!option) return () => {
767
780
  };
768
781
  const key = camelize(option);
782
+ let stopEntangle = () => {
783
+ };
769
784
  const stopObserving = observe(
770
785
  parseResult.value,
771
786
  () => {
772
787
  var _a;
773
788
  const value = (_a = parseResult.refs[0]) != null ? _a : parseResult.value()[0];
774
789
  const ctx = parseResult.context;
775
- const ctxKey = ctx[option];
790
+ const ctxKey = ctx[key];
776
791
  if (ctxKey === value) return;
792
+ if (isRef(value)) {
793
+ if (isRef(ctxKey)) {
794
+ stopEntangle();
795
+ stopEntangle = entangle(value, ctxKey);
796
+ return;
797
+ }
798
+ ctx[key] = value;
799
+ return;
800
+ }
801
+ stopEntangle();
802
+ stopEntangle = () => {
803
+ };
777
804
  if (isRef(ctxKey)) {
778
805
  ctxKey(value);
779
- } else {
780
- ctx[key] = value;
806
+ return;
781
807
  }
808
+ ctx[key] = value;
782
809
  },
783
810
  true
784
811
  );
785
- return stopObserving;
812
+ return () => {
813
+ stopEntangle();
814
+ stopObserving();
815
+ };
786
816
  }
787
817
  };
788
818
 
789
- // src/reactivity/entangle.ts
790
- var entangle = (r1, r2) => {
791
- if (r1 === r2) return () => {
792
- };
793
- const stop1 = observe(r1, (v) => r2(v));
794
- const stop2 = observe(r2, (v) => r1(v));
795
- r2(r1());
796
- return () => {
797
- stop1();
798
- stop2();
799
- };
800
- };
801
-
802
819
  // src/bind/ComponentBinder.ts
803
820
  var ComponentBinder = class {
804
821
  constructor(binder) {
@@ -2377,21 +2394,21 @@ var attachDOMChangeListener = (el, parseResult, directiveFlags) => {
2377
2394
  number: f1.number || f2.number,
2378
2395
  trim: f1.trim || f2.trim
2379
2396
  };
2380
- const modelRef = parseResult.refs[0];
2381
- if (!modelRef) {
2397
+ if (!parseResult.refs[0]) {
2382
2398
  warning(8 /* ModelRequiresRef */, el);
2383
2399
  return () => {
2384
2400
  };
2385
2401
  }
2402
+ const getModelRef = () => parseResult.refs[0];
2386
2403
  const isAnInput = isInput(el);
2387
2404
  if (isAnInput && isCheckBox(el)) {
2388
- return handleCheckBox(el, modelRef);
2405
+ return handleCheckBox(el, getModelRef);
2389
2406
  } else if (isAnInput && isRadio(el)) {
2390
- return handleRadio(el, modelRef);
2407
+ return handleRadio(el, getModelRef);
2391
2408
  } else if (isAnInput || isTextArea(el)) {
2392
- return handleInputAndTextArea(el, flags, modelRef, parsedValue);
2409
+ return handleInputAndTextArea(el, flags, getModelRef, parsedValue);
2393
2410
  } else if (isSelect(el)) {
2394
- return handleSelect(el, modelRef, parsedValue);
2411
+ return handleSelect(el, getModelRef, parsedValue);
2395
2412
  } else {
2396
2413
  warning(7 /* ModelNotSupportOnElement */, el);
2397
2414
  return () => {
@@ -2399,7 +2416,7 @@ var attachDOMChangeListener = (el, parseResult, directiveFlags) => {
2399
2416
  }
2400
2417
  };
2401
2418
  var decimalSeparators = /[.,' ·٫]/;
2402
- var handleInputAndTextArea = (el, flags, modelRef, parsedValue) => {
2419
+ var handleInputAndTextArea = (el, flags, getModelRef, parsedValue) => {
2403
2420
  const isLazy = flags.lazy;
2404
2421
  const eventType = isLazy ? "change" : "input";
2405
2422
  const isNumber = isNumberInput(el);
@@ -2426,6 +2443,8 @@ var handleInputAndTextArea = (el, flags, modelRef, parsedValue) => {
2426
2443
  el.removeEventListener("change", onCompositionEnd);
2427
2444
  };
2428
2445
  const listener = (event) => {
2446
+ const modelRef = getModelRef();
2447
+ if (!modelRef) return;
2429
2448
  const target = event.target;
2430
2449
  if (!target || target.composing) return;
2431
2450
  let value = target.value;
@@ -2457,12 +2476,14 @@ var handleInputAndTextArea = (el, flags, modelRef, parsedValue) => {
2457
2476
  el.addEventListener("change", onCompositionEnd);
2458
2477
  return unbinder;
2459
2478
  };
2460
- var handleCheckBox = (el, modelRef) => {
2479
+ var handleCheckBox = (el, getModelRef) => {
2461
2480
  const eventType = "change";
2462
2481
  const unbinder = () => {
2463
2482
  el.removeEventListener(eventType, listener);
2464
2483
  };
2465
2484
  const listener = () => {
2485
+ const modelRef = getModelRef();
2486
+ if (!modelRef) return;
2466
2487
  const elementValue = getValue(el);
2467
2488
  const checked = el.checked;
2468
2489
  const modelValue = modelRef();
@@ -2513,24 +2534,28 @@ var getCheckboxChecked = (el, value) => {
2513
2534
  return looseEqual(value, el.getAttribute(attrKey));
2514
2535
  return looseEqual(value, true);
2515
2536
  };
2516
- var handleRadio = (el, modelRef) => {
2537
+ var handleRadio = (el, getModelRef) => {
2517
2538
  const eventType = "change";
2518
2539
  const unbinder = () => {
2519
2540
  el.removeEventListener(eventType, listener);
2520
2541
  };
2521
2542
  const listener = () => {
2543
+ const modelRef = getModelRef();
2544
+ if (!modelRef) return;
2522
2545
  const elementValue = getValue(el);
2523
2546
  modelRef(elementValue);
2524
2547
  };
2525
2548
  el.addEventListener(eventType, listener);
2526
2549
  return unbinder;
2527
2550
  };
2528
- var handleSelect = (el, modelRef, parsedValue) => {
2551
+ var handleSelect = (el, getModelRef, parsedValue) => {
2529
2552
  const eventType = "change";
2530
2553
  const unbinder = () => {
2531
2554
  el.removeEventListener(eventType, listener);
2532
2555
  };
2533
2556
  const listener = () => {
2557
+ const modelRef = getModelRef();
2558
+ if (!modelRef) return;
2534
2559
  const flags = getFlags(parsedValue()[1]);
2535
2560
  const number = flags.number;
2536
2561
  const selectedValue = Array.prototype.filter.call(el.options, (o) => o.selected).map(
@@ -4798,8 +4823,8 @@ var Parser = class {
4798
4823
  stopObserverList.push(stopObserving);
4799
4824
  }
4800
4825
  }
4801
- value(evaluated.map((x) => x.value));
4802
4826
  result.refs = evaluated.map((x) => x.ref);
4827
+ value(evaluated.map((x) => x.value));
4803
4828
  };
4804
4829
  refresh();
4805
4830
  } catch (e) {
@@ -1,4 +1,4 @@
1
- "use strict";var at=Object.defineProperty,po=Object.defineProperties,fo=Object.getOwnPropertyDescriptor,lo=Object.getOwnPropertyDescriptors,uo=Object.getOwnPropertyNames,In=Object.getOwnPropertySymbols;var Dn=Object.prototype.hasOwnProperty,mo=Object.prototype.propertyIsEnumerable;var ct=Math.pow,Qt=(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={}))Dn.call(e,n)&&Qt(t,n,e[n]);if(In)for(var n of In(e))mo.call(e,n)&&Qt(t,n,e[n]);return t},Un=(t,e)=>po(t,lo(e));var ho=(t,e)=>{for(var n in e)at(t,n,{get:e[n],enumerable:!0})},yo=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of uo(e))!Dn.call(t,o)&&o!==n&&at(t,o,{get:()=>e[o],enumerable:!(r=fo(e,o))||r.enumerable});return t};var go=t=>yo(at({},"__esModule",{value:!0}),t);var m=(t,e,n)=>Qt(t,typeof e!="symbol"?e+"":e,n);var Ds={};ho(Ds,{ComponentHead:()=>He,RegorConfig:()=>ee,addUnbinder:()=>H,batch:()=>co,collectRefs:()=>wt,computeMany:()=>to,computeRef:()=>no,computed:()=>eo,createApp:()=>Xr,createComponent:()=>Yr,endBatch:()=>Mn,entangle:()=>Ct,flatten:()=>X,getBindData:()=>Te,html:()=>An,isDeepRef:()=>Le,isRaw:()=>Ve,isRef:()=>b,markRaw:()=>ro,observe:()=>O,observeMany:()=>io,observerCount:()=>ao,onMounted:()=>Zr,onUnmounted:()=>J,pause:()=>Ut,persist:()=>oo,raw:()=>so,ref:()=>Re,removeNode:()=>V,resume:()=>Ht,silence:()=>St,sref:()=>G,startBatch:()=>Nn,toFragment:()=>Ie,toJsonTemplate:()=>Ge,trigger:()=>K,unbind:()=>ae,unref:()=>j,useScope:()=>Et,warningHandler:()=>et,watchEffect:()=>Me});module.exports=go(Ds);var Ue=Symbol(":regor");var ae=t=>{let e=[t];for(;e.length>0;){let n=e.shift();bo(n);let r=n.childNodes;if(r)for(let o of r)e.push(o)}},bo=t=>{let e=t[Ue];if(e){for(let n of e.unbinders)n();e.unbinders.splice(0),delete t[Ue]}};var V=t=>{t.remove(),setTimeout(()=>ae(t),1)};var _=t=>typeof t=="function",B=t=>typeof t=="string",Hn=t=>typeof t=="undefined",ne=t=>t==null||typeof t=="undefined",z=t=>typeof t!="string"||!(t!=null&&t.trim()),To=Object.prototype.toString,Xt=t=>To.call(t),ge=t=>Xt(t)==="[object Map]",Z=t=>Xt(t)==="[object Set]",Yt=t=>Xt(t)==="[object Date]",Ze=t=>typeof t=="symbol",E=Array.isArray,N=t=>t!==null&&typeof t=="object";var _n={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."},D=(t,...e)=>{let n=_n[t];return new Error(_(n)?n.call(_n,...e):n)};var ft=[],Bn=()=>{let t={onMounted:[],onUnmounted:[]};return ft.push(t),t},Oe=t=>{let e=ft[ft.length-1];if(!e&&!t)throw D(2);return e},Pn=t=>{let e=Oe();return t&&en(t),ft.pop(),e},Zt=Symbol("csp"),en=t=>{let e=t,n=e[Zt];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[Zt]=Oe()},lt=t=>t[Zt];var be=t=>{var n,r;let e=(n=lt(t))==null?void 0:n.onUnmounted;e==null||e.forEach(o=>{o()}),(r=t.unmounted)==null||r.call(t)};var He=class{constructor(e,n,r,o,s){m(this,"props");m(this,"start");m(this,"end");m(this,"ctx");m(this,"autoProps",!0);m(this,"entangle",!0);m(this,"enableSwitch",!1);m(this,"onAutoPropsAssigned");m(this,"pe");m(this,"emit",(e,n)=>{this.pe.dispatchEvent(new CustomEvent(e,{detail:n}))});this.props=e,this.pe=n,this.ctx=r,this.start=o,this.end=s}unmount(){let e=this.start.nextSibling,n=this.end;for(;e&&e!==n;)V(e),e=e.nextSibling;for(let r of this.ctx)be(r)}};var Te=t=>{let e=t[Ue];if(e)return e;let n={unbinders:[],data:{}};return t[Ue]=n,n};var H=(t,e)=>{Te(t).unbinders.push(e)};var jn={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]})},L=(t,...e)=>{let n=jn[t],r=_(n)?n.call(jn,...e):n,o=et.warning;o&&(B(r)?o(r):o(r,...r.args))},et={warning:console.warn};var J=(t,e)=>{var n;(n=Oe(e))==null||n.onUnmounted.push(t)};var ut=Symbol("ref"),Q=Symbol("sref"),mt=Symbol("raw");var b=t=>(t==null?void 0:t[Q])===1;var O=(t,e,n)=>{if(!b(t))throw D(3,"observe");n&&e(t());let o=t(void 0,void 0,0,e);return J(o,!0),o};var ht={},dt={},Vn=1,$n=t=>{let e=(Vn++).toString();return ht[e]=t,dt[e]=0,e},tn=t=>{dt[t]+=1},nn=t=>{--dt[t]===0&&(delete ht[t],delete dt[t])},Fn=t=>ht[t],rn=()=>Vn!==1&&Object.keys(ht).length>0,tt="r-switch",Eo=t=>{let e=t.filter(r=>Ae(r)).map(r=>[...r.querySelectorAll("[r-switch]")].map(o=>o.getAttribute(tt))),n=new Set;return e.forEach(r=>{r.forEach(o=>o&&n.add(o))}),[...n]},_e=(t,e)=>{if(!rn())return;let n=Eo(e);n.length!==0&&(n.forEach(tn),H(t,()=>{n.forEach(nn)}))};var on=(t,e,n,r)=>{let o=[];for(let s of t){let i=s.cloneNode(!0);n.insertBefore(i,r),o.push(i)}Ce(e,o)},sn=Symbol("r-if"),qn=Symbol("r-else"),zn=t=>t[qn]===1,yt=class{constructor(e){m(this,"p");m(this,"B");m(this,"K");m(this,"z");m(this,"W");m(this,"b");m(this,"T");this.p=e,this.B=e.o.f.if,this.K=Pe(e.o.f.if),this.z=e.o.f.else,this.W=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.B),r=Ee(e,this.K);for(let o of r)this.x(o);return n}G(e){return e[sn]?!0:(e[sn]=!0,Ee(e,this.K).forEach(n=>n[sn]=!0),!1)}x(e){if(e.hasAttribute(this.T)||this.G(e)||this.qe(e,this.b))return;let n=e.getAttribute(this.B);if(!n){L(0,this.B,e);return}e.removeAttribute(this.B),this.L(e,n)}P(e,n,r){let o=Be(e),s=e.parentNode,i=document.createComment(`__begin__ :${n}${r!=null?r:""}`);s.insertBefore(i,e),_e(i,o),o.forEach(c=>{V(c)}),e.remove(),n!=="if"&&(e[qn]=1);let a=document.createComment(`__end__ :${n}${r!=null?r:""}`);return s.insertBefore(a,i.nextSibling),{nodes:o,parent:s,commentBegin:i,commentEnd:a}}ce(e,n){if(!e)return[];let r=e.nextElementSibling;if(e.hasAttribute(this.z)){e.removeAttribute(this.z);let{nodes:o,parent:s,commentBegin:i,commentEnd:a}=this.P(e,"else");return[{mount:()=>{on(o,this.p,s,a)},unmount:()=>{ue(i,a)},isTrue:()=>!0,isMounted:!1}]}else{let o=e.getAttribute(this.W);if(!o)return[];e.removeAttribute(this.W);let{nodes:s,parent:i,commentBegin:a,commentEnd:c}=this.P(e,"elseif",` => ${o} `),p=this.p.h.C(o),f=p.value,l=this.ce(r,n),u=[];H(a,()=>{p.stop();for(let y of u)y();u.length=0});let d=O(f,n);return u.push(d),[{mount:()=>{on(s,this.p,i,c)},unmount:()=>{ue(a,c)},isTrue:()=>!!f()[0],isMounted:!1}].concat(l)}}L(e,n){let r=e.nextElementSibling,{nodes:o,parent:s,commentBegin:i,commentEnd:a}=this.P(e,"if",` => ${n} `),c=this.p.h.C(n),p=c.value,f=!1,l=this.p.h,u=l.V(),h=()=>{l.v(u,()=>{if(p()[0])f||(on(o,this.p,s,a),f=!0),d.forEach(T=>{T.unmount(),T.isMounted=!1});else{ue(i,a),f=!1;let T=!1;for(let k of d)!T&&k.isTrue()?(k.isMounted||(k.mount(),k.isMounted=!0),T=!0):(k.unmount(),k.isMounted=!1)}})},d=this.ce(r,h),y=[];H(i,()=>{c.stop();for(let T of y)T();y.length=0}),h();let C=O(p,h);y.push(C)}};var Be=t=>{let e=pe(t)?t.content.childNodes:[t];return Array.from(e).filter(n=>{let r=n==null?void 0:n.tagName;return r!=="SCRIPT"&&r!=="STYLE"})},Ce=(t,e)=>{for(let n of e)zn(n)||t.H(n)},Ee=(t,e)=>{var r;let n=t.querySelectorAll(e);return(r=t.matches)!=null&&r.call(t,e)?[t,...n]:n},pe=t=>t instanceof HTMLTemplateElement,Ae=t=>t.nodeType===Node.ELEMENT_NODE,nt=t=>t.nodeType===Node.ELEMENT_NODE,Kn=t=>t instanceof HTMLSlotElement,me=t=>pe(t)?t.content.childNodes:t.childNodes,ue=(t,e)=>{let n=t.nextSibling;for(;n!=null&&n!==e;){let r=n.nextSibling;V(n),n=r}},xe=(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})},Wn=(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},Pe=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),an=t=>{let e=Object.create(null);return n=>e[n]||(e[n]=t(n))},Co=/-(\w)/g,P=an(t=>t&&t.replace(Co,(e,n)=>n?n.toUpperCase():"")),xo=/\B([A-Z])/g,je=an(t=>t&&t.replace(xo,"-$1").toLowerCase()),rt=an(t=>t&&t.charAt(0).toUpperCase()+t.slice(1));var bt={};var Tt=t=>{var n,r;let e=(n=lt(t))==null?void 0:n.onMounted;e==null||e.forEach(o=>{o()}),(r=t.mounted)==null||r.call(t)};var cn=Symbol("scope"),Et=t=>{try{Bn();let e=t();en(e);let n={context:e,unmount:()=>be(e),[cn]:1};return n[cn]=1,n}finally{Pn()}},Gn=t=>N(t)?cn in t:!1;var Jn={collectRefObj:!0,onBind:(t,e)=>O(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&&(b(p)?p(c):o[a]=c)}},!0)};var Qn={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&&(b(c)?c(a):r[i]=a)}return()=>{}}};var Xn={collectRefObj:!0,onBind:(t,e,n,r,o,s)=>{if(!r)return()=>{};let i=P(r);return O(e.value,()=>{var l;let c=(l=e.refs[0])!=null?l:e.value()[0],p=e.context,f=p[r];f!==c&&(b(f)?f(c):p[i]=c)},!0)}};var Ct=(t,e)=>{if(t===e)return()=>{};let n=O(t,o=>e(o)),r=O(e,o=>t(o));return e(t()),()=>{n(),r()}};var xt=class{constructor(e){m(this,"p");m(this,"fe");this.p=e,this.fe=e.o.f.inherit}N(e){this.Ke(e)}Ke(e){var l;let n=this.p,r=n.h,o=n.o.le,s=n.o.ue,i=r.me(),a=r.ze(),c=[...o.keys(),...a,...[...o.keys()].map(je),...a.map(je)].join(",");if(z(c))return;let p=e.querySelectorAll(c),f=(l=e.matches)!=null&&l.call(e,c)?[e,...p]:p;for(let u of f){if(u.hasAttribute(n.T))continue;let h=u.parentNode;if(!h)continue;let d=u.nextSibling,y=P(u.tagName).toUpperCase(),R=i[y],C=R!=null?R:s.get(y);if(!C)continue;let T=C.template;if(!T)continue;let k=u.parentElement;if(!k)continue;let U=new Comment(" begin component: "+u.tagName),oe=new Comment(" end component: "+u.tagName);k.insertBefore(U,u),u.remove();let Je=n.o.f.props,Qe=n.o.f.propsOnce,Wt=n.o.f.bind,Xe=(g,A)=>{let x={},W=g.hasAttribute(Je),F=g.hasAttribute(Qe);return r.v(A,()=>{r.S(x),W&&n.x(Jn,g,Je),F&&n.x(Qn,g,Qe);let v=C.props;if(!v||v.length===0)return;v=v.map(P);let q=new Map(v.map(Y=>[Y.toLowerCase(),Y]));for(let Y of v.concat(v.map(je))){let le=g.getAttribute(Y);le!==null&&(x[P(Y)]=le,g.removeAttribute(Y))}let Gt=n.J.de(g,!1);for(let[Y,le]of Gt.entries()){let[Jt,Ln]=le.Q;if(!Ln)continue;let kn=q.get(P(Ln).toLowerCase());kn&&(Jt!=="."&&Jt!==":"&&Jt!==Wt||n.x(Xn,g,Y,!0,kn,le.X))}}),x},ye=[...r.V()],it=()=>{var W;let g=Xe(u,ye),A=new He(g,u,ye,U,oe),x=Et(()=>{var F;return(F=C.context(A))!=null?F:{}}).context;if(A.autoProps){for(let[F,v]of Object.entries(g))if(F in x){let q=x[F];if(q===v)continue;A.entangle&&b(q)&&b(v)&&H(U,Ct(v,q))}else x[F]=v;(W=A.onAutoPropsAssigned)==null||W.call(A)}return{componentCtx:x,head:A}},{componentCtx:we,head:I}=it(),se=[...me(T)],S=se.length,M=u.childNodes.length===0,$=g=>{let A=g.parentElement;if(M){for(let v of[...g.childNodes])A.insertBefore(v,g);return}let x=g.name;z(x)&&(x=g.getAttributeNames().filter(v=>v.startsWith("#"))[0],z(x)?x="default":x=x.substring(1));let W=u.querySelector(`template[name='${x}'], template[\\#${x}]`);!W&&x==="default"&&(W=u.querySelector("template:not([name])"),W&&W.getAttributeNames().filter(v=>v.startsWith("#")).length>0&&(W=null));let F=v=>{I.enableSwitch&&r.v(ye,()=>{r.S(we);let q=Xe(g,r.V());r.v(ye,()=>{r.S(q);let Gt=r.V(),Y=$n(Gt);for(let le of v)Ae(le)&&(le.setAttribute(tt,Y),tn(Y),H(le,()=>{nn(Y)}))})})};if(W){let v=[...me(W)];for(let q of v)A.insertBefore(q,g);F(v)}else{if(x!=="default"){for(let q of[...me(g)])A.insertBefore(q,g);return}let v=[...me(u)].filter(q=>!pe(q));for(let q of v)A.insertBefore(q,g);F(v)}},w=g=>{if(!Ae(g))return;let A=g.querySelectorAll("slot");if(Kn(g)){$(g),g.remove();return}for(let x of A)$(x),x.remove()};(()=>{for(let g=0;g<S;++g)se[g]=se[g].cloneNode(!0),h.insertBefore(se[g],d),w(se[g])})(),k.insertBefore(oe,d);let ie=()=>{if(!C.inheritAttrs)return;let g=se.filter(x=>x.nodeType===Node.ELEMENT_NODE);g.length>1&&(g=g.filter(x=>x.hasAttribute(this.fe)));let A=g[0];if(A)for(let x of u.getAttributeNames()){if(x===Je||x===Qe)continue;let W=u.getAttribute(x);if(x==="class")A.classList.add(...W.split(" "));else if(x==="style"){let F=A.style,v=u.style;for(let q of v)F.setProperty(q,v.getPropertyValue(q))}else A.setAttribute(gt(x,n.o),W)}},De=()=>{for(let g of u.getAttributeNames())!g.startsWith("@")&&!g.startsWith(n.o.f.on)&&u.removeAttribute(g)},Ye=()=>{ie(),De(),r.S(we),n.ye(u,!1),we.$emit=I.emit,Ce(n,se),H(u,()=>{be(we)}),H(U,()=>{ae(u)}),Tt(we)};r.v(ye,Ye)}}};var pn=class{constructor(e){m(this,"he");m(this,"Q",[]);m(this,"X",[]);m(this,"ge",[]);this.he=e,this.C()}C(){let e=this.he,n=e.startsWith(".");n&&(e=":"+e.slice(1));let r=e.indexOf("."),o=this.Q=(r<0?e:e.substring(0,r)).split(/[:@]/);if(z(o[0])&&(o[0]=n?".":e[0]),r>=0){let s=this.X=e.slice(r+1).split(".");if(s.includes("camel")){let i=o.length-1;o[i]=P(o[i])}s.includes("prop")&&(o[0]=".")}}},Rt=class{constructor(e){m(this,"p");m(this,"be");this.p=e,this.be=e.o.We()}de(e,n){let r=new Map;if(!nt(e))return r;let o=this.be,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).ge.push(a)};if(s(e),!n)return r;let i=e.querySelectorAll("*");for(let a of i)s(a);return r}};var Ro=(t,e)=>{for(let n of t){let r=n.cloneNode(!0);e.appendChild(r)}},vt=class{constructor(e){m(this,"p");m(this,"I");m(this,"Te");this.p=e,this.I=e.o.f.is,this.Te=Pe(this.I)+", [is]"}N(e){let n=e.hasAttribute(this.I),r=Ee(e,this.Te);for(let o of r)this.x(o);return n}x(e){let n=e.getAttribute(this.I);if(!n){if(n=e.getAttribute("is"),!n)return;if(!n.startsWith("regor:")){if(!n.startsWith("r-"))return;let r=n.slice(2).trim().toLowerCase();if(!r)return;let o=e.parentNode;if(!o)return;let s=document.createElement(r);for(let i of e.getAttributeNames())i!=="is"&&s.setAttribute(i,e.getAttribute(i));for(;e.firstChild;)s.appendChild(e.firstChild);o.insertBefore(s,e),e.remove(),this.p.H(s);return}n=`'${n.slice(6)}'`,e.removeAttribute("is")}e.removeAttribute(this.I),this.L(e,n)}P(e,n){let r=Be(e),o=e.parentNode,s=document.createComment(`__begin__ dynamic ${n!=null?n:""}`);o.insertBefore(s,e),_e(s,r),r.forEach(a=>{V(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}}L(e,n){let{nodes:r,parent:o,commentBegin:s,commentEnd:i}=this.P(e,` => ${n} `),a=this.p.h.C(n),c=a.value,p=this.p.h,f=p.V(),l={name:""},u=pe(e)?r:[...r[0].childNodes],h=()=>{p.v(f,()=>{var k;let C=c()[0];if(N(C)&&(C.name?C=C.name:C=(k=Object.entries(p.me()).filter(U=>U[1]===C)[0])==null?void 0:k[0]),!B(C)||z(C)){ue(s,i);return}if(l.name===C)return;ue(s,i);let T=document.createElement(C);for(let U of e.getAttributeNames())U!==this.I&&T.setAttribute(U,e.getAttribute(U));Ro(u,T),o.insertBefore(T,i),this.p.H(T),l.name=C})},d=[];H(s,()=>{a.stop();for(let C of d)C();d.length=0}),h();let R=O(c,h);d.push(R)}};var re=[],Yn=t=>{var e;re.length!==0&&((e=re[re.length-1])==null||e.add(t))},Me=t=>{if(!t)return()=>{};let e={stop:()=>{}};return vo(t,e),J(()=>e.stop(),!0),e.stop},vo=(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(re.push(s),t(i=>n.push(i)),r)return;for(let i of[...s]){let a=O(i,()=>{o(),Me(t)});n.push(a)}}finally{re.pop()}},St=t=>{let e=re.length,n=e>0&&re[e-1];try{return n&&re.push(null),t()}finally{n&&re.pop()}},wt=t=>{try{let e=new Set;return re.push(e),{value:t(),refs:[...e]}}finally{re.pop()}};var Ve=t=>!!t&&t[mt]===1;var K=(t,e,n)=>{if(!b(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)K(s,e,!0);else if(ge(o))for(let s of o)K(s[0],e,!0),K(s[1],e,!0);if(N(o))for(let s in o)K(o[s],e,!0)}};function So(t,e,n){Object.defineProperty(t,e,{value:n,enumerable:!1,writable:!0,configurable:!0})}var $e=(t,e,n)=>{n.forEach(function(r){let o=t[r];So(e,r,function(...i){let a=o.apply(this,i),c=this[Q];for(let p of c)K(p);return a})})},Ot=(t,e)=>{Object.defineProperty(t,Symbol.toStringTag,{value:e,writable:!1,enumerable:!1,configurable:!0})};var Zn=Array.prototype,fn=Object.create(Zn),wo=["push","pop","shift","unshift","splice","sort","reverse"];$e(Zn,fn,wo);var er=Map.prototype,At=Object.create(er),Oo=["set","clear","delete"];Ot(At,"Map");$e(er,At,Oo);var tr=Set.prototype,Nt=Object.create(tr),Ao=["add","clear","delete"];Ot(Nt,"Set");$e(tr,Nt,Ao);var fe={},G=t=>{if(b(t)||Ve(t))return t;let e={auto:!0,_value:t},n=c=>N(c)?Q in c?!0:E(c)?(Object.setPrototypeOf(c,fn),!0):Z(c)?(Object.setPrototypeOf(c,Nt),!0):ge(c)?(Object.setPrototypeOf(c,At),!0):!1:!1,r=n(t),o=new Set,s=(c,p)=>{if(fe.stack&&fe.stack.length){fe.stack[fe.stack.length-1].add(a);return}o.size!==0&&St(()=>{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],l=c[1];return 0 in c?e._value===f||b(f)&&(f=f(),e._value===f)?f:(n(f)&&i(f),e._value=f,e.auto&&s(f,l),e._value):(Yn(a),e._value)}switch(c[2]){case 0:{let f=c[3];if(!f)return()=>{};let l=u=>{o.delete(u)};return o.add(f),()=>{l(f)}}case 1:{let f=c[1],l=e._value;s(l,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,xe(a,!1),r&&i(t),a};var j=t=>b(t)?t():t;var ot=class{constructor(e){m(this,"E",[]);m(this,"_",new Map);m(this,"Y");this.Y=e}get w(){return this.E.length}Z(e){let n=this.Y(e.value);n!==void 0&&this._.set(n,e)}ee(e){var r;let n=this.Y((r=this.E[e])==null?void 0:r.value);n!==void 0&&this._.delete(n)}static Ge(e,n){return{items:[],index:e,value:n,order:-1}}S(e){e.order=this.w,this.E.push(e),this.Z(e)}Je(e,n){let r=this.w;for(let o=e;o<r;++o)this.E[o].order=o+1;n.order=e,this.E.splice(e,0,n),this.Z(n)}D(e){return this.E[e]}te(e,n){this.ee(e),this.E[e]=n,this.Z(n),n.order=e}xe(e){this.ee(e),this.E.splice(e,1);let n=this.w;for(let r=e;r<n;++r)this.E[r].order=r}Ee(e){let n=this.w;for(let r=e;r<n;++r)this.ee(r);this.E.splice(e)}Ct(e){return this._.has(e)}Qe(e){var r;let n=this._.get(e);return(r=n==null?void 0:n.order)!=null?r:-1}};var ln=Symbol("r-for"),Lt=class Lt{constructor(e){m(this,"p");m(this,"b");m(this,"ne");m(this,"T");this.p=e,this.b=e.o.f.for,this.ne=Pe(this.b),this.T=e.o.f.pre}N(e){let n=e.hasAttribute(this.b),r=Ee(e,this.ne);for(let o of r)this.Xe(o);return n}G(e){return e[ln]?!0:(e[ln]=!0,Ee(e,this.ne).forEach(n=>n[ln]=!0),!1)}Xe(e){if(e.hasAttribute(this.T)||this.G(e))return;let n=e.getAttribute(this.b);if(!n){L(0,this.b,e);return}e.removeAttribute(this.b),this.Ye(e,n)}Re(e){return ne(e)?[]:(_(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))}Ye(e,n){var se;let r=this.Ze(n);if(!(r!=null&&r.list)){L(1,this.b,n,e);return}let o=this.p.o.f.key,s=this.p.o.f.keyBind,i=(se=e.getAttribute(o))!=null?se:e.getAttribute(s);e.removeAttribute(o),e.removeAttribute(s);let a=i?S=>{var M;return j((M=j(S))==null?void 0:M[i])}:S=>S,c=(S,M)=>a(S)===a(M),p=Be(e),f=e.parentNode;if(!f)return;let l=`${this.b} => ${n}`,u=new Comment(`__begin__ ${l}`);f.insertBefore(u,e),_e(u,p),p.forEach(S=>{V(S)}),e.remove();let h=new Comment(`__end__ ${l}`);f.insertBefore(h,u.nextSibling);let d=this.p,y=d.h,R=y.V(),C=(S,M,$)=>{let w=r.createContext(M,S),te=ot.Ge(w.index,M);return y.v(R,()=>{y.S(w.ctx);let ie=$.previousSibling,De=[];for(let Ye of p){let g=Ye.cloneNode(!0);f.insertBefore(g,$),De.push(g)}for(Ce(d,De),ie=ie.nextSibling;ie!==$;)te.items.push(ie),ie=ie.nextSibling}),te},T=(S,M)=>{let $=I.D(S).items,w=$[$.length-1].nextSibling;for(let te of $)V(te);I.te(S,C(S,M,w))},k=(S,M)=>{I.S(C(S,M,h))},U=S=>{for(let M of I.D(S).items)V(M)},oe=S=>{let M=I.w;for(let $=S;$<M;++$)I.D($).index($)},Je=S=>{let M=I.w;_(S)&&(S=S());let $=j(S[0]);if(E($)&&$.length===0){ue(u,h),I.Ee(0);return}let w=0,te=Number.MAX_SAFE_INTEGER,ie=M,De=this.p.o.forGrowThreshold,Ye=()=>I.w<ie+De;for(let A of this.Re(S[0])){let x=()=>{if(w<M){let W=I.D(w++);if(c(W.value,A))return;let F=I.Qe(a(A));if(F>=w&&F-w<10){if(--w,te=Math.min(te,w),U(w),I.xe(w),--M,F>w+1)for(let v=w;v<F-1&&v<M&&!c(I.D(w).value,A);)++v,U(w),I.xe(w),--M;x();return}Ye()?(I.Je(w-1,C(w,A,I.D(w-1).items[0])),te=Math.min(te,w-1),++M):T(w-1,A)}else k(w++,A)};x()}let g=w;for(M=I.w;w<M;)U(w++);I.Ee(g),oe(te)},Qe=()=>{it=O(ye,Je)},Wt=()=>{Xe.stop(),it()},Xe=y.C(r.list),ye=Xe.value,it,we=0,I=new ot(a);for(let S of this.Re(ye()[0]))I.S(C(we++,S,h));H(u,Wt),Qe()}Ze(e){var c,p;let n=Lt.et.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,l)=>{let u={},h=j(f);if(!a&&r.length===1)u[r[0]]=f;else if(E(h)){let y=0;for(let R of r)u[R]=h[y++]}else for(let y of r)u[y]=h[y];let d={ctx:u,index:G(-1)};return s&&(d.index=u[s.startsWith("#")?s.substring(1):s]=G(l)),d}}}};m(Lt,"et",/\{?\[?\(?([^)}\]]+)\)?\]?\}?([^)]+)?\s+\b(?:in|of)\b\s+(.*)\s*$/);var Mt=Lt;var kt=class{constructor(e){m(this,"h");m(this,"Ce");m(this,"ve");m(this,"Se");m(this,"we");m(this,"J");m(this,"o");m(this,"T");m(this,"Oe");this.h=e,this.o=e.o,this.ve=new Mt(this),this.Ce=new yt(this),this.Se=new vt(this),this.we=new xt(this),this.J=new Rt(this),this.T=this.o.f.pre,this.Oe=this.o.f.dynamic}tt(e){let n=pe(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);Ce(this,i)}}H(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.tt(e),this.ye(e,!0))}ye(e,n){var s;let r=this.J.de(e,n),o=this.o.j;for(let[i,a]of r.entries()){let[c,p]=a.Q,f=(s=o[i])!=null?s:o[c];if(!f){console.error("directive not found:",c);continue}a.ge.forEach(l=>{this.x(f,l,i,!1,p,a.X)})}}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(tt);return f||(p.parentElement?c(p.parentElement):null)};if(rn()){let p=c(n);if(p){this.h.v(Fn(p),()=>{this.L(e,n,a,s,i)});return}}this.L(e,n,a,s,i)}nt(e,n,r){if(e!==bt)return!1;if(z(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,H(i,()=>{V(n)}),o.appendChild(n)}return!0}L(e,n,r,o,s){var R;if(n.nodeType!==Node.ELEMENT_NODE||r==null||this.nt(e,n,r))return;let i=this.h.C(r,e.isLazy,e.isLazyKey,e.collectRefObj,e.once),a=[];H(n,()=>{i.stop(),f==null||f.stop();for(let C of a)C();a.length=0});let p=Wn(o,this.Oe),f;p&&(f=this.h.C(P(p),void 0,void 0,void 0,e.once));let l,u=()=>(l=i.value(),l),h,d=()=>f?(h=f.value()[0],h):(h=o,o),y=()=>{if(!e.onChange)return;let C=O(i.value,T=>{var oe;let k=l,U=h;(oe=e.onChange)==null||oe.call(e,n,u(),k,d(),U,s)});if(a.push(C),f){let T=O(f.value,k=>{var oe;let U=h;(oe=e.onChange)==null||oe.call(e,n,u(),U,d(),U,s)});a.push(T)}};e.once||y(),e.onBind&&a.push(e.onBind(n,i,r,o,f,s)),(R=e.onChange)==null||R.call(e,n,u(),void 0,d(),void 0,s)}};var nr="http://www.w3.org/1999/xlink",No={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 Mo(t){return!!t||t===""}var un={onChange:(t,e,n,r,o,s)=>{var a;if(r){s&&s.includes("camel")&&(r=P(r)),It(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],l=p[0],u=p[1];It(t,l,u,f)}else if(N(p))for(let f of Object.entries(p)){let l=f[0],u=f[1],h=n==null?void 0:n[c],d=h&&l in h?l:void 0;It(t,l,u,d)}else{let f=n==null?void 0:n[c],l=e[c++],u=e[c];It(t,l,u,f)}}}},It=(t,e,n,r)=>{if(r&&r!==e&&t.removeAttribute(r),ne(e)){L(3,name,t);return}if(!B(e)){L(6,`Attribute key is not string at ${t.outerHTML}`,e);return}if(e.startsWith("xlink:")){ne(n)?t.removeAttributeNS(nr,e.slice(6,e.length)):t.setAttributeNS(nr,e,n);return}let o=e in No;ne(n)||o&&!Mo(n)?t.removeAttribute(e):t.setAttribute(e,o?"":n)};var mn={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)rr(t,s[c],i==null?void 0:i[c])}else rr(t,s,i)}}},rr=(t,e,n)=>{let r=t.classList,o=B(e),s=B(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 or={onChange:(t,e)=>{let[n,r]=e;_(r)?r(t,n):t.innerHTML=n==null?void 0:n.toString()}};function Lo(t,e){if(t.length!==e.length)return!1;let n=!0;for(let r=0;n&&r<t.length;r++)n=de(t[r],e[r]);return n}function de(t,e){if(t===e)return!0;let n=Yt(t),r=Yt(e);if(n||r)return n&&r?t.getTime()===e.getTime():!1;if(n=Ze(t),r=Ze(e),n||r)return t===e;if(n=E(t),r=E(e),n||r)return n&&r?Lo(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||!de(t[i],e[i]))return!1}}return String(t)===String(e)}function Dt(t,e){return t.findIndex(n=>de(n,e))}var sr=t=>{let e=parseFloat(t);return isNaN(e)?t:e};var Ut=t=>{if(!b(t))throw D(3,"pause");t(void 0,void 0,3)};var Ht=t=>{if(!b(t))throw D(3,"resume");t(void 0,void 0,4)};var ar={onChange:(t,e)=>{ko(t,e[0])},onBind:(t,e,n,r,o,s)=>Io(t,e,s)},ko=(t,e)=>{let n=lr(t);if(n&&cr(t))E(e)?e=Dt(e,he(t))>-1:Z(e)?e=e.has(he(t)):e=Po(t,e),t.checked=e;else if(n&&pr(t))t.checked=de(e,he(t));else if(n||ur(t))fr(t)?t.value!==(e==null?void 0:e.toString())&&(t.value=e):t.value!==e&&(t.value=e);else if(mr(t)){let r=t.options,o=r.length,s=t.multiple;for(let i=0;i<o;i++){let a=r[i],c=he(a);if(s)E(e)?a.selected=Dt(e,c)>-1:a.selected=e.has(c);else if(de(he(a),e)){t.selectedIndex!==i&&(t.selectedIndex=i);return}}!s&&t.selectedIndex!==-1&&(t.selectedIndex=-1)}else L(7,t)},st=t=>(b(t)&&(t=t()),_(t)&&(t=t()),t?B(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}),cr=t=>t.type==="checkbox",pr=t=>t.type==="radio",fr=t=>t.type==="number"||t.type==="range",lr=t=>t.tagName==="INPUT",ur=t=>t.tagName==="TEXTAREA",mr=t=>t.tagName==="SELECT",Io=(t,e,n)=>{let r=e.value,o=st(n==null?void 0:n.join(",")),s=st(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 L(8,t),()=>{};let c=lr(t);return c&&cr(t)?Uo(t,a):c&&pr(t)?jo(t,a):c||ur(t)?Do(t,i,a,r):mr(t)?Vo(t,a,r):(L(7,t),()=>{})},ir=/[.,' ·٫]/,Do=(t,e,n,r)=>{let s=e.lazy?"change":"input",i=fr(t),a=()=>{!e.trim&&!st(r()[1]).trim||(t.value=t.value.trim())},c=u=>{let h=u.target;h.composing=1},p=u=>{let h=u.target;h.composing&&(h.composing=0,h.dispatchEvent(new Event(s)))},f=()=>{t.removeEventListener(s,l),t.removeEventListener("change",a),t.removeEventListener("compositionstart",c),t.removeEventListener("compositionend",p),t.removeEventListener("change",p)},l=u=>{let h=u.target;if(!h||h.composing)return;let d=h.value,y=st(r()[1]);if(i||y.number||y.int){if(y.int)d=parseInt(d);else{if(ir.test(d[d.length-1])&&d.split(ir).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 y.trim&&(d=d.trim());n(d)};return t.addEventListener(s,l),t.addEventListener("change",a),t.addEventListener("compositionstart",c),t.addEventListener("compositionend",p),t.addEventListener("change",p),f},Uo=(t,e)=>{let n="change",r=()=>{t.removeEventListener(n,o)},o=()=>{let s=he(t),i=t.checked,a=e();if(E(a)){let c=Dt(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(Bo(t,i))};return t.addEventListener(n,o),r},he=t=>"_value"in t?t._value:t.value,dr="trueValue",Ho="falseValue",hr="true-value",_o="false-value",Bo=(t,e)=>{let n=e?dr:Ho;if(n in t)return t[n];let r=e?hr:_o;return t.hasAttribute(r)?t.getAttribute(r):e},Po=(t,e)=>{if(dr in t)return de(e,t.trueValue);let r=hr;return t.hasAttribute(r)?de(e,t.getAttribute(r)):de(e,!0)},jo=(t,e)=>{let n="change",r=()=>{t.removeEventListener(n,o)},o=()=>{let s=he(t);e(s)};return t.addEventListener(n,o),r},Vo=(t,e,n)=>{let r="change",o=()=>{t.removeEventListener(r,s)},s=()=>{let a=st(n()[1]).number,c=Array.prototype.filter.call(t.options,p=>p.selected).map(p=>a?sr(he(p)):he(p));if(t.multiple){let p=e();try{if(Ut(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{Ht(e),K(e)}}else e(c[0])};return t.addEventListener(r,s),o};var $o=["stop","prevent","capture","self","once","left","right","middle","passive"],Fo=t=>{let e={};if(z(t))return;let n=t.split(",");for(let r of $o)e[r]=n.includes(r);return e},hn={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,l;if(o){let u=e.value(),h=j(o.value()[0]);return B(h)?dn(t,P(h),()=>e.value()[0],(f=s==null?void 0:s.join(","))!=null?f:u[1]):()=>{}}else if(r){let u=e.value();return dn(t,P(r),()=>e.value()[0],(l=s==null?void 0:s.join(","))!=null?l:u[1])}let i=[],a=()=>{i.forEach(u=>u())},c=e.value(),p=c.length;for(let u=0;u<p;++u){let h=c[u];if(_(h)&&(h=h()),N(h))for(let d of Object.entries(h)){let y=d[0],R=()=>{let T=e.value()[u];return _(T)&&(T=T()),T=T[y],_(T)&&(T=T()),T},C=h[y+"_flags"];i.push(dn(t,y,R,C))}else L(2,name,t)}return a}},qo=(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]},dn=(t,e,n,r)=>{if(z(e))return L(5,name,t),()=>{};let o=Fo(r),s=o?{capture:o.capture,passive:o.passive,once:o.once}:void 0,i;[e,i]=qo(e,r);let a=f=>{if(!i(f)||!n&&e==="submit"&&(o!=null&&o.prevent))return;let l=n(f);_(l)&&(l=l(f)),_(l)&&l(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 yr={onChange:(t,e,n,r,o,s)=>{if(r){s&&s.includes("camel")&&(r=P(r)),Fe(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];Fe(t,p,f)}else if(N(c))for(let p of Object.entries(c)){let f=p[0],l=p[1];Fe(t,f,l)}else{let p=e[a++],f=e[a];Fe(t,p,f)}}}};function zo(t){return!!t||t===""}var Fe=(t,e,n)=>{if(ne(e)){L(3,name,t);return}if(e==="innerHTML"||e==="textContent"){let s=[...t.childNodes];setTimeout(()=>s.forEach(ae),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=zo(n):n==null&&s==="string"?(n="",o=!0):s==="number"&&(n=0,o=!0)}try{t[e]=n}catch(s){o||L(4,e,r,n,s)}o&&t.removeAttribute(e)};var gr={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 br={onChange:(t,e)=>{let n=Te(t).data,r=n._ord;Hn(r)&&(r=n._ord=t.style.display),!!e[0]?t.style.display=r:t.style.display="none"}};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)Tr(t,s[c],i==null?void 0:i[c])}else Tr(t,s,i)}}},Tr=(t,e,n)=>{let r=t.style,o=B(e);if(e&&!o){if(n&&!B(n))for(let s in n)e[s]==null&&gn(r,s,"");for(let s in e)gn(r,s,e[s])}else{let s=r.display;if(o?n!==e&&(r.cssText=e):n&&t.removeAttribute("style"),"_ord"in Te(t).data)return;r.display=s}},Er=/\s*!important$/;function gn(t,e,n){if(E(n))n.forEach(r=>{gn(t,e,r)});else if(n==null&&(n=""),e.startsWith("--"))t.setProperty(e,n);else{let r=Ko(t,e);Er.test(n)?t.setProperty(je(r),n.replace(Er,""),"important"):t[r]=n}}var Cr=["Webkit","Moz","ms"],yn={};function Ko(t,e){let n=yn[e];if(n)return n;let r=P(e);if(r!=="filter"&&r in t)return yn[e]=r;r=rt(r);for(let o=0;o<Cr.length;o++){let s=Cr[o]+r;if(s in t)return yn[e]=s}return e}var X=t=>xr(j(t)),xr=(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(ge(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 j(e.get(t));let n=pt({},t);e.set(t,n);for(let r of Object.entries(n))n[r[0]]=xr(j(r[1]),e);return n};var Rr={onChange:(t,e)=>{var r;let n=e[0];t.textContent=Z(n)?JSON.stringify(X([...n])):ge(n)?JSON.stringify(X([...n])):N(n)?JSON.stringify(X(n)):(r=n==null?void 0:n.toString())!=null?r:""}};var vr={onChange:(t,e)=>{Fe(t,"value",e[0])}};var Le=t=>(t==null?void 0:t[ut])===1;var Re=t=>{if(Ve(t))return t;let e;if(b(t)?(e=t,t=e()):e=G(t),t instanceof Node||t instanceof Date||t instanceof RegExp||t instanceof Promise||t instanceof Error)return e;if(e[ut]=1,E(t)){let n=t.length;for(let r=0;r<n;++r){let o=t[r];Le(o)||(t[r]=Re(o))}return e}if(!N(t))return e;for(let n of Object.entries(t)){let r=n[1];if(Le(r))continue;let o=n[0];Ze(o)||(t[o]=null,t[o]=Re(r))}return e};var ve=class ve{constructor(e){m(this,"j",{});m(this,"f",{});m(this,"We",()=>Object.keys(this.j).filter(e=>e.length===1||!e.startsWith(":")));m(this,"le",new Map);m(this,"ue",new Map);m(this,"forGrowThreshold",10);m(this,"globalContext");m(this,"useInterpolation",!0);if(this.setDirectives("r-"),e){this.globalContext=e;return}this.globalContext=this.ot()}static getDefault(){var e;return(e=ve.Ae)!=null?e:ve.Ae=new ve}ot(){let e={},n=globalThis;for(let r of ve.rt.split(","))e[r]=n[r];return e.ref=Re,e.sref=G,e.flatten=X,e}addComponent(...e){for(let n of e){if(!n.defaultName){et.warning("Registered component's default name is not defined",n);continue}this.le.set(rt(n.defaultName),n),this.ue.set(rt(n.defaultName).toLocaleUpperCase(),n)}}setDirectives(e){this.j={".":yr,":":un,"@":hn,[`${e}on`]:hn,[`${e}bind`]:un,[`${e}html`]:or,[`${e}text`]:Rr,[`${e}show`]:br,[`${e}model`]:ar,":style":bn,[`${e}bind:style`]:bn,":class":mn,[`${e}bind:class`]:mn,":ref":gr,":value":vr,[`${e}teleport`]:bt},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.j,this.f)}};m(ve,"Ae"),m(ve,"rt","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 ee=ve;var _t=(t,e)=>{if(!t)return;let r=(e!=null?e:ee.getDefault()).f,o=/(\{\{[^]*?\}\}|\[\[[^]*?\]\])/g,s=[{start:"{{",end:"}}"},{start:"[[",end:"]]"}];for(let i of Go(t,r.pre,s))Wo(i,r.text,o,s)},Wo=(t,e,n,r)=>{var c;let o=t.textContent;if(!o)return;let s=n,i=o.split(s);if(i.length<=1)return;if(((c=t.parentElement)==null?void 0:c.childNodes.length)===1&&i.length===3){let p=i[1],f=Sr(p,r);if(f&&z(i[0])&&z(i[2])){let l=t.parentElement;l.setAttribute(e,p.substring(f.start.length,p.length-f.end.length)),l.innerText="";return}}let a=document.createDocumentFragment();for(let p of i){let f=Sr(p,r);if(f){let l=document.createElement("span");l.setAttribute(e,p.substring(f.start.length,p.length-f.end.length)),a.appendChild(l)}else a.appendChild(document.createTextNode(p))}t.replaceWith(a)},Go=(t,e,n)=>{let r=[],o=s=>{var i;if(s.nodeType===Node.TEXT_NODE)n.some(a=>{var c;return(c=s.textContent)==null?void 0:c.includes(a.start)})&&r.push(s);else{if((i=s==null?void 0:s.hasAttribute)!=null&&i.call(s,e))return;for(let a of me(s))o(a)}};return o(t),r},Sr=(t,e)=>e.find(n=>t.startsWith(n.start)&&t.endsWith(n.end));var Jo=9,Qo=10,Xo=13,Yo=32,Se=46,Bt=44,Zo=39,es=34,Pt=40,qe=41,jt=91,Vt=93,Tn=63,ts=59,wr=58,ns=123,$t=125,Cn=43,rs=45,Or=96,Ar=47,os=92,Nr=[2,3],Mr=[Cn,rs],Hr={"-":1,"!":1,"~":1,"+":1,new:1},_r={"=":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},Ke=Un(pt({"=>":2},_r),{"||":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}),Br=Object.keys(_r),ss=new Set(Br),Ft=new Set;Ft.add("=>");Br.forEach(t=>Ft.add(t));var is=new Set(["$","_"]),Lr={true:!0,false:!1,null:null},as="this";function Pr(t){return Math.max(0,...Object.keys(t).map(e=>e.length))}var cs=Pr(Hr),ps=Pr(Ke),We="Expected ",ke="Unexpected ",Rn="Unclosed ",fs=We+":",kr=We+"expression",ls="missing }",us=ke+"object property",ms=Rn+"(",Ir=We+"comma",Dr=ke+"token ",ds=ke+"period",En=We+"expression after ",hs="missing unaryOp argument",ys=Rn+"[",gs=We+"exponent (",bs="Variable names cannot start with a number (",Ts=Rn+'quote after "';var ze=t=>t>=48&&t<=57,Ur=t=>Ke[t]||0,xn=class{constructor(e){m(this,"st",{0:[this.it],1:[this.at,this.pt,this.ct],2:[this.ft,this.lt,this.ut,this.Ne,this.mt],3:[this.dt,this.yt,this.ht]});m(this,"r");m(this,"e");this.r=e,this.e=0}get M(){return this.r.charAt(this.e)}get l(){return this.r.charCodeAt(this.e)}m(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 Ke)||is.has(n)}re(e){return this.U(e)||ze(e)}i(e){return new Error(`${e} at character ${this.e}`)}k(e,n,r){let o=this.st[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===Yo||e===Jo||e===Qo||e===Xo;)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===ts||r===Bt)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(ke+'"'+this.M+'"')}}}return n}O(){var n;let e=(n=this.k(0,1))!=null?n:this.Me();return this.y(),this.k(1,0,e)}se(){this.y();let e=this.e,n=this.r,r=n.substr(e,ps),o=r.length;for(;o>0;){if(r in Ke&&(!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}Me(){let e,n,r,o,s,i,a,c;if(s=this.$(),!s||(n=this.se(),!n))return s;if(o={value:n,prec:Ur(n),right_a:Ft.has(n)},i=this.$(),!i)throw this.i(En+n);let p=[s,o,i];for(;n=this.se();){if(r=Ur(n),r===0){this.e-=n.length;break}o={value:n,prec:r,right_a:Ft.has(n)},c=n;let f=l=>o.right_a&&l.right_a?r>l.prec:r<=l.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.$(),!e)throw this.i(En+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}$(){let e,n,r;if(this.y(),r=this.k(2,1),r)return this.k(3,0,r);let o=this.l;if(ze(o)||o===Se)return this.gt();if(o===Zo||o===es)r=this.bt();else if(o===jt)r=this.Tt();else{for(e=this.r.substr(this.e,cs),n=e.length;n>0;){if(Object.prototype.hasOwnProperty.call(Hr,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.$();if(!s)throw this.i(hs);return this.k(3,0,{type:7,operator:e,argument:s})}e=e.substr(0,--n)}this.U(o)?(r=this.ie(),r.name in Lr?r={type:4,value:Lr[r.name],raw:r.name}:r.name===as&&(r={type:5})):o===Pt&&(r=this.xt())}return r?(r=this.F(r),this.k(3,0,r)):this.k(3,0,!1)}F(e){this.y();let n=this.l;for(;n===Se||n===jt||n===Pt||n===Tn;){let r;if(n===Tn){if(this.r.charCodeAt(this.e+1)!==Se)break;r=!0,this.e+=2,this.y(),n=this.l}if(this.e++,n===jt){if(e={type:3,computed:!0,object:e,property:this.O()},this.y(),n=this.l,n!==Vt)throw this.i(ys);this.e++}else n===Pt?e={type:6,arguments:this.ke(qe),callee:e}:(n===Se||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}gt(){let e="",n;for(;ze(this.l);)e+=this.r.charAt(this.e++);if(this.m(Se))for(e+=this.r.charAt(this.e++);ze(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++));ze(this.l);)e+=this.r.charAt(this.e++);if(!ze(this.r.charCodeAt(this.e-1)))throw this.i(gs+e+this.M+")")}let r=this.l;if(this.U(r))throw this.i(bs+e+this.M+")");if(r===Se||e.length===1&&e.charCodeAt(0)===Se)throw this.i(ds);return{type:4,value:parseFloat(e),raw:e}}bt(){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
- `;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(Ts+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(ke+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)}}ke(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===qe&&o&&o>=n.length)throw this.i(Dr+String.fromCharCode(e));break}else if(s===Bt){if(this.e++,o++,o!==n.length){if(e===qe)throw this.i(Dr+",");if(e===Vt)for(let i=n.length;i<o;i++)n.push(null)}}else{if(n.length!==o&&o!==0)throw this.i(Ir);{let i=this.O();if(!i||i.type===0)throw this.i(Ir);n.push(i)}}}if(!r)throw this.i(We+String.fromCharCode(e));return n}xt(){this.e++;let e=this.oe(qe);if(this.m(qe))return this.e++,e.length===1?e[0]:e.length?{type:1,expressions:e}:!1;throw this.i(ms)}Tt(){return this.e++,{type:9,elements:this.ke(Vt)}}ft(e){if(this.m(ns)){this.e++;let n=[];for(;!isNaN(this.l);){if(this.y(),this.m($t)){this.e++,e.node=this.F({type:10,properties:n});return}let r=this.O();if(!r)break;if(this.y(),r.type===2&&(this.m(Bt)||this.m($t)))n.push({type:12,computed:!1,key:r,value:r,shorthand:!0});else if(this.m(wr)){this.e++;let o=this.O();if(!o)throw this.i(us);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.m(Bt)&&this.e++}throw this.i(ls)}}lt(e){let n=this.l;if(Mr.some(r=>r===n&&r===this.r.charCodeAt(this.e+1))){this.e+=2;let r=e.node={type:13,operator:n===Cn?"++":"--",argument:this.F(this.ie()),prefix:!0};if(!r.argument||!Nr.includes(r.argument.type))throw this.i(ke+r.operator)}}yt(e){if(e.node){let n=this.l;if(Mr.some(r=>r===n&&r===this.r.charCodeAt(this.e+1))){if(!Nr.includes(e.node.type))throw this.i(ke+e.node.operator);this.e+=2,e.node={type:13,operator:n===Cn?"++":"--",argument:e.node,prefix:!1}}}}ut(e){[0,1,2].every(n=>this.r.charCodeAt(this.e+n)===Se)&&(this.e+=3,e.node={type:14,argument:this.O()})}ct(e){if(e.node&&this.m(Tn)){this.e++;let n=e.node,r=this.O();if(!r)throw this.i(kr);if(this.y(),this.m(wr)){this.e++;let o=this.O();if(!o)throw this.i(kr);if(e.node={type:11,test:n,consequent:r,alternate:o},n.operator&&Ke[n.operator]<=.9){let s=n;for(;s.right.operator&&Ke[s.right.operator]<=.9;)s=s.right;e.node.test=s.right,s.right=e.node,e.node=n}}else throw this.i(fs)}}it(e){if(this.y(),this.m(Pt)){let n=this.e;if(this.e++,this.y(),this.m(qe)){this.e++;let r=this.se();if(r==="=>"){let o=this.Me();if(!o)throw this.i(En+r);e.node={type:15,params:null,body:o};return}}this.e=n}}at(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))}pt(e){e.node&&this.q(e.node)}q(e){ss.has(e.operator)?(e.type=16,this.q(e.left),this.q(e.right)):e.operator||Object.values(e).forEach(n=>{n&&typeof n=="object"&&this.q(n)})}ht(e){if(!e.node)return;let n=e.node.type;(n===2||n===3)&&this.m(Or)&&(e.node={type:17,tag:e.node,quasi:this.Ne(e)})}Ne(e){if(!this.m(Or))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.m($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 `")}dt(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}mt(e){if(!this.m(Ar))return;let n=++this.e,r=!1;for(;this.e<this.r.length;){if(this.l===Ar&&!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.F(e.node),e.node}this.m(jt)?r=!0:r&&this.m(Vt)&&(r=!1),this.e+=this.m(os)?2:1}throw this.i("Unclosed Regex")}},jr=t=>new xn(t).parse();var Es={"=>":(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)},Cs={"-":t=>-t,"+":t=>+t,"!":t=>!t,"~":t=>~t,new:t=>t},qr=t=>{if(!(t!=null&&t.some(Fr)))return t;let e=[];return t.forEach(n=>Fr(n)?e.push(...n):e.push(n)),e},Vr=(...t)=>qr(t),vn=(t,e)=>{if(!t)return e;let n=Object.create(e!=null?e:{});return n.$event=t,n},xs={"++":(t,e)=>{let n=t[e];if(b(n)){let r=n();return n(++r),r}return++t[e]},"--":(t,e)=>{let n=t[e];if(b(n)){let r=n();return n(--r),r}return--t[e]}},Rs={"++":(t,e)=>{let n=t[e];if(b(n)){let r=n();return n(r+1),r}return t[e]++},"--":(t,e)=>{let n=t[e];if(b(n)){let r=n();return n(r-1),r}return t[e]--}},$r={"=":(t,e,n)=>{let r=t[e];return b(r)?r(n):t[e]=n},"+=":(t,e,n)=>{let r=t[e];return b(r)?r(r()+n):t[e]+=n},"-=":(t,e,n)=>{let r=t[e];return b(r)?r(r()-n):t[e]-=n},"*=":(t,e,n)=>{let r=t[e];return b(r)?r(r()*n):t[e]*=n},"/=":(t,e,n)=>{let r=t[e];return b(r)?r(r()/n):t[e]/=n},"%=":(t,e,n)=>{let r=t[e];return b(r)?r(r()%n):t[e]%=n},"**=":(t,e,n)=>{let r=t[e];return b(r)?r(ct(r(),n)):t[e]=ct(t[e],n)},"<<=":(t,e,n)=>{let r=t[e];return b(r)?r(r()<<n):t[e]<<=n},">>=":(t,e,n)=>{let r=t[e];return b(r)?r(r()>>n):t[e]>>=n},">>>=":(t,e,n)=>{let r=t[e];return b(r)?r(r()>>>n):t[e]>>>=n},"|=":(t,e,n)=>{let r=t[e];return b(r)?r(r()|n):t[e]|=n},"&=":(t,e,n)=>{let r=t[e];return b(r)?r(r()&n):t[e]&=n},"^=":(t,e,n)=>{let r=t[e];return b(r)?r(r()^n):t[e]^=n}},qt=(t,e)=>_(t)?t.bind(e):t,Sn=class{constructor(e,n,r,o,s){m(this,"u");m(this,"Ve");m(this,"Ie");m(this,"De");m(this,"A");m(this,"Ue");m(this,"Be");this.u=E(e)?e:[e],this.Ve=n,this.Ie=r,this.De=o,this.Be=!!s}Pe(e,n){if(n&&e in n)return n;for(let r of this.u)if(e in r)return r}2(e,n,r){let o=e.name;if(o==="$root")return this.u[this.u.length-1];if(o==="$parent")return this.u[1];if(o==="$ctx")return[...this.u];if(r&&o in r)return this.A=r[o],qt(j(r[o]),r);for(let i of this.u)if(o in i)return this.A=i[o],qt(j(i[o]),i);let s=this.Ve;if(s&&o in s)return this.A=s[o],qt(j(s[o]),s)}5(e,n,r){return this.u[0]}0(e,n,r){return this.He(n,r,Vr,...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,qt(j(i),o)}4(e,n,r){return e.value}6(e,n,r){let o=(i,...a)=>_(i)?i(...qr(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,Cs[e.operator],e.argument)}8(e,n,r){let o=Es[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.He(++n,r,Vr,...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=l=>(l==null?void 0:l.type)!==15,i=(f=this.De)!=null?f:()=>!1,a=n===0&&this.Be,c=l=>this._e(a,e.key,n,vn(l,r)),p=l=>this._e(a,e.value,n,vn(l,r));if(e.shorthand){let l=e.key.name;o[l]=s(e.key)&&i(l,n)?c:c()}else if(e.computed){let l=j(c());o[l]=s(e.value)&&i(l,n)?p:p()}else{let l=e.key.type===4?e.key.value:e.key.name;o[l]=s(e.value)&&i(l,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?xs:Rs;if(o.type===2){let a=o.name,c=this.Pe(a,r);return ne(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(ne(a))return;let c=this.g(e.right,n,r);return $r[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 $r[s](i,a,c)}}14(e,n,r){let o=this.g(e.argument,n,r);return E(o)&&(o.s=zr),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=j(this[e.type](e,n,r));return this.Ue=e.type,o}_e(e,n,r,o){let s=this.g(n,r,o);return e&&this.je()?this.A:s}je(){let e=this.Ue;return(e===2||e===3||e===6)&&b(this.A)}eval(e,n){let{value:r,refs:o}=wt(()=>this.g(e,-1,n)),s={value:r,refs:o};return this.je()&&(s.ref=this.A),s}R(e,n,r,...o){let s=o.map(i=>i&&this.g(i,e,n));return r(...s)}He(e,n,r,...o){let s=this.Ie;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,vn(p,n)):this.g(a,e,n)));return r(...i)}},zr=Symbol("s"),Fr=t=>(t==null?void 0:t.s)===zr,Kr=(t,e,n,r,o,s,i)=>new Sn(e,n,r,o,i).eval(t,s);var Wr={},zt=class{constructor(e,n){m(this,"u");m(this,"o");m(this,"$e",[]);this.u=e,this.o=n}S(e){this.u=[e,...this.u]}me(){return this.u.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},{})}ze(){let e=[],n=new Set,r=this.u.map(o=>o.components).filter(o=>!!o).reverse();for(let o of r)for(let s of Object.keys(o))n.has(s)||(n.add(s),e.push(s));return e}C(e,n,r,o,s){var h;let i=G([]),a=[],c=()=>{for(let d of a)d();a.length=0},p={value:i,stop:c,refs:[],context:this.u[0]};if(z(e))return p;let f=this.o.globalContext,l=[],u=(d,y,R,C)=>{try{let T=Kr(d,y,f,n,r,C,o);return R&&l.push(...T.refs),{value:T.value,refs:T.refs,ref:T.ref}}catch(T){L(6,`evaluation error: ${e}`,T)}return{value:void 0,refs:[]}};try{let d=(h=Wr[e])!=null?h:jr("["+e+"]");Wr[e]=d;let y=this.u,R=()=>{l.splice(0),c();let C=d.elements.map((T,k)=>n!=null&&n(k,-1)?{value:U=>u(T,y,!1,{$event:U}).value,refs:[]}:u(T,y,!0));if(!s)for(let T of l){let k=O(T,R);a.push(k)}i(C.map(T=>T.value)),p.refs=C.map(T=>T.ref)};R()}catch(d){L(6,`parse error: ${e}`,d)}return p}V(){return this.u}te(e){this.$e.push(this.u),this.u=e}v(e,n){try{this.te(e),n()}finally{this.Et()}}Et(){var e;this.u=(e=this.$e.pop())!=null?e:[]}};var Gr=t=>{let e=t.charCodeAt(0);return e>=48&&e<=57||e>=65&&e<=90||e>=97&&e<=122||t==="-"||t==="_"||t===":"},vs=(t,e)=>{let n="";for(let r=e;r<t.length;++r){let o=t[r];if(n){o===n&&(n="");continue}if(o==='"'||o==="'"){n=o;continue}if(o===">")return r}return-1},Ss=(t,e)=>{let n=e?2:1;for(;n<t.length&&(t[n]===" "||t[n]===`
4
- `);)++n;if(n>=t.length||!Gr(t[n]))return null;let r=n;for(;n<t.length&&Gr(t[n]);)++n;return{start:r,end:n}},Jr=new Set(["table","thead","tbody","tfoot"]),ws=new Set(["thead","tbody","tfoot"]),Os=new Set(["caption","colgroup","thead","tbody","tfoot","tr"]),Kt=t=>{var s;let e=0,n=[],r=[],o=0;for(;e<t.length;){let i=t.indexOf("<",e);if(i===-1){n.push(t.slice(e));break}if(n.push(t.slice(e,i)),t.startsWith("<!--",i)){let R=t.indexOf("-->",i+4);if(R===-1){n.push(t.slice(i));break}n.push(t.slice(i,R+3)),e=R+3;continue}let a=vs(t,i);if(a===-1){n.push(t.slice(i));break}let c=t.slice(i,a+1),p=c.startsWith("</");if(c.startsWith("<!")||c.startsWith("<?")){n.push(c),e=a+1;continue}let l=Ss(c,p);if(!l){n.push(c),e=a+1;continue}let u=c.slice(l.start,l.end);if(p){let R=r[r.length-1];R?(r.pop(),n.push(R.replacementHost?`</${R.replacementHost}>`:c),Jr.has(R.effectiveTag)&&--o):n.push(c),e=a+1;continue}let h=c.charCodeAt(c.length-2)===47,d=r[r.length-1],y=null;if(o===0?u==="tr"?y="trx":u==="td"?y="tdx":u==="th"&&(y="thx"):ws.has((s=d==null?void 0:d.effectiveTag)!=null?s:"")?y=u==="tr"?null:"tr":(d==null?void 0:d.effectiveTag)==="table"?y=Os.has(u)?null:"tr":(d==null?void 0:d.effectiveTag)==="tr"&&(y=u==="td"||u==="th"?null:"td"),y){let R=y==="trx"||y==="tdx"||y==="thx";n.push(`${c.slice(0,l.start)}${y} is="${R?`r-${u}`:`regor:${u}`}"${c.slice(l.end)}`)}else h&&(d==null?void 0:d.effectiveTag)==="tr"?n.push(`${c.slice(0,c.length-2)}></${u}>`):n.push(c);if(!h){let R=y==="trx"?"tr":y==="tdx"?"td":y==="thx"?"th":y||u;r.push({replacementHost:y,effectiveTag:R}),Jr.has(R)&&++o}e=a+1}return n.join("")};var As="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",Ns=new Set(As.toUpperCase().split(",")),Ms="http://www.w3.org/2000/svg",Qr=(t,e)=>{pe(t)?t.content.appendChild(e):t.appendChild(e)},wn=(t,e,n,r)=>{var i;let o=t.t;if(o){let a=n&&Ns.has(o.toUpperCase())?document.createElementNS(Ms,o.toLowerCase()):document.createElement(o),c=t.a;if(c)for(let f of Object.entries(c)){let l=f[0],u=f[1];l.startsWith("#")&&(u=l.substring(1),l="name"),a.setAttribute(gt(l,r),u)}let p=t.c;if(p)for(let f of p)wn(f,a,n,r);Qr(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)Qr(e,a);else throw new Error("unsupported node type.")}},Ie=(t,e,n)=>{n!=null||(n=ee.getDefault());let r=document.createDocumentFragment();if(!E(t))return wn(t,r,!!e,n),r;for(let o of t)wn(o,r,!!e,n);return r};var Xr=(t,e={selector:"#app"},n)=>{B(e)&&(e={selector:"#app",template:e}),Gn(t)&&(t=t.context);let r=e.element?e.element:e.selector?document.querySelector(e.selector):null;if(!r||!Ae(r))throw D(0);n||(n=ee.getDefault());let o=()=>{for(let a of[...r.childNodes])V(a)},s=a=>{for(let c of a)r.appendChild(c)};if(e.template){let a=document.createRange().createContextualFragment(Kt(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&&_t(r,n),new On(t,r,n).x(),H(r,()=>{be(t)}),Tt(t),{context:t,unmount:()=>{V(r)},unbind:()=>{ae(r)}}},On=class{constructor(e,n,r){m(this,"Rt");m(this,"Fe");m(this,"o");m(this,"h");m(this,"p");this.Rt=e,this.Fe=n,this.o=r,this.h=new zt([e],r),this.p=new kt(this.h)}x(){this.p.H(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=>{var s;return[o,(s=t.getAttribute(o))!=null?s:""]})));let r=me(t);return r.length>0&&(e.c=[...r].map(o=>Ge(o))),e};var Yr=(t,e={})=>{var s,i,a,c,p,f;E(e)&&(e={props:e}),B(t)&&(t={template:t});let n=(s=e.context)!=null?s:()=>({}),r=!1;if(t.element){let l=t.element;l.remove(),t.element=l}else if(t.selector){let l=document.querySelector(t.selector);if(!l)throw D(1,t.selector);l.remove(),t.element=l}else if(t.template){let l=document.createRange().createContextualFragment(Kt(t.template));t.element=l}else t.json&&(t.element=Ie(t.json,t.isSVG,e.config),r=!0);t.element||(t.element=document.createDocumentFragment()),((i=e.useInterpolation)==null||i)&&_t(t.element,(a=e.config)!=null?a:ee.getDefault());let o=t.element;if(!r&&(((p=t.isSVG)!=null?p:nt(o)&&((c=o.hasAttribute)!=null&&c.call(o,"isSVG")))||nt(o)&&o.querySelector("[isSVG]"))){let l=o.content,u=l?[...l.childNodes]:[...o.childNodes],h=Ge(u);t.element=Ie(h,!0,e.config)}return{context:n,template:t.element,inheritAttrs:(f=e.inheritAttrs)!=null?f:!0,props:e.props,defaultName:e.defaultName}};var Zr=t=>{var e;(e=Oe())==null||e.onMounted.push(t)};var eo=t=>{let e,n={},r=(...o)=>{if(o.length<=2&&0 in o)throw D(4);return e&&!n.isStopped?e(...o):(e=Ls(t,n),e(...o))};return r[Q]=1,xe(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},Ls=(t,e)=>{var s;let n=(s=e.ref)!=null?s:G(null);e.ref=n,e.isStopped=!1;let r=0,o=Me(()=>{if(r>0){o(),e.isStopped=!0,K(n);return}n(t()),++r});return n.stop=o,n};var to=(t,e)=>{let n={},r,o=(...s)=>{if(s.length<=2&&0 in s)throw D(4);return r&&!n.isStopped?r(...s):(r=ks(t,e,n),r(...s))};return o[Q]=1,xe(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},ks=(t,e,n)=>{var a;let r=(a=n.ref)!=null?a:G(null);n.ref=r,n.isStopped=!1;let o=0,s=c=>{if(o>0){r.stop(),n.isStopped=!0,K(r);return}r(e(...t.map(p=>p()))),++o},i=[];for(let c of t){let p=O(c,s);i.push(p)}return s(null),r.stop=()=>{i.forEach(c=>{c()})},r};var no=(t,e)=>{let n={},r,o=(...s)=>{if(s.length<=2&&0 in s)throw D(4);return r&&!n.isStopped?r(...s):(r=Is(t,e,n),r(...s))};return o[Q]=1,xe(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},Is=(t,e,n)=>{var s;let r=(s=n.ref)!=null?s:G(null);n.ref=r,n.isStopped=!1;let o=0;return r.stop=O(t,i=>{if(o>0){r.stop(),n.isStopped=!0,K(r);return}r(e(i)),++o},!0),r};var ro=t=>(t[mt]=1,t);var oo=(t,e)=>{if(!e)throw D(5);let r=Le(t)?Re: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){L(6,`persist: failed to parse data for key ${e}`,a),o()}else o();let i=Me(o);return J(i,!0),t};var An=(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},so=An;var io=(t,e,n)=>{let r=[],o=()=>{e(t.map(i=>i()))};for(let i of t)r.push(O(i,o));n&&o();let s=()=>{for(let i of r)i()};return J(s,!0),s};var ao=t=>{if(!b(t))throw D(3,"observerCount");return t(void 0,void 0,2)};var co=t=>{Nn();try{t()}finally{Mn()}},Nn=()=>{fe.stack||(fe.stack=[]),fe.stack.push(new Set)},Mn=()=>{let t=fe.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 fe.stack;for(let n of e)try{K(n)}catch(r){console.error(r)}};
1
+ "use strict";var ct=Object.defineProperty,po=Object.defineProperties,fo=Object.getOwnPropertyDescriptor,lo=Object.getOwnPropertyDescriptors,uo=Object.getOwnPropertyNames,In=Object.getOwnPropertySymbols;var Dn=Object.prototype.hasOwnProperty,mo=Object.prototype.propertyIsEnumerable;var pt=Math.pow,Qt=(t,e,n)=>e in t?ct(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,ft=(t,e)=>{for(var n in e||(e={}))Dn.call(e,n)&&Qt(t,n,e[n]);if(In)for(var n of In(e))mo.call(e,n)&&Qt(t,n,e[n]);return t},Un=(t,e)=>po(t,lo(e));var ho=(t,e)=>{for(var n in e)ct(t,n,{get:e[n],enumerable:!0})},yo=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of uo(e))!Dn.call(t,o)&&o!==n&&ct(t,o,{get:()=>e[o],enumerable:!(r=fo(e,o))||r.enumerable});return t};var go=t=>yo(ct({},"__esModule",{value:!0}),t);var m=(t,e,n)=>Qt(t,typeof e!="symbol"?e+"":e,n);var Ds={};ho(Ds,{ComponentHead:()=>He,RegorConfig:()=>ee,addUnbinder:()=>H,batch:()=>co,collectRefs:()=>wt,computeMany:()=>to,computeRef:()=>no,computed:()=>eo,createApp:()=>Xr,createComponent:()=>Yr,endBatch:()=>Mn,entangle:()=>Ve,flatten:()=>X,getBindData:()=>Te,html:()=>An,isDeepRef:()=>Le,isRaw:()=>$e,isRef:()=>g,markRaw:()=>ro,observe:()=>O,observeMany:()=>io,observerCount:()=>ao,onMounted:()=>Zr,onUnmounted:()=>J,pause:()=>Ut,persist:()=>oo,raw:()=>so,ref:()=>xe,removeNode:()=>V,resume:()=>Ht,silence:()=>St,sref:()=>G,startBatch:()=>Nn,toFragment:()=>Ie,toJsonTemplate:()=>Je,trigger:()=>K,unbind:()=>ae,unref:()=>j,useScope:()=>Ct,warningHandler:()=>tt,watchEffect:()=>Me});module.exports=go(Ds);var Ue=Symbol(":regor");var ae=t=>{let e=[t];for(;e.length>0;){let n=e.shift();bo(n);let r=n.childNodes;if(r)for(let o of r)e.push(o)}},bo=t=>{let e=t[Ue];if(e){for(let n of e.unbinders)n();e.unbinders.splice(0),delete t[Ue]}};var V=t=>{t.remove(),setTimeout(()=>ae(t),1)};var _=t=>typeof t=="function",B=t=>typeof t=="string",Hn=t=>typeof t=="undefined",ne=t=>t==null||typeof t=="undefined",z=t=>typeof t!="string"||!(t!=null&&t.trim()),To=Object.prototype.toString,Xt=t=>To.call(t),ge=t=>Xt(t)==="[object Map]",Z=t=>Xt(t)==="[object Set]",Yt=t=>Xt(t)==="[object Date]",et=t=>typeof t=="symbol",C=Array.isArray,N=t=>t!==null&&typeof t=="object";var _n={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."},D=(t,...e)=>{let n=_n[t];return new Error(_(n)?n.call(_n,...e):n)};var lt=[],Bn=()=>{let t={onMounted:[],onUnmounted:[]};return lt.push(t),t},Oe=t=>{let e=lt[lt.length-1];if(!e&&!t)throw D(2);return e},Pn=t=>{let e=Oe();return t&&en(t),lt.pop(),e},Zt=Symbol("csp"),en=t=>{let e=t,n=e[Zt];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[Zt]=Oe()},ut=t=>t[Zt];var be=t=>{var n,r;let e=(n=ut(t))==null?void 0:n.onUnmounted;e==null||e.forEach(o=>{o()}),(r=t.unmounted)==null||r.call(t)};var He=class{constructor(e,n,r,o,s){m(this,"props");m(this,"start");m(this,"end");m(this,"ctx");m(this,"autoProps",!0);m(this,"entangle",!0);m(this,"enableSwitch",!1);m(this,"onAutoPropsAssigned");m(this,"pe");m(this,"emit",(e,n)=>{this.pe.dispatchEvent(new CustomEvent(e,{detail:n}))});this.props=e,this.pe=n,this.ctx=r,this.start=o,this.end=s}unmount(){let e=this.start.nextSibling,n=this.end;for(;e&&e!==n;)V(e),e=e.nextSibling;for(let r of this.ctx)be(r)}};var Te=t=>{let e=t[Ue];if(e)return e;let n={unbinders:[],data:{}};return t[Ue]=n,n};var H=(t,e)=>{Te(t).unbinders.push(e)};var jn={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]})},L=(t,...e)=>{let n=jn[t],r=_(n)?n.call(jn,...e):n,o=tt.warning;o&&(B(r)?o(r):o(r,...r.args))},tt={warning:console.warn};var J=(t,e)=>{var n;(n=Oe(e))==null||n.onUnmounted.push(t)};var mt=Symbol("ref"),Q=Symbol("sref"),dt=Symbol("raw");var g=t=>(t==null?void 0:t[Q])===1;var O=(t,e,n)=>{if(!g(t))throw D(3,"observe");n&&e(t());let o=t(void 0,void 0,0,e);return J(o,!0),o};var yt={},ht={},Vn=1,$n=t=>{let e=(Vn++).toString();return yt[e]=t,ht[e]=0,e},tn=t=>{ht[t]+=1},nn=t=>{--ht[t]===0&&(delete yt[t],delete ht[t])},Fn=t=>yt[t],rn=()=>Vn!==1&&Object.keys(yt).length>0,nt="r-switch",Eo=t=>{let e=t.filter(r=>Ae(r)).map(r=>[...r.querySelectorAll("[r-switch]")].map(o=>o.getAttribute(nt))),n=new Set;return e.forEach(r=>{r.forEach(o=>o&&n.add(o))}),[...n]},_e=(t,e)=>{if(!rn())return;let n=Eo(e);n.length!==0&&(n.forEach(tn),H(t,()=>{n.forEach(nn)}))};var on=(t,e,n,r)=>{let o=[];for(let s of t){let i=s.cloneNode(!0);n.insertBefore(i,r),o.push(i)}Ce(e,o)},sn=Symbol("r-if"),qn=Symbol("r-else"),zn=t=>t[qn]===1,gt=class{constructor(e){m(this,"p");m(this,"B");m(this,"K");m(this,"z");m(this,"W");m(this,"b");m(this,"T");this.p=e,this.B=e.o.f.if,this.K=Pe(e.o.f.if),this.z=e.o.f.else,this.W=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.B),r=Ee(e,this.K);for(let o of r)this.x(o);return n}G(e){return e[sn]?!0:(e[sn]=!0,Ee(e,this.K).forEach(n=>n[sn]=!0),!1)}x(e){if(e.hasAttribute(this.T)||this.G(e)||this.qe(e,this.b))return;let n=e.getAttribute(this.B);if(!n){L(0,this.B,e);return}e.removeAttribute(this.B),this.L(e,n)}P(e,n,r){let o=Be(e),s=e.parentNode,i=document.createComment(`__begin__ :${n}${r!=null?r:""}`);s.insertBefore(i,e),_e(i,o),o.forEach(c=>{V(c)}),e.remove(),n!=="if"&&(e[qn]=1);let a=document.createComment(`__end__ :${n}${r!=null?r:""}`);return s.insertBefore(a,i.nextSibling),{nodes:o,parent:s,commentBegin:i,commentEnd:a}}ce(e,n){if(!e)return[];let r=e.nextElementSibling;if(e.hasAttribute(this.z)){e.removeAttribute(this.z);let{nodes:o,parent:s,commentBegin:i,commentEnd:a}=this.P(e,"else");return[{mount:()=>{on(o,this.p,s,a)},unmount:()=>{ue(i,a)},isTrue:()=>!0,isMounted:!1}]}else{let o=e.getAttribute(this.W);if(!o)return[];e.removeAttribute(this.W);let{nodes:s,parent:i,commentBegin:a,commentEnd:c}=this.P(e,"elseif",` => ${o} `),p=this.p.h.C(o),f=p.value,l=this.ce(r,n),u=[];H(a,()=>{p.stop();for(let d of u)d();u.length=0});let y=O(f,n);return u.push(y),[{mount:()=>{on(s,this.p,i,c)},unmount:()=>{ue(a,c)},isTrue:()=>!!f()[0],isMounted:!1}].concat(l)}}L(e,n){let r=e.nextElementSibling,{nodes:o,parent:s,commentBegin:i,commentEnd:a}=this.P(e,"if",` => ${n} `),c=this.p.h.C(n),p=c.value,f=!1,l=this.p.h,u=l.V(),h=()=>{l.v(u,()=>{if(p()[0])f||(on(o,this.p,s,a),f=!0),y.forEach(T=>{T.unmount(),T.isMounted=!1});else{ue(i,a),f=!1;let T=!1;for(let k of y)!T&&k.isTrue()?(k.isMounted||(k.mount(),k.isMounted=!0),T=!0):(k.unmount(),k.isMounted=!1)}})},y=this.ce(r,h),d=[];H(i,()=>{c.stop();for(let T of d)T();d.length=0}),h();let R=O(p,h);d.push(R)}};var Be=t=>{let e=pe(t)?t.content.childNodes:[t];return Array.from(e).filter(n=>{let r=n==null?void 0:n.tagName;return r!=="SCRIPT"&&r!=="STYLE"})},Ce=(t,e)=>{for(let n of e)zn(n)||t.H(n)},Ee=(t,e)=>{var r;let n=t.querySelectorAll(e);return(r=t.matches)!=null&&r.call(t,e)?[t,...n]:n},pe=t=>t instanceof HTMLTemplateElement,Ae=t=>t.nodeType===Node.ELEMENT_NODE,rt=t=>t.nodeType===Node.ELEMENT_NODE,Kn=t=>t instanceof HTMLSlotElement,me=t=>pe(t)?t.content.childNodes:t.childNodes,ue=(t,e)=>{let n=t.nextSibling;for(;n!=null&&n!==e;){let r=n.nextSibling;V(n),n=r}},Re=(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})},Wn=(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},Pe=t=>`[${CSS.escape(t)}]`,bt=(t,e)=>(t.startsWith("@")&&(t=e.f.on+":"+t.slice(1)),t.includes("[")&&(t=t.replace(/[[\]]/g,e.f.dynamic)),t),an=t=>{let e=Object.create(null);return n=>e[n]||(e[n]=t(n))},Co=/-(\w)/g,P=an(t=>t&&t.replace(Co,(e,n)=>n?n.toUpperCase():"")),Ro=/\B([A-Z])/g,je=an(t=>t&&t.replace(Ro,"-$1").toLowerCase()),ot=an(t=>t&&t.charAt(0).toUpperCase()+t.slice(1));var Tt={};var Et=t=>{var n,r;let e=(n=ut(t))==null?void 0:n.onMounted;e==null||e.forEach(o=>{o()}),(r=t.mounted)==null||r.call(t)};var cn=Symbol("scope"),Ct=t=>{try{Bn();let e=t();en(e);let n={context:e,unmount:()=>be(e),[cn]:1};return n[cn]=1,n}finally{Pn()}},Gn=t=>N(t)?cn in t:!1;var Jn={collectRefObj:!0,onBind:(t,e)=>O(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&&(g(p)?p(c):o[a]=c)}},!0)};var Qn={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&&(g(c)?c(a):r[i]=a)}return()=>{}}};var Ve=(t,e)=>{if(t===e)return()=>{};let n=O(t,o=>e(o)),r=O(e,o=>t(o));return e(t()),()=>{n(),r()}};var Xn={collectRefObj:!0,onBind:(t,e,n,r,o,s)=>{if(!r)return()=>{};let i=P(r),a=()=>{},c=O(e.value,()=>{var u;let p=(u=e.refs[0])!=null?u:e.value()[0],f=e.context,l=f[i];if(l!==p){if(g(p)){if(g(l)){a(),a=Ve(p,l);return}f[i]=p;return}if(a(),a=()=>{},g(l)){l(p);return}f[i]=p}},!0);return()=>{a(),c()}}};var Rt=class{constructor(e){m(this,"p");m(this,"fe");this.p=e,this.fe=e.o.f.inherit}N(e){this.Ke(e)}Ke(e){var l;let n=this.p,r=n.h,o=n.o.le,s=n.o.ue,i=r.me(),a=r.ze(),c=[...o.keys(),...a,...[...o.keys()].map(je),...a.map(je)].join(",");if(z(c))return;let p=e.querySelectorAll(c),f=(l=e.matches)!=null&&l.call(e,c)?[e,...p]:p;for(let u of f){if(u.hasAttribute(n.T))continue;let h=u.parentNode;if(!h)continue;let y=u.nextSibling,d=P(u.tagName).toUpperCase(),E=i[d],R=E!=null?E:s.get(d);if(!R)continue;let T=R.template;if(!T)continue;let k=u.parentElement;if(!k)continue;let U=new Comment(" begin component: "+u.tagName),oe=new Comment(" end component: "+u.tagName);k.insertBefore(U,u),u.remove();let Qe=n.o.f.props,Xe=n.o.f.propsOnce,Wt=n.o.f.bind,Ye=(b,A)=>{let x={},W=b.hasAttribute(Qe),F=b.hasAttribute(Xe);return r.v(A,()=>{r.S(x),W&&n.x(Jn,b,Qe),F&&n.x(Qn,b,Xe);let v=R.props;if(!v||v.length===0)return;v=v.map(P);let q=new Map(v.map(Y=>[Y.toLowerCase(),Y]));for(let Y of v.concat(v.map(je))){let le=b.getAttribute(Y);le!==null&&(x[P(Y)]=le,b.removeAttribute(Y))}let Gt=n.J.de(b,!1);for(let[Y,le]of Gt.entries()){let[Jt,Ln]=le.Q;if(!Ln)continue;let kn=q.get(P(Ln).toLowerCase());kn&&(Jt!=="."&&Jt!==":"&&Jt!==Wt||n.x(Xn,b,Y,!0,kn,le.X))}}),x},ye=[...r.V()],at=()=>{var W;let b=Ye(u,ye),A=new He(b,u,ye,U,oe),x=Ct(()=>{var F;return(F=R.context(A))!=null?F:{}}).context;if(A.autoProps){for(let[F,v]of Object.entries(b))if(F in x){let q=x[F];if(q===v)continue;A.entangle&&g(q)&&g(v)&&H(U,Ve(v,q))}else x[F]=v;(W=A.onAutoPropsAssigned)==null||W.call(A)}return{componentCtx:x,head:A}},{componentCtx:we,head:I}=at(),se=[...me(T)],S=se.length,M=u.childNodes.length===0,$=b=>{let A=b.parentElement;if(M){for(let v of[...b.childNodes])A.insertBefore(v,b);return}let x=b.name;z(x)&&(x=b.getAttributeNames().filter(v=>v.startsWith("#"))[0],z(x)?x="default":x=x.substring(1));let W=u.querySelector(`template[name='${x}'], template[\\#${x}]`);!W&&x==="default"&&(W=u.querySelector("template:not([name])"),W&&W.getAttributeNames().filter(v=>v.startsWith("#")).length>0&&(W=null));let F=v=>{I.enableSwitch&&r.v(ye,()=>{r.S(we);let q=Ye(b,r.V());r.v(ye,()=>{r.S(q);let Gt=r.V(),Y=$n(Gt);for(let le of v)Ae(le)&&(le.setAttribute(nt,Y),tn(Y),H(le,()=>{nn(Y)}))})})};if(W){let v=[...me(W)];for(let q of v)A.insertBefore(q,b);F(v)}else{if(x!=="default"){for(let q of[...me(b)])A.insertBefore(q,b);return}let v=[...me(u)].filter(q=>!pe(q));for(let q of v)A.insertBefore(q,b);F(v)}},w=b=>{if(!Ae(b))return;let A=b.querySelectorAll("slot");if(Kn(b)){$(b),b.remove();return}for(let x of A)$(x),x.remove()};(()=>{for(let b=0;b<S;++b)se[b]=se[b].cloneNode(!0),h.insertBefore(se[b],y),w(se[b])})(),k.insertBefore(oe,y);let ie=()=>{if(!R.inheritAttrs)return;let b=se.filter(x=>x.nodeType===Node.ELEMENT_NODE);b.length>1&&(b=b.filter(x=>x.hasAttribute(this.fe)));let A=b[0];if(A)for(let x of u.getAttributeNames()){if(x===Qe||x===Xe)continue;let W=u.getAttribute(x);if(x==="class")A.classList.add(...W.split(" "));else if(x==="style"){let F=A.style,v=u.style;for(let q of v)F.setProperty(q,v.getPropertyValue(q))}else A.setAttribute(bt(x,n.o),W)}},De=()=>{for(let b of u.getAttributeNames())!b.startsWith("@")&&!b.startsWith(n.o.f.on)&&u.removeAttribute(b)},Ze=()=>{ie(),De(),r.S(we),n.ye(u,!1),we.$emit=I.emit,Ce(n,se),H(u,()=>{be(we)}),H(U,()=>{ae(u)}),Et(we)};r.v(ye,Ze)}}};var pn=class{constructor(e){m(this,"he");m(this,"Q",[]);m(this,"X",[]);m(this,"ge",[]);this.he=e,this.C()}C(){let e=this.he,n=e.startsWith(".");n&&(e=":"+e.slice(1));let r=e.indexOf("."),o=this.Q=(r<0?e:e.substring(0,r)).split(/[:@]/);if(z(o[0])&&(o[0]=n?".":e[0]),r>=0){let s=this.X=e.slice(r+1).split(".");if(s.includes("camel")){let i=o.length-1;o[i]=P(o[i])}s.includes("prop")&&(o[0]=".")}}},xt=class{constructor(e){m(this,"p");m(this,"be");this.p=e,this.be=e.o.We()}de(e,n){let r=new Map;if(!rt(e))return r;let o=this.be,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).ge.push(a)};if(s(e),!n)return r;let i=e.querySelectorAll("*");for(let a of i)s(a);return r}};var xo=(t,e)=>{for(let n of t){let r=n.cloneNode(!0);e.appendChild(r)}},vt=class{constructor(e){m(this,"p");m(this,"I");m(this,"Te");this.p=e,this.I=e.o.f.is,this.Te=Pe(this.I)+", [is]"}N(e){let n=e.hasAttribute(this.I),r=Ee(e,this.Te);for(let o of r)this.x(o);return n}x(e){let n=e.getAttribute(this.I);if(!n){if(n=e.getAttribute("is"),!n)return;if(!n.startsWith("regor:")){if(!n.startsWith("r-"))return;let r=n.slice(2).trim().toLowerCase();if(!r)return;let o=e.parentNode;if(!o)return;let s=document.createElement(r);for(let i of e.getAttributeNames())i!=="is"&&s.setAttribute(i,e.getAttribute(i));for(;e.firstChild;)s.appendChild(e.firstChild);o.insertBefore(s,e),e.remove(),this.p.H(s);return}n=`'${n.slice(6)}'`,e.removeAttribute("is")}e.removeAttribute(this.I),this.L(e,n)}P(e,n){let r=Be(e),o=e.parentNode,s=document.createComment(`__begin__ dynamic ${n!=null?n:""}`);o.insertBefore(s,e),_e(s,r),r.forEach(a=>{V(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}}L(e,n){let{nodes:r,parent:o,commentBegin:s,commentEnd:i}=this.P(e,` => ${n} `),a=this.p.h.C(n),c=a.value,p=this.p.h,f=p.V(),l={name:""},u=pe(e)?r:[...r[0].childNodes],h=()=>{p.v(f,()=>{var k;let R=c()[0];if(N(R)&&(R.name?R=R.name:R=(k=Object.entries(p.me()).filter(U=>U[1]===R)[0])==null?void 0:k[0]),!B(R)||z(R)){ue(s,i);return}if(l.name===R)return;ue(s,i);let T=document.createElement(R);for(let U of e.getAttributeNames())U!==this.I&&T.setAttribute(U,e.getAttribute(U));xo(u,T),o.insertBefore(T,i),this.p.H(T),l.name=R})},y=[];H(s,()=>{a.stop();for(let R of y)R();y.length=0}),h();let E=O(c,h);y.push(E)}};var re=[],Yn=t=>{var e;re.length!==0&&((e=re[re.length-1])==null||e.add(t))},Me=t=>{if(!t)return()=>{};let e={stop:()=>{}};return vo(t,e),J(()=>e.stop(),!0),e.stop},vo=(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(re.push(s),t(i=>n.push(i)),r)return;for(let i of[...s]){let a=O(i,()=>{o(),Me(t)});n.push(a)}}finally{re.pop()}},St=t=>{let e=re.length,n=e>0&&re[e-1];try{return n&&re.push(null),t()}finally{n&&re.pop()}},wt=t=>{try{let e=new Set;return re.push(e),{value:t(),refs:[...e]}}finally{re.pop()}};var $e=t=>!!t&&t[dt]===1;var K=(t,e,n)=>{if(!g(t))return;let r=t;if(r(void 0,e,1),!n)return;let o=r();if(o){if(C(o)||Z(o))for(let s of o)K(s,e,!0);else if(ge(o))for(let s of o)K(s[0],e,!0),K(s[1],e,!0);if(N(o))for(let s in o)K(o[s],e,!0)}};function So(t,e,n){Object.defineProperty(t,e,{value:n,enumerable:!1,writable:!0,configurable:!0})}var Fe=(t,e,n)=>{n.forEach(function(r){let o=t[r];So(e,r,function(...i){let a=o.apply(this,i),c=this[Q];for(let p of c)K(p);return a})})},Ot=(t,e)=>{Object.defineProperty(t,Symbol.toStringTag,{value:e,writable:!1,enumerable:!1,configurable:!0})};var Zn=Array.prototype,fn=Object.create(Zn),wo=["push","pop","shift","unshift","splice","sort","reverse"];Fe(Zn,fn,wo);var er=Map.prototype,At=Object.create(er),Oo=["set","clear","delete"];Ot(At,"Map");Fe(er,At,Oo);var tr=Set.prototype,Nt=Object.create(tr),Ao=["add","clear","delete"];Ot(Nt,"Set");Fe(tr,Nt,Ao);var fe={},G=t=>{if(g(t)||$e(t))return t;let e={auto:!0,_value:t},n=c=>N(c)?Q in c?!0:C(c)?(Object.setPrototypeOf(c,fn),!0):Z(c)?(Object.setPrototypeOf(c,Nt),!0):ge(c)?(Object.setPrototypeOf(c,At),!0):!1:!1,r=n(t),o=new Set,s=(c,p)=>{if(fe.stack&&fe.stack.length){fe.stack[fe.stack.length-1].add(a);return}o.size!==0&&St(()=>{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],l=c[1];return 0 in c?e._value===f||g(f)&&(f=f(),e._value===f)?f:(n(f)&&i(f),e._value=f,e.auto&&s(f,l),e._value):(Yn(a),e._value)}switch(c[2]){case 0:{let f=c[3];if(!f)return()=>{};let l=u=>{o.delete(u)};return o.add(f),()=>{l(f)}}case 1:{let f=c[1],l=e._value;s(l,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,Re(a,!1),r&&i(t),a};var j=t=>g(t)?t():t;var st=class{constructor(e){m(this,"E",[]);m(this,"_",new Map);m(this,"Y");this.Y=e}get w(){return this.E.length}Z(e){let n=this.Y(e.value);n!==void 0&&this._.set(n,e)}ee(e){var r;let n=this.Y((r=this.E[e])==null?void 0:r.value);n!==void 0&&this._.delete(n)}static Ge(e,n){return{items:[],index:e,value:n,order:-1}}S(e){e.order=this.w,this.E.push(e),this.Z(e)}Je(e,n){let r=this.w;for(let o=e;o<r;++o)this.E[o].order=o+1;n.order=e,this.E.splice(e,0,n),this.Z(n)}D(e){return this.E[e]}te(e,n){this.ee(e),this.E[e]=n,this.Z(n),n.order=e}xe(e){this.ee(e),this.E.splice(e,1);let n=this.w;for(let r=e;r<n;++r)this.E[r].order=r}Ee(e){let n=this.w;for(let r=e;r<n;++r)this.ee(r);this.E.splice(e)}Ct(e){return this._.has(e)}Qe(e){var r;let n=this._.get(e);return(r=n==null?void 0:n.order)!=null?r:-1}};var ln=Symbol("r-for"),Lt=class Lt{constructor(e){m(this,"p");m(this,"b");m(this,"ne");m(this,"T");this.p=e,this.b=e.o.f.for,this.ne=Pe(this.b),this.T=e.o.f.pre}N(e){let n=e.hasAttribute(this.b),r=Ee(e,this.ne);for(let o of r)this.Xe(o);return n}G(e){return e[ln]?!0:(e[ln]=!0,Ee(e,this.ne).forEach(n=>n[ln]=!0),!1)}Xe(e){if(e.hasAttribute(this.T)||this.G(e))return;let n=e.getAttribute(this.b);if(!n){L(0,this.b,e);return}e.removeAttribute(this.b),this.Ye(e,n)}Re(e){return ne(e)?[]:(_(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))}Ye(e,n){var se;let r=this.Ze(n);if(!(r!=null&&r.list)){L(1,this.b,n,e);return}let o=this.p.o.f.key,s=this.p.o.f.keyBind,i=(se=e.getAttribute(o))!=null?se:e.getAttribute(s);e.removeAttribute(o),e.removeAttribute(s);let a=i?S=>{var M;return j((M=j(S))==null?void 0:M[i])}:S=>S,c=(S,M)=>a(S)===a(M),p=Be(e),f=e.parentNode;if(!f)return;let l=`${this.b} => ${n}`,u=new Comment(`__begin__ ${l}`);f.insertBefore(u,e),_e(u,p),p.forEach(S=>{V(S)}),e.remove();let h=new Comment(`__end__ ${l}`);f.insertBefore(h,u.nextSibling);let y=this.p,d=y.h,E=d.V(),R=(S,M,$)=>{let w=r.createContext(M,S),te=st.Ge(w.index,M);return d.v(E,()=>{d.S(w.ctx);let ie=$.previousSibling,De=[];for(let Ze of p){let b=Ze.cloneNode(!0);f.insertBefore(b,$),De.push(b)}for(Ce(y,De),ie=ie.nextSibling;ie!==$;)te.items.push(ie),ie=ie.nextSibling}),te},T=(S,M)=>{let $=I.D(S).items,w=$[$.length-1].nextSibling;for(let te of $)V(te);I.te(S,R(S,M,w))},k=(S,M)=>{I.S(R(S,M,h))},U=S=>{for(let M of I.D(S).items)V(M)},oe=S=>{let M=I.w;for(let $=S;$<M;++$)I.D($).index($)},Qe=S=>{let M=I.w;_(S)&&(S=S());let $=j(S[0]);if(C($)&&$.length===0){ue(u,h),I.Ee(0);return}let w=0,te=Number.MAX_SAFE_INTEGER,ie=M,De=this.p.o.forGrowThreshold,Ze=()=>I.w<ie+De;for(let A of this.Re(S[0])){let x=()=>{if(w<M){let W=I.D(w++);if(c(W.value,A))return;let F=I.Qe(a(A));if(F>=w&&F-w<10){if(--w,te=Math.min(te,w),U(w),I.xe(w),--M,F>w+1)for(let v=w;v<F-1&&v<M&&!c(I.D(w).value,A);)++v,U(w),I.xe(w),--M;x();return}Ze()?(I.Je(w-1,R(w,A,I.D(w-1).items[0])),te=Math.min(te,w-1),++M):T(w-1,A)}else k(w++,A)};x()}let b=w;for(M=I.w;w<M;)U(w++);I.Ee(b),oe(te)},Xe=()=>{at=O(ye,Qe)},Wt=()=>{Ye.stop(),at()},Ye=d.C(r.list),ye=Ye.value,at,we=0,I=new st(a);for(let S of this.Re(ye()[0]))I.S(R(we++,S,h));H(u,Wt),Xe()}Ze(e){var c,p;let n=Lt.et.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,l)=>{let u={},h=j(f);if(!a&&r.length===1)u[r[0]]=f;else if(C(h)){let d=0;for(let E of r)u[E]=h[d++]}else for(let d of r)u[d]=h[d];let y={ctx:u,index:G(-1)};return s&&(y.index=u[s.startsWith("#")?s.substring(1):s]=G(l)),y}}}};m(Lt,"et",/\{?\[?\(?([^)}\]]+)\)?\]?\}?([^)]+)?\s+\b(?:in|of)\b\s+(.*)\s*$/);var Mt=Lt;var kt=class{constructor(e){m(this,"h");m(this,"Ce");m(this,"ve");m(this,"Se");m(this,"we");m(this,"J");m(this,"o");m(this,"T");m(this,"Oe");this.h=e,this.o=e.o,this.ve=new Mt(this),this.Ce=new gt(this),this.Se=new vt(this),this.we=new Rt(this),this.J=new xt(this),this.T=this.o.f.pre,this.Oe=this.o.f.dynamic}tt(e){let n=pe(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);Ce(this,i)}}H(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.tt(e),this.ye(e,!0))}ye(e,n){var s;let r=this.J.de(e,n),o=this.o.j;for(let[i,a]of r.entries()){let[c,p]=a.Q,f=(s=o[i])!=null?s:o[c];if(!f){console.error("directive not found:",c);continue}a.ge.forEach(l=>{this.x(f,l,i,!1,p,a.X)})}}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(nt);return f||(p.parentElement?c(p.parentElement):null)};if(rn()){let p=c(n);if(p){this.h.v(Fn(p),()=>{this.L(e,n,a,s,i)});return}}this.L(e,n,a,s,i)}nt(e,n,r){if(e!==Tt)return!1;if(z(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,H(i,()=>{V(n)}),o.appendChild(n)}return!0}L(e,n,r,o,s){var E;if(n.nodeType!==Node.ELEMENT_NODE||r==null||this.nt(e,n,r))return;let i=this.h.C(r,e.isLazy,e.isLazyKey,e.collectRefObj,e.once),a=[];H(n,()=>{i.stop(),f==null||f.stop();for(let R of a)R();a.length=0});let p=Wn(o,this.Oe),f;p&&(f=this.h.C(P(p),void 0,void 0,void 0,e.once));let l,u=()=>(l=i.value(),l),h,y=()=>f?(h=f.value()[0],h):(h=o,o),d=()=>{if(!e.onChange)return;let R=O(i.value,T=>{var oe;let k=l,U=h;(oe=e.onChange)==null||oe.call(e,n,u(),k,y(),U,s)});if(a.push(R),f){let T=O(f.value,k=>{var oe;let U=h;(oe=e.onChange)==null||oe.call(e,n,u(),U,y(),U,s)});a.push(T)}};e.once||d(),e.onBind&&a.push(e.onBind(n,i,r,o,f,s)),(E=e.onChange)==null||E.call(e,n,u(),void 0,y(),void 0,s)}};var nr="http://www.w3.org/1999/xlink",No={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 Mo(t){return!!t||t===""}var un={onChange:(t,e,n,r,o,s)=>{var a;if(r){s&&s.includes("camel")&&(r=P(r)),It(t,r,e[0],o);return}let i=e.length;for(let c=0;c<i;++c){let p=e[c];if(C(p)){let f=(a=n==null?void 0:n[c])==null?void 0:a[0],l=p[0],u=p[1];It(t,l,u,f)}else if(N(p))for(let f of Object.entries(p)){let l=f[0],u=f[1],h=n==null?void 0:n[c],y=h&&l in h?l:void 0;It(t,l,u,y)}else{let f=n==null?void 0:n[c],l=e[c++],u=e[c];It(t,l,u,f)}}}},It=(t,e,n,r)=>{if(r&&r!==e&&t.removeAttribute(r),ne(e)){L(3,name,t);return}if(!B(e)){L(6,`Attribute key is not string at ${t.outerHTML}`,e);return}if(e.startsWith("xlink:")){ne(n)?t.removeAttributeNS(nr,e.slice(6,e.length)):t.setAttributeNS(nr,e,n);return}let o=e in No;ne(n)||o&&!Mo(n)?t.removeAttribute(e):t.setAttribute(e,o?"":n)};var mn={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(C(s)){let a=s.length;for(let c=0;c<a;++c)rr(t,s[c],i==null?void 0:i[c])}else rr(t,s,i)}}},rr=(t,e,n)=>{let r=t.classList,o=B(e),s=B(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 or={onChange:(t,e)=>{let[n,r]=e;_(r)?r(t,n):t.innerHTML=n==null?void 0:n.toString()}};function Lo(t,e){if(t.length!==e.length)return!1;let n=!0;for(let r=0;n&&r<t.length;r++)n=de(t[r],e[r]);return n}function de(t,e){if(t===e)return!0;let n=Yt(t),r=Yt(e);if(n||r)return n&&r?t.getTime()===e.getTime():!1;if(n=et(t),r=et(e),n||r)return t===e;if(n=C(t),r=C(e),n||r)return n&&r?Lo(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||!de(t[i],e[i]))return!1}}return String(t)===String(e)}function Dt(t,e){return t.findIndex(n=>de(n,e))}var sr=t=>{let e=parseFloat(t);return isNaN(e)?t:e};var Ut=t=>{if(!g(t))throw D(3,"pause");t(void 0,void 0,3)};var Ht=t=>{if(!g(t))throw D(3,"resume");t(void 0,void 0,4)};var ar={onChange:(t,e)=>{ko(t,e[0])},onBind:(t,e,n,r,o,s)=>Io(t,e,s)},ko=(t,e)=>{let n=lr(t);if(n&&cr(t))C(e)?e=Dt(e,he(t))>-1:Z(e)?e=e.has(he(t)):e=Po(t,e),t.checked=e;else if(n&&pr(t))t.checked=de(e,he(t));else if(n||ur(t))fr(t)?t.value!==(e==null?void 0:e.toString())&&(t.value=e):t.value!==e&&(t.value=e);else if(mr(t)){let r=t.options,o=r.length,s=t.multiple;for(let i=0;i<o;i++){let a=r[i],c=he(a);if(s)C(e)?a.selected=Dt(e,c)>-1:a.selected=e.has(c);else if(de(he(a),e)){t.selectedIndex!==i&&(t.selectedIndex=i);return}}!s&&t.selectedIndex!==-1&&(t.selectedIndex=-1)}else L(7,t)},it=t=>(g(t)&&(t=t()),_(t)&&(t=t()),t?B(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}),cr=t=>t.type==="checkbox",pr=t=>t.type==="radio",fr=t=>t.type==="number"||t.type==="range",lr=t=>t.tagName==="INPUT",ur=t=>t.tagName==="TEXTAREA",mr=t=>t.tagName==="SELECT",Io=(t,e,n)=>{let r=e.value,o=it(n==null?void 0:n.join(",")),s=it(r()[1]),i={int:o.int||s.int,lazy:o.lazy||s.lazy,number:o.number||s.number,trim:o.trim||s.trim};if(!e.refs[0])return L(8,t),()=>{};let a=()=>e.refs[0],c=lr(t);return c&&cr(t)?Uo(t,a):c&&pr(t)?jo(t,a):c||ur(t)?Do(t,i,a,r):mr(t)?Vo(t,a,r):(L(7,t),()=>{})},ir=/[.,' ·٫]/,Do=(t,e,n,r)=>{let s=e.lazy?"change":"input",i=fr(t),a=()=>{!e.trim&&!it(r()[1]).trim||(t.value=t.value.trim())},c=u=>{let h=u.target;h.composing=1},p=u=>{let h=u.target;h.composing&&(h.composing=0,h.dispatchEvent(new Event(s)))},f=()=>{t.removeEventListener(s,l),t.removeEventListener("change",a),t.removeEventListener("compositionstart",c),t.removeEventListener("compositionend",p),t.removeEventListener("change",p)},l=u=>{let h=n();if(!h)return;let y=u.target;if(!y||y.composing)return;let d=y.value,E=it(r()[1]);if(i||E.number||E.int){if(E.int)d=parseInt(d);else{if(ir.test(d[d.length-1])&&d.split(ir).length===2){if(d+="0",d=parseFloat(d),isNaN(d))d="";else if(h()===d)return}d=parseFloat(d)}isNaN(d)&&(d=""),t.value=d}else E.trim&&(d=d.trim());h(d)};return t.addEventListener(s,l),t.addEventListener("change",a),t.addEventListener("compositionstart",c),t.addEventListener("compositionend",p),t.addEventListener("change",p),f},Uo=(t,e)=>{let n="change",r=()=>{t.removeEventListener(n,o)},o=()=>{let s=e();if(!s)return;let i=he(t),a=t.checked,c=s();if(C(c)){let p=Dt(c,i),f=p!==-1;a&&!f?c.push(i):!a&&f&&c.splice(p,1)}else Z(c)?a?c.add(i):c.delete(i):s(Bo(t,a))};return t.addEventListener(n,o),r},he=t=>"_value"in t?t._value:t.value,dr="trueValue",Ho="falseValue",hr="true-value",_o="false-value",Bo=(t,e)=>{let n=e?dr:Ho;if(n in t)return t[n];let r=e?hr:_o;return t.hasAttribute(r)?t.getAttribute(r):e},Po=(t,e)=>{if(dr in t)return de(e,t.trueValue);let r=hr;return t.hasAttribute(r)?de(e,t.getAttribute(r)):de(e,!0)},jo=(t,e)=>{let n="change",r=()=>{t.removeEventListener(n,o)},o=()=>{let s=e();if(!s)return;let i=he(t);s(i)};return t.addEventListener(n,o),r},Vo=(t,e,n)=>{let r="change",o=()=>{t.removeEventListener(r,s)},s=()=>{let i=e();if(!i)return;let c=it(n()[1]).number,p=Array.prototype.filter.call(t.options,f=>f.selected).map(f=>c?sr(he(f)):he(f));if(t.multiple){let f=i();try{if(Ut(i),Z(f)){f.clear();for(let l of p)f.add(l)}else C(f)?(f.splice(0),f.push(...p)):i(p)}finally{Ht(i),K(i)}}else i(p[0])};return t.addEventListener(r,s),o};var $o=["stop","prevent","capture","self","once","left","right","middle","passive"],Fo=t=>{let e={};if(z(t))return;let n=t.split(",");for(let r of $o)e[r]=n.includes(r);return e},hn={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,l;if(o){let u=e.value(),h=j(o.value()[0]);return B(h)?dn(t,P(h),()=>e.value()[0],(f=s==null?void 0:s.join(","))!=null?f:u[1]):()=>{}}else if(r){let u=e.value();return dn(t,P(r),()=>e.value()[0],(l=s==null?void 0:s.join(","))!=null?l:u[1])}let i=[],a=()=>{i.forEach(u=>u())},c=e.value(),p=c.length;for(let u=0;u<p;++u){let h=c[u];if(_(h)&&(h=h()),N(h))for(let y of Object.entries(h)){let d=y[0],E=()=>{let T=e.value()[u];return _(T)&&(T=T()),T=T[d],_(T)&&(T=T()),T},R=h[d+"_flags"];i.push(dn(t,d,E,R))}else L(2,name,t)}return a}},qo=(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]},dn=(t,e,n,r)=>{if(z(e))return L(5,name,t),()=>{};let o=Fo(r),s=o?{capture:o.capture,passive:o.passive,once:o.once}:void 0,i;[e,i]=qo(e,r);let a=f=>{if(!i(f)||!n&&e==="submit"&&(o!=null&&o.prevent))return;let l=n(f);_(l)&&(l=l(f)),_(l)&&l(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 yr={onChange:(t,e,n,r,o,s)=>{if(r){s&&s.includes("camel")&&(r=P(r)),qe(t,r,e[0]);return}let i=e.length;for(let a=0;a<i;++a){let c=e[a];if(C(c)){let p=c[0],f=c[1];qe(t,p,f)}else if(N(c))for(let p of Object.entries(c)){let f=p[0],l=p[1];qe(t,f,l)}else{let p=e[a++],f=e[a];qe(t,p,f)}}}};function zo(t){return!!t||t===""}var qe=(t,e,n)=>{if(ne(e)){L(3,name,t);return}if(e==="innerHTML"||e==="textContent"){let s=[...t.childNodes];setTimeout(()=>s.forEach(ae),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=zo(n):n==null&&s==="string"?(n="",o=!0):s==="number"&&(n=0,o=!0)}try{t[e]=n}catch(s){o||L(4,e,r,n,s)}o&&t.removeAttribute(e)};var gr={once:!0,onBind:(t,e,n)=>{let r=e.value()[0],o=C(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 br={onChange:(t,e)=>{let n=Te(t).data,r=n._ord;Hn(r)&&(r=n._ord=t.style.display),!!e[0]?t.style.display=r:t.style.display="none"}};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(C(s)){let a=s.length;for(let c=0;c<a;++c)Tr(t,s[c],i==null?void 0:i[c])}else Tr(t,s,i)}}},Tr=(t,e,n)=>{let r=t.style,o=B(e);if(e&&!o){if(n&&!B(n))for(let s in n)e[s]==null&&gn(r,s,"");for(let s in e)gn(r,s,e[s])}else{let s=r.display;if(o?n!==e&&(r.cssText=e):n&&t.removeAttribute("style"),"_ord"in Te(t).data)return;r.display=s}},Er=/\s*!important$/;function gn(t,e,n){if(C(n))n.forEach(r=>{gn(t,e,r)});else if(n==null&&(n=""),e.startsWith("--"))t.setProperty(e,n);else{let r=Ko(t,e);Er.test(n)?t.setProperty(je(r),n.replace(Er,""),"important"):t[r]=n}}var Cr=["Webkit","Moz","ms"],yn={};function Ko(t,e){let n=yn[e];if(n)return n;let r=P(e);if(r!=="filter"&&r in t)return yn[e]=r;r=ot(r);for(let o=0;o<Cr.length;o++){let s=Cr[o]+r;if(s in t)return yn[e]=s}return e}var X=t=>Rr(j(t)),Rr=(t,e=new WeakMap)=>{if(!t||!N(t))return t;if(C(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(ge(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 j(e.get(t));let n=ft({},t);e.set(t,n);for(let r of Object.entries(n))n[r[0]]=Rr(j(r[1]),e);return n};var xr={onChange:(t,e)=>{var r;let n=e[0];t.textContent=Z(n)?JSON.stringify(X([...n])):ge(n)?JSON.stringify(X([...n])):N(n)?JSON.stringify(X(n)):(r=n==null?void 0:n.toString())!=null?r:""}};var vr={onChange:(t,e)=>{qe(t,"value",e[0])}};var Le=t=>(t==null?void 0:t[mt])===1;var xe=t=>{if($e(t))return t;let e;if(g(t)?(e=t,t=e()):e=G(t),t instanceof Node||t instanceof Date||t instanceof RegExp||t instanceof Promise||t instanceof Error)return e;if(e[mt]=1,C(t)){let n=t.length;for(let r=0;r<n;++r){let o=t[r];Le(o)||(t[r]=xe(o))}return e}if(!N(t))return e;for(let n of Object.entries(t)){let r=n[1];if(Le(r))continue;let o=n[0];et(o)||(t[o]=null,t[o]=xe(r))}return e};var ve=class ve{constructor(e){m(this,"j",{});m(this,"f",{});m(this,"We",()=>Object.keys(this.j).filter(e=>e.length===1||!e.startsWith(":")));m(this,"le",new Map);m(this,"ue",new Map);m(this,"forGrowThreshold",10);m(this,"globalContext");m(this,"useInterpolation",!0);if(this.setDirectives("r-"),e){this.globalContext=e;return}this.globalContext=this.ot()}static getDefault(){var e;return(e=ve.Ae)!=null?e:ve.Ae=new ve}ot(){let e={},n=globalThis;for(let r of ve.rt.split(","))e[r]=n[r];return e.ref=xe,e.sref=G,e.flatten=X,e}addComponent(...e){for(let n of e){if(!n.defaultName){tt.warning("Registered component's default name is not defined",n);continue}this.le.set(ot(n.defaultName),n),this.ue.set(ot(n.defaultName).toLocaleUpperCase(),n)}}setDirectives(e){this.j={".":yr,":":un,"@":hn,[`${e}on`]:hn,[`${e}bind`]:un,[`${e}html`]:or,[`${e}text`]:xr,[`${e}show`]:br,[`${e}model`]:ar,":style":bn,[`${e}bind:style`]:bn,":class":mn,[`${e}bind:class`]:mn,":ref":gr,":value":vr,[`${e}teleport`]:Tt},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.j,this.f)}};m(ve,"Ae"),m(ve,"rt","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 ee=ve;var _t=(t,e)=>{if(!t)return;let r=(e!=null?e:ee.getDefault()).f,o=/(\{\{[^]*?\}\}|\[\[[^]*?\]\])/g,s=[{start:"{{",end:"}}"},{start:"[[",end:"]]"}];for(let i of Go(t,r.pre,s))Wo(i,r.text,o,s)},Wo=(t,e,n,r)=>{var c;let o=t.textContent;if(!o)return;let s=n,i=o.split(s);if(i.length<=1)return;if(((c=t.parentElement)==null?void 0:c.childNodes.length)===1&&i.length===3){let p=i[1],f=Sr(p,r);if(f&&z(i[0])&&z(i[2])){let l=t.parentElement;l.setAttribute(e,p.substring(f.start.length,p.length-f.end.length)),l.innerText="";return}}let a=document.createDocumentFragment();for(let p of i){let f=Sr(p,r);if(f){let l=document.createElement("span");l.setAttribute(e,p.substring(f.start.length,p.length-f.end.length)),a.appendChild(l)}else a.appendChild(document.createTextNode(p))}t.replaceWith(a)},Go=(t,e,n)=>{let r=[],o=s=>{var i;if(s.nodeType===Node.TEXT_NODE)n.some(a=>{var c;return(c=s.textContent)==null?void 0:c.includes(a.start)})&&r.push(s);else{if((i=s==null?void 0:s.hasAttribute)!=null&&i.call(s,e))return;for(let a of me(s))o(a)}};return o(t),r},Sr=(t,e)=>e.find(n=>t.startsWith(n.start)&&t.endsWith(n.end));var Jo=9,Qo=10,Xo=13,Yo=32,Se=46,Bt=44,Zo=39,es=34,Pt=40,ze=41,jt=91,Vt=93,Tn=63,ts=59,wr=58,ns=123,$t=125,Cn=43,rs=45,Or=96,Ar=47,os=92,Nr=[2,3],Mr=[Cn,rs],Hr={"-":1,"!":1,"~":1,"+":1,new:1},_r={"=":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},We=Un(ft({"=>":2},_r),{"||":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}),Br=Object.keys(_r),ss=new Set(Br),Ft=new Set;Ft.add("=>");Br.forEach(t=>Ft.add(t));var is=new Set(["$","_"]),Lr={true:!0,false:!1,null:null},as="this";function Pr(t){return Math.max(0,...Object.keys(t).map(e=>e.length))}var cs=Pr(Hr),ps=Pr(We),Ge="Expected ",ke="Unexpected ",xn="Unclosed ",fs=Ge+":",kr=Ge+"expression",ls="missing }",us=ke+"object property",ms=xn+"(",Ir=Ge+"comma",Dr=ke+"token ",ds=ke+"period",En=Ge+"expression after ",hs="missing unaryOp argument",ys=xn+"[",gs=Ge+"exponent (",bs="Variable names cannot start with a number (",Ts=xn+'quote after "';var Ke=t=>t>=48&&t<=57,Ur=t=>We[t]||0,Rn=class{constructor(e){m(this,"st",{0:[this.it],1:[this.at,this.pt,this.ct],2:[this.ft,this.lt,this.ut,this.Ne,this.mt],3:[this.dt,this.yt,this.ht]});m(this,"r");m(this,"e");this.r=e,this.e=0}get M(){return this.r.charAt(this.e)}get l(){return this.r.charCodeAt(this.e)}m(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 We)||is.has(n)}re(e){return this.U(e)||Ke(e)}i(e){return new Error(`${e} at character ${this.e}`)}k(e,n,r){let o=this.st[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===Yo||e===Jo||e===Qo||e===Xo;)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===ts||r===Bt)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(ke+'"'+this.M+'"')}}}return n}O(){var n;let e=(n=this.k(0,1))!=null?n:this.Me();return this.y(),this.k(1,0,e)}se(){this.y();let e=this.e,n=this.r,r=n.substr(e,ps),o=r.length;for(;o>0;){if(r in We&&(!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}Me(){let e,n,r,o,s,i,a,c;if(s=this.$(),!s||(n=this.se(),!n))return s;if(o={value:n,prec:Ur(n),right_a:Ft.has(n)},i=this.$(),!i)throw this.i(En+n);let p=[s,o,i];for(;n=this.se();){if(r=Ur(n),r===0){this.e-=n.length;break}o={value:n,prec:r,right_a:Ft.has(n)},c=n;let f=l=>o.right_a&&l.right_a?r>l.prec:r<=l.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.$(),!e)throw this.i(En+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}$(){let e,n,r;if(this.y(),r=this.k(2,1),r)return this.k(3,0,r);let o=this.l;if(Ke(o)||o===Se)return this.gt();if(o===Zo||o===es)r=this.bt();else if(o===jt)r=this.Tt();else{for(e=this.r.substr(this.e,cs),n=e.length;n>0;){if(Object.prototype.hasOwnProperty.call(Hr,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.$();if(!s)throw this.i(hs);return this.k(3,0,{type:7,operator:e,argument:s})}e=e.substr(0,--n)}this.U(o)?(r=this.ie(),r.name in Lr?r={type:4,value:Lr[r.name],raw:r.name}:r.name===as&&(r={type:5})):o===Pt&&(r=this.xt())}return r?(r=this.F(r),this.k(3,0,r)):this.k(3,0,!1)}F(e){this.y();let n=this.l;for(;n===Se||n===jt||n===Pt||n===Tn;){let r;if(n===Tn){if(this.r.charCodeAt(this.e+1)!==Se)break;r=!0,this.e+=2,this.y(),n=this.l}if(this.e++,n===jt){if(e={type:3,computed:!0,object:e,property:this.O()},this.y(),n=this.l,n!==Vt)throw this.i(ys);this.e++}else n===Pt?e={type:6,arguments:this.ke(ze),callee:e}:(n===Se||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}gt(){let e="",n;for(;Ke(this.l);)e+=this.r.charAt(this.e++);if(this.m(Se))for(e+=this.r.charAt(this.e++);Ke(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++));Ke(this.l);)e+=this.r.charAt(this.e++);if(!Ke(this.r.charCodeAt(this.e-1)))throw this.i(gs+e+this.M+")")}let r=this.l;if(this.U(r))throw this.i(bs+e+this.M+")");if(r===Se||e.length===1&&e.charCodeAt(0)===Se)throw this.i(ds);return{type:4,value:parseFloat(e),raw:e}}bt(){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
+ `;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(Ts+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(ke+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)}}ke(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===ze&&o&&o>=n.length)throw this.i(Dr+String.fromCharCode(e));break}else if(s===Bt){if(this.e++,o++,o!==n.length){if(e===ze)throw this.i(Dr+",");if(e===Vt)for(let i=n.length;i<o;i++)n.push(null)}}else{if(n.length!==o&&o!==0)throw this.i(Ir);{let i=this.O();if(!i||i.type===0)throw this.i(Ir);n.push(i)}}}if(!r)throw this.i(Ge+String.fromCharCode(e));return n}xt(){this.e++;let e=this.oe(ze);if(this.m(ze))return this.e++,e.length===1?e[0]:e.length?{type:1,expressions:e}:!1;throw this.i(ms)}Tt(){return this.e++,{type:9,elements:this.ke(Vt)}}ft(e){if(this.m(ns)){this.e++;let n=[];for(;!isNaN(this.l);){if(this.y(),this.m($t)){this.e++,e.node=this.F({type:10,properties:n});return}let r=this.O();if(!r)break;if(this.y(),r.type===2&&(this.m(Bt)||this.m($t)))n.push({type:12,computed:!1,key:r,value:r,shorthand:!0});else if(this.m(wr)){this.e++;let o=this.O();if(!o)throw this.i(us);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.m(Bt)&&this.e++}throw this.i(ls)}}lt(e){let n=this.l;if(Mr.some(r=>r===n&&r===this.r.charCodeAt(this.e+1))){this.e+=2;let r=e.node={type:13,operator:n===Cn?"++":"--",argument:this.F(this.ie()),prefix:!0};if(!r.argument||!Nr.includes(r.argument.type))throw this.i(ke+r.operator)}}yt(e){if(e.node){let n=this.l;if(Mr.some(r=>r===n&&r===this.r.charCodeAt(this.e+1))){if(!Nr.includes(e.node.type))throw this.i(ke+e.node.operator);this.e+=2,e.node={type:13,operator:n===Cn?"++":"--",argument:e.node,prefix:!1}}}}ut(e){[0,1,2].every(n=>this.r.charCodeAt(this.e+n)===Se)&&(this.e+=3,e.node={type:14,argument:this.O()})}ct(e){if(e.node&&this.m(Tn)){this.e++;let n=e.node,r=this.O();if(!r)throw this.i(kr);if(this.y(),this.m(wr)){this.e++;let o=this.O();if(!o)throw this.i(kr);if(e.node={type:11,test:n,consequent:r,alternate:o},n.operator&&We[n.operator]<=.9){let s=n;for(;s.right.operator&&We[s.right.operator]<=.9;)s=s.right;e.node.test=s.right,s.right=e.node,e.node=n}}else throw this.i(fs)}}it(e){if(this.y(),this.m(Pt)){let n=this.e;if(this.e++,this.y(),this.m(ze)){this.e++;let r=this.se();if(r==="=>"){let o=this.Me();if(!o)throw this.i(En+r);e.node={type:15,params:null,body:o};return}}this.e=n}}at(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))}pt(e){e.node&&this.q(e.node)}q(e){ss.has(e.operator)?(e.type=16,this.q(e.left),this.q(e.right)):e.operator||Object.values(e).forEach(n=>{n&&typeof n=="object"&&this.q(n)})}ht(e){if(!e.node)return;let n=e.node.type;(n===2||n===3)&&this.m(Or)&&(e.node={type:17,tag:e.node,quasi:this.Ne(e)})}Ne(e){if(!this.m(Or))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.m($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 `")}dt(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}mt(e){if(!this.m(Ar))return;let n=++this.e,r=!1;for(;this.e<this.r.length;){if(this.l===Ar&&!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.F(e.node),e.node}this.m(jt)?r=!0:r&&this.m(Vt)&&(r=!1),this.e+=this.m(os)?2:1}throw this.i("Unclosed Regex")}},jr=t=>new Rn(t).parse();var Es={"=>":(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)=>pt(t,e)},Cs={"-":t=>-t,"+":t=>+t,"!":t=>!t,"~":t=>~t,new:t=>t},qr=t=>{if(!(t!=null&&t.some(Fr)))return t;let e=[];return t.forEach(n=>Fr(n)?e.push(...n):e.push(n)),e},Vr=(...t)=>qr(t),vn=(t,e)=>{if(!t)return e;let n=Object.create(e!=null?e:{});return n.$event=t,n},Rs={"++":(t,e)=>{let n=t[e];if(g(n)){let r=n();return n(++r),r}return++t[e]},"--":(t,e)=>{let n=t[e];if(g(n)){let r=n();return n(--r),r}return--t[e]}},xs={"++":(t,e)=>{let n=t[e];if(g(n)){let r=n();return n(r+1),r}return t[e]++},"--":(t,e)=>{let n=t[e];if(g(n)){let r=n();return n(r-1),r}return t[e]--}},$r={"=":(t,e,n)=>{let r=t[e];return g(r)?r(n):t[e]=n},"+=":(t,e,n)=>{let r=t[e];return g(r)?r(r()+n):t[e]+=n},"-=":(t,e,n)=>{let r=t[e];return g(r)?r(r()-n):t[e]-=n},"*=":(t,e,n)=>{let r=t[e];return g(r)?r(r()*n):t[e]*=n},"/=":(t,e,n)=>{let r=t[e];return g(r)?r(r()/n):t[e]/=n},"%=":(t,e,n)=>{let r=t[e];return g(r)?r(r()%n):t[e]%=n},"**=":(t,e,n)=>{let r=t[e];return g(r)?r(pt(r(),n)):t[e]=pt(t[e],n)},"<<=":(t,e,n)=>{let r=t[e];return g(r)?r(r()<<n):t[e]<<=n},">>=":(t,e,n)=>{let r=t[e];return g(r)?r(r()>>n):t[e]>>=n},">>>=":(t,e,n)=>{let r=t[e];return g(r)?r(r()>>>n):t[e]>>>=n},"|=":(t,e,n)=>{let r=t[e];return g(r)?r(r()|n):t[e]|=n},"&=":(t,e,n)=>{let r=t[e];return g(r)?r(r()&n):t[e]&=n},"^=":(t,e,n)=>{let r=t[e];return g(r)?r(r()^n):t[e]^=n}},qt=(t,e)=>_(t)?t.bind(e):t,Sn=class{constructor(e,n,r,o,s){m(this,"u");m(this,"Ve");m(this,"Ie");m(this,"De");m(this,"A");m(this,"Ue");m(this,"Be");this.u=C(e)?e:[e],this.Ve=n,this.Ie=r,this.De=o,this.Be=!!s}Pe(e,n){if(n&&e in n)return n;for(let r of this.u)if(e in r)return r}2(e,n,r){let o=e.name;if(o==="$root")return this.u[this.u.length-1];if(o==="$parent")return this.u[1];if(o==="$ctx")return[...this.u];if(r&&o in r)return this.A=r[o],qt(j(r[o]),r);for(let i of this.u)if(o in i)return this.A=i[o],qt(j(i[o]),i);let s=this.Ve;if(s&&o in s)return this.A=s[o],qt(j(s[o]),s)}5(e,n,r){return this.u[0]}0(e,n,r){return this.He(n,r,Vr,...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,qt(j(i),o)}4(e,n,r){return e.value}6(e,n,r){let o=(i,...a)=>_(i)?i(...qr(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,Cs[e.operator],e.argument)}8(e,n,r){let o=Es[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.He(++n,r,Vr,...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=l=>(l==null?void 0:l.type)!==15,i=(f=this.De)!=null?f:()=>!1,a=n===0&&this.Be,c=l=>this._e(a,e.key,n,vn(l,r)),p=l=>this._e(a,e.value,n,vn(l,r));if(e.shorthand){let l=e.key.name;o[l]=s(e.key)&&i(l,n)?c:c()}else if(e.computed){let l=j(c());o[l]=s(e.value)&&i(l,n)?p:p()}else{let l=e.key.type===4?e.key.value:e.key.name;o[l]=s(e.value)&&i(l,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?Rs:xs;if(o.type===2){let a=o.name,c=this.Pe(a,r);return ne(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(ne(a))return;let c=this.g(e.right,n,r);return $r[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 $r[s](i,a,c)}}14(e,n,r){let o=this.g(e.argument,n,r);return C(o)&&(o.s=zr),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=j(this[e.type](e,n,r));return this.Ue=e.type,o}_e(e,n,r,o){let s=this.g(n,r,o);return e&&this.je()?this.A:s}je(){let e=this.Ue;return(e===2||e===3||e===6)&&g(this.A)}eval(e,n){let{value:r,refs:o}=wt(()=>this.g(e,-1,n)),s={value:r,refs:o};return this.je()&&(s.ref=this.A),s}R(e,n,r,...o){let s=o.map(i=>i&&this.g(i,e,n));return r(...s)}He(e,n,r,...o){let s=this.Ie;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,vn(p,n)):this.g(a,e,n)));return r(...i)}},zr=Symbol("s"),Fr=t=>(t==null?void 0:t.s)===zr,Kr=(t,e,n,r,o,s,i)=>new Sn(e,n,r,o,i).eval(t,s);var Wr={},zt=class{constructor(e,n){m(this,"u");m(this,"o");m(this,"$e",[]);this.u=e,this.o=n}S(e){this.u=[e,...this.u]}me(){return this.u.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},{})}ze(){let e=[],n=new Set,r=this.u.map(o=>o.components).filter(o=>!!o).reverse();for(let o of r)for(let s of Object.keys(o))n.has(s)||(n.add(s),e.push(s));return e}C(e,n,r,o,s){var h;let i=G([]),a=[],c=()=>{for(let y of a)y();a.length=0},p={value:i,stop:c,refs:[],context:this.u[0]};if(z(e))return p;let f=this.o.globalContext,l=[],u=(y,d,E,R)=>{try{let T=Kr(y,d,f,n,r,R,o);return E&&l.push(...T.refs),{value:T.value,refs:T.refs,ref:T.ref}}catch(T){L(6,`evaluation error: ${e}`,T)}return{value:void 0,refs:[]}};try{let y=(h=Wr[e])!=null?h:jr("["+e+"]");Wr[e]=y;let d=this.u,E=()=>{l.splice(0),c();let R=y.elements.map((T,k)=>n!=null&&n(k,-1)?{value:U=>u(T,d,!1,{$event:U}).value,refs:[]}:u(T,d,!0));if(!s)for(let T of l){let k=O(T,E);a.push(k)}p.refs=R.map(T=>T.ref),i(R.map(T=>T.value))};E()}catch(y){L(6,`parse error: ${e}`,y)}return p}V(){return this.u}te(e){this.$e.push(this.u),this.u=e}v(e,n){try{this.te(e),n()}finally{this.Et()}}Et(){var e;this.u=(e=this.$e.pop())!=null?e:[]}};var Gr=t=>{let e=t.charCodeAt(0);return e>=48&&e<=57||e>=65&&e<=90||e>=97&&e<=122||t==="-"||t==="_"||t===":"},vs=(t,e)=>{let n="";for(let r=e;r<t.length;++r){let o=t[r];if(n){o===n&&(n="");continue}if(o==='"'||o==="'"){n=o;continue}if(o===">")return r}return-1},Ss=(t,e)=>{let n=e?2:1;for(;n<t.length&&(t[n]===" "||t[n]===`
4
+ `);)++n;if(n>=t.length||!Gr(t[n]))return null;let r=n;for(;n<t.length&&Gr(t[n]);)++n;return{start:r,end:n}},Jr=new Set(["table","thead","tbody","tfoot"]),ws=new Set(["thead","tbody","tfoot"]),Os=new Set(["caption","colgroup","thead","tbody","tfoot","tr"]),Kt=t=>{var s;let e=0,n=[],r=[],o=0;for(;e<t.length;){let i=t.indexOf("<",e);if(i===-1){n.push(t.slice(e));break}if(n.push(t.slice(e,i)),t.startsWith("<!--",i)){let E=t.indexOf("-->",i+4);if(E===-1){n.push(t.slice(i));break}n.push(t.slice(i,E+3)),e=E+3;continue}let a=vs(t,i);if(a===-1){n.push(t.slice(i));break}let c=t.slice(i,a+1),p=c.startsWith("</");if(c.startsWith("<!")||c.startsWith("<?")){n.push(c),e=a+1;continue}let l=Ss(c,p);if(!l){n.push(c),e=a+1;continue}let u=c.slice(l.start,l.end);if(p){let E=r[r.length-1];E?(r.pop(),n.push(E.replacementHost?`</${E.replacementHost}>`:c),Jr.has(E.effectiveTag)&&--o):n.push(c),e=a+1;continue}let h=c.charCodeAt(c.length-2)===47,y=r[r.length-1],d=null;if(o===0?u==="tr"?d="trx":u==="td"?d="tdx":u==="th"&&(d="thx"):ws.has((s=y==null?void 0:y.effectiveTag)!=null?s:"")?d=u==="tr"?null:"tr":(y==null?void 0:y.effectiveTag)==="table"?d=Os.has(u)?null:"tr":(y==null?void 0:y.effectiveTag)==="tr"&&(d=u==="td"||u==="th"?null:"td"),d){let E=d==="trx"||d==="tdx"||d==="thx";n.push(`${c.slice(0,l.start)}${d} is="${E?`r-${u}`:`regor:${u}`}"${c.slice(l.end)}`)}else h&&(y==null?void 0:y.effectiveTag)==="tr"?n.push(`${c.slice(0,c.length-2)}></${u}>`):n.push(c);if(!h){let E=d==="trx"?"tr":d==="tdx"?"td":d==="thx"?"th":d||u;r.push({replacementHost:d,effectiveTag:E}),Jr.has(E)&&++o}e=a+1}return n.join("")};var As="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",Ns=new Set(As.toUpperCase().split(",")),Ms="http://www.w3.org/2000/svg",Qr=(t,e)=>{pe(t)?t.content.appendChild(e):t.appendChild(e)},wn=(t,e,n,r)=>{var i;let o=t.t;if(o){let a=n&&Ns.has(o.toUpperCase())?document.createElementNS(Ms,o.toLowerCase()):document.createElement(o),c=t.a;if(c)for(let f of Object.entries(c)){let l=f[0],u=f[1];l.startsWith("#")&&(u=l.substring(1),l="name"),a.setAttribute(bt(l,r),u)}let p=t.c;if(p)for(let f of p)wn(f,a,n,r);Qr(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)Qr(e,a);else throw new Error("unsupported node type.")}},Ie=(t,e,n)=>{n!=null||(n=ee.getDefault());let r=document.createDocumentFragment();if(!C(t))return wn(t,r,!!e,n),r;for(let o of t)wn(o,r,!!e,n);return r};var Xr=(t,e={selector:"#app"},n)=>{B(e)&&(e={selector:"#app",template:e}),Gn(t)&&(t=t.context);let r=e.element?e.element:e.selector?document.querySelector(e.selector):null;if(!r||!Ae(r))throw D(0);n||(n=ee.getDefault());let o=()=>{for(let a of[...r.childNodes])V(a)},s=a=>{for(let c of a)r.appendChild(c)};if(e.template){let a=document.createRange().createContextualFragment(Kt(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&&_t(r,n),new On(t,r,n).x(),H(r,()=>{be(t)}),Et(t),{context:t,unmount:()=>{V(r)},unbind:()=>{ae(r)}}},On=class{constructor(e,n,r){m(this,"Rt");m(this,"Fe");m(this,"o");m(this,"h");m(this,"p");this.Rt=e,this.Fe=n,this.o=r,this.h=new zt([e],r),this.p=new kt(this.h)}x(){this.p.H(this.Fe)}};var Je=t=>{if(C(t))return t.map(o=>Je(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=>{var s;return[o,(s=t.getAttribute(o))!=null?s:""]})));let r=me(t);return r.length>0&&(e.c=[...r].map(o=>Je(o))),e};var Yr=(t,e={})=>{var s,i,a,c,p,f;C(e)&&(e={props:e}),B(t)&&(t={template:t});let n=(s=e.context)!=null?s:()=>({}),r=!1;if(t.element){let l=t.element;l.remove(),t.element=l}else if(t.selector){let l=document.querySelector(t.selector);if(!l)throw D(1,t.selector);l.remove(),t.element=l}else if(t.template){let l=document.createRange().createContextualFragment(Kt(t.template));t.element=l}else t.json&&(t.element=Ie(t.json,t.isSVG,e.config),r=!0);t.element||(t.element=document.createDocumentFragment()),((i=e.useInterpolation)==null||i)&&_t(t.element,(a=e.config)!=null?a:ee.getDefault());let o=t.element;if(!r&&(((p=t.isSVG)!=null?p:rt(o)&&((c=o.hasAttribute)!=null&&c.call(o,"isSVG")))||rt(o)&&o.querySelector("[isSVG]"))){let l=o.content,u=l?[...l.childNodes]:[...o.childNodes],h=Je(u);t.element=Ie(h,!0,e.config)}return{context:n,template:t.element,inheritAttrs:(f=e.inheritAttrs)!=null?f:!0,props:e.props,defaultName:e.defaultName}};var Zr=t=>{var e;(e=Oe())==null||e.onMounted.push(t)};var eo=t=>{let e,n={},r=(...o)=>{if(o.length<=2&&0 in o)throw D(4);return e&&!n.isStopped?e(...o):(e=Ls(t,n),e(...o))};return r[Q]=1,Re(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},Ls=(t,e)=>{var s;let n=(s=e.ref)!=null?s:G(null);e.ref=n,e.isStopped=!1;let r=0,o=Me(()=>{if(r>0){o(),e.isStopped=!0,K(n);return}n(t()),++r});return n.stop=o,n};var to=(t,e)=>{let n={},r,o=(...s)=>{if(s.length<=2&&0 in s)throw D(4);return r&&!n.isStopped?r(...s):(r=ks(t,e,n),r(...s))};return o[Q]=1,Re(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},ks=(t,e,n)=>{var a;let r=(a=n.ref)!=null?a:G(null);n.ref=r,n.isStopped=!1;let o=0,s=c=>{if(o>0){r.stop(),n.isStopped=!0,K(r);return}r(e(...t.map(p=>p()))),++o},i=[];for(let c of t){let p=O(c,s);i.push(p)}return s(null),r.stop=()=>{i.forEach(c=>{c()})},r};var no=(t,e)=>{let n={},r,o=(...s)=>{if(s.length<=2&&0 in s)throw D(4);return r&&!n.isStopped?r(...s):(r=Is(t,e,n),r(...s))};return o[Q]=1,Re(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},Is=(t,e,n)=>{var s;let r=(s=n.ref)!=null?s:G(null);n.ref=r,n.isStopped=!1;let o=0;return r.stop=O(t,i=>{if(o>0){r.stop(),n.isStopped=!0,K(r);return}r(e(i)),++o},!0),r};var ro=t=>(t[dt]=1,t);var oo=(t,e)=>{if(!e)throw D(5);let r=Le(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){L(6,`persist: failed to parse data for key ${e}`,a),o()}else o();let i=Me(o);return J(i,!0),t};var An=(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},so=An;var io=(t,e,n)=>{let r=[],o=()=>{e(t.map(i=>i()))};for(let i of t)r.push(O(i,o));n&&o();let s=()=>{for(let i of r)i()};return J(s,!0),s};var ao=t=>{if(!g(t))throw D(3,"observerCount");return t(void 0,void 0,2)};var co=t=>{Nn();try{t()}finally{Mn()}},Nn=()=>{fe.stack||(fe.stack=[]),fe.stack.push(new Set)},Mn=()=>{let t=fe.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 fe.stack;for(let n of e)try{K(n)}catch(r){console.error(r)}};