regor 1.6.1 → 1.6.3
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 +13 -0
- package/dist/regor.es2015.cjs.js +14 -0
- package/dist/regor.es2015.cjs.prod.js +3 -3
- package/dist/regor.es2015.esm.js +14 -0
- package/dist/regor.es2015.esm.prod.js +3 -3
- package/dist/regor.es2015.iife.js +14 -0
- package/dist/regor.es2015.iife.prod.js +3 -3
- package/dist/regor.es2019.cjs.js +14 -0
- package/dist/regor.es2019.cjs.prod.js +3 -3
- package/dist/regor.es2019.esm.js +14 -0
- package/dist/regor.es2019.esm.prod.js +3 -3
- package/dist/regor.es2019.iife.js +14 -0
- package/dist/regor.es2019.iife.prod.js +3 -3
- package/dist/regor.es2022.cjs.js +13 -0
- package/dist/regor.es2022.cjs.prod.js +3 -3
- package/dist/regor.es2022.esm.js +13 -0
- package/dist/regor.es2022.esm.prod.js +3 -3
- package/dist/regor.es2022.iife.js +13 -0
- package/dist/regor.es2022.iife.prod.js +3 -3
- package/package.json +1 -1
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
var xr=Object.defineProperty,Cr=Object.defineProperties;var Er=Object.getOwnPropertyDescriptors;var Xn=Object.getOwnPropertySymbols;var Rr=Object.prototype.hasOwnProperty,wr=Object.prototype.propertyIsEnumerable;var Tt=Math.pow,un=(t,e,n)=>e in t?xr(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,xt=(t,e)=>{for(var n in e||(e={}))Rr.call(e,n)&&un(t,n,e[n]);if(Xn)for(var n of Xn(e))wr.call(e,n)&&un(t,n,e[n]);return t},Yn=(t,e)=>Cr(t,Er(e));var m=(t,e,n)=>un(t,typeof e!="symbol"?e+"":e,n);var Zn=(t,e,n)=>new Promise((o,r)=>{var s=c=>{try{a(n.next(c))}catch(l){r(l)}},i=c=>{try{a(n.throw(c))}catch(l){r(l)}},a=c=>c.done?o(c.value):Promise.resolve(c.value).then(s,i);a((n=n.apply(t,e)).next())});var qe=Symbol(":regor");var Ee=t=>{let e=[t];for(let n=0;n<e.length;++n){let o=e[n];vr(o);for(let r=o.lastChild;r!=null;r=r.previousSibling)e.push(r)}},vr=t=>{let e=t[qe];if(!e)return;let n=e.unbinders;for(let o=0;o<n.length;++o)n[o]();n.length=0,t[qe]=void 0};var ze=[],Ct=!1,Et,eo=()=>{if(Ct=!1,Et=void 0,ze.length!==0){for(let t=0;t<ze.length;++t)Ee(ze[t]);ze.length=0}},Y=t=>{t.remove(),ze.push(t),Ct||(Ct=!0,Et=setTimeout(eo,1))},Sr=()=>Zn(null,null,function*(){ze.length===0&&!Ct||(Et&&clearTimeout(Et),eo())});var K=t=>typeof t=="function",W=t=>typeof t=="string",to=t=>typeof t=="undefined",pe=t=>t==null||typeof t=="undefined",F=t=>typeof t!="string"||!(t!=null&&t.trim()),Ar=Object.prototype.toString,fn=t=>Ar.call(t),Le=t=>fn(t)==="[object Map]",le=t=>fn(t)==="[object Set]",ln=t=>fn(t)==="[object Date]",rt=t=>typeof t=="symbol",w=Array.isArray,L=t=>t!==null&&typeof t=="object";var no={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."},q=(t,...e)=>{let n=no[t];return new Error(K(n)?n.call(no,...e):n)};var Rt=[],oo=()=>{let t={onMounted:[],onUnmounted:[]};return Rt.push(t),t},He=t=>{let e=Rt[Rt.length-1];if(!e&&!t)throw q(2);return e},ro=t=>{let e=He();return t&&mn(t),Rt.pop(),e},pn=Symbol("csp"),mn=t=>{let e=t,n=e[pn];if(n){let o=He();if(n===o)return;o.onMounted.length>0&&n.onMounted.push(...o.onMounted),o.onUnmounted.length>0&&n.onUnmounted.push(...o.onUnmounted);return}e[pn]=He()},wt=t=>t[pn];var Ie=t=>{var n,o;let e=(n=wt(t))==null?void 0:n.onUnmounted;e==null||e.forEach(r=>{r()}),(o=t.unmounted)==null||o.call(t)};var so={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,o)=>({msg:`Failed setting prop "${t}" on <${e.toLowerCase()}>: value ${n} is invalid.`,args:[o]}),5:(t,e)=>`${t} binding missing event type at ${e.outerHTML}`,6:(t,e)=>({msg:t,args:[e]})},j=(t,...e)=>{let n=so[t],o=K(n)?n.call(so,...e):n,r=Ke.warning;r&&(W(o)?r(o):r(o,...o.args))},Ke={warning:console.warn};var vt=Symbol("ref"),ee=Symbol("sref"),St=Symbol("raw");var C=t=>t!=null&&t[ee]===1;var Ve=class extends Error{constructor(n,o){super(o);m(this,"propPath");m(this,"detail");this.name="PropValidationError",this.propPath=n,this.detail=o}},ge=(t,e)=>{throw new Ve(t,`${e}.`)},At=t=>{var n;if(t===null)return"null";if(t===void 0)return"undefined";if(C(t))return`ref<${At(t())}>`;if(typeof t=="string")return"string";if(typeof t=="number")return"number";if(typeof t=="boolean")return"boolean";if(typeof t=="bigint")return"bigint";if(typeof t=="symbol")return"symbol";if(typeof t=="function")return"function";if(w(t))return"array";if(t instanceof Date)return"Date";if(t instanceof RegExp)return"RegExp";if(t instanceof Map)return"Map";if(t instanceof Set)return"Set";let e=(n=t==null?void 0:t.constructor)==null?void 0:n.name;return e&&e!=="Object"?e:"object"},Nr=t=>t.length>60?`${t.slice(0,57)}...`:t,st=(t,e=0)=>{if(e>1)return"unknown";if(C(t)){let s=t();return`ref(${st(s,e+1)})`}if(typeof t=="string")return Nr(JSON.stringify(t));if(typeof t=="number"||typeof t=="boolean"||typeof t=="bigint"||typeof t=="symbol")return String(t);if(t===null)return"null";if(t===void 0)return"undefined";if(t instanceof Date)return t.toISOString();if(t instanceof RegExp)return String(t);if(w(t)){let s=t.slice(0,5).map(i=>st(i,e+1)).join(", ");return t.length>5?`[${s}, ...]`:`[${s}]`}if(L(t)){let s=Object.entries(t).slice(0,5);if(s.length===0)return"{}";let i=s.map(([a,c])=>{let l=st(c,e+1);return`${a}: ${l}`}).join(", ");return Object.keys(t).length>5?`{ ${i}, ... }`:`{ ${i} }`}return"unknown"},ce=t=>{if(C(t))return`got ${At(t)}(${st(t())})`;let e=At(t),n=st(t);return`got ${e} (${n})`},Mr=t=>t instanceof Ve?t.detail:t instanceof Error?t.message:String(t),io=(t,e)=>{let n=`, ${ce(e)}.`;return t.endsWith(n)?t.slice(0,-n.length):t},Or=(t,e,n)=>{if(e instanceof Ve){if(e.propPath===t)return io(e.detail,n);if(e.propPath===`${t}.value`&&C(n)){let o=io(e.detail,n());return o.startsWith("expected ")?`expected ref<${o.slice(9)}>`:`expected ref where ${o}`}}return Mr(e)},kr=(t,e,n)=>{let o=[];for(let r of e){let s=Or(t,r,n);o.includes(s)||o.push(s)}return o.length===0?ce(n):o.length===1?`${o[0]}, ${ce(n)}`:`${o.join(" or ")}, ${ce(n)}`},Lr=t=>typeof t=="string"?`"${t}"`:typeof t=="number"||typeof t=="boolean"?String(t):t===null?"null":t===void 0?"undefined":At(t),Ir=(t,e)=>{typeof t!="string"&&ge(e,`expected string, ${ce(t)}`)},Vr=(t,e)=>{typeof t!="number"&&ge(e,`expected number, ${ce(t)}`)},Pr=(t,e)=>{typeof t!="boolean"&&ge(e,`expected boolean, ${ce(t)}`)},Dr=t=>(e,n)=>{e instanceof t||ge(n,`expected instance of ${t.name||"provided class"}, ${ce(e)}`)},Ur=t=>(e,n,o)=>{e!==void 0&&t(e,n,o)},Hr=t=>(e,n,o)=>{e!==null&&t(e,n,o)},Br=(...t)=>(e,n,o)=>{let r=[];for(let s of t)try{s(e,n,o);return}catch(i){r.push(i)}ge(n,kr(n,r,e))},$r=t=>(e,n)=>{t.includes(e)||ge(n,`expected one of ${t.map(o=>Lr(o)).join(", ")}, ${ce(e)}`)},jr=t=>(e,n,o)=>{w(e)||ge(n,`expected array, ${ce(e)}`);let r=e;for(let s=0;s<r.length;++s)t(r[s],`${n}[${s}]`,o)};function _r(t){return(e,n,o)=>{L(e)||ge(n,`expected object, ${ce(e)}`);let r=e;for(let s in t){let i=t[s];if(!i)continue;i(r[s],`${n}.${s}`,o)}}}var Fr=t=>(e,n,o)=>{if(C(e)){t(e(),`${n}.value`,o);return}ge(n,`expected ref, ${ce(e)}`)},qr={fail:ge,describe:ce,isString:Ir,isNumber:Vr,isBoolean:Pr,isClass:Dr,optional:Ur,nullable:Hr,or:Br,oneOf:$r,arrayOf:jr,shape:_r,refOf:Fr};var zr=(t,e,n)=>{var i,a;let o=((a=(i=t.tagName)==null?void 0:i.toLowerCase)==null?void 0:a.call(i))||"unknown",r=n instanceof Ve?n.propPath:e,s=n instanceof Ve?n.detail:n instanceof Error?n.message:String(n);return n instanceof Error?new Error(`Invalid prop "${r}" on <${o}>: ${s}`,{cause:n}):new Error(`Invalid prop "${r}" on <${o}>: ${s}`,{cause:n})},it=class{constructor(e,n,o,r,s,i){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,"J");m(this,"Q");m(this,"emit",(e,n)=>{this.J.dispatchEvent(new CustomEvent(e,{detail:n}))});this.props=e,this.J=n,this.ctx=o,this.start=r,this.end=s,this.Q=i}findContext(e,n=0){var r;if(n<0)return;let o=0;for(let s of(r=this.ctx)!=null?r:[])if(s instanceof e){if(o===n)return s;++o}}requireContext(e,n=0){let o=this.findContext(e,n);if(o!==void 0)return o;throw new Error(`${e} was not found in the context stack at occurrence ${n}.`)}validateProps(e){if(this.Q==="off")return;let n=this.props;for(let o in e){let r=e[o];if(!r)continue;let s=r;try{s(n[o],o,this)}catch(i){let a=zr(this.J,o,i);if(this.Q==="warn"){Ke.warning(a.message,a);continue}throw a}}}unmount(){let e=this.start.nextSibling,n=this.end;for(;e&&e!==n;)Y(e),e=e.nextSibling;for(let o of this.ctx)Ie(o)}};var Be=t=>{let e=t,n=e[qe];if(n)return n;let o={unbinders:[],data:{}};return e[qe]=o,o};var G=(t,e)=>{Be(t).unbinders.push(e)};var at=t=>{if(typeof t=="string"){let e=t.trim().toLowerCase();if(e===""||e==="0"||e==="false")return!1;if(e==="true")return!0}return!!t};var Mt={},Nt={},ao=1,co=t=>{let e=(ao++).toString();return Mt[e]=t,Nt[e]=0,e},dn=t=>{Nt[t]+=1},hn=t=>{--Nt[t]===0&&(delete Mt[t],delete Nt[t])},uo=t=>Mt[t],yn=()=>ao!==1&&Object.keys(Mt).length>0,ct="r-switch",Kr=t=>{let e=t.filter(o=>Re(o)).map(o=>[...o.querySelectorAll("[r-switch]")].map(r=>r.getAttribute(ct))),n=new Set;return e.forEach(o=>{o.forEach(r=>r&&n.add(r))}),[...n]},We=(t,e)=>{if(!yn())return;let n=Kr(e);n.length!==0&&(n.forEach(dn),G(t,()=>{n.forEach(hn)}))};var Ot=()=>{},gn=(t,e,n,o)=>{let r=[];for(let s of t){let i=s.cloneNode(!0);n.insertBefore(i,o),r.push(i)}Pe(e,r)},bn=Symbol("r-if"),fo=Symbol("r-else"),lo=t=>t[fo]===1,kt=class{constructor(e){m(this,"o");m(this,"M");m(this,"be");m(this,"X");m(this,"Y");m(this,"x");m(this,"R");this.o=e,this.M=e.r.p.if,this.be=It(e.r.p.if),this.X=e.r.p.else,this.Y=e.r.p.elseif,this.x=e.r.p.for,this.R=e.r.p.pre}rt(e,n){let o=e.parentElement;for(;o!==null&&o!==document.documentElement;){if(o.hasAttribute(n))return!0;o=o.parentElement}return!1}k(e){let n=e.hasAttribute(this.M);return n&&this.y(e),e.hasAttribute(this.o.r.p.is)||e.hasAttribute("is")||this.o.V.j(e,r=>{r.hasAttribute(this.M)&&this.y(r)}),n}Z(e){return e[bn]?!0:(e[bn]=!0,Lt(e,this.be).forEach(n=>n[bn]=!0),!1)}y(e){if(e.hasAttribute(this.R)||this.Z(e)||this.rt(e,this.x))return;let n=e.getAttribute(this.M);if(!n){j(0,this.M,e);return}e.removeAttribute(this.M),this.O(e,n)}U(e,n,o){let r=Ge(e),s=e.parentNode,i=document.createComment(`__begin__ :${n}${o!=null?o:""}`);s.insertBefore(i,e),We(i,r),r.forEach(c=>{Y(c)}),e.remove(),n!=="if"&&(e[fo]=1);let a=document.createComment(`__end__ :${n}${o!=null?o:""}`);return s.insertBefore(a,i.nextSibling),{nodes:r,parent:s,commentBegin:i,commentEnd:a}}xe(e,n){if(!e)return[];let o=e.nextElementSibling;if(e.hasAttribute(this.X)){e.removeAttribute(this.X);let{nodes:r,parent:s,commentBegin:i,commentEnd:a}=this.U(e,"else");return[{mount:()=>{gn(r,this.o,s,a)},unmount:()=>{we(i,a)},isTrue:()=>!0,isMounted:!1}]}else{let r=e.getAttribute(this.Y);if(!r)return[];e.removeAttribute(this.Y);let{nodes:s,parent:i,commentBegin:a,commentEnd:c}=this.U(e,"elseif",` => ${r} `),l=this.o.m.N(r),u=l.value,f=this.xe(o,n),p=Ot;return G(a,()=>{l.stop(),p(),p=Ot}),p=l.subscribe(n),[{mount:()=>{gn(s,this.o,i,c)},unmount:()=>{we(a,c)},isTrue:()=>at(u()[0]),isMounted:!1},...f]}}O(e,n){let o=e.nextElementSibling,{nodes:r,parent:s,commentBegin:i,commentEnd:a}=this.U(e,"if",` => ${n} `),c=this.o.m.N(n),l=c.value,u=!1,f=this.o.m,p=f.L(),y=()=>{f.E(p,()=>{if(at(l()[0]))u||(gn(r,this.o,s,a),u=!0),b.forEach(T=>{T.unmount(),T.isMounted=!1});else{we(i,a),u=!1;let T=!1;for(let R of b)!T&&R.isTrue()?(R.isMounted||(R.mount(),R.isMounted=!0),T=!0):(R.unmount(),R.isMounted=!1)}})},b=this.xe(o,y),d=Ot;G(i,()=>{c.stop(),d(),d=Ot}),y(),d=c.subscribe(y)}};var Ge=t=>{let e=me(t)?t.content.childNodes:[t],n=[];for(let o=0;o<e.length;++o){let r=e[o];if(r.nodeType===1){let s=r==null?void 0:r.tagName;if(s==="SCRIPT"||s==="STYLE")continue}n.push(r)}return n},Pe=(t,e)=>{for(let n=0;n<e.length;++n){let o=e[n];o.nodeType===Node.ELEMENT_NODE&&(lo(o)||t.$(o))}},Lt=(t,e)=>{var o;let n=t.querySelectorAll(e);return(o=t.matches)!=null&&o.call(t,e)?[t,...n]:n},me=t=>t instanceof HTMLTemplateElement,Re=t=>t.nodeType===Node.ELEMENT_NODE,ut=t=>t.nodeType===Node.ELEMENT_NODE,po=t=>t instanceof HTMLSlotElement,ve=t=>me(t)?t.content.childNodes:t.childNodes,we=(t,e)=>{let n=t.nextSibling;for(;n!=null&&n!==e;){let o=n.nextSibling;Y(n),n=o}},mo=function(){return this()},Wr=function(t){return this(t)},Gr=()=>{throw new Error("value is readonly.")},Jr={get:mo,set:Wr,enumerable:!0,configurable:!1},Qr={get:mo,set:Gr,enumerable:!0,configurable:!1},De=(t,e)=>{Object.defineProperty(t,"value",e?Qr:Jr)},ho=(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},It=t=>`[${CSS.escape(t)}]`,Vt=(t,e)=>(t.startsWith("@")&&(t=e.p.on+":"+t.slice(1)),t.includes("[")&&(t=t.replace(/[[\]]/g,e.p.dynamic)),t),Tn=t=>{let e=Object.create(null);return n=>e[n]||(e[n]=t(n))},Xr=/-(\w)/g,z=Tn(t=>t&&t.replace(Xr,(e,n)=>n?n.toUpperCase():"")),Yr=/\B([A-Z])/g,Je=Tn(t=>t&&t.replace(Yr,"-$1").toLowerCase()),ft=Tn(t=>t&&t.charAt(0).toUpperCase()+t.slice(1));var Pt={mount:()=>{}};var Qe=t=>{let e=t.trim();return e?e.split(/\s+/):[]};var Dt=t=>{var n,o;let e=(n=wt(t))==null?void 0:n.onMounted;e==null||e.forEach(r=>{r()}),(o=t.mounted)==null||o.call(t)};var xn=Symbol("scope"),Cn=t=>{try{oo();let e=t();mn(e);let n={context:e,unmount:()=>Ie(e),[xn]:1};return n[xn]=1,n}finally{ro()}},yo=t=>L(t)?xn in t:!1;var En={collectRefObj:!0,mount:({parseResult:t})=>({update:({values:e})=>{let n=t.context,o=e[0];if(L(o))for(let r of Object.entries(o)){let s=r[0],i=r[1],a=n[s];a!==i&&(C(a)?a(i):n[s]=i)}}})};var se=(t,e)=>{var n;(n=He(e))==null||n.onUnmounted.push(t)};var ie=(t,e,n,o=!0)=>{if(!C(t))throw q(3,"observe");n&&e(t());let s=t(void 0,void 0,0,e);return o&&se(s,!0),s};var lt=(t,e)=>{if(t===e)return()=>{};let n=ie(t,r=>e(r)),o=ie(e,r=>t(r));return e(t()),()=>{n(),o()}};var pt=t=>!!t&&t[St]===1;var Xe=t=>(t==null?void 0:t[vt])===1;var de=[],go=t=>{var e;de.length!==0&&((e=de[de.length-1])==null||e.add(t))},Ye=t=>{if(!t)return()=>{};let e={stop:()=>{}};return Zr(t,e),se(()=>e.stop(),!0),e.stop},Zr=(t,e)=>{if(!t)return;let n=[],o=!1,r=()=>{for(let s of n)s();n=[],o=!0};e.stop=r;try{let s=new Set;if(de.push(s),t(i=>n.push(i)),o)return;for(let i of[...s]){let a=ie(i,()=>{r(),Ye(t)});n.push(a)}}finally{de.pop()}},Rn=t=>{let e=de.length,n=e>0&&de[e-1];try{return n&&de.push(null),t()}finally{n&&de.pop()}},wn=t=>{try{let e=new Set;return de.push(e),{value:t(),refs:[...e]}}finally{de.pop()}};var te=(t,e,n)=>{if(!C(t))return;let o=t;if(o(void 0,e,1),!n)return;let r=o();if(r){if(w(r)||le(r))for(let s of r)te(s,e,!0);else if(Le(r))for(let s of r)te(s[0],e,!0),te(s[1],e,!0);if(L(r))for(let s in r)te(r[s],e,!0)}};function es(t,e,n){Object.defineProperty(t,e,{value:n,enumerable:!1,writable:!0,configurable:!0})}var Ze=(t,e,n)=>{n.forEach(function(o){let r=t[o];es(e,o,function(...i){let a=r.apply(this,i),c=this[ee];for(let l of c)te(l);return a})})},Ut=(t,e)=>{Object.defineProperty(t,Symbol.toStringTag,{value:e,writable:!1,enumerable:!1,configurable:!0})};var bo=Array.prototype,vn=Object.create(bo),ts=["push","pop","shift","unshift","splice","sort","reverse"];Ze(bo,vn,ts);var To=Map.prototype,Ht=Object.create(To),ns=["set","clear","delete"];Ut(Ht,"Map");Ze(To,Ht,ns);var xo=Set.prototype,Bt=Object.create(xo),os=["add","clear","delete"];Ut(Bt,"Set");Ze(xo,Bt,os);var be={},ue=t=>{if(C(t)||pt(t))return t;let e={auto:!0,_value:t},n=c=>L(c)?ee in c?!0:w(c)?(Object.setPrototypeOf(c,vn),!0):le(c)?(Object.setPrototypeOf(c,Bt),!0):Le(c)?(Object.setPrototypeOf(c,Ht),!0):!1:!1,o=n(t),r=new Set,s=(c,l)=>{if(be.stack&&be.stack.length){be.stack[be.stack.length-1].add(a);return}r.size!==0&&Rn(()=>{for(let u of[...r.keys()])r.has(u)&&u(c,l)})},i=c=>{let l=c[ee];l||(c[ee]=l=new Set),l.add(a)},a=(...c)=>{if(!(2 in c)){let u=c[0],f=c[1];return 0 in c?e._value===u||C(u)&&(u=u(),e._value===u)?u:(n(u)&&i(u),e._value=u,e.auto&&s(u,f),e._value):(go(a),e._value)}switch(c[2]){case 0:{let u=c[3];if(!u)return()=>{};let f=p=>{r.delete(p)};return r.add(u),()=>{f(u)}}case 1:{let u=c[1],f=e._value;s(f,u);break}case 2:return r.size;case 3:{e.auto=!1;break}case 4:e.auto=!0}return e._value};return a[ee]=1,De(a,!1),o&&i(t),a};var Se=t=>{if(pt(t))return t;let e;if(C(t)?(e=t,t=e()):e=ue(t),t instanceof Node||t instanceof Date||t instanceof RegExp||t instanceof Promise||t instanceof Error)return e;if(e[vt]=1,w(t)){let n=t.length;for(let o=0;o<n;++o){let r=t[o];Xe(r)||(t[o]=Se(r))}return e}if(!L(t))return e;for(let n of Object.entries(t)){let o=n[1];if(Xe(o))continue;let r=n[0];rt(r)||(t[r]=null,t[r]=Se(o))}return e};var Co=Symbol("modelBridge"),$t=()=>{},rs=t=>!!(t!=null&&t[Co]),ss=t=>{t[Co]=1},is=t=>{let e=Se(t());return ss(e),e},Eo={collectRefObj:!0,mount:({parseResult:t,option:e})=>{if(typeof e!="string"||!e)return $t;let n=z(e),o,r,s=$t,i=()=>{s(),s=$t,o=void 0,r=void 0},a=()=>{s(),s=$t},c=(u,f)=>{o!==u&&(a(),s=lt(u,f),o=u)},l=()=>{var y;let u=(y=t.refs[0])!=null?y:t.value()[0],f=t.context,p=f[n];if(!C(u)){if(r&&p===r){r(u);return}if(i(),C(p)){p(u);return}f[n]=u;return}if(rs(u)){if(p===u)return;C(p)?c(u,p):f[n]=u;return}r||(r=is(u)),f[n]=r,c(u,r)};return{update:()=>{l()},unmount:()=>{s()}}}};var jt=class{constructor(e){m(this,"o");m(this,"_");m(this,"Te","");m(this,"Re",-1);this.o=e,this._=e.r.p.inherit}k(e){this.ot(e)}st(e){if(this.Re!==e.size){let n=[...e.keys()];this.Te=[...n,...n.map(Je)].join(","),this.Re=e.size}return this.Te}it(e){var n;for(let o=0;o<e.length;++o){let r=(n=e[o])==null?void 0:n.components;if(r)for(let s in r)return!0}return!1}ct(e){if(!me(e))return!1;let n=e.getAttributeNames();return e.hasAttribute("name")?!0:n.some(o=>o.startsWith("#"))}pt(e){return me(e)&&e.getAttributeNames().length===0}ot(e){var l,u;let n=this.o,o=n.m,r=n.r.ee,s=n.r.F;if(r.size===0&&!this.it(o.l))return;let i=o.te(),a=this.Ee();if(F(a))return;let c=this.ut(e,a);for(let f of c){if(f.hasAttribute(n.R))continue;let p=f.parentNode;if(!p)continue;let y=f.nextSibling,b=z(f.tagName).toUpperCase(),d=i[b],v=d!=null?d:s.get(b);if(!v)continue;let T=v.template;if(!T)continue;let R=f.parentElement;if(!R)continue;let H=new Comment(" begin component: "+f.tagName),P=new Comment(" end component: "+f.tagName);R.insertBefore(H,f),f.remove();let D=n.r.p.context,B=n.r.p.contextAlias,ae=n.r.p.bind,Z=(u=(l=v.props)==null?void 0:l.map(z))!=null?u:[],V=[],x=h=>h==="class"||h==="style",k=(h,M,S=!1)=>{let Q={},$=h.hasAttribute(D);return o.E(M,()=>{if(o.w(Q),$?n.y(En,h,D):h.hasAttribute(B)&&n.y(En,h,B),Z.length===0)return;let X=new Map(Z.map(g=>[g.toLowerCase(),g]));for(let g of[...Z,...Z.map(Je)]){let O=h.getAttribute(g);if(O===null)continue;let U=z(g);Q[U]=O,S&&v.inheritAttrs===!0&&x(U)&&V.push({name:g,value:O}),h.removeAttribute(g)}let E=n.q.Ce(h,!1);for(let[g,O]of E.entries()){let[U,oe]=O.ne;if(!oe)continue;let Ce=X.get(z(oe).toLowerCase());if(Ce&&!(U!=="."&&U!==":"&&U!==ae)){if(S&&U!=="."&&v.inheritAttrs===!0&&x(Ce)){let Qn=h.getAttribute(g);Qn!==null&&V.push({name:g,value:Qn})}n.y(Eo,h,g,!0,Ce,O.re)}}}),Q},_=[...o.L()],Fe=()=>{var Q;let h=k(f,_,!0),M=new it(h,f,_,H,P,n.r.propValidationMode),S=Cn(()=>{var $;return($=v.context(M))!=null?$:{}}).context;if(M.autoProps){for(let[$,X]of Object.entries(h))if($ in S){let E=S[$];if(E===X)continue;if(C(E)){C(X)?M.entangle?G(H,lt(X,E)):E(X()):E(X);continue}}else S[$]=X;for(let $ of Z)$ in S||(S[$]=void 0);(Q=M.onAutoPropsAssigned)==null||Q.call(M)}return{componentCtx:S,head:M}},{componentCtx:Te,head:gt}=Fe(),N=[...ve(T)],bt=N.length,I=f.childNodes.length===0,J=h=>{var X;let M=h.parentElement,S=h.name;if(F(S)&&(S=h.getAttributeNames().filter(E=>E.startsWith("#"))[0],F(S)?S="default":S=S.substring(1)),I){if(S==="default"){let E=n.r.p.text,g=f.getAttribute(E);if(!F(g)){let O=document.createElement("span");O.setAttribute(E,g),M.insertBefore(O,h),f.removeAttribute(E);return}}for(let E of[...h.childNodes])M.insertBefore(E,h);return}let Q=f.querySelector(`template[name='${S}'], template[\\#${S}]`);!Q&&S==="default"&&(Q=(X=[...f.querySelectorAll("template:not([name])")].find(g=>this.pt(g)))!=null?X:null);let $=E=>{gt.enableSwitch&&o.E(_,()=>{o.w(Te);let g=k(h,o.L());o.E(_,()=>{o.w(g);let O=o.L(),U=co(O);for(let oe of E)Re(oe)&&(oe.setAttribute(ct,U),dn(U),G(oe,()=>{hn(U)}))})})};if(Q){let E=[...ve(Q)];for(let g of E)M.insertBefore(g,h);$(E)}else{if(S!=="default"){for(let g of[...ve(h)])M.insertBefore(g,h);return}let E=[...ve(f)].filter(g=>!this.ct(g));for(let g of E)M.insertBefore(g,h);$(E)}},ne=h=>{if(!Re(h))return;let M=h.querySelectorAll("slot");if(po(h)){J(h),h.remove();return}for(let S of M)J(S),S.remove()};(()=>{for(let h=0;h<bt;++h)N[h]=N[h].cloneNode(!0),p.insertBefore(N[h],y),ne(N[h])})(),R.insertBefore(P,y);let xe=()=>{if(!v.inheritAttrs)return;let h=N.filter(g=>g.nodeType===Node.ELEMENT_NODE),M=h.flatMap(g=>[...g.hasAttribute(this._)?[g]:[],...g.querySelectorAll(`[${this._}]`)]).at(0),S=M!=null?M:h.length===1?h[0]:void 0;if(!S)return;S.removeAttribute(this._);let Q=`${ae}:class`,$=`${ae}:style`,X=(g,O,U)=>{let oe=S.hasAttribute(g)?g:S.hasAttribute(O)?O:g,Ce=S.getAttribute(oe);S.setAttribute(oe,F(Ce)?U:`${Ce}, ${U}`)},E=(g,O)=>{if(g==="class"){let U=Qe(O);U.length>0&&S.classList.add(...U)}else if(g===":class"||g===Q)X(":class",Q,O);else if(g==="style"){let U=S.style,oe=f.style;for(let Ce of oe)U.setProperty(Ce,oe.getPropertyValue(Ce))}else g===":style"||g===$?X(":style",$,O):S.setAttribute(Vt(g,n.r),O)};for(let{name:g,value:O}of V)f.setAttribute(g,O);for(let g of f.getAttributeNames())g===D||g===B||E(g,f.getAttribute(g))},Oe=()=>{for(let h of f.getAttributeNames())!h.startsWith("@")&&!h.startsWith(n.r.p.on)&&f.removeAttribute(h)},ke=()=>{xe(),Oe(),o.w(Te),n.we(f,!1),Te.$emit=gt.emit,Pe(n,N),G(f,()=>{Ie(Te)}),G(H,()=>{Ee(f)}),Dt(Te)};o.E(_,ke)}}Ee(){let e=this.o,n=e.m,o=e.r.ee,r=n.lt(),s=this.st(o);return[...s?[s]:[],...r,...r.map(Je)].join(",")}ut(e,n){var s;let o=[];if(F(n))return o;if((s=e.matches)!=null&&s.call(e,n))return[e];let r=this.K(e).reverse();for(;r.length>0;){let i=r.pop();if(i.matches(n)){o.push(i);continue}r.push(...this.K(i).reverse())}return o}j(e,n){let o=this.Ee(),r=this.K(e).reverse();for(;r.length>0;){let s=r.pop();n(s),!(!F(o)&&s.matches(o))&&r.push(...this.K(s).reverse())}}K(e){let n=e==null?void 0:e.children;if((n==null?void 0:n.length)!=null){let r=[];for(let s=0;s<n.length;++s){let i=n[s];Re(i)&&r.push(i)}return r}let o=e==null?void 0:e.childNodes;if((o==null?void 0:o.length)!=null){let r=[];for(let s=0;s<o.length;++s){let i=o[s];Re(i)&&r.push(i)}return r}return[]}};var Sn=class{constructor(e,n){m(this,"ne");m(this,"re");m(this,"ve",[]);this.ne=e,this.re=n}},_t=class{constructor(e){m(this,"o");m(this,"Se");m(this,"Ae");m(this,"oe");var o;this.o=e,this.Se=e.r.ft(),this.oe=new Map;let n=new Map;for(let r of this.Se){let s=(o=r[0])!=null?o:"",i=n.get(s);i?i.push(r):n.set(s,[r])}this.Ae=n}ke(e){let n=this.oe.get(e);if(n)return n;let o=e,r=o.startsWith(".");r&&(o=":"+o.slice(1));let s=o.indexOf("."),a=(s<0?o:o.substring(0,s)).split(/[:@]/);F(a[0])&&(a[0]=r?".":o[0]);let c=s>=0?o.slice(s+1).split("."):[],l=!1,u=!1;for(let p=0;p<c.length;++p){let y=c[p];if(!l&&y==="camel"?l=!0:!u&&y==="prop"&&(u=!0),l&&u)break}l&&(a[a.length-1]=z(a[a.length-1])),u&&(a[0]=".");let f={terms:a,flags:c};return this.oe.set(e,f),f}Ce(e,n){let o=new Map;if(!ut(e))return o;let r=this.Ae,s=(a,c)=>{var u;let l=r.get((u=c[0])!=null?u:"");if(l)for(let f=0;f<l.length;++f){if(!c.startsWith(l[f]))continue;let p=o.get(c);if(!p){let y=this.ke(c);p=new Sn(y.terms,y.flags),o.set(c,p)}p.ve.push(a);return}},i=a=>{var l;let c=a.attributes;if(!(!c||c.length===0))for(let u=0;u<c.length;++u){let f=(l=c.item(u))==null?void 0:l.name;f&&s(a,f)}};return i(e),!n||!e.firstElementChild||this.o.V.j(e,i),o}};var Ro=()=>{},as=(t,e)=>{for(let n of t){let o=n.cloneNode(!0);e.appendChild(o)}},Ft=class{constructor(e){m(this,"o");m(this,"I");this.o=e,this.I=e.r.p.is}k(e){let n=e.hasAttribute(this.I);return(n||e.hasAttribute("is"))&&this.y(e),this.o.V.j(e,o=>{(o.hasAttribute(this.I)||o.hasAttribute("is"))&&this.y(o)}),n}y(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 o=n.slice(2).trim().toLowerCase();if(!o)return;let r=e.parentNode;if(!r)return;let s=document.createElement(o);for(let i of e.getAttributeNames())i!=="is"&&s.setAttribute(i,e.getAttribute(i));for(;e.firstChild;)s.appendChild(e.firstChild);r.insertBefore(s,e),e.remove(),this.o.$(s);return}n=`'${n.slice(6)}'`,e.removeAttribute("is")}e.removeAttribute(this.I),this.O(e,n)}U(e,n){let o=Ge(e),r=e.parentNode,s=document.createComment(`__begin__ dynamic ${n!=null?n:""}`);r.insertBefore(s,e),We(s,o),o.forEach(a=>{Y(a)}),e.remove();let i=document.createComment(`__end__ dynamic ${n!=null?n:""}`);return r.insertBefore(i,s.nextSibling),{nodes:o,parent:r,commentBegin:s,commentEnd:i}}O(e,n){let{nodes:o,commentBegin:r,commentEnd:s}=this.U(e,` => ${n} `),i=this.o.m.N(n),a=i.value,c=this.o.m,l=c.L(),u={name:""},f=me(e)?o:[...o[0].childNodes],p=()=>{c.E(l,()=>{var R,H;let d=a()[0];if(L(d)&&(d.name?d=d.name:d=(R=Object.entries(c.te()).filter(P=>P[1]===d)[0])==null?void 0:R[0]),!W(d)||F(d)){we(r,s);return}if(u.name===d)return;we(r,s);let v=(H=s.parentNode)!=null?H:r.parentNode;if(!v)return;let T=document.createElement(d);for(let P of e.getAttributeNames())P!==this.I&&T.setAttribute(P,e.getAttribute(P));as(f,T),v.insertBefore(T,s),this.o.$(T),u.name=d})},y=Ro;G(r,()=>{i.stop(),y(),y=Ro}),p(),y=i.subscribe(p)}};var A=t=>{let e=t;return e!=null&&e[ee]===1?e():e};var cs=(t,e)=>{let[n,o]=e;K(o)?o(t,n):t.innerHTML=n==null?void 0:n.toString()},qt={mount:()=>({update:({el:t,values:e})=>{cs(t,e)}})};var zt=class t{constructor(e){m(this,"se");this.se=e}static dt(e,n){var y,b;let o=e.m,r=e.r,s=r.p,i=new Set([s.for,s.if,s.else,s.elseif,s.pre]),a=r.B,c=o.te();if(Object.keys(c).length>0||r.F.size>0)return;let l=e.q,u=[],f=0,p=[];for(let d=n.length-1;d>=0;--d)p.push(n[d]);for(;p.length>0;){let d=p.pop();if(d.nodeType===Node.ELEMENT_NODE){let T=d;if(T.tagName==="TEMPLATE"||T.tagName.includes("-"))return;let R=z(T.tagName).toUpperCase();if(r.F.has(R)||c[R])return;let H=T.attributes;for(let P=0;P<H.length;++P){let D=(y=H.item(P))==null?void 0:y.name;if(!D)continue;if(i.has(D))return;let{terms:B,flags:ae}=l.ke(D),[Z,V]=B,x=(b=a[D])!=null?b:a[Z];if(x){if(x===qt)return;u.push({nodeIndex:f,attrName:D,directive:x,option:V,flags:ae})}}++f}let v=d.childNodes;for(let T=v.length-1;T>=0;--T)p.push(v[T])}if(u.length!==0)return new t(u)}y(e,n){let o=[],r=[];for(let s=n.length-1;s>=0;--s)r.push(n[s]);for(;r.length>0;){let s=r.pop();s.nodeType===Node.ELEMENT_NODE&&o.push(s);let i=s.childNodes;for(let a=i.length-1;a>=0;--a)r.push(i[a])}for(let s=0;s<this.se.length;++s){let i=this.se[s],a=o[i.nodeIndex];a&&e.y(i.directive,a,i.attrName,!1,i.option,i.flags)}}};var us=(t,e)=>{let n=e.parentNode;if(n)for(let o=0;o<t.items.length;++o)n.insertBefore(t.items[o],e)},fs=t=>{var a;let e=t.length,n=t.slice(),o=[],r,s,i;for(let c=0;c<e;++c){let l=t[c];if(l===0)continue;let u=o[o.length-1];if(u===void 0||t[u]<l){n[c]=u!=null?u:-1,o.push(c);continue}for(r=0,s=o.length-1;r<s;)i=r+s>>1,t[o[i]]<l?r=i+1:s=i;l<t[o[r]]&&(r>0&&(n[c]=o[r-1]),o[r]=c)}for(r=o.length,s=(a=o[r-1])!=null?a:-1;r-- >0;)o[r]=s,s=n[s];return o},Kt=class{static mt(e){let{oldItems:n,newValues:o,getKey:r,isSameValue:s,mountNewValue:i,removeMountItem:a,endAnchor:c}=e,l=n.length,u=o.length,f=new Array(u),p=new Set;for(let x=0;x<u;++x){let k=r(o[x]);if(k===void 0||p.has(k))return;p.add(k),f[x]=k}let y=new Array(u),b=0,d=l-1,v=u-1;for(;b<=d&&b<=v;){let x=n[b];if(r(x.value)!==f[b]||!s(x.value,o[b]))break;x.value=o[b],y[b]=x,++b}for(;b<=d&&b<=v;){let x=n[d];if(r(x.value)!==f[v]||!s(x.value,o[v]))break;x.value=o[v],y[v]=x,--d,--v}if(b>d){for(let x=v;x>=b;--x){let k=x+1<u?y[x+1].items[0]:c;y[x]=i(x,o[x],k)}return y}if(b>v){for(let x=b;x<=d;++x)a(n[x]);return y}let T=b,R=b,H=v-R+1,P=new Array(H).fill(0),D=new Map;for(let x=R;x<=v;++x)D.set(f[x],x);let B=!1,ae=0;for(let x=T;x<=d;++x){let k=n[x],_=D.get(r(k.value));if(_===void 0){a(k);continue}if(!s(k.value,o[_])){a(k);continue}k.value=o[_],y[_]=k,P[_-R]=x+1,_>=ae?ae=_:B=!0}let Z=B?fs(P):[],V=Z.length-1;for(let x=H-1;x>=0;--x){let k=R+x,_=k+1<u?y[k+1].items[0]:c;if(P[x]===0){y[k]=i(k,o[k],_);continue}let Fe=y[k];B&&(V>=0&&Z[V]===x?--V:Fe&&us(Fe,_))}return y}};var mt=class{constructor(e){m(this,"T",[]);m(this,"P",new Map);m(this,"ie");this.ie=e}get v(){return this.T.length}ae(e){let n=this.ie(e.value);n!==void 0&&this.P.set(n,e)}ce(e){var o;let n=this.ie((o=this.T[e])==null?void 0:o.value);n!==void 0&&this.P.delete(n)}static yt(e,n){return{items:[],index:e,value:n,order:-1}}w(e){e.order=this.v,this.T.push(e),this.ae(e)}ht(e,n){let o=this.v;for(let r=e;r<o;++r)this.T[r].order=r+1;n.order=e,this.T.splice(e,0,n),this.ae(n)}D(e){return this.T[e]}pe(e,n){this.ce(e),this.T[e]=n,this.ae(n),n.order=e}Me(e){this.ce(e),this.T.splice(e,1);let n=this.v;for(let o=e;o<n;++o)this.T[o].order=o}Ve(e){let n=this.v;for(let o=e;o<n;++o)this.ce(o);this.T.splice(e)}tn(e){return this.P.has(e)}gt(e){var o;let n=this.P.get(e);return(o=n==null?void 0:n.order)!=null?o:-1}};var An=Symbol("r-for"),ls=t=>-1,wo=()=>{},Gt=class Gt{constructor(e){m(this,"o");m(this,"x");m(this,"Oe");m(this,"R");this.o=e,this.x=e.r.p.for,this.Oe=It(this.x),this.R=e.r.p.pre}k(e){let n=e.hasAttribute(this.x);return n&&this.Ne(e),e.hasAttribute(this.o.r.p.is)||e.hasAttribute("is")||this.o.V.j(e,r=>{r.hasAttribute(this.x)&&this.Ne(r)}),n}Z(e){return e[An]?!0:(e[An]=!0,Lt(e,this.Oe).forEach(n=>n[An]=!0),!1)}Ne(e){if(e.hasAttribute(this.R)||this.Z(e))return;let n=e.getAttribute(this.x);if(!n){j(0,this.x,e);return}e.removeAttribute(this.x),this.bt(e,n)}Le(e){return pe(e)?[]:(K(e)&&(e=e()),Symbol.iterator in Object(e)?e:typeof e=="number"?(o=>({*[Symbol.iterator](){for(let r=1;r<=o;r++)yield r}}))(e):Object.entries(e))}bt(e,n){var bt;let o=this.xt(n);if(!(o!=null&&o.list)){j(1,this.x,n,e);return}let r=this.o.r.p.key,s=this.o.r.p.keyBind,i=(bt=e.getAttribute(r))!=null?bt:e.getAttribute(s);e.removeAttribute(r),e.removeAttribute(s);let a=Ge(e),c=zt.dt(this.o,a),l=e.parentNode;if(!l)return;let u=`${this.x} => ${n}`,f=new Comment(`__begin__ ${u}`);l.insertBefore(f,e),We(f,a),a.forEach(I=>{Y(I)}),e.remove();let p=new Comment(`__end__ ${u}`);l.insertBefore(p,f.nextSibling);let y=this.o,b=y.m,d=b.L(),T=d.length===1?[void 0,d[0]]:void 0,R=this.Tt(i),H=(I,J)=>R(I)===R(J),P=(I,J)=>I===J,D=(I,J,ne)=>{let re=o.createContext(J,I),xe=mt.yt(re.index,J),Oe=()=>{var S,Q;let ke=(Q=(S=p.parentNode)!=null?S:f.parentNode)!=null?Q:l,h=ne.previousSibling,M=[];for(let $=0;$<a.length;++$){let X=a[$].cloneNode(!0);ke.insertBefore(X,ne),M.push(X)}for(c?c.y(y,M):Pe(y,M),h=h.nextSibling;h!==ne;)xe.items.push(h),h=h.nextSibling};return T?(T[0]=re.ctx,b.E(T,Oe)):b.E(d,()=>{b.w(re.ctx),Oe()}),xe},B=(I,J)=>{let ne=N.D(I).items,re=ne[ne.length-1].nextSibling;for(let xe of ne)Y(xe);N.pe(I,D(I,J,re))},ae=(I,J)=>{N.w(D(I,J,p))},Z=I=>{for(let J of N.D(I).items)Y(J)},V=I=>{let J=N.v;for(let ne=I;ne<J;++ne)N.D(ne).index(ne)},x=I=>{let J=f.parentNode,ne=p.parentNode;if(!J||!ne)return;let re=N.v;K(I)&&(I=I());let xe=A(I[0]);if(w(xe)&&xe.length===0){we(f,p),N.Ve(0);return}let Oe=[];for(let E of this.Le(I[0]))Oe.push(E);let ke=Kt.mt({oldItems:N.T,newValues:Oe,getKey:R,isSameValue:P,mountNewValue:(E,g,O)=>D(E,g,O),removeMountItem:E=>{for(let g=0;g<E.items.length;++g)Y(E.items[g])},endAnchor:p});if(ke){N.T=ke,N.P.clear();for(let E=0;E<ke.length;++E){let g=ke[E];g.order=E,g.index(E);let O=R(g.value);O!==void 0&&N.P.set(O,g)}return}let h=0,M=Number.MAX_SAFE_INTEGER,S=re,Q=this.o.r.forGrowThreshold,$=()=>N.v<S+Q;for(let E of Oe){let g=()=>{if(h<re){let O=N.D(h++);if(H(O.value,E)){if(P(O.value,E))return;B(h-1,E);return}let U=N.gt(R(E));if(U>=h&&U-h<10){if(--h,M=Math.min(M,h),Z(h),N.Me(h),--re,U>h+1)for(let oe=h;oe<U-1&&oe<re&&!H(N.D(h).value,E);)++oe,Z(h),N.Me(h),--re;g();return}$()?(N.ht(h-1,D(h,E,N.D(h-1).items[0])),M=Math.min(M,h-1),++re):B(h-1,E)}else ae(h++,E)};g()}let X=h;for(re=N.v;h<re;)Z(h++);N.Ve(X),V(M)},k=()=>{_.stop(),Te(),Te=wo},_=b.N(o.list),Fe=_.value,Te=wo,gt=0,N=new mt(R);for(let I of this.Le(Fe()[0]))N.w(D(gt++,I,p));G(f,k),Te=_.subscribe(x)}xt(e){var c,l;let n=Gt.Rt.exec(e);if(!n)return;let o=(n[1]+((c=n[2])!=null?c:"")).split(",").map(u=>u.trim()),r=o.length>1?o.length-1:-1,s=r!==-1&&(o[r]==="index"||(l=o[r])!=null&&l.startsWith("#"))?o[r]:"";s&&o.splice(r,1);let i=n[3];if(!i||o.length===0)return;let a=/[{[]/.test(e);return{list:i,createContext:(u,f)=>{let p={},y=A(u);if(!a&&o.length===1)p[o[0]]=u;else if(w(y)){let d=0;for(let v of o)p[v]=y[d++]}else for(let d of o)p[d]=y[d];let b={ctx:p,index:ls};return s&&(b.index=p[s.startsWith("#")?s.substring(1):s]=ue(f)),b}}}Tt(e){if(!e)return o=>o;let n=e.trim();if(!n)return o=>o;if(n.includes(".")){let o=this.Et(n),r=o.length>1?o.slice(1):void 0;return s=>{let i=A(s),a=this.Ie(i,o);return a!==void 0||!r?a:this.Ie(i,r)}}return o=>{var r;return A((r=A(o))==null?void 0:r[n])}}Et(e){return e.split(".").filter(n=>n.length>0)}Ie(e,n){var r;let o=e;for(let s of n)o=(r=A(o))==null?void 0:r[s];return A(o)}};m(Gt,"Rt",/\{?\[?\(?([^)}\]]+)\)?\]?\}?([^)]+)?\s+\b(?:in|of)\b\s+(.*)\s*$/);var Wt=Gt;var Jt=class{constructor(e){m(this,"ue",0);m(this,"le",new Map);m(this,"m");m(this,"Pe");m(this,"De");m(this,"Ue");m(this,"V");m(this,"q");m(this,"r");m(this,"R");m(this,"Be");this.m=e,this.r=e.r,this.De=new Wt(this),this.Pe=new kt(this),this.Ue=new Ft(this),this.V=new jt(this),this.q=new _t(this),this.R=this.r.p.pre,this.Be=this.r.p.dynamic}Ct(e){let n=me(e)?[e]:e.querySelectorAll("template");for(let o of n){if(o.hasAttribute(this.R))continue;let r=o.parentNode;if(!r)continue;let s=o.nextSibling;if(o.remove(),!o.content)continue;let i=[...o.content.childNodes];for(let a of i)r.insertBefore(a,s);Pe(this,i)}}$(e){++this.ue;try{if(e.nodeType!==Node.ELEMENT_NODE||e.hasAttribute(this.R)||this.Pe.k(e)||this.De.k(e)||this.Ue.k(e))return;this.V.k(e),this.Ct(e),this.we(e,!0)}finally{--this.ue,this.ue===0&&this.wt()}}vt(e,n){let o=document;if(!o){let r=e.parentNode;for(;r!=null&&r.parentNode;)r=r.parentNode;if(!r)return null;o=r}return o.querySelector(n)}He(e,n){let o=this.vt(e,n);if(!o)return!1;let r=e.parentElement;if(!r)return!1;let s=new Comment(`teleported => '${n}'`);return r.insertBefore(s,e),e.teleportedFrom=s,s.teleportedTo=e,G(s,()=>{Y(e)}),o.appendChild(e),!0}St(e,n){this.le.set(e,n)}wt(){let e=this.le;if(e.size!==0){this.le=new Map;for(let[n,o]of e.entries())this.He(n,o)}}we(e,n){var s;let o=this.q.Ce(e,n),r=this.r.B;for(let[i,a]of o.entries()){let[c,l]=a.ne,u=(s=r[i])!=null?s:r[c];if(!u){console.error("directive not found:",c);continue}let f=a.ve;for(let p=0;p<f.length;++p){let y=f[p];this.y(u,y,i,!1,l,a.re)}}}y(e,n,o,r,s,i){if(n.hasAttribute(this.R))return;let a=n.getAttribute(o);n.removeAttribute(o);let c=l=>{let u=l;for(;u;){let f=u.getAttribute(ct);if(f)return f;u=u.parentElement}return null};if(yn()){let l=c(n);if(l){this.m.E(uo(l),()=>{this.O(e,n,a,s,i)});return}}this.O(e,n,a,s,i)}At(e,n,o){return e!==Pt?!1:(F(o)||this.He(n,o)||this.St(n,o),!0)}O(e,n,o,r,s){if(n.nodeType!==Node.ELEMENT_NODE||o==null||this.At(e,n,o))return;let i=this.kt(r,e.once),a=this.Mt(e,o),c=this.Vt(a,i);G(n,c.stop);let l=this.Ot(n,o,a,i,r,s),u=this.Nt(e,l,c);if(!u)return;let f=this.Lt(l,a,i,r,u);f(),e.once||(c.result=a.subscribe(f),i&&(c.dynamic=i.subscribe(f)))}kt(e,n){let o=ho(e,this.Be);if(o)return this.m.N(z(o),void 0,void 0,void 0,n)}Mt(e,n){return this.m.N(n,e.isLazy,e.isLazyKey,e.collectRefObj,e.once)}Vt(e,n){let o={stop:()=>{var r,s,i;e.stop(),n==null||n.stop(),(r=o.result)==null||r.call(o),(s=o.dynamic)==null||s.call(o),(i=o.mounted)==null||i.call(o),o.result=void 0,o.dynamic=void 0,o.mounted=void 0}};return o}Ot(e,n,o,r,s,i){return{el:e,expr:n,values:o.value(),previousValues:void 0,option:r?r.value()[0]:s,previousOption:void 0,flags:i,parseResult:o,dynamicOption:r}}Nt(e,n,o){let r=e.mount(n);if(typeof r=="function"){o.mounted=r;return}return r!=null&&r.unmount&&(o.mounted=r.unmount),r==null?void 0:r.update}Lt(e,n,o,r,s){let i,a;return()=>{let c=n.value(),l=o?o.value()[0]:r;e.values=c,e.previousValues=i,e.option=l,e.previousOption=a,i=c,a=l,s(e)}}};var vo="http://www.w3.org/1999/xlink",ps={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 ms(t){return!!t||t===""}var ds=(t,e,n,o,r,s)=>{var a;if(o){s&&s.includes("camel")&&(o=z(o)),Qt(t,o,e[0],r);return}let i=e.length;for(let c=0;c<i;++c){let l=e[c];if(w(l)){let u=(a=n==null?void 0:n[c])==null?void 0:a[0],f=l[0],p=l[1];Qt(t,f,p,u)}else if(L(l))for(let u of Object.entries(l)){let f=u[0],p=u[1],y=n==null?void 0:n[c],b=y&&f in y?f:void 0;Qt(t,f,p,b)}else{let u=n==null?void 0:n[c],f=e[c++],p=e[c];Qt(t,f,p,u)}}},Nn={mount:()=>({update:({el:t,values:e,previousValues:n,option:o,previousOption:r,flags:s})=>{ds(t,e,n,o,r,s)}})},Qt=(t,e,n,o)=>{if(o&&o!==e&&t.removeAttribute(o),pe(e)){j(3,"r-bind",t);return}if(!W(e)){j(6,`Attribute key is not string at ${t.outerHTML}`,e);return}if(e.startsWith("xlink:")){pe(n)?t.removeAttributeNS(vo,e.slice(6,e.length)):t.setAttributeNS(vo,e,n);return}let r=e in ps;pe(n)||r&&!ms(n)?t.removeAttribute(e):t.setAttribute(e,r?"":n)};var hs=(t,e,n)=>{let o=e.length;for(let r=0;r<o;++r){let s=e[r],i=n==null?void 0:n[r];if(w(s)){let a=s.length;for(let c=0;c<a;++c)So(t,s[c],i==null?void 0:i[c])}else So(t,s,i)}},Mn={mount:()=>({update:({el:t,values:e,previousValues:n})=>{hs(t,e,n)}})},So=(t,e,n)=>{let o=A(e),r=A(n),s=t.classList,i=W(o),a=W(r);if(o&&!i){let c=o;if(r&&!a){let l=r;for(let u in l)(!(u in c)||!A(c[u]))&&s.remove(u)}for(let l in c)A(c[l])&&s.add(l)}else if(i){if(r!==o){let c=a?Qe(r):[],l=Qe(o);c.length>0&&s.remove(...c),l.length>0&&s.add(...l)}}else if(r){let c=a?Qe(r):[];c.length>0&&s.remove(...c)}};function ys(t,e){if(t.length!==e.length)return!1;let n=!0;for(let o=0;n&&o<t.length;o++)n=Ae(t[o],e[o]);return n}function Ae(t,e){if(t===e)return!0;let n=ln(t),o=ln(e);if(n||o)return n&&o?t.getTime()===e.getTime():!1;if(n=rt(t),o=rt(e),n||o)return t===e;if(n=w(t),o=w(e),n||o)return n&&o?ys(t,e):!1;if(n=L(t),o=L(e),n||o){if(!n||!o)return!1;let r=Object.keys(t).length,s=Object.keys(e).length;if(r!==s)return!1;for(let i in t){let a=Object.prototype.hasOwnProperty.call(t,i),c=Object.prototype.hasOwnProperty.call(e,i);if(a&&!c||!Ae(t[i],e[i]))return!1}return!0}return String(t)===String(e)}function Xt(t,e){return t.findIndex(n=>Ae(n,e))}var Ao=t=>{let e=parseFloat(t);return isNaN(e)?t:e};var On=t=>{if(!C(t))throw q(3,"pause");t(void 0,void 0,3)};var kn=t=>{if(!C(t))throw q(3,"resume");t(void 0,void 0,4)};var Mo={mount:({el:t,parseResult:e,flags:n})=>({update:({values:o})=>{gs(t,o[0])},unmount:bs(t,e,n)})},gs=(t,e)=>{let n=Io(t);if(n&&Oo(t))w(e)?e=Xt(e,Ne(t))>-1:le(e)?e=e.has(Ne(t)):e=ws(t,e),t.checked=e;else if(n&&ko(t))t.checked=Ae(e,Ne(t));else if(n||Vo(t))Lo(t)?t.value!==(e==null?void 0:e.toString())&&(t.value=e):t.value!==e&&(t.value=e);else if(Po(t)){let o=t.options,r=o.length,s=t.multiple;for(let i=0;i<r;i++){let a=o[i],c=Ne(a);if(s)w(e)?a.selected=Xt(e,c)>-1:a.selected=e.has(c);else if(Ae(Ne(a),e)){t.selectedIndex!==i&&(t.selectedIndex=i);return}}!s&&t.selectedIndex!==-1&&(t.selectedIndex=-1)}else j(7,t)},dt=t=>(C(t)&&(t=t()),K(t)&&(t=t()),t?W(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}),Oo=t=>t.type==="checkbox",ko=t=>t.type==="radio",Lo=t=>t.type==="number"||t.type==="range",Io=t=>t.tagName==="INPUT",Vo=t=>t.tagName==="TEXTAREA",Po=t=>t.tagName==="SELECT",bs=(t,e,n)=>{let o=e.value,r=dt(n==null?void 0:n.join(",")),s=dt(o()[1]),i={int:r.int||s.int,lazy:r.lazy||s.lazy,number:r.number||s.number,trim:r.trim||s.trim};if(!e.refs[0])return j(8,t),()=>{};let a=()=>e.refs[0],c=Io(t);return c&&Oo(t)?xs(t,a):c&&ko(t)?vs(t,a):c||Vo(t)?Ts(t,i,a,o):Po(t)?Ss(t,a,o):(j(7,t),()=>{})},No=/[.,' ·٫]/,Ts=(t,e,n,o)=>{let s=e.lazy?"change":"input",i=Lo(t),a=()=>{!e.trim&&!dt(o()[1]).trim||(t.value=t.value.trim())},c=p=>{let y=p.target;y.composing=1},l=p=>{let y=p.target;y.composing&&(y.composing=0,y.dispatchEvent(new Event(s)))},u=()=>{t.removeEventListener(s,f),t.removeEventListener("change",a),t.removeEventListener("compositionstart",c),t.removeEventListener("compositionend",l),t.removeEventListener("change",l)},f=p=>{let y=n();if(!y)return;let b=p.target;if(!b||b.composing)return;let d=b.value,v=dt(o()[1]);if(i||v.number||v.int){if(v.int)d=parseInt(d);else{if(No.test(d[d.length-1])&&d.split(No).length===2){if(d+="0",d=parseFloat(d),isNaN(d))d="";else if(y()===d)return}d=parseFloat(d)}isNaN(d)&&(d=""),t.value=d}else v.trim&&(d=d.trim());y(d)};return t.addEventListener(s,f),t.addEventListener("change",a),t.addEventListener("compositionstart",c),t.addEventListener("compositionend",l),t.addEventListener("change",l),u},xs=(t,e)=>{let n="change",o=()=>{t.removeEventListener(n,r)},r=()=>{let s=e();if(!s)return;let i=Ne(t),a=t.checked,c=s();if(w(c)){let l=Xt(c,i),u=l!==-1;a&&!u?c.push(i):!a&&u&&c.splice(l,1)}else le(c)?a?c.add(i):c.delete(i):s(Rs(t,a))};return t.addEventListener(n,r),o},Ne=t=>"_value"in t?t._value:t.value,Do="trueValue",Cs="falseValue",Uo="true-value",Es="false-value",Rs=(t,e)=>{let n=e?Do:Cs;if(n in t)return t[n];let o=e?Uo:Es;return t.hasAttribute(o)?t.getAttribute(o):e},ws=(t,e)=>{if(Do in t)return Ae(e,t.trueValue);let o=Uo;return t.hasAttribute(o)?Ae(e,t.getAttribute(o)):Ae(e,!0)},vs=(t,e)=>{let n="change",o=()=>{t.removeEventListener(n,r)},r=()=>{let s=e();if(!s)return;let i=Ne(t);s(i)};return t.addEventListener(n,r),o},Ss=(t,e,n)=>{let o="change",r=()=>{t.removeEventListener(o,s)},s=()=>{let i=e();if(!i)return;let c=dt(n()[1]).number,l=Array.prototype.filter.call(t.options,u=>u.selected).map(u=>c?Ao(Ne(u)):Ne(u));if(t.multiple){let u=i();try{if(On(i),le(u)){u.clear();for(let f of l)u.add(f)}else w(u)?(u.splice(0),u.push(...l)):i(l)}finally{kn(i),te(i)}}else i(l[0])};return t.addEventListener(o,s),r};var As=["stop","prevent","capture","self","once","left","right","middle","passive"],Ns=t=>{let e={};if(F(t))return;let n=t.split(",");for(let o of As)e[o]=n.includes(o);return e},Ms=(t,e,n,o,r)=>{var l,u;if(o){let f=e.value(),p=A(o.value()[0]);return W(p)?Ln(t,z(p),()=>e.value()[0],(l=r==null?void 0:r.join(","))!=null?l:f[1]):()=>{}}else if(n){let f=e.value();return Ln(t,z(n),()=>e.value()[0],(u=r==null?void 0:r.join(","))!=null?u:f[1])}let s=[],i=()=>{s.forEach(f=>f())},a=e.value(),c=a.length;for(let f=0;f<c;++f){let p=a[f];if(K(p)&&(p=p()),L(p))for(let y of Object.entries(p)){let b=y[0],d=()=>{let T=e.value()[f];return K(T)&&(T=T()),T=T[b],K(T)&&(T=T()),T},v=p[b+"_flags"];s.push(Ln(t,b,d,v))}else j(2,"r-on",t)}return i},In={isLazy:(t,e)=>e===-1&&t%2===0,isLazyKey:(t,e)=>e===0&&!t.endsWith("_flags"),once:!1,collectRefObj:!0,mount:({el:t,parseResult:e,option:n,dynamicOption:o,flags:r})=>Ms(t,e,n,o,r)},Os=(t,e)=>{if(t.startsWith("keydown")||t.startsWith("keyup")||t.startsWith("keypress")){e!=null||(e="");let n=[...t.split("."),...e.split(",")];t=n[0];let o=n[1],r=n.includes("ctrl"),s=n.includes("shift"),i=n.includes("alt"),a=n.includes("meta"),c=l=>!(r&&!l.ctrlKey||s&&!l.shiftKey||i&&!l.altKey||a&&!l.metaKey);return o?[t,l=>c(l)?l.key.toUpperCase()===o.toUpperCase():!1]:[t,c]}return[t,n=>!0]},Ln=(t,e,n,o)=>{if(F(e))return j(5,"r-on",t),()=>{};let r=Ns(o),s=r?{capture:r.capture,passive:r.passive,once:r.once}:void 0,i;[e,i]=Os(e,o);let a=u=>{if(!i(u)||!n&&e==="submit"&&(r!=null&&r.prevent))return;let f=n(u);K(f)&&(f=f(u)),K(f)&&f(u)},c=()=>{t.removeEventListener(e,l,s)},l=u=>{if(!r){a(u);return}try{if(r.left&&u.button!==0||r.middle&&u.button!==1||r.right&&u.button!==2||r.self&&u.target!==t)return;r.stop&&u.stopPropagation(),r.prevent&&u.preventDefault(),a(u)}finally{r.once&&c()}};return t.addEventListener(e,l,s),c};var ks=(t,e,n,o)=>{if(n){o&&o.includes("camel")&&(n=z(n)),et(t,n,e[0]);return}let r=e.length;for(let s=0;s<r;++s){let i=e[s];if(w(i)){let a=i[0],c=i[1];et(t,a,c)}else if(L(i))for(let a of Object.entries(i)){let c=a[0],l=a[1];et(t,c,l)}else{let a=e[s++],c=e[s];et(t,a,c)}}},Ho={mount:()=>({update:({el:t,values:e,option:n,flags:o})=>{ks(t,e,n,o)}})};function Ls(t){return!!t||t===""}var et=(t,e,n)=>{if(pe(e)){j(3,":prop",t);return}if(e==="innerHTML"||e==="textContent"){let s=[...t.childNodes];setTimeout(()=>s.forEach(Ee),1),t[e]=n!=null?n:"";return}let o=t.tagName;if(e==="value"&&o!=="PROGRESS"&&!o.includes("-")){t._value=n;let s=o==="OPTION"?t.getAttribute("value"):t.value,i=n!=null?n:"";s!==i&&(t.value=i),n==null&&t.removeAttribute(e);return}let r=!1;if(n===""||n==null){let s=typeof t[e];s==="boolean"?n=Ls(n):n==null&&s==="string"?(n="",r=!0):s==="number"&&(n=0,r=!0)}try{t[e]=n}catch(s){r||j(4,e,o,n,s)}r&&t.removeAttribute(e)};var Bo={once:!0,mount:({el:t,parseResult:e,expr:n})=>{let o=e,r=o.value()[0],s=w(r),i=o.refs[0];return s?r.push(t):i?i==null||i(t):o.context[n]=t,()=>{if(s){let a=r.indexOf(t);a!==-1&&r.splice(a,1)}else i==null||i(null)}}};var Is=(t,e)=>{let n=Be(t).data,o=n._ord;to(o)&&(o=n._ord=t.style.display),at(e[0])?t.style.display=o:t.style.display="none"},$o={mount:()=>({update:({el:t,values:e})=>{Is(t,e)}})};var Vs=(t,e,n)=>{let o=e.length;for(let r=0;r<o;++r){let s=e[r],i=n==null?void 0:n[r];if(w(s)){let a=s.length;for(let c=0;c<a;++c)jo(t,s[c],i==null?void 0:i[c])}else jo(t,s,i)}},Yt={mount:()=>({update:({el:t,values:e,previousValues:n})=>{Vs(t,e,n)}})},jo=(t,e,n)=>{let o=A(e),r=A(n),s=t.style,i=W(o);if(o&&!i){let a=o;if(r&&!W(r)){let c=r;for(let l in c)A(a[l])==null&&Pn(s,l,"")}for(let c in a)Pn(s,c,a[c])}else{let a=s.display;if(i?r!==o&&(s.cssText=o):r&&t.removeAttribute("style"),"_ord"in Be(t).data)return;s.display=a}},_o=/\s*!important$/;function Pn(t,e,n){let o=A(n);if(w(o))o.forEach(r=>{Pn(t,e,r)});else{let r=o==null?"":String(o);if(e.startsWith("--"))t.setProperty(e,r);else{let s=Ps(t,e);_o.test(r)?t.setProperty(Je(s),r.replace(_o,""),"important"):t[s]=r}}}var Fo=["Webkit","Moz","ms"],Vn={};function Ps(t,e){let n=Vn[e];if(n)return n;let o=z(e);if(o!=="filter"&&o in t)return Vn[e]=o;o=ft(o);for(let r=0;r<Fo.length;r++){let s=Fo[r]+o;if(s in t)return Vn[e]=s}return e}var fe=t=>qo(A(t)),qo=(t,e=new WeakMap)=>{if(!t||!L(t))return t;if(w(t))return t.map(fe);if(le(t)){let o=new Set;for(let r of t.keys())o.add(fe(r));return o}if(Le(t)){let o=new Map;for(let r of t)o.set(fe(r[0]),fe(r[1]));return o}if(e.has(t))return A(e.get(t));let n=xt({},t);e.set(t,n);for(let o of Object.entries(n))n[o[0]]=qo(A(o[1]),e);return n};var Ds=(t,e)=>{var o;let n=e[0];t.textContent=le(n)?JSON.stringify(fe([...n])):Le(n)?JSON.stringify(fe([...n])):L(n)?JSON.stringify(fe(n)):(o=n==null?void 0:n.toString())!=null?o:""},zo={mount:()=>({update:({el:t,values:e})=>{Ds(t,e)}})};var Ko={mount:()=>({update:({el:t,values:e})=>{et(t,"value",e[0])}})};var Ue=class Ue{constructor(e){m(this,"B",{});m(this,"p",{});m(this,"ft",()=>Object.keys(this.B).filter(e=>e.length===1||!e.startsWith(":")));m(this,"ee",new Map);m(this,"F",new Map);m(this,"forGrowThreshold",10);m(this,"globalContext");m(this,"useInterpolation",!0);m(this,"propValidationMode","throw");if(this.setDirectives("r-"),e){this.globalContext=e;return}this.globalContext=this.Pt()}static getDefault(){var e;return(e=Ue.je)!=null?e:Ue.je=new Ue}Pt(){let e={},n=globalThis;for(let o of Ue.It.split(","))e[o]=n[o];return e.ref=Se,e.sref=ue,e.flatten=fe,e}addComponent(...e){for(let n of e){if(!n.defaultName){Ke.warning("Registered component's default name is not defined",n);continue}this.ee.set(ft(n.defaultName),n),this.F.set(ft(n.defaultName).toLocaleUpperCase(),n)}}setDirectives(e){this.B={".":Ho,":":Nn,"@":In,[`${e}on`]:In,[`${e}bind`]:Nn,[`${e}html`]:qt,[`${e}text`]:zo,[`${e}show`]:$o,[`${e}model`]:Mo,":style":Yt,[`${e}style`]:Yt,[`${e}bind:style`]:Yt,":class":Mn,[`${e}bind:class`]:Mn,":ref":Bo,":value":Ko,[`${e}teleport`]:Pt},this.p={for:`${e}for`,if:`${e}if`,else:`${e}else`,elseif:`${e}else-if`,pre:`${e}pre`,inherit:`${e}inherit`,text:`${e}text`,context:":context",contextAlias:`${e}context`,bind:`${e}bind`,on:`${e}on`,keyBind:":key",key:"key",is:":is",teleport:`${e}teleport`,dynamic:"_d_"}}updateDirectives(e){e(this.B,this.p)}};m(Ue,"je"),m(Ue,"It","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 he=Ue;var Zt=(t,e)=>{if(!t)return;let o=(e!=null?e:he.getDefault()).p,r=/(\{\{[^]*?\}\}|\[\[[^]*?\]\])/g,s=[{start:"{{",end:"}}"},{start:"[[",end:"]]"}];for(let i of Hs(t,o.pre,s))Us(i,o.text,r,s)},Us=(t,e,n,o)=>{var c;let r=t.textContent;if(!r)return;let s=n,i=r.split(s);if(i.length<=1)return;if(((c=t.parentElement)==null?void 0:c.childNodes.length)===1&&i.length===3){let l=i[1],u=Wo(l,o);if(u&&F(i[0])&&F(i[2])){let f=t.parentElement;f.setAttribute(e,l.substring(u.start.length,l.length-u.end.length)),f.innerText="";return}}let a=document.createDocumentFragment();for(let l of i){let u=Wo(l,o);if(u){let f=document.createElement("span");f.setAttribute(e,l.substring(u.start.length,l.length-u.end.length)),a.appendChild(f)}else a.appendChild(document.createTextNode(l))}t.replaceWith(a)},Hs=(t,e,n)=>{let o=[],r=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)})&&o.push(s);else{if((i=s==null?void 0:s.hasAttribute)!=null&&i.call(s,e))return;for(let a of ve(s))r(a)}};return r(t),o},Wo=(t,e)=>e.find(n=>t.startsWith(n.start)&&t.endsWith(n.end));var Bs=9,$s=10,js=13,_s=32,Me=46,en=44,Fs=39,qs=34,tn=40,tt=41,nn=91,Dn=93,Un=63,zs=59,Go=58,Jo=123,on=125,je=43,rn=45,Hn=96,Qo=47,Bn=92,Xo=new Set([2,3]),or={"=":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},Ks=Yn(xt({"=>":2},or),{"||":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}),rr=Object.keys(or),Ws=new Set(rr),jn=new Set(["=>"]);rr.forEach(t=>jn.add(t));var Yo={true:!0,false:!1,null:null},Gs="this",nt="Expected ",_e="Unexpected ",Fn="Unclosed ",Js=nt+":",Zo=nt+"expression",Qs="missing }",Xs=_e+"object property",Ys=Fn+"(",er=nt+"comma",tr=_e+"token ",Zs=_e+"period",$n=nt+"expression after ",ei="missing unaryOp argument",ti=Fn+"[",ni=nt+"exponent (",oi="Variable names cannot start with a number (",ri=Fn+'quote after "',ht=t=>t>=48&&t<=57,nr=t=>Ks[t],_n=class{constructor(e){m(this,"u");m(this,"e");this.u=e,this.e=0}get H(){return this.u.charAt(this.e)}get h(){return this.u.charCodeAt(this.e)}f(e){return this.u.charCodeAt(this.e)===e}z(e){return e>=65&&e<=90||e>=97&&e<=122||e===36||e===95||e>=128}fe(e){return this.z(e)||ht(e)}i(e){return new Error(`${e} at character ${this.e}`)}g(){let e=this.h,n=this.u,o=this.e;for(;e===_s||e===Bs||e===$s||e===js;)e=n.charCodeAt(++o);this.e=o}parse(){let e=this.de();return e.length===1?e[0]:{type:0,body:e}}de(e){let n=[];for(;this.e<this.u.length;){let o=this.h;if(o===zs||o===en)this.e++;else{let r=this.S();if(r)n.push(r);else if(this.e<this.u.length){if(o===e)break;throw this.i(_e+'"'+this.H+'"')}}}return n}S(){var n;let e=(n=this.Dt())!=null?n:this.$e();return this.g(),this.Ut(e)}me(){this.g();let e=this.u,n=this.e,o=e.charCodeAt(n),r=e.charCodeAt(n+1),s=e.charCodeAt(n+2),i=e.charCodeAt(n+3);if(isNaN(o))return!1;let a=!1,c=0;return o===62&&r===62&&s===62&&i===61?(a=">>>=",c=4):o===61&&r===61&&s===61?(a="===",c=3):o===33&&r===61&&s===61?(a="!==",c=3):o===62&&r===62&&s===62?(a=">>>",c=3):o===60&&r===60&&s===61?(a="<<=",c=3):o===62&&r===62&&s===61?(a=">>=",c=3):o===42&&r===42&&s===61?(a="**=",c=3):o===61&&r===62?(a="=>",c=2):o===124&&r===124?(a="||",c=2):o===63&&r===63?(a="??",c=2):o===38&&r===38?(a="&&",c=2):o===61&&r===61?(a="==",c=2):o===33&&r===61?(a="!=",c=2):o===60&&r===61?(a="<=",c=2):o===62&&r===61?(a=">=",c=2):o===60&&r===60?(a="<<",c=2):o===62&&r===62?(a=">>",c=2):o===43&&r===61?(a="+=",c=2):o===45&&r===61?(a="-=",c=2):o===42&&r===61?(a="*=",c=2):o===47&&r===61?(a="/=",c=2):o===37&&r===61?(a="%=",c=2):o===38&&r===61?(a="&=",c=2):o===94&&r===61?(a="^=",c=2):o===124&&r===61?(a="|=",c=2):o===42&&r===42?(a="**",c=2):o===105&&r===110?this.fe(e.charCodeAt(n+2))||(a="in",c=2):o===61?(a="=",c=1):o===124?(a="|",c=1):o===94?(a="^",c=1):o===38?(a="&",c=1):o===60?(a="<",c=1):o===62?(a=">",c=1):o===43?(a="+",c=1):o===45?(a="-",c=1):o===42?(a="*",c=1):o===47?(a="/",c=1):o===37&&(a="%",c=1),a?(this.e+=c,a):!1}$e(){let e,n,o,r,s,i,a,c;if(s=this.W(),!s||(n=this.me(),!n))return s;if(r={value:n,prec:nr(n),right_a:jn.has(n)},i=this.W(),!i)throw this.i($n+n);let l=[s,r,i];for(;n=this.me();){o=nr(n),r={value:n,prec:o,right_a:jn.has(n)},c=n;let u=f=>r.right_a&&f.right_a?o>f.prec:o<=f.prec;for(;l.length>2&&u(l[l.length-2]);)i=l.pop(),n=l.pop().value,s=l.pop(),e=this._e(n,s,i),l.push(e);if(e=this.W(),!e)throw this.i($n+c);l.push(r,e)}for(a=l.length-1,e=l[a];a>1;)e=this._e(l[a-1].value,l[a-2],e),a-=2;return e}W(){let e;if(this.g(),e=this.Bt(),e)return this.ye(e);let n=this.h;if(ht(n)||n===Me)return this.Ht();if(n===Fs||n===qs)e=this.jt();else if(n===nn)e=this.$t();else{let o=this._t();if(o){let r=this.W();if(!r)throw this.i(ei);return this.ye({type:7,operator:o,argument:r})}this.z(n)?(e=this.he(),e.name in Yo?e={type:4,value:Yo[e.name],raw:e.name}:e.name===Gs&&(e={type:5})):n===tn&&(e=this.Ft())}return e?(e=this.G(e),this.ye(e)):!1}_e(e,n,o){if(e==="=>"){let r=n.type===1?n.expressions:[n];return{type:15,params:r,body:o}}return Ws.has(e)?{type:16,operator:e,left:n,right:o}:{type:8,operator:e,left:n,right:o}}Bt(){let e={node:!1};return this.qt(e),e.node||(this.Kt(e),e.node)||(this.zt(e),e.node)||(this.Fe(e),e.node)||this.Wt(e),e.node}ye(e){let n={node:e};return this.Gt(n),this.Jt(n),this.Qt(n),n.node}_t(){let e=this.u,n=this.e,o=e.charCodeAt(n),r=e.charCodeAt(n+1),s=e.charCodeAt(n+2),i=e.charCodeAt(n+3);return o===rn?(this.e++,"-"):o===33?(this.e++,"!"):o===126?(this.e++,"~"):o===je?(this.e++,"+"):o===110&&r===101&&s===119&&!this.fe(i)?(this.e+=3,"new"):!1}Dt(){let e={};return this.Xt(e),e.node}Ut(e){let n={node:e};return this.Yt(n),n.node}G(e){this.g();let n=this.h;for(;n===Me||n===nn||n===tn||n===Un;){let o;if(n===Un){if(this.u.charCodeAt(this.e+1)!==Me)break;o=!0,this.e+=2,this.g(),n=this.h}if(this.e++,n===nn){if(e={type:3,computed:!0,object:e,property:this.S()},this.g(),n=this.h,n!==Dn)throw this.i(ti);this.e++}else n===tn?e={type:6,arguments:this.qe(tt),callee:e}:(o&&this.e--,this.g(),e={type:3,computed:!1,object:e,property:this.he()});o&&(e.optional=!0),this.g(),n=this.h}return e}Ht(){let e=this.u,n=this.e,o=n;for(;ht(e.charCodeAt(o));)o++;if(e.charCodeAt(o)===Me)for(o++;ht(e.charCodeAt(o));)o++;let r=e.charCodeAt(o);if(r===101||r===69){o++;let a=e.charCodeAt(o);(a===je||a===rn)&&o++;let c=o;for(;ht(e.charCodeAt(o));)o++;if(c===o){this.e=o;let l=e.slice(n,o);throw this.i(ni+l+this.H+")")}}this.e=o;let s=e.slice(n,o),i=e.charCodeAt(o);if(this.z(i))throw this.i(oi+s+this.H+")");if(i===Me||s.length===1&&s.charCodeAt(0)===Me)throw this.i(Zs);return{type:4,value:parseFloat(s),raw:s}}jt(){let e=this.u,n=e.length,o=this.e,r=e.charCodeAt(this.e++),s=this.e,i=s,a=[],c=!1,l=!1;for(;s<n;){let f=e.charCodeAt(s);if(f===r){l=!0,this.e=s+1;break}if(f===Bn){c||(c=!0),a.push(e.slice(i,s));let p=e.charCodeAt(s+1);a.push(this.Ke(p)),s+=2,i=s}else s++}let u=c?a.join("")+e.slice(i,l?s:n):e.slice(i,l?s:n);if(!l)throw this.e=s,this.i(ri+u+'"');return{type:4,value:u,raw:e.substring(o,this.e)}}Ke(e){switch(e){case 110:return`
|
|
2
|
-
`;case 114:return"\r";case 116:return" ";case 98:return"\b";case 102:return"\f";case 118:return"\v";default:return isNaN(e)?"":String.fromCharCode(e)}}he(){let e=this.h,n=this.e;if(this.z(e))this.e++;else throw this.i(_e+this.H);for(;this.e<this.u.length&&(e=this.h,this.fe(e));)this.e++;return{type:2,name:this.u.slice(n,this.e)}}qe(e){let n=[],o=!1,r=0;for(;this.e<this.u.length;){this.g();let s=this.h;if(s===e){if(o=!0,this.e++,e===tt&&r&&r>=n.length)throw this.i(tr+String.fromCharCode(e));break}else if(s===en){if(this.e++,r++,r!==n.length){if(e===tt)throw this.i(tr+",");for(let i=n.length;i<r;i++)n.push(null)}}else{if(n.length!==r&&r!==0)throw this.i(er);{let i=this.S();if(!i||i.type===0)throw this.i(er);n.push(i)}}}if(!o)throw this.i(nt+String.fromCharCode(e));return n}Ft(){this.e++;let e=this.de(tt);if(this.f(tt))return this.e++,e.length===1?e[0]:e.length?{type:1,expressions:e}:!1;throw this.i(Ys)}$t(){return this.e++,{type:9,elements:this.qe(Dn)}}qt(e){if(this.f(Jo)){this.e++;let n=[];for(;!isNaN(this.h);){if(this.g(),this.f(on)){this.e++,e.node=this.G({type:10,properties:n});return}let o=this.S();if(!o)break;if(this.g(),o.type===2&&(this.f(en)||this.f(on)))n.push({type:12,computed:!1,key:o,value:o,shorthand:!0});else if(this.f(Go)){this.e++;let r=this.S();if(!r)throw this.i(Xs);let s=o.type===9;n.push({type:12,computed:s,key:s?o.elements[0]:o,value:r,shorthand:!1}),this.g()}else n.push(o);this.f(en)&&this.e++}throw this.i(Qs)}}Kt(e){let n=this.h;if((n===je||n===rn)&&n===this.u.charCodeAt(this.e+1)){this.e+=2;let o=e.node={type:13,operator:n===je?"++":"--",argument:this.G(this.he()),prefix:!0};if(!o.argument||!Xo.has(o.argument.type))throw this.i(_e+o.operator)}}Jt(e){let n=e.node,o=this.h;if((o===je||o===rn)&&o===this.u.charCodeAt(this.e+1)){if(!Xo.has(n.type))throw this.i(_e+(o===je?"++":"--"));this.e+=2,e.node={type:13,operator:o===je?"++":"--",argument:n,prefix:!1}}}zt(e){this.u.charCodeAt(this.e)===Me&&this.u.charCodeAt(this.e+1)===Me&&this.u.charCodeAt(this.e+2)===Me&&(this.e+=3,e.node={type:14,argument:this.S()})}Yt(e){if(e.node&&this.f(Un)){this.e++;let n=e.node,o=this.S();if(!o)throw this.i(Zo);if(this.g(),this.f(Go)){this.e++;let r=this.S();if(!r)throw this.i(Zo);e.node={type:11,test:n,consequent:o,alternate:r}}else throw this.i(Js)}}Xt(e){if(this.g(),this.f(tn)){let n=this.e;if(this.e++,this.g(),this.f(tt)){this.e++;let o=this.me();if(o==="=>"){let r=this.$e();if(!r)throw this.i($n+o);e.node={type:15,params:null,body:r};return}}this.e=n}}Qt(e){let n=e.node,o=n.type;(o===2||o===3)&&this.f(Hn)&&(e.node={type:17,tag:n,quasi:this.Fe(e)})}Fe(e){if(!this.f(Hn))return;let n=this.u,o=n.length,r={type:19,quasis:[],expressions:[]},s=++this.e,i=[],a=[],c=!1,l=u=>{if(!c){let y=n.slice(s,this.e);return r.quasis.push({type:18,value:{raw:y,cooked:y},tail:u})}i.push(n.slice(s,this.e)),a.push(n.slice(s,this.e));let f=i.join(""),p=a.join("");return i.length=0,a.length=0,c=!1,r.quasis.push({type:18,value:{raw:f,cooked:p},tail:u})};for(;this.e<o;){let u=n.charCodeAt(this.e);if(u===Hn)return l(!0),this.e+=1,e.node=r,r;if(u===36&&n.charCodeAt(this.e+1)===Jo){if(l(!1),this.e+=2,r.expressions.push(...this.de(on)),!this.f(on))throw this.i("unclosed ${");this.e+=1,s=this.e}else if(u===Bn){c||(c=!0),i.push(n.slice(s,this.e)),a.push(n.slice(s,this.e));let f=n.charCodeAt(this.e+1);i.push(n.slice(this.e,this.e+2)),a.push(this.Ke(f)),this.e+=2,s=this.e}else this.e+=1}throw this.i("Unclosed `")}Gt(e){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 o=e.node;for(;o.type===3||o.type===6&&o.callee.type===3;)o=o.type===3?o.object:o.callee.object;o.type=20}Wt(e){if(!this.f(Qo))return;let n=++this.e,o=!1;for(;this.e<this.u.length;){if(this.h===Qo&&!o){let r=this.u.slice(n,this.e),s="";for(;++this.e<this.u.length;){let a=this.h;if(a>=97&&a<=122||a>=65&&a<=90||a>=48&&a<=57)s+=this.H;else break}let i;try{i=new RegExp(r,s)}catch(a){throw this.i(a.message)}return e.node={type:4,value:i,raw:this.u.slice(n-1,this.e)},e.node=this.G(e.node),e.node}this.f(nn)?o=!0:o&&this.f(Dn)&&(o=!1),this.e+=this.f(Bn)?2:1}throw this.i("Unclosed Regex")}},sr=t=>new _n(t).parse();var si={"=>":(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)=>Tt(t,e)},ii={"-":t=>-t,"+":t=>+t,"!":t=>!t,"~":t=>~t,new:t=>t},ur=t=>{if(!(t!=null&&t.some(cr)))return t;let e=[];return t.forEach(n=>cr(n)?e.push(...n):e.push(n)),e},ir=(...t)=>ur(t),qn=(t,e)=>{if(!t)return e;let n=Object.create(e!=null?e:{});return n.$event=t,n},ai={"++":(t,e)=>{let n=t[e];if(C(n)){let o=n();return n(++o),o}return++t[e]},"--":(t,e)=>{let n=t[e];if(C(n)){let o=n();return n(--o),o}return--t[e]}},ci={"++":(t,e)=>{let n=t[e];if(C(n)){let o=n();return n(o+1),o}return t[e]++},"--":(t,e)=>{let n=t[e];if(C(n)){let o=n();return n(o-1),o}return t[e]--}},ar={"=":(t,e,n)=>{let o=t[e];return C(o)?o(n):t[e]=n},"+=":(t,e,n)=>{let o=t[e];return C(o)?o(o()+n):t[e]+=n},"-=":(t,e,n)=>{let o=t[e];return C(o)?o(o()-n):t[e]-=n},"*=":(t,e,n)=>{let o=t[e];return C(o)?o(o()*n):t[e]*=n},"/=":(t,e,n)=>{let o=t[e];return C(o)?o(o()/n):t[e]/=n},"%=":(t,e,n)=>{let o=t[e];return C(o)?o(o()%n):t[e]%=n},"**=":(t,e,n)=>{let o=t[e];return C(o)?o(Tt(o(),n)):t[e]=Tt(t[e],n)},"<<=":(t,e,n)=>{let o=t[e];return C(o)?o(o()<<n):t[e]<<=n},">>=":(t,e,n)=>{let o=t[e];return C(o)?o(o()>>n):t[e]>>=n},">>>=":(t,e,n)=>{let o=t[e];return C(o)?o(o()>>>n):t[e]>>>=n},"|=":(t,e,n)=>{let o=t[e];return C(o)?o(o()|n):t[e]|=n},"&=":(t,e,n)=>{let o=t[e];return C(o)?o(o()&n):t[e]&=n},"^=":(t,e,n)=>{let o=t[e];return C(o)?o(o()^n):t[e]^=n}},sn=(t,e)=>K(t)?t.bind(e):t,zn=class{constructor(e,n,o,r,s){m(this,"l");m(this,"ze");m(this,"We");m(this,"Ge");m(this,"A");m(this,"Je");m(this,"Qe");this.l=w(e)?e:[e],this.ze=n,this.We=o,this.Ge=r,this.Qe=!!s}Xe(e,n){if(n&&e in n)return n;for(let o of this.l)if(e in o)return o}2(e,n,o){let r=e.name;if(r==="$root")return this.l[this.l.length-1];if(r==="$parent")return this.l[1];if(r==="$ctx")return[...this.l];if(o&&r in o)return this.A=o[r],sn(A(o[r]),o);for(let i of this.l)if(r in i)return this.A=i[r],sn(A(i[r]),i);let s=this.ze;if(s&&r in s)return this.A=s[r],sn(A(s[r]),s)}5(e,n,o){return this.l[0]}0(e,n,o){return this.Ye(n,o,ir,...e.body)}1(e,n,o){return this.C(n,o,(...r)=>r.pop(),...e.expressions)}3(e,n,o){let{obj:r,key:s}=this.ge(e,n,o),i=r==null?void 0:r[s];return this.A=i,sn(A(i),r)}4(e,n,o){return e.value}6(e,n,o){let r=(i,...a)=>K(i)?i(...ur(a)):i,s=this.C(++n,o,r,e.callee,...e.arguments);return this.A=s,s}7(e,n,o){return this.C(n,o,ii[e.operator],e.argument)}8(e,n,o){let r=si[e.operator];switch(e.operator){case"||":case"&&":case"??":return r(()=>this.b(e.left,n,o),()=>this.b(e.right,n,o))}return this.C(n,o,r,e.left,e.right)}9(e,n,o){return this.Ye(++n,o,ir,...e.elements)}10(e,n,o){let r={},s=(...i)=>{i.forEach(a=>{Object.assign(r,a)})};return this.C(++n,o,s,...e.properties),r}11(e,n,o){return this.C(n,o,r=>this.b(r?e.consequent:e.alternate,n,o),e.test)}12(e,n,o){var u;let r={},s=f=>(f==null?void 0:f.type)!==15,i=(u=this.Ge)!=null?u:()=>!1,a=n===0&&this.Qe,c=f=>this.Ze(a,e.key,n,qn(f,o)),l=f=>this.Ze(a,e.value,n,qn(f,o));if(e.shorthand){let f=e.key.name;r[f]=s(e.key)&&i(f,n)?c:c()}else if(e.computed){let f=A(c());r[f]=s(e.value)&&i(f,n)?l:l()}else{let f=e.key.type===4?e.key.value:e.key.name;r[f]=s(e.value)&&i(f,n)?()=>l:l()}return r}ge(e,n,o){let r=this.b(e.object,n,o),s=e.computed?this.b(e.property,n,o):e.property.name;return{obj:r,key:s}}13(e,n,o){let r=e.argument,s=e.operator,i=e.prefix?ai:ci;if(r.type===2){let a=r.name,c=this.Xe(a,o);return pe(c)?void 0:i[s](c,a)}if(r.type===3){let{obj:a,key:c}=this.ge(r,n,o);return i[s](a,c)}}16(e,n,o){let r=e.left,s=e.operator;if(r.type===2){let i=r.name,a=this.Xe(i,o);if(pe(a))return;let c=this.b(e.right,n,o);return ar[s](a,i,c)}if(r.type===3){let{obj:i,key:a}=this.ge(r,n,o),c=this.b(e.right,n,o);return ar[s](i,a,c)}}14(e,n,o){let r=this.b(e.argument,n,o);return w(r)&&(r.s=fr),r}17(e,n,o){return this[6]({type:6,callee:e.tag,arguments:[{type:9,elements:e.quasi.quasis},...e.quasi.expressions]},n,o)}19(e,n,o){let r=(...s)=>s.reduce((i,a,c)=>i+=a+e.quasis[c+1].value.cooked,e.quasis[0].value.cooked);return this.C(n,o,r,...e.expressions)}18(e,n,o){return e.value.cooked}20(e,n,o){let r=(s,...i)=>new s(...i);return this.C(n,o,r,e.callee,...e.arguments)}15(e,n,o){return(...r)=>{let s=Object.create(o!=null?o:{}),i=e.params;if(i){let a=0;for(let c of i)s[c.name]=r[a++]}return this.b(e.body,n,s)}}b(e,n,o){let r=A(this[e.type](e,n,o));return this.Je=e.type,r}Ze(e,n,o,r){let s=this.b(n,o,r);return e&&this.et()?this.A:s}et(){let e=this.Je;return(e===2||e===3||e===6)&&C(this.A)}eval(e,n){let{value:o,refs:r}=wn(()=>this.b(e,-1,n)),s={value:o,refs:r};return this.et()&&(s.ref=this.A),s}C(e,n,o,...r){let s=r.map(i=>i&&this.b(i,e,n));return o(...s)}Ye(e,n,o,...r){let s=this.We;if(!s)return this.C(e,n,o,...r);let i=r.map((a,c)=>a&&(a.type!==15&&s(c,e)?l=>this.b(a,e,qn(l,n)):this.b(a,e,n)));return o(...i)}},fr=Symbol("s"),cr=t=>(t==null?void 0:t.s)===fr,lr=(t,e,n,o,r,s,i)=>new zn(e,n,o,r,i).eval(t,s);var pr={},mr=t=>!!t,an=class{constructor(e,n){m(this,"l");m(this,"r");m(this,"tt",[]);this.l=e,this.r=n}w(e){this.l=[e,...this.l]}te(){return this.l.map(n=>n.components).filter(mr).reverse().reduce((n,o)=>{for(let[r,s]of Object.entries(o))n[r.toUpperCase()]=s;return n},{})}lt(){let e=[],n=new Set,o=this.l.map(r=>r.components).filter(mr).reverse();for(let r of o)for(let s of Object.keys(r))n.has(s)||(n.add(s),e.push(s));return e}N(e,n,o,r,s){var T;let i=[],a=[],c=new Set,l=()=>{for(let R=0;R<a.length;++R)a[R]();a.length=0},p={value:()=>i,stop:()=>{l(),c.clear()},subscribe:(R,H)=>(c.add(R),H&&R(i),()=>{c.delete(R)}),refs:[],context:this.l[0]};if(F(e))return p;let y=this.r.globalContext,b=[],d=new Set,v=(R,H,P,D)=>{try{let B=lr(R,H,y,n,o,D,r);return P&&B.refs.length>0&&b.push(...B.refs),{value:B.value,refs:B.refs,ref:B.ref}}catch(B){j(6,`evaluation error: ${e}`,B)}return{value:void 0,refs:[]}};try{let R=(T=pr[e])!=null?T:sr("["+e+"]");pr[e]=R;let H=this.l.slice(),P=R.elements,D=P.length,B=new Array(D);p.refs=B;let ae=()=>{b.length=0,s||(d.clear(),l());let Z=new Array(D);for(let V=0;V<D;++V){let x=P[V];if(n!=null&&n(V,-1)){Z[V]=_=>v(x,H,!1,{$event:_}).value;continue}let k=v(x,H,!0);Z[V]=k.value,B[V]=k.ref}if(!s)for(let V of b)d.has(V)||(d.add(V),a.push(ie(V,ae)));if(i=Z,c.size!==0)for(let V of c)c.has(V)&&V(i)};ae()}catch(R){j(6,`parse error: ${e}`,R)}return p}L(){return this.l.slice()}pe(e){this.tt.push(this.l),this.l=e}E(e,n){try{this.pe(e),n()}finally{this.Zt()}}Zt(){var e;this.l=(e=this.tt.pop())!=null?e:[]}};var dr=t=>{let e=t.charCodeAt(0);return e>=48&&e<=57||e>=65&&e<=90||e>=97&&e<=122||t==="-"||t==="_"||t===":"},ui=(t,e)=>{let n="";for(let o=e;o<t.length;++o){let r=t[o];if(n){r===n&&(n="");continue}if(r==='"'||r==="'"){n=r;continue}if(r===">")return o}return-1},fi=(t,e)=>{let n=e?2:1;for(;n<t.length&&(t[n]===" "||t[n]===`
|
|
3
|
-
`);)++n;if(n>=t.length||!
|
|
1
|
+
var xo=Object.defineProperty,Co=Object.defineProperties;var Eo=Object.getOwnPropertyDescriptors;var Xn=Object.getOwnPropertySymbols;var Ro=Object.prototype.hasOwnProperty,wo=Object.prototype.propertyIsEnumerable;var Tt=Math.pow,un=(t,e,n)=>e in t?xo(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,xt=(t,e)=>{for(var n in e||(e={}))Ro.call(e,n)&&un(t,n,e[n]);if(Xn)for(var n of Xn(e))wo.call(e,n)&&un(t,n,e[n]);return t},Yn=(t,e)=>Co(t,Eo(e));var m=(t,e,n)=>un(t,typeof e!="symbol"?e+"":e,n);var Zn=(t,e,n)=>new Promise((r,o)=>{var s=c=>{try{a(n.next(c))}catch(l){o(l)}},i=c=>{try{a(n.throw(c))}catch(l){o(l)}},a=c=>c.done?r(c.value):Promise.resolve(c.value).then(s,i);a((n=n.apply(t,e)).next())});var qe=Symbol(":regor");var Ee=t=>{let e=[t];for(let n=0;n<e.length;++n){let r=e[n];vo(r);for(let o=r.lastChild;o!=null;o=o.previousSibling)e.push(o)}},vo=t=>{let e=t[qe];if(!e)return;let n=e.unbinders;for(let r=0;r<n.length;++r)n[r]();n.length=0,t[qe]=void 0};var ze=[],Ct=!1,Et,er=()=>{if(Ct=!1,Et=void 0,ze.length!==0){for(let t=0;t<ze.length;++t)Ee(ze[t]);ze.length=0}},Y=t=>{t.remove(),ze.push(t),Ct||(Ct=!0,Et=setTimeout(er,1))},So=()=>Zn(null,null,function*(){ze.length===0&&!Ct||(Et&&clearTimeout(Et),er())});var K=t=>typeof t=="function",W=t=>typeof t=="string",tr=t=>typeof t=="undefined",pe=t=>t==null||typeof t=="undefined",j=t=>typeof t!="string"||!(t!=null&&t.trim()),Ao=Object.prototype.toString,fn=t=>Ao.call(t),Le=t=>fn(t)==="[object Map]",le=t=>fn(t)==="[object Set]",ln=t=>fn(t)==="[object Date]",ot=t=>typeof t=="symbol",w=Array.isArray,L=t=>t!==null&&typeof t=="object";var nr={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."},q=(t,...e)=>{let n=nr[t];return new Error(K(n)?n.call(nr,...e):n)};var Rt=[],rr=()=>{let t={onMounted:[],onUnmounted:[]};return Rt.push(t),t},He=t=>{let e=Rt[Rt.length-1];if(!e&&!t)throw q(2);return e},or=t=>{let e=He();return t&&mn(t),Rt.pop(),e},pn=Symbol("csp"),mn=t=>{let e=t,n=e[pn];if(n){let r=He();if(n===r)return;r.onMounted.length>0&&n.onMounted.push(...r.onMounted),r.onUnmounted.length>0&&n.onUnmounted.push(...r.onUnmounted);return}e[pn]=He()},wt=t=>t[pn];var Ie=t=>{var n,r;let e=(n=wt(t))==null?void 0:n.onUnmounted;e==null||e.forEach(o=>{o()}),(r=t.unmounted)==null||r.call(t)};var sr={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]})},_=(t,...e)=>{let n=sr[t],r=K(n)?n.call(sr,...e):n,o=Ke.warning;o&&(W(r)?o(r):o(r,...r.args))},Ke={warning:console.warn};var vt=Symbol("ref"),ee=Symbol("sref"),St=Symbol("raw");var C=t=>t!=null&&t[ee]===1;var Ve=class extends Error{constructor(n,r){super(r);m(this,"propPath");m(this,"detail");this.name="PropValidationError",this.propPath=n,this.detail=r}},ge=(t,e)=>{throw new Ve(t,`${e}.`)},At=t=>{var n;if(t===null)return"null";if(t===void 0)return"undefined";if(C(t))return`ref<${At(t())}>`;if(typeof t=="string")return"string";if(typeof t=="number")return"number";if(typeof t=="boolean")return"boolean";if(typeof t=="bigint")return"bigint";if(typeof t=="symbol")return"symbol";if(typeof t=="function")return"function";if(w(t))return"array";if(t instanceof Date)return"Date";if(t instanceof RegExp)return"RegExp";if(t instanceof Map)return"Map";if(t instanceof Set)return"Set";let e=(n=t==null?void 0:t.constructor)==null?void 0:n.name;return e&&e!=="Object"?e:"object"},No=t=>t.length>60?`${t.slice(0,57)}...`:t,st=(t,e=0)=>{if(e>1)return"unknown";if(C(t)){let s=t();return`ref(${st(s,e+1)})`}if(typeof t=="string")return No(JSON.stringify(t));if(typeof t=="number"||typeof t=="boolean"||typeof t=="bigint"||typeof t=="symbol")return String(t);if(t===null)return"null";if(t===void 0)return"undefined";if(t instanceof Date)return t.toISOString();if(t instanceof RegExp)return String(t);if(w(t)){let s=t.slice(0,5).map(i=>st(i,e+1)).join(", ");return t.length>5?`[${s}, ...]`:`[${s}]`}if(L(t)){let s=Object.entries(t).slice(0,5);if(s.length===0)return"{}";let i=s.map(([a,c])=>{let l=st(c,e+1);return`${a}: ${l}`}).join(", ");return Object.keys(t).length>5?`{ ${i}, ... }`:`{ ${i} }`}return"unknown"},ce=t=>{if(C(t))return`got ${At(t)}(${st(t())})`;let e=At(t),n=st(t);return`got ${e} (${n})`},Mo=t=>t instanceof Ve?t.detail:t instanceof Error?t.message:String(t),ir=(t,e)=>{let n=`, ${ce(e)}.`;return t.endsWith(n)?t.slice(0,-n.length):t},Oo=(t,e,n)=>{if(e instanceof Ve){if(e.propPath===t)return ir(e.detail,n);if(e.propPath===`${t}.value`&&C(n)){let r=ir(e.detail,n());return r.startsWith("expected ")?`expected ref<${r.slice(9)}>`:`expected ref where ${r}`}}return Mo(e)},ko=(t,e,n)=>{let r=[];for(let o of e){let s=Oo(t,o,n);r.includes(s)||r.push(s)}return r.length===0?ce(n):r.length===1?`${r[0]}, ${ce(n)}`:`${r.join(" or ")}, ${ce(n)}`},Lo=t=>typeof t=="string"?`"${t}"`:typeof t=="number"||typeof t=="boolean"?String(t):t===null?"null":t===void 0?"undefined":At(t),Io=(t,e)=>{typeof t!="string"&&ge(e,`expected string, ${ce(t)}`)},Vo=(t,e)=>{typeof t!="number"&&ge(e,`expected number, ${ce(t)}`)},Po=(t,e)=>{typeof t!="boolean"&&ge(e,`expected boolean, ${ce(t)}`)},Do=t=>(e,n)=>{e instanceof t||ge(n,`expected instance of ${t.name||"provided class"}, ${ce(e)}`)},Uo=t=>(e,n,r)=>{e!==void 0&&t(e,n,r)},Ho=t=>(e,n,r)=>{e!==null&&t(e,n,r)},Bo=(...t)=>(e,n,r)=>{let o=[];for(let s of t)try{s(e,n,r);return}catch(i){o.push(i)}ge(n,ko(n,o,e))},$o=t=>(e,n)=>{t.includes(e)||ge(n,`expected one of ${t.map(r=>Lo(r)).join(", ")}, ${ce(e)}`)},jo=t=>(e,n,r)=>{w(e)||ge(n,`expected array, ${ce(e)}`);let o=e;for(let s=0;s<o.length;++s)t(o[s],`${n}[${s}]`,r)};function _o(t){return(e,n,r)=>{L(e)||ge(n,`expected object, ${ce(e)}`);let o=e;for(let s in t){let i=t[s];if(!i)continue;i(o[s],`${n}.${s}`,r)}}}var Fo=t=>(e,n,r)=>{if(C(e)){t(e(),`${n}.value`,r);return}ge(n,`expected ref, ${ce(e)}`)},qo={fail:ge,describe:ce,isString:Io,isNumber:Vo,isBoolean:Po,isClass:Do,optional:Uo,nullable:Ho,or:Bo,oneOf:$o,arrayOf:jo,shape:_o,refOf:Fo};var zo=(t,e,n)=>{var i,a;let r=((a=(i=t.tagName)==null?void 0:i.toLowerCase)==null?void 0:a.call(i))||"unknown",o=n instanceof Ve?n.propPath:e,s=n instanceof Ve?n.detail:n instanceof Error?n.message:String(n);return n instanceof Error?new Error(`Invalid prop "${o}" on <${r}>: ${s}`,{cause:n}):new Error(`Invalid prop "${o}" on <${r}>: ${s}`,{cause:n})},it=class{constructor(e,n,r,o,s,i){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,"J");m(this,"Q");m(this,"emit",(e,n)=>{this.J.dispatchEvent(new CustomEvent(e,{detail:n}))});this.props=e,this.J=n,this.ctx=r,this.start=o,this.end=s,this.Q=i}findContext(e,n=0){var o;if(n<0)return;let r=0;for(let s of(o=this.ctx)!=null?o:[])if(s instanceof e){if(r===n)return s;++r}}requireContext(e,n=0){let r=this.findContext(e,n);if(r!==void 0)return r;throw new Error(`${e} was not found in the context stack at occurrence ${n}.`)}validateProps(e){if(this.Q==="off")return;let n=this.props;for(let r in e){let o=e[r];if(!o)continue;let s=o;try{s(n[r],r,this)}catch(i){let a=zo(this.J,r,i);if(this.Q==="warn"){Ke.warning(a.message,a);continue}throw a}}}unmount(){let e=this.start.nextSibling,n=this.end;for(;e&&e!==n;)Y(e),e=e.nextSibling;for(let r of this.ctx)Ie(r)}};var Be=t=>{let e=t,n=e[qe];if(n)return n;let r={unbinders:[],data:{}};return e[qe]=r,r};var G=(t,e)=>{Be(t).unbinders.push(e)};var at=t=>{if(typeof t=="string"){let e=t.trim().toLowerCase();if(e===""||e==="0"||e==="false")return!1;if(e==="true")return!0}return!!t};var Mt={},Nt={},ar=1,cr=t=>{let e=(ar++).toString();return Mt[e]=t,Nt[e]=0,e},dn=t=>{Nt[t]+=1},hn=t=>{--Nt[t]===0&&(delete Mt[t],delete Nt[t])},ur=t=>Mt[t],yn=()=>ar!==1&&Object.keys(Mt).length>0,ct="r-switch",Ko=t=>{let e=t.filter(r=>Re(r)).map(r=>[...r.querySelectorAll("[r-switch]")].map(o=>o.getAttribute(ct))),n=new Set;return e.forEach(r=>{r.forEach(o=>o&&n.add(o))}),[...n]},We=(t,e)=>{if(!yn())return;let n=Ko(e);n.length!==0&&(n.forEach(dn),G(t,()=>{n.forEach(hn)}))};var Ot=()=>{},gn=(t,e,n,r)=>{let o=[];for(let s of t){let i=s.cloneNode(!0);n.insertBefore(i,r),o.push(i)}Pe(e,o)},bn=Symbol("r-if"),fr=Symbol("r-else"),lr=t=>t[fr]===1,kt=class{constructor(e){m(this,"r");m(this,"V");m(this,"Te");m(this,"X");m(this,"Y");m(this,"x");m(this,"R");this.r=e,this.V=e.o.p.if,this.Te=It(e.o.p.if),this.X=e.o.p.else,this.Y=e.o.p.elseif,this.x=e.o.p.for,this.R=e.o.p.pre}ot(e,n){let r=e.parentElement;for(;r!==null&&r!==document.documentElement;){if(r.hasAttribute(n))return!0;r=r.parentElement}return!1}M(e){let n=e.hasAttribute(this.V);return n&&this.y(e),e.hasAttribute(this.r.o.p.is)||e.hasAttribute("is")||this.r.E.Z(e)||this.r.E.j(e,o=>{o.hasAttribute(this.V)&&this.y(o)}),n}ee(e){return e[bn]?!0:(e[bn]=!0,Lt(e,this.Te).forEach(n=>n[bn]=!0),!1)}y(e){if(e.hasAttribute(this.R)||this.ee(e)||this.ot(e,this.x))return;let n=e.getAttribute(this.V);if(!n){_(0,this.V,e);return}e.removeAttribute(this.V),this.O(e,n)}U(e,n,r){let o=Ge(e),s=e.parentNode,i=document.createComment(`__begin__ :${n}${r!=null?r:""}`);s.insertBefore(i,e),We(i,o),o.forEach(c=>{Y(c)}),e.remove(),n!=="if"&&(e[fr]=1);let a=document.createComment(`__end__ :${n}${r!=null?r:""}`);return s.insertBefore(a,i.nextSibling),{nodes:o,parent:s,commentBegin:i,commentEnd:a}}Re(e,n){if(!e)return[];let r=e.nextElementSibling;if(e.hasAttribute(this.X)){e.removeAttribute(this.X);let{nodes:o,parent:s,commentBegin:i,commentEnd:a}=this.U(e,"else");return[{mount:()=>{gn(o,this.r,s,a)},unmount:()=>{we(i,a)},isTrue:()=>!0,isMounted:!1}]}else{let o=e.getAttribute(this.Y);if(!o)return[];e.removeAttribute(this.Y);let{nodes:s,parent:i,commentBegin:a,commentEnd:c}=this.U(e,"elseif",` => ${o} `),l=this.r.m.N(o),u=l.value,f=this.Re(r,n),p=Ot;return G(a,()=>{l.stop(),p(),p=Ot}),p=l.subscribe(n),[{mount:()=>{gn(s,this.r,i,c)},unmount:()=>{we(a,c)},isTrue:()=>at(u()[0]),isMounted:!1},...f]}}O(e,n){let r=e.nextElementSibling,{nodes:o,parent:s,commentBegin:i,commentEnd:a}=this.U(e,"if",` => ${n} `),c=this.r.m.N(n),l=c.value,u=!1,f=this.r.m,p=f.L(),y=()=>{f.C(p,()=>{if(at(l()[0]))u||(gn(o,this.r,s,a),u=!0),b.forEach(T=>{T.unmount(),T.isMounted=!1});else{we(i,a),u=!1;let T=!1;for(let R of b)!T&&R.isTrue()?(R.isMounted||(R.mount(),R.isMounted=!0),T=!0):(R.unmount(),R.isMounted=!1)}})},b=this.Re(r,y),d=Ot;G(i,()=>{c.stop(),d(),d=Ot}),y(),d=c.subscribe(y)}};var Ge=t=>{let e=me(t)?t.content.childNodes:[t],n=[];for(let r=0;r<e.length;++r){let o=e[r];if(o.nodeType===1){let s=o==null?void 0:o.tagName;if(s==="SCRIPT"||s==="STYLE")continue}n.push(o)}return n},Pe=(t,e)=>{for(let n=0;n<e.length;++n){let r=e[n];r.nodeType===Node.ELEMENT_NODE&&(lr(r)||t.$(r))}},Lt=(t,e)=>{var r;let n=t.querySelectorAll(e);return(r=t.matches)!=null&&r.call(t,e)?[t,...n]:n},me=t=>t instanceof HTMLTemplateElement,Re=t=>t.nodeType===Node.ELEMENT_NODE,ut=t=>t.nodeType===Node.ELEMENT_NODE,pr=t=>t instanceof HTMLSlotElement,ve=t=>me(t)?t.content.childNodes:t.childNodes,we=(t,e)=>{let n=t.nextSibling;for(;n!=null&&n!==e;){let r=n.nextSibling;Y(n),n=r}},mr=function(){return this()},Wo=function(t){return this(t)},Go=()=>{throw new Error("value is readonly.")},Jo={get:mr,set:Wo,enumerable:!0,configurable:!1},Qo={get:mr,set:Go,enumerable:!0,configurable:!1},De=(t,e)=>{Object.defineProperty(t,"value",e?Qo:Jo)},dr=(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},It=t=>`[${CSS.escape(t)}]`,Vt=(t,e)=>(t.startsWith("@")&&(t=e.p.on+":"+t.slice(1)),t.includes("[")&&(t=t.replace(/[[\]]/g,e.p.dynamic)),t),Tn=t=>{let e=Object.create(null);return n=>e[n]||(e[n]=t(n))},Xo=/-(\w)/g,z=Tn(t=>t&&t.replace(Xo,(e,n)=>n?n.toUpperCase():"")),Yo=/\B([A-Z])/g,Je=Tn(t=>t&&t.replace(Yo,"-$1").toLowerCase()),ft=Tn(t=>t&&t.charAt(0).toUpperCase()+t.slice(1));var Pt={mount:()=>{}};var Qe=t=>{let e=t.trim();return e?e.split(/\s+/):[]};var Dt=t=>{var n,r;let e=(n=wt(t))==null?void 0:n.onMounted;e==null||e.forEach(o=>{o()}),(r=t.mounted)==null||r.call(t)};var xn=Symbol("scope"),Cn=t=>{try{rr();let e=t();mn(e);let n={context:e,unmount:()=>Ie(e),[xn]:1};return n[xn]=1,n}finally{or()}},hr=t=>L(t)?xn in t:!1;var En={collectRefObj:!0,mount:({parseResult:t})=>({update:({values:e})=>{let n=t.context,r=e[0];if(L(r))for(let o of Object.entries(r)){let s=o[0],i=o[1],a=n[s];a!==i&&(C(a)?a(i):n[s]=i)}}})};var se=(t,e)=>{var n;(n=He(e))==null||n.onUnmounted.push(t)};var ie=(t,e,n,r=!0)=>{if(!C(t))throw q(3,"observe");n&&e(t());let s=t(void 0,void 0,0,e);return r&&se(s,!0),s};var lt=(t,e)=>{if(t===e)return()=>{};let n=ie(t,o=>e(o)),r=ie(e,o=>t(o));return e(t()),()=>{n(),r()}};var pt=t=>!!t&&t[St]===1;var Xe=t=>(t==null?void 0:t[vt])===1;var de=[],yr=t=>{var e;de.length!==0&&((e=de[de.length-1])==null||e.add(t))},Ye=t=>{if(!t)return()=>{};let e={stop:()=>{}};return Zo(t,e),se(()=>e.stop(),!0),e.stop},Zo=(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(de.push(s),t(i=>n.push(i)),r)return;for(let i of[...s]){let a=ie(i,()=>{o(),Ye(t)});n.push(a)}}finally{de.pop()}},Rn=t=>{let e=de.length,n=e>0&&de[e-1];try{return n&&de.push(null),t()}finally{n&&de.pop()}},wn=t=>{try{let e=new Set;return de.push(e),{value:t(),refs:[...e]}}finally{de.pop()}};var te=(t,e,n)=>{if(!C(t))return;let r=t;if(r(void 0,e,1),!n)return;let o=r();if(o){if(w(o)||le(o))for(let s of o)te(s,e,!0);else if(Le(o))for(let s of o)te(s[0],e,!0),te(s[1],e,!0);if(L(o))for(let s in o)te(o[s],e,!0)}};function es(t,e,n){Object.defineProperty(t,e,{value:n,enumerable:!1,writable:!0,configurable:!0})}var Ze=(t,e,n)=>{n.forEach(function(r){let o=t[r];es(e,r,function(...i){let a=o.apply(this,i),c=this[ee];for(let l of c)te(l);return a})})},Ut=(t,e)=>{Object.defineProperty(t,Symbol.toStringTag,{value:e,writable:!1,enumerable:!1,configurable:!0})};var gr=Array.prototype,vn=Object.create(gr),ts=["push","pop","shift","unshift","splice","sort","reverse"];Ze(gr,vn,ts);var br=Map.prototype,Ht=Object.create(br),ns=["set","clear","delete"];Ut(Ht,"Map");Ze(br,Ht,ns);var Tr=Set.prototype,Bt=Object.create(Tr),rs=["add","clear","delete"];Ut(Bt,"Set");Ze(Tr,Bt,rs);var be={},ue=t=>{if(C(t)||pt(t))return t;let e={auto:!0,_value:t},n=c=>L(c)?ee in c?!0:w(c)?(Object.setPrototypeOf(c,vn),!0):le(c)?(Object.setPrototypeOf(c,Bt),!0):Le(c)?(Object.setPrototypeOf(c,Ht),!0):!1:!1,r=n(t),o=new Set,s=(c,l)=>{if(be.stack&&be.stack.length){be.stack[be.stack.length-1].add(a);return}o.size!==0&&Rn(()=>{for(let u of[...o.keys()])o.has(u)&&u(c,l)})},i=c=>{let l=c[ee];l||(c[ee]=l=new Set),l.add(a)},a=(...c)=>{if(!(2 in c)){let u=c[0],f=c[1];return 0 in c?e._value===u||C(u)&&(u=u(),e._value===u)?u:(n(u)&&i(u),e._value=u,e.auto&&s(u,f),e._value):(yr(a),e._value)}switch(c[2]){case 0:{let u=c[3];if(!u)return()=>{};let f=p=>{o.delete(p)};return o.add(u),()=>{f(u)}}case 1:{let u=c[1],f=e._value;s(f,u);break}case 2:return o.size;case 3:{e.auto=!1;break}case 4:e.auto=!0}return e._value};return a[ee]=1,De(a,!1),r&&i(t),a};var Se=t=>{if(pt(t))return t;let e;if(C(t)?(e=t,t=e()):e=ue(t),t instanceof Node||t instanceof Date||t instanceof RegExp||t instanceof Promise||t instanceof Error)return e;if(e[vt]=1,w(t)){let n=t.length;for(let r=0;r<n;++r){let o=t[r];Xe(o)||(t[r]=Se(o))}return e}if(!L(t))return e;for(let n of Object.entries(t)){let r=n[1];if(Xe(r))continue;let o=n[0];ot(o)||(t[o]=null,t[o]=Se(r))}return e};var xr=Symbol("modelBridge"),$t=()=>{},os=t=>!!(t!=null&&t[xr]),ss=t=>{t[xr]=1},is=t=>{let e=Se(t());return ss(e),e},Cr={collectRefObj:!0,mount:({parseResult:t,option:e})=>{if(typeof e!="string"||!e)return $t;let n=z(e),r,o,s=$t,i=()=>{s(),s=$t,r=void 0,o=void 0},a=()=>{s(),s=$t},c=(u,f)=>{r!==u&&(a(),s=lt(u,f),r=u)},l=()=>{var y;let u=(y=t.refs[0])!=null?y:t.value()[0],f=t.context,p=f[n];if(!C(u)){if(o&&p===o){o(u);return}if(i(),C(p)){p(u);return}f[n]=u;return}if(os(u)){if(p===u)return;C(p)?c(u,p):f[n]=u;return}o||(o=is(u)),f[n]=o,c(u,o)};return{update:()=>{l()},unmount:()=>{s()}}}};var jt=class{constructor(e){m(this,"r");m(this,"_");m(this,"Ee","");m(this,"Ce",-1);this.r=e,this._=e.o.p.inherit}M(e){this.st(e)}it(e){if(this.Ce!==e.size){let n=[...e.keys()];this.Ee=[...n,...n.map(Je)].join(","),this.Ce=e.size}return this.Ee}ct(e){var n;for(let r=0;r<e.length;++r){let o=(n=e[r])==null?void 0:n.components;if(o)for(let s in o)return!0}return!1}pt(e){if(!me(e))return!1;let n=e.getAttributeNames();return e.hasAttribute("name")?!0:n.some(r=>r.startsWith("#"))}ut(e){return me(e)&&e.getAttributeNames().length===0}st(e){var l,u;let n=this.r,r=n.m,o=n.o.te,s=n.o.F;if(o.size===0&&!this.ct(r.l))return;let i=r.ne(),a=this.re();if(j(a))return;let c=this.lt(e,a);for(let f of c){if(f.hasAttribute(n.R))continue;let p=f.parentNode;if(!p)continue;let y=f.nextSibling,b=z(f.tagName).toUpperCase(),d=i[b],v=d!=null?d:s.get(b);if(!v)continue;let T=v.template;if(!T)continue;let R=f.parentElement;if(!R)continue;let H=new Comment(" begin component: "+f.tagName),P=new Comment(" end component: "+f.tagName);R.insertBefore(H,f),f.remove();let D=n.o.p.context,B=n.o.p.contextAlias,ae=n.o.p.bind,Z=(u=(l=v.props)==null?void 0:l.map(z))!=null?u:[],V=[],x=h=>h==="class"||h==="style",k=(h,M,S=!1)=>{let Q={},$=h.hasAttribute(D);return r.C(M,()=>{if(r.v(Q),$?n.y(En,h,D):h.hasAttribute(B)&&n.y(En,h,B),Z.length===0)return;let X=new Map(Z.map(g=>[g.toLowerCase(),g]));for(let g of[...Z,...Z.map(Je)]){let O=h.getAttribute(g);if(O===null)continue;let U=z(g);Q[U]=O,S&&v.inheritAttrs===!0&&x(U)&&V.push({name:g,value:O}),h.removeAttribute(g)}let E=n.q.we(h,!1);for(let[g,O]of E.entries()){let[U,re]=O.oe;if(!re)continue;let Ce=X.get(z(re).toLowerCase());if(Ce&&!(U!=="."&&U!==":"&&U!==ae)){if(S&&U!=="."&&v.inheritAttrs===!0&&x(Ce)){let Qn=h.getAttribute(g);Qn!==null&&V.push({name:g,value:Qn})}n.y(Cr,h,g,!0,Ce,O.se)}}}),Q},F=[...r.L()],Fe=()=>{var Q;let h=k(f,F,!0),M=new it(h,f,F,H,P,n.o.propValidationMode),S=Cn(()=>{var $;return($=v.context(M))!=null?$:{}}).context;if(M.autoProps){for(let[$,X]of Object.entries(h))if($ in S){let E=S[$];if(E===X)continue;if(C(E)){C(X)?M.entangle?G(H,lt(X,E)):E(X()):E(X);continue}}else S[$]=X;for(let $ of Z)$ in S||(S[$]=void 0);(Q=M.onAutoPropsAssigned)==null||Q.call(M)}return{componentCtx:S,head:M}},{componentCtx:Te,head:gt}=Fe(),N=[...ve(T)],bt=N.length,I=f.childNodes.length===0,J=h=>{var X;let M=h.parentElement,S=h.name;if(j(S)&&(S=h.getAttributeNames().filter(E=>E.startsWith("#"))[0],j(S)?S="default":S=S.substring(1)),I){if(S==="default"){let E=n.o.p.text,g=f.getAttribute(E);if(!j(g)){let O=document.createElement("span");O.setAttribute(E,g),M.insertBefore(O,h),f.removeAttribute(E);return}}for(let E of[...h.childNodes])M.insertBefore(E,h);return}let Q=f.querySelector(`template[name='${S}'], template[\\#${S}]`);!Q&&S==="default"&&(Q=(X=[...f.querySelectorAll("template:not([name])")].find(g=>this.ut(g)))!=null?X:null);let $=E=>{gt.enableSwitch&&r.C(F,()=>{r.v(Te);let g=k(h,r.L());r.C(F,()=>{r.v(g);let O=r.L(),U=cr(O);for(let re of E)Re(re)&&(re.setAttribute(ct,U),dn(U),G(re,()=>{hn(U)}))})})};if(Q){let E=[...ve(Q)];for(let g of E)M.insertBefore(g,h);$(E)}else{if(S!=="default"){for(let g of[...ve(h)])M.insertBefore(g,h);return}let E=[...ve(f)].filter(g=>!this.pt(g));for(let g of E)M.insertBefore(g,h);$(E)}},ne=h=>{if(!Re(h))return;let M=h.querySelectorAll("slot");if(pr(h)){J(h),h.remove();return}for(let S of M)J(S),S.remove()};(()=>{for(let h=0;h<bt;++h)N[h]=N[h].cloneNode(!0),p.insertBefore(N[h],y),ne(N[h])})(),R.insertBefore(P,y);let xe=()=>{if(!v.inheritAttrs)return;let h=N.filter(g=>g.nodeType===Node.ELEMENT_NODE),M=h.flatMap(g=>[...g.hasAttribute(this._)?[g]:[],...g.querySelectorAll(`[${this._}]`)]).at(0),S=M!=null?M:h.length===1?h[0]:void 0;if(!S)return;S.removeAttribute(this._);let Q=`${ae}:class`,$=`${ae}:style`,X=(g,O,U)=>{let re=S.hasAttribute(g)?g:S.hasAttribute(O)?O:g,Ce=S.getAttribute(re);S.setAttribute(re,j(Ce)?U:`${Ce}, ${U}`)},E=(g,O)=>{if(g==="class"){let U=Qe(O);U.length>0&&S.classList.add(...U)}else if(g===":class"||g===Q)X(":class",Q,O);else if(g==="style"){let U=S.style,re=f.style;for(let Ce of re)U.setProperty(Ce,re.getPropertyValue(Ce))}else g===":style"||g===$?X(":style",$,O):S.setAttribute(Vt(g,n.o),O)};for(let{name:g,value:O}of V)f.setAttribute(g,O);for(let g of f.getAttributeNames())g===D||g===B||E(g,f.getAttribute(g))},Oe=()=>{for(let h of f.getAttributeNames())!h.startsWith("@")&&!h.startsWith(n.o.p.on)&&f.removeAttribute(h)},ke=()=>{xe(),Oe(),r.v(Te),n.ve(f,!1),Te.$emit=gt.emit,Pe(n,N),G(f,()=>{Ie(Te)}),G(H,()=>{Ee(f)}),Dt(Te)};r.C(F,ke)}}re(){let e=this.r,n=e.m,r=e.o.te,o=n.ft(),s=this.it(r);return[...s?[s]:[],...o,...o.map(Je)].join(",")}Z(e){var r;let n=this.re();return!j(n)&&((r=e.matches)==null?void 0:r.call(e,n))}lt(e,n){var s;let r=[];if(j(n))return r;if((s=e.matches)!=null&&s.call(e,n))return[e];let o=this.K(e).reverse();for(;o.length>0;){let i=o.pop();if(i.matches(n)){r.push(i);continue}o.push(...this.K(i).reverse())}return r}j(e,n){let r=this.r,o=this.re(),s=r.o.p.is,i=this.K(e).reverse();for(;i.length>0;){let a=i.pop();n(a),!(!j(o)&&a.matches(o))&&(a.hasAttribute(s)||a.hasAttribute("is")||i.push(...this.K(a).reverse()))}}K(e){let n=e==null?void 0:e.children;if((n==null?void 0:n.length)!=null){let o=[];for(let s=0;s<n.length;++s){let i=n[s];Re(i)&&o.push(i)}return o}let r=e==null?void 0:e.childNodes;if((r==null?void 0:r.length)!=null){let o=[];for(let s=0;s<r.length;++s){let i=r[s];Re(i)&&o.push(i)}return o}return[]}};var Sn=class{constructor(e,n){m(this,"oe");m(this,"se");m(this,"Se",[]);this.oe=e,this.se=n}},_t=class{constructor(e){m(this,"r");m(this,"Ae");m(this,"ke");m(this,"ie");var r;this.r=e,this.Ae=e.o.dt(),this.ie=new Map;let n=new Map;for(let o of this.Ae){let s=(r=o[0])!=null?r:"",i=n.get(s);i?i.push(o):n.set(s,[o])}this.ke=n}Me(e){let n=this.ie.get(e);if(n)return n;let r=e,o=r.startsWith(".");o&&(r=":"+r.slice(1));let s=r.indexOf("."),a=(s<0?r:r.substring(0,s)).split(/[:@]/);j(a[0])&&(a[0]=o?".":r[0]);let c=s>=0?r.slice(s+1).split("."):[],l=!1,u=!1;for(let p=0;p<c.length;++p){let y=c[p];if(!l&&y==="camel"?l=!0:!u&&y==="prop"&&(u=!0),l&&u)break}l&&(a[a.length-1]=z(a[a.length-1])),u&&(a[0]=".");let f={terms:a,flags:c};return this.ie.set(e,f),f}we(e,n){let r=new Map;if(!ut(e))return r;let o=this.ke,s=(a,c)=>{var u;let l=o.get((u=c[0])!=null?u:"");if(l)for(let f=0;f<l.length;++f){if(!c.startsWith(l[f]))continue;let p=r.get(c);if(!p){let y=this.Me(c);p=new Sn(y.terms,y.flags),r.set(c,p)}p.Se.push(a);return}},i=a=>{var l;let c=a.attributes;if(!(!c||c.length===0))for(let u=0;u<c.length;++u){let f=(l=c.item(u))==null?void 0:l.name;f&&s(a,f)}};return i(e),!n||!e.firstElementChild||this.r.E.j(e,i),r}};var Er=()=>{},as=(t,e)=>{for(let n of t){let r=n.cloneNode(!0);e.appendChild(r)}},Ft=class{constructor(e){m(this,"r");m(this,"I");this.r=e,this.I=e.o.p.is}M(e){let n=e.hasAttribute(this.I);return(n||e.hasAttribute("is"))&&this.y(e),this.r.E.Z(e)||this.r.E.j(e,r=>{(r.hasAttribute(this.I)||r.hasAttribute("is"))&&this.y(r)}),n}y(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.r.$(s);return}n=`'${n.slice(6)}'`,e.removeAttribute("is")}e.removeAttribute(this.I),this.O(e,n)}U(e,n){let r=Ge(e),o=e.parentNode,s=document.createComment(`__begin__ dynamic ${n!=null?n:""}`);o.insertBefore(s,e),We(s,r),r.forEach(a=>{Y(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}}O(e,n){let{nodes:r,commentBegin:o,commentEnd:s}=this.U(e,` => ${n} `),i=this.r.m.N(n),a=i.value,c=this.r.m,l=c.L(),u={name:""},f=me(e)?r:[...r[0].childNodes],p=()=>{c.C(l,()=>{var R,H;let d=a()[0];if(L(d)&&(d.name?d=d.name:d=(R=Object.entries(c.ne()).filter(P=>P[1]===d)[0])==null?void 0:R[0]),!W(d)||j(d)){we(o,s);return}if(u.name===d)return;we(o,s);let v=(H=s.parentNode)!=null?H:o.parentNode;if(!v)return;let T=document.createElement(d);for(let P of e.getAttributeNames())P!==this.I&&T.setAttribute(P,e.getAttribute(P));as(f,T),v.insertBefore(T,s),this.r.$(T),u.name=d})},y=Er;G(o,()=>{i.stop(),y(),y=Er}),p(),y=i.subscribe(p)}};var A=t=>{let e=t;return e!=null&&e[ee]===1?e():e};var cs=(t,e)=>{let[n,r]=e;K(r)?r(t,n):t.innerHTML=n==null?void 0:n.toString()},qt={mount:()=>({update:({el:t,values:e})=>{cs(t,e)}})};var zt=class t{constructor(e){m(this,"ae");this.ae=e}static mt(e,n){var y,b;let r=e.m,o=e.o,s=o.p,i=new Set([s.for,s.if,s.else,s.elseif,s.pre]),a=o.B,c=r.ne();if(Object.keys(c).length>0||o.F.size>0)return;let l=e.q,u=[],f=0,p=[];for(let d=n.length-1;d>=0;--d)p.push(n[d]);for(;p.length>0;){let d=p.pop();if(d.nodeType===Node.ELEMENT_NODE){let T=d;if(T.tagName==="TEMPLATE"||T.tagName.includes("-"))return;let R=z(T.tagName).toUpperCase();if(o.F.has(R)||c[R])return;let H=T.attributes;for(let P=0;P<H.length;++P){let D=(y=H.item(P))==null?void 0:y.name;if(!D)continue;if(i.has(D))return;let{terms:B,flags:ae}=l.Me(D),[Z,V]=B,x=(b=a[D])!=null?b:a[Z];if(x){if(x===qt)return;u.push({nodeIndex:f,attrName:D,directive:x,option:V,flags:ae})}}++f}let v=d.childNodes;for(let T=v.length-1;T>=0;--T)p.push(v[T])}if(u.length!==0)return new t(u)}y(e,n){let r=[],o=[];for(let s=n.length-1;s>=0;--s)o.push(n[s]);for(;o.length>0;){let s=o.pop();s.nodeType===Node.ELEMENT_NODE&&r.push(s);let i=s.childNodes;for(let a=i.length-1;a>=0;--a)o.push(i[a])}for(let s=0;s<this.ae.length;++s){let i=this.ae[s],a=r[i.nodeIndex];a&&e.y(i.directive,a,i.attrName,!1,i.option,i.flags)}}};var us=(t,e)=>{let n=e.parentNode;if(n)for(let r=0;r<t.items.length;++r)n.insertBefore(t.items[r],e)},fs=t=>{var a;let e=t.length,n=t.slice(),r=[],o,s,i;for(let c=0;c<e;++c){let l=t[c];if(l===0)continue;let u=r[r.length-1];if(u===void 0||t[u]<l){n[c]=u!=null?u:-1,r.push(c);continue}for(o=0,s=r.length-1;o<s;)i=o+s>>1,t[r[i]]<l?o=i+1:s=i;l<t[r[o]]&&(o>0&&(n[c]=r[o-1]),r[o]=c)}for(o=r.length,s=(a=r[o-1])!=null?a:-1;o-- >0;)r[o]=s,s=n[s];return r},Kt=class{static yt(e){let{oldItems:n,newValues:r,getKey:o,isSameValue:s,mountNewValue:i,removeMountItem:a,endAnchor:c}=e,l=n.length,u=r.length,f=new Array(u),p=new Set;for(let x=0;x<u;++x){let k=o(r[x]);if(k===void 0||p.has(k))return;p.add(k),f[x]=k}let y=new Array(u),b=0,d=l-1,v=u-1;for(;b<=d&&b<=v;){let x=n[b];if(o(x.value)!==f[b]||!s(x.value,r[b]))break;x.value=r[b],y[b]=x,++b}for(;b<=d&&b<=v;){let x=n[d];if(o(x.value)!==f[v]||!s(x.value,r[v]))break;x.value=r[v],y[v]=x,--d,--v}if(b>d){for(let x=v;x>=b;--x){let k=x+1<u?y[x+1].items[0]:c;y[x]=i(x,r[x],k)}return y}if(b>v){for(let x=b;x<=d;++x)a(n[x]);return y}let T=b,R=b,H=v-R+1,P=new Array(H).fill(0),D=new Map;for(let x=R;x<=v;++x)D.set(f[x],x);let B=!1,ae=0;for(let x=T;x<=d;++x){let k=n[x],F=D.get(o(k.value));if(F===void 0){a(k);continue}if(!s(k.value,r[F])){a(k);continue}k.value=r[F],y[F]=k,P[F-R]=x+1,F>=ae?ae=F:B=!0}let Z=B?fs(P):[],V=Z.length-1;for(let x=H-1;x>=0;--x){let k=R+x,F=k+1<u?y[k+1].items[0]:c;if(P[x]===0){y[k]=i(k,r[k],F);continue}let Fe=y[k];B&&(V>=0&&Z[V]===x?--V:Fe&&us(Fe,F))}return y}};var mt=class{constructor(e){m(this,"T",[]);m(this,"P",new Map);m(this,"ce");this.ce=e}get S(){return this.T.length}pe(e){let n=this.ce(e.value);n!==void 0&&this.P.set(n,e)}ue(e){var r;let n=this.ce((r=this.T[e])==null?void 0:r.value);n!==void 0&&this.P.delete(n)}static ht(e,n){return{items:[],index:e,value:n,order:-1}}v(e){e.order=this.S,this.T.push(e),this.pe(e)}gt(e,n){let r=this.S;for(let o=e;o<r;++o)this.T[o].order=o+1;n.order=e,this.T.splice(e,0,n),this.pe(n)}D(e){return this.T[e]}le(e,n){this.ue(e),this.T[e]=n,this.pe(n),n.order=e}Ve(e){this.ue(e),this.T.splice(e,1);let n=this.S;for(let r=e;r<n;++r)this.T[r].order=r}Oe(e){let n=this.S;for(let r=e;r<n;++r)this.ue(r);this.T.splice(e)}nn(e){return this.P.has(e)}bt(e){var r;let n=this.P.get(e);return(r=n==null?void 0:n.order)!=null?r:-1}};var An=Symbol("r-for"),ls=t=>-1,Rr=()=>{},Gt=class Gt{constructor(e){m(this,"r");m(this,"x");m(this,"Ne");m(this,"R");this.r=e,this.x=e.o.p.for,this.Ne=It(this.x),this.R=e.o.p.pre}M(e){let n=e.hasAttribute(this.x);return n&&this.Le(e),e.hasAttribute(this.r.o.p.is)||e.hasAttribute("is")||this.r.E.Z(e)||this.r.E.j(e,o=>{o.hasAttribute(this.x)&&this.Le(o)}),n}ee(e){return e[An]?!0:(e[An]=!0,Lt(e,this.Ne).forEach(n=>n[An]=!0),!1)}Le(e){if(e.hasAttribute(this.R)||this.ee(e))return;let n=e.getAttribute(this.x);if(!n){_(0,this.x,e);return}e.removeAttribute(this.x),this.xt(e,n)}Ie(e){return pe(e)?[]:(K(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))}xt(e,n){var bt;let r=this.Tt(n);if(!(r!=null&&r.list)){_(1,this.x,n,e);return}let o=this.r.o.p.key,s=this.r.o.p.keyBind,i=(bt=e.getAttribute(o))!=null?bt:e.getAttribute(s);e.removeAttribute(o),e.removeAttribute(s);let a=Ge(e),c=zt.mt(this.r,a),l=e.parentNode;if(!l)return;let u=`${this.x} => ${n}`,f=new Comment(`__begin__ ${u}`);l.insertBefore(f,e),We(f,a),a.forEach(I=>{Y(I)}),e.remove();let p=new Comment(`__end__ ${u}`);l.insertBefore(p,f.nextSibling);let y=this.r,b=y.m,d=b.L(),T=d.length===1?[void 0,d[0]]:void 0,R=this.Rt(i),H=(I,J)=>R(I)===R(J),P=(I,J)=>I===J,D=(I,J,ne)=>{let oe=r.createContext(J,I),xe=mt.ht(oe.index,J),Oe=()=>{var S,Q;let ke=(Q=(S=p.parentNode)!=null?S:f.parentNode)!=null?Q:l,h=ne.previousSibling,M=[];for(let $=0;$<a.length;++$){let X=a[$].cloneNode(!0);ke.insertBefore(X,ne),M.push(X)}for(c?c.y(y,M):Pe(y,M),h=h.nextSibling;h!==ne;)xe.items.push(h),h=h.nextSibling};return T?(T[0]=oe.ctx,b.C(T,Oe)):b.C(d,()=>{b.v(oe.ctx),Oe()}),xe},B=(I,J)=>{let ne=N.D(I).items,oe=ne[ne.length-1].nextSibling;for(let xe of ne)Y(xe);N.le(I,D(I,J,oe))},ae=(I,J)=>{N.v(D(I,J,p))},Z=I=>{for(let J of N.D(I).items)Y(J)},V=I=>{let J=N.S;for(let ne=I;ne<J;++ne)N.D(ne).index(ne)},x=I=>{let J=f.parentNode,ne=p.parentNode;if(!J||!ne)return;let oe=N.S;K(I)&&(I=I());let xe=A(I[0]);if(w(xe)&&xe.length===0){we(f,p),N.Oe(0);return}let Oe=[];for(let E of this.Ie(I[0]))Oe.push(E);let ke=Kt.yt({oldItems:N.T,newValues:Oe,getKey:R,isSameValue:P,mountNewValue:(E,g,O)=>D(E,g,O),removeMountItem:E=>{for(let g=0;g<E.items.length;++g)Y(E.items[g])},endAnchor:p});if(ke){N.T=ke,N.P.clear();for(let E=0;E<ke.length;++E){let g=ke[E];g.order=E,g.index(E);let O=R(g.value);O!==void 0&&N.P.set(O,g)}return}let h=0,M=Number.MAX_SAFE_INTEGER,S=oe,Q=this.r.o.forGrowThreshold,$=()=>N.S<S+Q;for(let E of Oe){let g=()=>{if(h<oe){let O=N.D(h++);if(H(O.value,E)){if(P(O.value,E))return;B(h-1,E);return}let U=N.bt(R(E));if(U>=h&&U-h<10){if(--h,M=Math.min(M,h),Z(h),N.Ve(h),--oe,U>h+1)for(let re=h;re<U-1&&re<oe&&!H(N.D(h).value,E);)++re,Z(h),N.Ve(h),--oe;g();return}$()?(N.gt(h-1,D(h,E,N.D(h-1).items[0])),M=Math.min(M,h-1),++oe):B(h-1,E)}else ae(h++,E)};g()}let X=h;for(oe=N.S;h<oe;)Z(h++);N.Oe(X),V(M)},k=()=>{F.stop(),Te(),Te=Rr},F=b.N(r.list),Fe=F.value,Te=Rr,gt=0,N=new mt(R);for(let I of this.Ie(Fe()[0]))N.v(D(gt++,I,p));G(f,k),Te=F.subscribe(x)}Tt(e){var c,l;let n=Gt.Et.exec(e);if(!n)return;let r=(n[1]+((c=n[2])!=null?c:"")).split(",").map(u=>u.trim()),o=r.length>1?r.length-1:-1,s=o!==-1&&(r[o]==="index"||(l=r[o])!=null&&l.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:(u,f)=>{let p={},y=A(u);if(!a&&r.length===1)p[r[0]]=u;else if(w(y)){let d=0;for(let v of r)p[v]=y[d++]}else for(let d of r)p[d]=y[d];let b={ctx:p,index:ls};return s&&(b.index=p[s.startsWith("#")?s.substring(1):s]=ue(f)),b}}}Rt(e){if(!e)return r=>r;let n=e.trim();if(!n)return r=>r;if(n.includes(".")){let r=this.Ct(n),o=r.length>1?r.slice(1):void 0;return s=>{let i=A(s),a=this.Pe(i,r);return a!==void 0||!o?a:this.Pe(i,o)}}return r=>{var o;return A((o=A(r))==null?void 0:o[n])}}Ct(e){return e.split(".").filter(n=>n.length>0)}Pe(e,n){var o;let r=e;for(let s of n)r=(o=A(r))==null?void 0:o[s];return A(r)}};m(Gt,"Et",/\{?\[?\(?([^)}\]]+)\)?\]?\}?([^)]+)?\s+\b(?:in|of)\b\s+(.*)\s*$/);var Wt=Gt;var Jt=class{constructor(e){m(this,"fe",0);m(this,"de",new Map);m(this,"m");m(this,"De");m(this,"Ue");m(this,"Be");m(this,"E");m(this,"q");m(this,"o");m(this,"R");m(this,"He");this.m=e,this.o=e.o,this.Ue=new Wt(this),this.De=new kt(this),this.Be=new Ft(this),this.E=new jt(this),this.q=new _t(this),this.R=this.o.p.pre,this.He=this.o.p.dynamic}wt(e){let n=me(e)?[e]:e.querySelectorAll("template");for(let r of n){if(r.hasAttribute(this.R))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);Pe(this,i)}}$(e){++this.fe;try{if(e.nodeType!==Node.ELEMENT_NODE||e.hasAttribute(this.R)||this.De.M(e)||this.Ue.M(e)||this.Be.M(e))return;this.E.M(e),this.wt(e),this.ve(e,!0)}finally{--this.fe,this.fe===0&&this.vt()}}St(e,n){let r=document;if(!r){let o=e.parentNode;for(;o!=null&&o.parentNode;)o=o.parentNode;if(!o)return null;r=o}return r.querySelector(n)}je(e,n){let r=this.St(e,n);if(!r)return!1;let o=e.parentElement;if(!o)return!1;let s=new Comment(`teleported => '${n}'`);return o.insertBefore(s,e),e.teleportedFrom=s,s.teleportedTo=e,G(s,()=>{Y(e)}),r.appendChild(e),!0}At(e,n){this.de.set(e,n)}vt(){let e=this.de;if(e.size!==0){this.de=new Map;for(let[n,r]of e.entries())this.je(n,r)}}ve(e,n){var s;let r=this.q.we(e,n),o=this.o.B;for(let[i,a]of r.entries()){let[c,l]=a.oe,u=(s=o[i])!=null?s:o[c];if(!u){console.error("directive not found:",c);continue}let f=a.Se;for(let p=0;p<f.length;++p){let y=f[p];this.y(u,y,i,!1,l,a.se)}}}y(e,n,r,o,s,i){if(n.hasAttribute(this.R))return;let a=n.getAttribute(r);n.removeAttribute(r);let c=l=>{let u=l;for(;u;){let f=u.getAttribute(ct);if(f)return f;u=u.parentElement}return null};if(yn()){let l=c(n);if(l){this.m.C(ur(l),()=>{this.O(e,n,a,s,i)});return}}this.O(e,n,a,s,i)}kt(e,n,r){return e!==Pt?!1:(j(r)||this.je(n,r)||this.At(n,r),!0)}O(e,n,r,o,s){if(n.nodeType!==Node.ELEMENT_NODE||r==null||this.kt(e,n,r))return;let i=this.Mt(o,e.once),a=this.Vt(e,r),c=this.Ot(a,i);G(n,c.stop);let l=this.Nt(n,r,a,i,o,s),u=this.Lt(e,l,c);if(!u)return;let f=this.It(l,a,i,o,u);f(),e.once||(c.result=a.subscribe(f),i&&(c.dynamic=i.subscribe(f)))}Mt(e,n){let r=dr(e,this.He);if(r)return this.m.N(z(r),void 0,void 0,void 0,n)}Vt(e,n){return this.m.N(n,e.isLazy,e.isLazyKey,e.collectRefObj,e.once)}Ot(e,n){let r={stop:()=>{var o,s,i;e.stop(),n==null||n.stop(),(o=r.result)==null||o.call(r),(s=r.dynamic)==null||s.call(r),(i=r.mounted)==null||i.call(r),r.result=void 0,r.dynamic=void 0,r.mounted=void 0}};return r}Nt(e,n,r,o,s,i){return{el:e,expr:n,values:r.value(),previousValues:void 0,option:o?o.value()[0]:s,previousOption:void 0,flags:i,parseResult:r,dynamicOption:o}}Lt(e,n,r){let o=e.mount(n);if(typeof o=="function"){r.mounted=o;return}return o!=null&&o.unmount&&(r.mounted=o.unmount),o==null?void 0:o.update}It(e,n,r,o,s){let i,a;return()=>{let c=n.value(),l=r?r.value()[0]:o;e.values=c,e.previousValues=i,e.option=l,e.previousOption=a,i=c,a=l,s(e)}}};var wr="http://www.w3.org/1999/xlink",ps={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 ms(t){return!!t||t===""}var ds=(t,e,n,r,o,s)=>{var a;if(r){s&&s.includes("camel")&&(r=z(r)),Qt(t,r,e[0],o);return}let i=e.length;for(let c=0;c<i;++c){let l=e[c];if(w(l)){let u=(a=n==null?void 0:n[c])==null?void 0:a[0],f=l[0],p=l[1];Qt(t,f,p,u)}else if(L(l))for(let u of Object.entries(l)){let f=u[0],p=u[1],y=n==null?void 0:n[c],b=y&&f in y?f:void 0;Qt(t,f,p,b)}else{let u=n==null?void 0:n[c],f=e[c++],p=e[c];Qt(t,f,p,u)}}},Nn={mount:()=>({update:({el:t,values:e,previousValues:n,option:r,previousOption:o,flags:s})=>{ds(t,e,n,r,o,s)}})},Qt=(t,e,n,r)=>{if(r&&r!==e&&t.removeAttribute(r),pe(e)){_(3,"r-bind",t);return}if(!W(e)){_(6,`Attribute key is not string at ${t.outerHTML}`,e);return}if(e.startsWith("xlink:")){pe(n)?t.removeAttributeNS(wr,e.slice(6,e.length)):t.setAttributeNS(wr,e,n);return}let o=e in ps;pe(n)||o&&!ms(n)?t.removeAttribute(e):t.setAttribute(e,o?"":n)};var hs=(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(w(s)){let a=s.length;for(let c=0;c<a;++c)vr(t,s[c],i==null?void 0:i[c])}else vr(t,s,i)}},Mn={mount:()=>({update:({el:t,values:e,previousValues:n})=>{hs(t,e,n)}})},vr=(t,e,n)=>{let r=A(e),o=A(n),s=t.classList,i=W(r),a=W(o);if(r&&!i){let c=r;if(o&&!a){let l=o;for(let u in l)(!(u in c)||!A(c[u]))&&s.remove(u)}for(let l in c)A(c[l])&&s.add(l)}else if(i){if(o!==r){let c=a?Qe(o):[],l=Qe(r);c.length>0&&s.remove(...c),l.length>0&&s.add(...l)}}else if(o){let c=a?Qe(o):[];c.length>0&&s.remove(...c)}};function ys(t,e){if(t.length!==e.length)return!1;let n=!0;for(let r=0;n&&r<t.length;r++)n=Ae(t[r],e[r]);return n}function Ae(t,e){if(t===e)return!0;let n=ln(t),r=ln(e);if(n||r)return n&&r?t.getTime()===e.getTime():!1;if(n=ot(t),r=ot(e),n||r)return t===e;if(n=w(t),r=w(e),n||r)return n&&r?ys(t,e):!1;if(n=L(t),r=L(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=Object.prototype.hasOwnProperty.call(t,i),c=Object.prototype.hasOwnProperty.call(e,i);if(a&&!c||!Ae(t[i],e[i]))return!1}return!0}return String(t)===String(e)}function Xt(t,e){return t.findIndex(n=>Ae(n,e))}var Sr=t=>{let e=parseFloat(t);return isNaN(e)?t:e};var On=t=>{if(!C(t))throw q(3,"pause");t(void 0,void 0,3)};var kn=t=>{if(!C(t))throw q(3,"resume");t(void 0,void 0,4)};var Nr={mount:({el:t,parseResult:e,flags:n})=>({update:({values:r})=>{gs(t,r[0])},unmount:bs(t,e,n)})},gs=(t,e)=>{let n=Lr(t);if(n&&Mr(t))w(e)?e=Xt(e,Ne(t))>-1:le(e)?e=e.has(Ne(t)):e=ws(t,e),t.checked=e;else if(n&&Or(t))t.checked=Ae(e,Ne(t));else if(n||Ir(t))kr(t)?t.value!==(e==null?void 0:e.toString())&&(t.value=e):t.value!==e&&(t.value=e);else if(Vr(t)){let r=t.options,o=r.length,s=t.multiple;for(let i=0;i<o;i++){let a=r[i],c=Ne(a);if(s)w(e)?a.selected=Xt(e,c)>-1:a.selected=e.has(c);else if(Ae(Ne(a),e)){t.selectedIndex!==i&&(t.selectedIndex=i);return}}!s&&t.selectedIndex!==-1&&(t.selectedIndex=-1)}else _(7,t)},dt=t=>(C(t)&&(t=t()),K(t)&&(t=t()),t?W(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}),Mr=t=>t.type==="checkbox",Or=t=>t.type==="radio",kr=t=>t.type==="number"||t.type==="range",Lr=t=>t.tagName==="INPUT",Ir=t=>t.tagName==="TEXTAREA",Vr=t=>t.tagName==="SELECT",bs=(t,e,n)=>{let r=e.value,o=dt(n==null?void 0:n.join(",")),s=dt(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 _(8,t),()=>{};let a=()=>e.refs[0],c=Lr(t);return c&&Mr(t)?xs(t,a):c&&Or(t)?vs(t,a):c||Ir(t)?Ts(t,i,a,r):Vr(t)?Ss(t,a,r):(_(7,t),()=>{})},Ar=/[.,' ·٫]/,Ts=(t,e,n,r)=>{let s=e.lazy?"change":"input",i=kr(t),a=()=>{!e.trim&&!dt(r()[1]).trim||(t.value=t.value.trim())},c=p=>{let y=p.target;y.composing=1},l=p=>{let y=p.target;y.composing&&(y.composing=0,y.dispatchEvent(new Event(s)))},u=()=>{t.removeEventListener(s,f),t.removeEventListener("change",a),t.removeEventListener("compositionstart",c),t.removeEventListener("compositionend",l),t.removeEventListener("change",l)},f=p=>{let y=n();if(!y)return;let b=p.target;if(!b||b.composing)return;let d=b.value,v=dt(r()[1]);if(i||v.number||v.int){if(v.int)d=parseInt(d);else{if(Ar.test(d[d.length-1])&&d.split(Ar).length===2){if(d+="0",d=parseFloat(d),isNaN(d))d="";else if(y()===d)return}d=parseFloat(d)}isNaN(d)&&(d=""),t.value=d}else v.trim&&(d=d.trim());y(d)};return t.addEventListener(s,f),t.addEventListener("change",a),t.addEventListener("compositionstart",c),t.addEventListener("compositionend",l),t.addEventListener("change",l),u},xs=(t,e)=>{let n="change",r=()=>{t.removeEventListener(n,o)},o=()=>{let s=e();if(!s)return;let i=Ne(t),a=t.checked,c=s();if(w(c)){let l=Xt(c,i),u=l!==-1;a&&!u?c.push(i):!a&&u&&c.splice(l,1)}else le(c)?a?c.add(i):c.delete(i):s(Rs(t,a))};return t.addEventListener(n,o),r},Ne=t=>"_value"in t?t._value:t.value,Pr="trueValue",Cs="falseValue",Dr="true-value",Es="false-value",Rs=(t,e)=>{let n=e?Pr:Cs;if(n in t)return t[n];let r=e?Dr:Es;return t.hasAttribute(r)?t.getAttribute(r):e},ws=(t,e)=>{if(Pr in t)return Ae(e,t.trueValue);let r=Dr;return t.hasAttribute(r)?Ae(e,t.getAttribute(r)):Ae(e,!0)},vs=(t,e)=>{let n="change",r=()=>{t.removeEventListener(n,o)},o=()=>{let s=e();if(!s)return;let i=Ne(t);s(i)};return t.addEventListener(n,o),r},Ss=(t,e,n)=>{let r="change",o=()=>{t.removeEventListener(r,s)},s=()=>{let i=e();if(!i)return;let c=dt(n()[1]).number,l=Array.prototype.filter.call(t.options,u=>u.selected).map(u=>c?Sr(Ne(u)):Ne(u));if(t.multiple){let u=i();try{if(On(i),le(u)){u.clear();for(let f of l)u.add(f)}else w(u)?(u.splice(0),u.push(...l)):i(l)}finally{kn(i),te(i)}}else i(l[0])};return t.addEventListener(r,s),o};var As=["stop","prevent","capture","self","once","left","right","middle","passive"],Ns=t=>{let e={};if(j(t))return;let n=t.split(",");for(let r of As)e[r]=n.includes(r);return e},Ms=(t,e,n,r,o)=>{var l,u;if(r){let f=e.value(),p=A(r.value()[0]);return W(p)?Ln(t,z(p),()=>e.value()[0],(l=o==null?void 0:o.join(","))!=null?l:f[1]):()=>{}}else if(n){let f=e.value();return Ln(t,z(n),()=>e.value()[0],(u=o==null?void 0:o.join(","))!=null?u:f[1])}let s=[],i=()=>{s.forEach(f=>f())},a=e.value(),c=a.length;for(let f=0;f<c;++f){let p=a[f];if(K(p)&&(p=p()),L(p))for(let y of Object.entries(p)){let b=y[0],d=()=>{let T=e.value()[f];return K(T)&&(T=T()),T=T[b],K(T)&&(T=T()),T},v=p[b+"_flags"];s.push(Ln(t,b,d,v))}else _(2,"r-on",t)}return i},In={isLazy:(t,e)=>e===-1&&t%2===0,isLazyKey:(t,e)=>e===0&&!t.endsWith("_flags"),once:!1,collectRefObj:!0,mount:({el:t,parseResult:e,option:n,dynamicOption:r,flags:o})=>Ms(t,e,n,r,o)},Os=(t,e)=>{if(t.startsWith("keydown")||t.startsWith("keyup")||t.startsWith("keypress")){e!=null||(e="");let n=[...t.split("."),...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=l=>!(o&&!l.ctrlKey||s&&!l.shiftKey||i&&!l.altKey||a&&!l.metaKey);return r?[t,l=>c(l)?l.key.toUpperCase()===r.toUpperCase():!1]:[t,c]}return[t,n=>!0]},Ln=(t,e,n,r)=>{if(j(e))return _(5,"r-on",t),()=>{};let o=Ns(r),s=o?{capture:o.capture,passive:o.passive,once:o.once}:void 0,i;[e,i]=Os(e,r);let a=u=>{if(!i(u)||!n&&e==="submit"&&(o!=null&&o.prevent))return;let f=n(u);K(f)&&(f=f(u)),K(f)&&f(u)},c=()=>{t.removeEventListener(e,l,s)},l=u=>{if(!o){a(u);return}try{if(o.left&&u.button!==0||o.middle&&u.button!==1||o.right&&u.button!==2||o.self&&u.target!==t)return;o.stop&&u.stopPropagation(),o.prevent&&u.preventDefault(),a(u)}finally{o.once&&c()}};return t.addEventListener(e,l,s),c};var ks=(t,e,n,r)=>{if(n){r&&r.includes("camel")&&(n=z(n)),et(t,n,e[0]);return}let o=e.length;for(let s=0;s<o;++s){let i=e[s];if(w(i)){let a=i[0],c=i[1];et(t,a,c)}else if(L(i))for(let a of Object.entries(i)){let c=a[0],l=a[1];et(t,c,l)}else{let a=e[s++],c=e[s];et(t,a,c)}}},Ur={mount:()=>({update:({el:t,values:e,option:n,flags:r})=>{ks(t,e,n,r)}})};function Ls(t){return!!t||t===""}var et=(t,e,n)=>{if(pe(e)){_(3,":prop",t);return}if(e==="innerHTML"||e==="textContent"){let s=[...t.childNodes];setTimeout(()=>s.forEach(Ee),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=Ls(n):n==null&&s==="string"?(n="",o=!0):s==="number"&&(n=0,o=!0)}try{t[e]=n}catch(s){o||_(4,e,r,n,s)}o&&t.removeAttribute(e)};var Hr={once:!0,mount:({el:t,parseResult:e,expr:n})=>{let r=e,o=r.value()[0],s=w(o),i=r.refs[0];return s?o.push(t):i?i==null||i(t):r.context[n]=t,()=>{if(s){let a=o.indexOf(t);a!==-1&&o.splice(a,1)}else i==null||i(null)}}};var Is=(t,e)=>{let n=Be(t).data,r=n._ord;tr(r)&&(r=n._ord=t.style.display),at(e[0])?t.style.display=r:t.style.display="none"},Br={mount:()=>({update:({el:t,values:e})=>{Is(t,e)}})};var Vs=(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(w(s)){let a=s.length;for(let c=0;c<a;++c)$r(t,s[c],i==null?void 0:i[c])}else $r(t,s,i)}},Yt={mount:()=>({update:({el:t,values:e,previousValues:n})=>{Vs(t,e,n)}})},$r=(t,e,n)=>{let r=A(e),o=A(n),s=t.style,i=W(r);if(r&&!i){let a=r;if(o&&!W(o)){let c=o;for(let l in c)A(a[l])==null&&Pn(s,l,"")}for(let c in a)Pn(s,c,a[c])}else{let a=s.display;if(i?o!==r&&(s.cssText=r):o&&t.removeAttribute("style"),"_ord"in Be(t).data)return;s.display=a}},jr=/\s*!important$/;function Pn(t,e,n){let r=A(n);if(w(r))r.forEach(o=>{Pn(t,e,o)});else{let o=r==null?"":String(r);if(e.startsWith("--"))t.setProperty(e,o);else{let s=Ps(t,e);jr.test(o)?t.setProperty(Je(s),o.replace(jr,""),"important"):t[s]=o}}}var _r=["Webkit","Moz","ms"],Vn={};function Ps(t,e){let n=Vn[e];if(n)return n;let r=z(e);if(r!=="filter"&&r in t)return Vn[e]=r;r=ft(r);for(let o=0;o<_r.length;o++){let s=_r[o]+r;if(s in t)return Vn[e]=s}return e}var fe=t=>Fr(A(t)),Fr=(t,e=new WeakMap)=>{if(!t||!L(t))return t;if(w(t))return t.map(fe);if(le(t)){let r=new Set;for(let o of t.keys())r.add(fe(o));return r}if(Le(t)){let r=new Map;for(let o of t)r.set(fe(o[0]),fe(o[1]));return r}if(e.has(t))return A(e.get(t));let n=xt({},t);e.set(t,n);for(let r of Object.entries(n))n[r[0]]=Fr(A(r[1]),e);return n};var Ds=(t,e)=>{var r;let n=e[0];t.textContent=le(n)?JSON.stringify(fe([...n])):Le(n)?JSON.stringify(fe([...n])):L(n)?JSON.stringify(fe(n)):(r=n==null?void 0:n.toString())!=null?r:""},qr={mount:()=>({update:({el:t,values:e})=>{Ds(t,e)}})};var zr={mount:()=>({update:({el:t,values:e})=>{et(t,"value",e[0])}})};var Ue=class Ue{constructor(e){m(this,"B",{});m(this,"p",{});m(this,"dt",()=>Object.keys(this.B).filter(e=>e.length===1||!e.startsWith(":")));m(this,"te",new Map);m(this,"F",new Map);m(this,"forGrowThreshold",10);m(this,"globalContext");m(this,"useInterpolation",!0);m(this,"propValidationMode","throw");if(this.setDirectives("r-"),e){this.globalContext=e;return}this.globalContext=this.Dt()}static getDefault(){var e;return(e=Ue.$e)!=null?e:Ue.$e=new Ue}Dt(){let e={},n=globalThis;for(let r of Ue.Pt.split(","))e[r]=n[r];return e.ref=Se,e.sref=ue,e.flatten=fe,e}addComponent(...e){for(let n of e){if(!n.defaultName){Ke.warning("Registered component's default name is not defined",n);continue}this.te.set(ft(n.defaultName),n),this.F.set(ft(n.defaultName).toLocaleUpperCase(),n)}}setDirectives(e){this.B={".":Ur,":":Nn,"@":In,[`${e}on`]:In,[`${e}bind`]:Nn,[`${e}html`]:qt,[`${e}text`]:qr,[`${e}show`]:Br,[`${e}model`]:Nr,":style":Yt,[`${e}style`]:Yt,[`${e}bind:style`]:Yt,":class":Mn,[`${e}bind:class`]:Mn,":ref":Hr,":value":zr,[`${e}teleport`]:Pt},this.p={for:`${e}for`,if:`${e}if`,else:`${e}else`,elseif:`${e}else-if`,pre:`${e}pre`,inherit:`${e}inherit`,text:`${e}text`,context:":context",contextAlias:`${e}context`,bind:`${e}bind`,on:`${e}on`,keyBind:":key",key:"key",is:":is",teleport:`${e}teleport`,dynamic:"_d_"}}updateDirectives(e){e(this.B,this.p)}};m(Ue,"$e"),m(Ue,"Pt","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 he=Ue;var Zt=(t,e)=>{if(!t)return;let r=(e!=null?e:he.getDefault()).p,o=/(\{\{[^]*?\}\}|\[\[[^]*?\]\])/g,s=[{start:"{{",end:"}}"},{start:"[[",end:"]]"}];for(let i of Hs(t,r.pre,s))Us(i,r.text,o,s)},Us=(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 l=i[1],u=Kr(l,r);if(u&&j(i[0])&&j(i[2])){let f=t.parentElement;f.setAttribute(e,l.substring(u.start.length,l.length-u.end.length)),f.innerText="";return}}let a=document.createDocumentFragment();for(let l of i){let u=Kr(l,r);if(u){let f=document.createElement("span");f.setAttribute(e,l.substring(u.start.length,l.length-u.end.length)),a.appendChild(f)}else a.appendChild(document.createTextNode(l))}t.replaceWith(a)},Hs=(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 ve(s))o(a)}};return o(t),r},Kr=(t,e)=>e.find(n=>t.startsWith(n.start)&&t.endsWith(n.end));var Bs=9,$s=10,js=13,_s=32,Me=46,en=44,Fs=39,qs=34,tn=40,tt=41,nn=91,Dn=93,Un=63,zs=59,Wr=58,Gr=123,rn=125,je=43,on=45,Hn=96,Jr=47,Bn=92,Qr=new Set([2,3]),no={"=":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},Ks=Yn(xt({"=>":2},no),{"||":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}),ro=Object.keys(no),Ws=new Set(ro),jn=new Set(["=>"]);ro.forEach(t=>jn.add(t));var Xr={true:!0,false:!1,null:null},Gs="this",nt="Expected ",_e="Unexpected ",Fn="Unclosed ",Js=nt+":",Yr=nt+"expression",Qs="missing }",Xs=_e+"object property",Ys=Fn+"(",Zr=nt+"comma",eo=_e+"token ",Zs=_e+"period",$n=nt+"expression after ",ei="missing unaryOp argument",ti=Fn+"[",ni=nt+"exponent (",ri="Variable names cannot start with a number (",oi=Fn+'quote after "',ht=t=>t>=48&&t<=57,to=t=>Ks[t],_n=class{constructor(e){m(this,"u");m(this,"e");this.u=e,this.e=0}get H(){return this.u.charAt(this.e)}get h(){return this.u.charCodeAt(this.e)}f(e){return this.u.charCodeAt(this.e)===e}z(e){return e>=65&&e<=90||e>=97&&e<=122||e===36||e===95||e>=128}me(e){return this.z(e)||ht(e)}i(e){return new Error(`${e} at character ${this.e}`)}g(){let e=this.h,n=this.u,r=this.e;for(;e===_s||e===Bs||e===$s||e===js;)e=n.charCodeAt(++r);this.e=r}parse(){let e=this.ye();return e.length===1?e[0]:{type:0,body:e}}ye(e){let n=[];for(;this.e<this.u.length;){let r=this.h;if(r===zs||r===en)this.e++;else{let o=this.A();if(o)n.push(o);else if(this.e<this.u.length){if(r===e)break;throw this.i(_e+'"'+this.H+'"')}}}return n}A(){var n;let e=(n=this.Ut())!=null?n:this._e();return this.g(),this.Bt(e)}he(){this.g();let e=this.u,n=this.e,r=e.charCodeAt(n),o=e.charCodeAt(n+1),s=e.charCodeAt(n+2),i=e.charCodeAt(n+3);if(isNaN(r))return!1;let a=!1,c=0;return r===62&&o===62&&s===62&&i===61?(a=">>>=",c=4):r===61&&o===61&&s===61?(a="===",c=3):r===33&&o===61&&s===61?(a="!==",c=3):r===62&&o===62&&s===62?(a=">>>",c=3):r===60&&o===60&&s===61?(a="<<=",c=3):r===62&&o===62&&s===61?(a=">>=",c=3):r===42&&o===42&&s===61?(a="**=",c=3):r===61&&o===62?(a="=>",c=2):r===124&&o===124?(a="||",c=2):r===63&&o===63?(a="??",c=2):r===38&&o===38?(a="&&",c=2):r===61&&o===61?(a="==",c=2):r===33&&o===61?(a="!=",c=2):r===60&&o===61?(a="<=",c=2):r===62&&o===61?(a=">=",c=2):r===60&&o===60?(a="<<",c=2):r===62&&o===62?(a=">>",c=2):r===43&&o===61?(a="+=",c=2):r===45&&o===61?(a="-=",c=2):r===42&&o===61?(a="*=",c=2):r===47&&o===61?(a="/=",c=2):r===37&&o===61?(a="%=",c=2):r===38&&o===61?(a="&=",c=2):r===94&&o===61?(a="^=",c=2):r===124&&o===61?(a="|=",c=2):r===42&&o===42?(a="**",c=2):r===105&&o===110?this.me(e.charCodeAt(n+2))||(a="in",c=2):r===61?(a="=",c=1):r===124?(a="|",c=1):r===94?(a="^",c=1):r===38?(a="&",c=1):r===60?(a="<",c=1):r===62?(a=">",c=1):r===43?(a="+",c=1):r===45?(a="-",c=1):r===42?(a="*",c=1):r===47?(a="/",c=1):r===37&&(a="%",c=1),a?(this.e+=c,a):!1}_e(){let e,n,r,o,s,i,a,c;if(s=this.W(),!s||(n=this.he(),!n))return s;if(o={value:n,prec:to(n),right_a:jn.has(n)},i=this.W(),!i)throw this.i($n+n);let l=[s,o,i];for(;n=this.he();){r=to(n),o={value:n,prec:r,right_a:jn.has(n)},c=n;let u=f=>o.right_a&&f.right_a?r>f.prec:r<=f.prec;for(;l.length>2&&u(l[l.length-2]);)i=l.pop(),n=l.pop().value,s=l.pop(),e=this.Fe(n,s,i),l.push(e);if(e=this.W(),!e)throw this.i($n+c);l.push(o,e)}for(a=l.length-1,e=l[a];a>1;)e=this.Fe(l[a-1].value,l[a-2],e),a-=2;return e}W(){let e;if(this.g(),e=this.Ht(),e)return this.ge(e);let n=this.h;if(ht(n)||n===Me)return this.jt();if(n===Fs||n===qs)e=this.$t();else if(n===nn)e=this._t();else{let r=this.Ft();if(r){let o=this.W();if(!o)throw this.i(ei);return this.ge({type:7,operator:r,argument:o})}this.z(n)?(e=this.be(),e.name in Xr?e={type:4,value:Xr[e.name],raw:e.name}:e.name===Gs&&(e={type:5})):n===tn&&(e=this.qt())}return e?(e=this.G(e),this.ge(e)):!1}Fe(e,n,r){if(e==="=>"){let o=n.type===1?n.expressions:[n];return{type:15,params:o,body:r}}return Ws.has(e)?{type:16,operator:e,left:n,right:r}:{type:8,operator:e,left:n,right:r}}Ht(){let e={node:!1};return this.Kt(e),e.node||(this.zt(e),e.node)||(this.Wt(e),e.node)||(this.qe(e),e.node)||this.Gt(e),e.node}ge(e){let n={node:e};return this.Jt(n),this.Qt(n),this.Xt(n),n.node}Ft(){let e=this.u,n=this.e,r=e.charCodeAt(n),o=e.charCodeAt(n+1),s=e.charCodeAt(n+2),i=e.charCodeAt(n+3);return r===on?(this.e++,"-"):r===33?(this.e++,"!"):r===126?(this.e++,"~"):r===je?(this.e++,"+"):r===110&&o===101&&s===119&&!this.me(i)?(this.e+=3,"new"):!1}Ut(){let e={};return this.Yt(e),e.node}Bt(e){let n={node:e};return this.Zt(n),n.node}G(e){this.g();let n=this.h;for(;n===Me||n===nn||n===tn||n===Un;){let r;if(n===Un){if(this.u.charCodeAt(this.e+1)!==Me)break;r=!0,this.e+=2,this.g(),n=this.h}if(this.e++,n===nn){if(e={type:3,computed:!0,object:e,property:this.A()},this.g(),n=this.h,n!==Dn)throw this.i(ti);this.e++}else n===tn?e={type:6,arguments:this.Ke(tt),callee:e}:(r&&this.e--,this.g(),e={type:3,computed:!1,object:e,property:this.be()});r&&(e.optional=!0),this.g(),n=this.h}return e}jt(){let e=this.u,n=this.e,r=n;for(;ht(e.charCodeAt(r));)r++;if(e.charCodeAt(r)===Me)for(r++;ht(e.charCodeAt(r));)r++;let o=e.charCodeAt(r);if(o===101||o===69){r++;let a=e.charCodeAt(r);(a===je||a===on)&&r++;let c=r;for(;ht(e.charCodeAt(r));)r++;if(c===r){this.e=r;let l=e.slice(n,r);throw this.i(ni+l+this.H+")")}}this.e=r;let s=e.slice(n,r),i=e.charCodeAt(r);if(this.z(i))throw this.i(ri+s+this.H+")");if(i===Me||s.length===1&&s.charCodeAt(0)===Me)throw this.i(Zs);return{type:4,value:parseFloat(s),raw:s}}$t(){let e=this.u,n=e.length,r=this.e,o=e.charCodeAt(this.e++),s=this.e,i=s,a=[],c=!1,l=!1;for(;s<n;){let f=e.charCodeAt(s);if(f===o){l=!0,this.e=s+1;break}if(f===Bn){c||(c=!0),a.push(e.slice(i,s));let p=e.charCodeAt(s+1);a.push(this.ze(p)),s+=2,i=s}else s++}let u=c?a.join("")+e.slice(i,l?s:n):e.slice(i,l?s:n);if(!l)throw this.e=s,this.i(oi+u+'"');return{type:4,value:u,raw:e.substring(r,this.e)}}ze(e){switch(e){case 110:return`
|
|
2
|
+
`;case 114:return"\r";case 116:return" ";case 98:return"\b";case 102:return"\f";case 118:return"\v";default:return isNaN(e)?"":String.fromCharCode(e)}}be(){let e=this.h,n=this.e;if(this.z(e))this.e++;else throw this.i(_e+this.H);for(;this.e<this.u.length&&(e=this.h,this.me(e));)this.e++;return{type:2,name:this.u.slice(n,this.e)}}Ke(e){let n=[],r=!1,o=0;for(;this.e<this.u.length;){this.g();let s=this.h;if(s===e){if(r=!0,this.e++,e===tt&&o&&o>=n.length)throw this.i(eo+String.fromCharCode(e));break}else if(s===en){if(this.e++,o++,o!==n.length){if(e===tt)throw this.i(eo+",");for(let i=n.length;i<o;i++)n.push(null)}}else{if(n.length!==o&&o!==0)throw this.i(Zr);{let i=this.A();if(!i||i.type===0)throw this.i(Zr);n.push(i)}}}if(!r)throw this.i(nt+String.fromCharCode(e));return n}qt(){this.e++;let e=this.ye(tt);if(this.f(tt))return this.e++,e.length===1?e[0]:e.length?{type:1,expressions:e}:!1;throw this.i(Ys)}_t(){return this.e++,{type:9,elements:this.Ke(Dn)}}Kt(e){if(this.f(Gr)){this.e++;let n=[];for(;!isNaN(this.h);){if(this.g(),this.f(rn)){this.e++,e.node=this.G({type:10,properties:n});return}let r=this.A();if(!r)break;if(this.g(),r.type===2&&(this.f(en)||this.f(rn)))n.push({type:12,computed:!1,key:r,value:r,shorthand:!0});else if(this.f(Wr)){this.e++;let o=this.A();if(!o)throw this.i(Xs);let s=r.type===9;n.push({type:12,computed:s,key:s?r.elements[0]:r,value:o,shorthand:!1}),this.g()}else n.push(r);this.f(en)&&this.e++}throw this.i(Qs)}}zt(e){let n=this.h;if((n===je||n===on)&&n===this.u.charCodeAt(this.e+1)){this.e+=2;let r=e.node={type:13,operator:n===je?"++":"--",argument:this.G(this.be()),prefix:!0};if(!r.argument||!Qr.has(r.argument.type))throw this.i(_e+r.operator)}}Qt(e){let n=e.node,r=this.h;if((r===je||r===on)&&r===this.u.charCodeAt(this.e+1)){if(!Qr.has(n.type))throw this.i(_e+(r===je?"++":"--"));this.e+=2,e.node={type:13,operator:r===je?"++":"--",argument:n,prefix:!1}}}Wt(e){this.u.charCodeAt(this.e)===Me&&this.u.charCodeAt(this.e+1)===Me&&this.u.charCodeAt(this.e+2)===Me&&(this.e+=3,e.node={type:14,argument:this.A()})}Zt(e){if(e.node&&this.f(Un)){this.e++;let n=e.node,r=this.A();if(!r)throw this.i(Yr);if(this.g(),this.f(Wr)){this.e++;let o=this.A();if(!o)throw this.i(Yr);e.node={type:11,test:n,consequent:r,alternate:o}}else throw this.i(Js)}}Yt(e){if(this.g(),this.f(tn)){let n=this.e;if(this.e++,this.g(),this.f(tt)){this.e++;let r=this.he();if(r==="=>"){let o=this._e();if(!o)throw this.i($n+r);e.node={type:15,params:null,body:o};return}}this.e=n}}Xt(e){let n=e.node,r=n.type;(r===2||r===3)&&this.f(Hn)&&(e.node={type:17,tag:n,quasi:this.qe(e)})}qe(e){if(!this.f(Hn))return;let n=this.u,r=n.length,o={type:19,quasis:[],expressions:[]},s=++this.e,i=[],a=[],c=!1,l=u=>{if(!c){let y=n.slice(s,this.e);return o.quasis.push({type:18,value:{raw:y,cooked:y},tail:u})}i.push(n.slice(s,this.e)),a.push(n.slice(s,this.e));let f=i.join(""),p=a.join("");return i.length=0,a.length=0,c=!1,o.quasis.push({type:18,value:{raw:f,cooked:p},tail:u})};for(;this.e<r;){let u=n.charCodeAt(this.e);if(u===Hn)return l(!0),this.e+=1,e.node=o,o;if(u===36&&n.charCodeAt(this.e+1)===Gr){if(l(!1),this.e+=2,o.expressions.push(...this.ye(rn)),!this.f(rn))throw this.i("unclosed ${");this.e+=1,s=this.e}else if(u===Bn){c||(c=!0),i.push(n.slice(s,this.e)),a.push(n.slice(s,this.e));let f=n.charCodeAt(this.e+1);i.push(n.slice(this.e,this.e+2)),a.push(this.ze(f)),this.e+=2,s=this.e}else this.e+=1}throw this.i("Unclosed `")}Jt(e){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&&r.callee.type===3;)r=r.type===3?r.object:r.callee.object;r.type=20}Gt(e){if(!this.f(Jr))return;let n=++this.e,r=!1;for(;this.e<this.u.length;){if(this.h===Jr&&!r){let o=this.u.slice(n,this.e),s="";for(;++this.e<this.u.length;){let a=this.h;if(a>=97&&a<=122||a>=65&&a<=90||a>=48&&a<=57)s+=this.H;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.u.slice(n-1,this.e)},e.node=this.G(e.node),e.node}this.f(nn)?r=!0:r&&this.f(Dn)&&(r=!1),this.e+=this.f(Bn)?2:1}throw this.i("Unclosed Regex")}},oo=t=>new _n(t).parse();var si={"=>":(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)=>Tt(t,e)},ii={"-":t=>-t,"+":t=>+t,"!":t=>!t,"~":t=>~t,new:t=>t},co=t=>{if(!(t!=null&&t.some(ao)))return t;let e=[];return t.forEach(n=>ao(n)?e.push(...n):e.push(n)),e},so=(...t)=>co(t),qn=(t,e)=>{if(!t)return e;let n=Object.create(e!=null?e:{});return n.$event=t,n},ai={"++":(t,e)=>{let n=t[e];if(C(n)){let r=n();return n(++r),r}return++t[e]},"--":(t,e)=>{let n=t[e];if(C(n)){let r=n();return n(--r),r}return--t[e]}},ci={"++":(t,e)=>{let n=t[e];if(C(n)){let r=n();return n(r+1),r}return t[e]++},"--":(t,e)=>{let n=t[e];if(C(n)){let r=n();return n(r-1),r}return t[e]--}},io={"=":(t,e,n)=>{let r=t[e];return C(r)?r(n):t[e]=n},"+=":(t,e,n)=>{let r=t[e];return C(r)?r(r()+n):t[e]+=n},"-=":(t,e,n)=>{let r=t[e];return C(r)?r(r()-n):t[e]-=n},"*=":(t,e,n)=>{let r=t[e];return C(r)?r(r()*n):t[e]*=n},"/=":(t,e,n)=>{let r=t[e];return C(r)?r(r()/n):t[e]/=n},"%=":(t,e,n)=>{let r=t[e];return C(r)?r(r()%n):t[e]%=n},"**=":(t,e,n)=>{let r=t[e];return C(r)?r(Tt(r(),n)):t[e]=Tt(t[e],n)},"<<=":(t,e,n)=>{let r=t[e];return C(r)?r(r()<<n):t[e]<<=n},">>=":(t,e,n)=>{let r=t[e];return C(r)?r(r()>>n):t[e]>>=n},">>>=":(t,e,n)=>{let r=t[e];return C(r)?r(r()>>>n):t[e]>>>=n},"|=":(t,e,n)=>{let r=t[e];return C(r)?r(r()|n):t[e]|=n},"&=":(t,e,n)=>{let r=t[e];return C(r)?r(r()&n):t[e]&=n},"^=":(t,e,n)=>{let r=t[e];return C(r)?r(r()^n):t[e]^=n}},sn=(t,e)=>K(t)?t.bind(e):t,zn=class{constructor(e,n,r,o,s){m(this,"l");m(this,"We");m(this,"Ge");m(this,"Je");m(this,"k");m(this,"Qe");m(this,"Xe");this.l=w(e)?e:[e],this.We=n,this.Ge=r,this.Je=o,this.Xe=!!s}Ye(e,n){if(n&&e in n)return n;for(let r of this.l)if(e in r)return r}2(e,n,r){let o=e.name;if(o==="$root")return this.l[this.l.length-1];if(o==="$parent")return this.l[1];if(o==="$ctx")return[...this.l];if(r&&o in r)return this.k=r[o],sn(A(r[o]),r);for(let i of this.l)if(o in i)return this.k=i[o],sn(A(i[o]),i);let s=this.We;if(s&&o in s)return this.k=s[o],sn(A(s[o]),s)}5(e,n,r){return this.l[0]}0(e,n,r){return this.Ze(n,r,so,...e.body)}1(e,n,r){return this.w(n,r,(...o)=>o.pop(),...e.expressions)}3(e,n,r){let{obj:o,key:s}=this.xe(e,n,r),i=o==null?void 0:o[s];return this.k=i,sn(A(i),o)}4(e,n,r){return e.value}6(e,n,r){let o=(i,...a)=>K(i)?i(...co(a)):i,s=this.w(++n,r,o,e.callee,...e.arguments);return this.k=s,s}7(e,n,r){return this.w(n,r,ii[e.operator],e.argument)}8(e,n,r){let o=si[e.operator];switch(e.operator){case"||":case"&&":case"??":return o(()=>this.b(e.left,n,r),()=>this.b(e.right,n,r))}return this.w(n,r,o,e.left,e.right)}9(e,n,r){return this.Ze(++n,r,so,...e.elements)}10(e,n,r){let o={},s=(...i)=>{i.forEach(a=>{Object.assign(o,a)})};return this.w(++n,r,s,...e.properties),o}11(e,n,r){return this.w(n,r,o=>this.b(o?e.consequent:e.alternate,n,r),e.test)}12(e,n,r){var u;let o={},s=f=>(f==null?void 0:f.type)!==15,i=(u=this.Je)!=null?u:()=>!1,a=n===0&&this.Xe,c=f=>this.et(a,e.key,n,qn(f,r)),l=f=>this.et(a,e.value,n,qn(f,r));if(e.shorthand){let f=e.key.name;o[f]=s(e.key)&&i(f,n)?c:c()}else if(e.computed){let f=A(c());o[f]=s(e.value)&&i(f,n)?l:l()}else{let f=e.key.type===4?e.key.value:e.key.name;o[f]=s(e.value)&&i(f,n)?()=>l:l()}return o}xe(e,n,r){let o=this.b(e.object,n,r),s=e.computed?this.b(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?ai:ci;if(o.type===2){let a=o.name,c=this.Ye(a,r);return pe(c)?void 0:i[s](c,a)}if(o.type===3){let{obj:a,key:c}=this.xe(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.Ye(i,r);if(pe(a))return;let c=this.b(e.right,n,r);return io[s](a,i,c)}if(o.type===3){let{obj:i,key:a}=this.xe(o,n,r),c=this.b(e.right,n,r);return io[s](i,a,c)}}14(e,n,r){let o=this.b(e.argument,n,r);return w(o)&&(o.s=uo),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.w(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.w(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.b(e.body,n,s)}}b(e,n,r){let o=A(this[e.type](e,n,r));return this.Qe=e.type,o}et(e,n,r,o){let s=this.b(n,r,o);return e&&this.tt()?this.k:s}tt(){let e=this.Qe;return(e===2||e===3||e===6)&&C(this.k)}eval(e,n){let{value:r,refs:o}=wn(()=>this.b(e,-1,n)),s={value:r,refs:o};return this.tt()&&(s.ref=this.k),s}w(e,n,r,...o){let s=o.map(i=>i&&this.b(i,e,n));return r(...s)}Ze(e,n,r,...o){let s=this.Ge;if(!s)return this.w(e,n,r,...o);let i=o.map((a,c)=>a&&(a.type!==15&&s(c,e)?l=>this.b(a,e,qn(l,n)):this.b(a,e,n)));return r(...i)}},uo=Symbol("s"),ao=t=>(t==null?void 0:t.s)===uo,fo=(t,e,n,r,o,s,i)=>new zn(e,n,r,o,i).eval(t,s);var lo={},po=t=>!!t,an=class{constructor(e,n){m(this,"l");m(this,"o");m(this,"nt",[]);this.l=e,this.o=n}v(e){this.l=[e,...this.l]}ne(){return this.l.map(n=>n.components).filter(po).reverse().reduce((n,r)=>{for(let[o,s]of Object.entries(r))n[o.toUpperCase()]=s;return n},{})}ft(){let e=[],n=new Set,r=this.l.map(o=>o.components).filter(po).reverse();for(let o of r)for(let s of Object.keys(o))n.has(s)||(n.add(s),e.push(s));return e}N(e,n,r,o,s){var T;let i=[],a=[],c=new Set,l=()=>{for(let R=0;R<a.length;++R)a[R]();a.length=0},p={value:()=>i,stop:()=>{l(),c.clear()},subscribe:(R,H)=>(c.add(R),H&&R(i),()=>{c.delete(R)}),refs:[],context:this.l[0]};if(j(e))return p;let y=this.o.globalContext,b=[],d=new Set,v=(R,H,P,D)=>{try{let B=fo(R,H,y,n,r,D,o);return P&&B.refs.length>0&&b.push(...B.refs),{value:B.value,refs:B.refs,ref:B.ref}}catch(B){_(6,`evaluation error: ${e}`,B)}return{value:void 0,refs:[]}};try{let R=(T=lo[e])!=null?T:oo("["+e+"]");lo[e]=R;let H=this.l.slice(),P=R.elements,D=P.length,B=new Array(D);p.refs=B;let ae=()=>{b.length=0,s||(d.clear(),l());let Z=new Array(D);for(let V=0;V<D;++V){let x=P[V];if(n!=null&&n(V,-1)){Z[V]=F=>v(x,H,!1,{$event:F}).value;continue}let k=v(x,H,!0);Z[V]=k.value,B[V]=k.ref}if(!s)for(let V of b)d.has(V)||(d.add(V),a.push(ie(V,ae)));if(i=Z,c.size!==0)for(let V of c)c.has(V)&&V(i)};ae()}catch(R){_(6,`parse error: ${e}`,R)}return p}L(){return this.l.slice()}le(e){this.nt.push(this.l),this.l=e}C(e,n){try{this.le(e),n()}finally{this.en()}}en(){var e;this.l=(e=this.nt.pop())!=null?e:[]}};var mo=t=>{let e=t.charCodeAt(0);return e>=48&&e<=57||e>=65&&e<=90||e>=97&&e<=122||t==="-"||t==="_"||t===":"},ui=(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},fi=(t,e)=>{let n=e?2:1;for(;n<t.length&&(t[n]===" "||t[n]===`
|
|
3
|
+
`);)++n;if(n>=t.length||!mo(t[n]))return null;let r=n;for(;n<t.length&&mo(t[n]);)++n;return{start:r,end:n}},ho=new Set(["table","thead","tbody","tfoot"]),li=new Set(["thead","tbody","tfoot"]),pi=new Set(["caption","colgroup","thead","tbody","tfoot","tr"]),mi=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),yo=(t,e)=>`${t.slice(0,t.length-2)}></${e}>`,cn=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 T=t.indexOf("-->",i+4);if(T===-1){n.push(t.slice(i));break}n.push(t.slice(i,T+3)),e=T+3;continue}let a=ui(t,i);if(a===-1){n.push(t.slice(i));break}let c=t.slice(i,a+1),l=c.startsWith("</");if(c.startsWith("<!")||c.startsWith("<?")){n.push(c),e=a+1;continue}let f=fi(c,l);if(!f){n.push(c),e=a+1;continue}let p=c.slice(f.start,f.end);if(l){let T=r[r.length-1];T?(r.pop(),n.push(T.replacementHost?`</${T.replacementHost}>`:c),ho.has(T.effectiveTag)&&--o):n.push(c),e=a+1;continue}let y=c.charCodeAt(c.length-2)===47,b=r[r.length-1],d=null;o===0?p==="tr"?d="trx":p==="td"?d="tdx":p==="th"&&(d="thx"):li.has((s=b==null?void 0:b.effectiveTag)!=null?s:"")?d=p==="tr"?null:"tr":(b==null?void 0:b.effectiveTag)==="table"?d=pi.has(p)?null:"tr":(b==null?void 0:b.effectiveTag)==="tr"&&(d=p==="td"||p==="th"?null:"td");let v=y&&!mi.has(d||p);if(d){let T=d==="trx"||d==="tdx"||d==="thx",R=`${c.slice(0,f.start)}${d} is="${T?`r-${p}`:`regor:${p}`}"${c.slice(f.end)}`;n.push(v?yo(R,d):R)}else n.push(v?yo(c,p):c);if(!y){let T=d==="trx"?"tr":d==="tdx"?"td":d==="thx"?"th":d||p;r.push({replacementHost:d,effectiveTag:T}),ho.has(T)&&++o}e=a+1}return n.join("")};var di="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",hi=new Set(di.toUpperCase().split(",")),yi="http://www.w3.org/2000/svg",go=(t,e)=>{me(t)?t.content.appendChild(e):t.appendChild(e)},Kn=(t,e,n,r)=>{var i;let o=t.t;if(o){let a=n&&hi.has(o.toUpperCase())?document.createElementNS(yi,o.toLowerCase()):document.createElement(o),c=t.a;if(c)for(let u of Object.entries(c)){let f=u[0],p=u[1];f.startsWith("#")&&(p=f.substring(1),f="name"),a.setAttribute(Vt(f,r),p)}let l=t.c;if(l)for(let u of l)Kn(u,a,n,r);go(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)go(e,a);else throw new Error("unsupported node type.")}},rt=(t,e,n)=>{n!=null||(n=he.getDefault());let r=document.createDocumentFragment();if(!w(t))return Kn(t,r,!!e,n),r;for(let o of t)Kn(o,r,!!e,n);return r};var gi=(t,e={selector:"#app"},n)=>{W(e)&&(e={selector:"#app",template:e}),hr(t)&&(t=t.context);let r=e.element?e.element:e.selector?document.querySelector(e.selector):null;if(!r||!Re(r))throw q(0);n||(n=he.getDefault());let o=()=>{for(let a of[...r.childNodes])Y(a)},s=a=>{for(;a.length>0;)r.appendChild(a[0])};if(e.template){let a=document.createRange().createContextualFragment(cn(e.template));o(),s(a.childNodes),e.element=a}else if(e.json){let a=rt(e.json,e.isSVG,n);o(),s(a.childNodes)}return n.useInterpolation&&Zt(r,n),new Wn(t,r,n).y(),G(r,()=>{Ie(t)}),Dt(t),{context:t,unmount:()=>{Y(r)},unbind:()=>{Ee(r)}}},Wn=class{constructor(e,n,r){m(this,"tn");m(this,"rt");m(this,"o");m(this,"m");m(this,"r");this.tn=e,this.rt=n,this.o=r,this.m=new an([e],r),this.r=new Jt(this.m)}y(){this.r.$(this.rt)}};var yt=t=>{if(w(t))return t.map(o=>yt(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=ve(t);return r.length>0&&(e.c=[...r].map(o=>yt(o))),e};var bi=(t,e={})=>{var s,i,a,c,l,u;w(e)&&(e={props:e}),W(t)&&(t={template:t});let n=(s=e.context)!=null?s:()=>({}),r=!1;if(t.element){let f=t.element;f.remove(),t.element=f}else if(t.selector){let f=document.querySelector(t.selector);if(!f)throw q(1,t.selector);f.remove(),t.element=f}else if(t.template){let f=document.createRange().createContextualFragment(cn(t.template));t.element=f}else t.json&&(t.element=rt(t.json,t.isSVG,e.config),r=!0);t.element||(t.element=document.createDocumentFragment()),((i=e.useInterpolation)==null||i)&&Zt(t.element,(a=e.config)!=null?a:he.getDefault());let o=t.element;if(!r&&(((l=t.isSVG)!=null?l:ut(o)&&((c=o.hasAttribute)!=null&&c.call(o,"isSVG")))||ut(o)&&o.querySelector("[isSVG]"))){let f=o.content,p=f?[...f.childNodes]:[...o.childNodes],y=yt(p);t.element=rt(y,!0,e.config)}return{context:n,template:t.element,inheritAttrs:(u=e.inheritAttrs)!=null?u:!0,props:e.props,defaultName:e.defaultName}};var Gn=class{constructor(){m(this,"byConstructor",new Map)}register(e){this.byConstructor.set(e.constructor,e)}unregisterByClass(e){this.byConstructor.delete(e)}unregister(e){let n=e.constructor;this.byConstructor.get(n)===e&&this.byConstructor.delete(n)}find(e){for(let n of this.byConstructor.values())if(n instanceof e)return n}require(e){let n=this.find(e);if(n)return n;throw new Error(`${e.name} is not registered in ContextRegistry.`)}};var Ti=t=>{var e;(e=He())==null||e.onMounted.push(t)};var xi=t=>{let e,n={},r=(...o)=>{if(o.length<=2&&0 in o)throw q(4);return e&&!n.isStopped?e(...o):(e=Ci(t,n),e(...o))};return r[ee]=1,De(r,!0),r.stop=()=>{var o,s;return(s=(o=n.ref)==null?void 0:o.stop)==null?void 0:s.call(o)},se(()=>r.stop(),!0),r},Ci=(t,e)=>{var s;let n=(s=e.ref)!=null?s:ue(null);e.ref=n,e.isStopped=!1;let r=0,o=Ye(()=>{if(r>0){o(),e.isStopped=!0,te(n);return}n(t()),++r});return n.stop=o,n};var Ei=(t,e)=>{let n={},r,o=(...s)=>{if(s.length<=2&&0 in s)throw q(4);return r&&!n.isStopped?r(...s):(r=Ri(t,e,n),r(...s))};return o[ee]=1,De(o,!0),o.stop=()=>{var s,i;return(i=(s=n.ref)==null?void 0:s.stop)==null?void 0:i.call(s)},se(()=>o.stop(),!0),o},Ri=(t,e,n)=>{var a;let r=(a=n.ref)!=null?a:ue(null);n.ref=r,n.isStopped=!1;let o=0,s=c=>{if(o>0){r.stop(),n.isStopped=!0,te(r);return}let l=t.map(u=>u());r(e(...l)),++o},i=[];for(let c of t){let l=ie(c,s);i.push(l)}return s(null),r.stop=()=>{i.forEach(c=>{c()})},r};var wi=(t,e)=>{let n={},r,o=(...s)=>{if(s.length<=2&&0 in s)throw q(4);return r&&!n.isStopped?r(...s):(r=vi(t,e,n),r(...s))};return o[ee]=1,De(o,!0),o.stop=()=>{var s,i;return(i=(s=n.ref)==null?void 0:s.stop)==null?void 0:i.call(s)},se(()=>o.stop(),!0),o},vi=(t,e,n)=>{var s;let r=(s=n.ref)!=null?s:ue(null);n.ref=r,n.isStopped=!1;let o=0;return r.stop=ie(t,i=>{if(o>0){r.stop(),n.isStopped=!0,te(r);return}r(e(i)),++o},!0),r};var Si=t=>(t[St]=1,t);var Ai=(t,e)=>{if(!e)throw q(5);let r=Xe(t)?Se:a=>a,o=()=>localStorage.setItem(e,JSON.stringify(fe(t()))),s=localStorage.getItem(e);if(s!=null)try{t(r(JSON.parse(s)))}catch(a){_(6,`persist: failed to parse data for key ${e}`,a),o()}else o();let i=Ye(o);return se(i,!0),t};var Jn=(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},Ni=Jn,Mi=Jn;var Oi=(t,e,n)=>{let r=[],o=()=>{e(t.map(i=>i()))};for(let i of t)r.push(ie(i,o));n&&o();let s=()=>{for(let i of r)i()};return se(s,!0),s};var ki=t=>{if(!C(t))throw q(3,"observerCount");return t(void 0,void 0,2)};var Li=t=>{bo();try{t()}finally{To()}},bo=()=>{be.stack||(be.stack=[]),be.stack.push(new Set)},To=()=>{let t=be.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 be.stack;for(let n of e)try{te(n)}catch(r){console.error(r)}};export{it as ComponentHead,Gn as ContextRegistry,he as RegorConfig,G as addUnbinder,Li as batch,wn as collectRefs,Ei as computeMany,wi as computeRef,xi as computed,gi as createApp,bi as defineComponent,So as drainUnbind,To as endBatch,lt as entangle,fe as flatten,Be as getBindData,Jn as html,Xe as isDeepRef,pt as isRaw,C as isRef,Si as markRaw,ie as observe,Oi as observeMany,ki as observerCount,Ti as onMounted,se as onUnmounted,On as pause,Ai as persist,qo as pval,Ni as raw,Se as ref,Y as removeNode,kn as resume,Rn as silence,ue as sref,bo as startBatch,Mi as svg,rt as toFragment,yt as toJsonTemplate,te as trigger,Ee as unbind,A as unref,Cn as useScope,Ke as warningHandler,Ye as watchEffect};
|
|
@@ -910,6 +910,8 @@ var Regor = (() => {
|
|
|
910
910
|
if (isIfElement) this.__bind(element);
|
|
911
911
|
const isDynamicElement = element.hasAttribute(this.__binder.__config.__builtInNames.is) || element.hasAttribute("is");
|
|
912
912
|
if (isDynamicElement) return isIfElement;
|
|
913
|
+
if (this.__binder.__componentBinder.__isComponentHost(element))
|
|
914
|
+
return isIfElement;
|
|
913
915
|
this.__binder.__componentBinder.__forEachBindableDescendant(
|
|
914
916
|
element,
|
|
915
917
|
(el) => {
|
|
@@ -2043,6 +2045,11 @@ var Regor = (() => {
|
|
|
2043
2045
|
...contextComponentSelectors.map(hyphenate)
|
|
2044
2046
|
].join(",");
|
|
2045
2047
|
}
|
|
2048
|
+
__isComponentHost(element) {
|
|
2049
|
+
var _a;
|
|
2050
|
+
const selector = this.__getComponentSelector();
|
|
2051
|
+
return !isNullOrWhitespace(selector) && ((_a = element.matches) == null ? void 0 : _a.call(element, selector));
|
|
2052
|
+
}
|
|
2046
2053
|
__collectTopLevelComponentHosts(root, selector) {
|
|
2047
2054
|
var _a;
|
|
2048
2055
|
const result = [];
|
|
@@ -2060,12 +2067,15 @@ var Regor = (() => {
|
|
|
2060
2067
|
return result;
|
|
2061
2068
|
}
|
|
2062
2069
|
__forEachBindableDescendant(root, action) {
|
|
2070
|
+
const binder = this.__binder;
|
|
2063
2071
|
const selector = this.__getComponentSelector();
|
|
2072
|
+
const isName = binder.__config.__builtInNames.is;
|
|
2064
2073
|
const stack = this.__getChildElements(root).reverse();
|
|
2065
2074
|
while (stack.length > 0) {
|
|
2066
2075
|
const current = stack.pop();
|
|
2067
2076
|
action(current);
|
|
2068
2077
|
if (!isNullOrWhitespace(selector) && current.matches(selector)) continue;
|
|
2078
|
+
if (current.hasAttribute(isName) || current.hasAttribute("is")) continue;
|
|
2069
2079
|
stack.push(...this.__getChildElements(current).reverse());
|
|
2070
2080
|
}
|
|
2071
2081
|
}
|
|
@@ -2210,6 +2220,8 @@ var Regor = (() => {
|
|
|
2210
2220
|
const isComponentElement = element.hasAttribute(this.__is);
|
|
2211
2221
|
if (isComponentElement || element.hasAttribute("is"))
|
|
2212
2222
|
this.__bind(element);
|
|
2223
|
+
if (this.__binder.__componentBinder.__isComponentHost(element))
|
|
2224
|
+
return isComponentElement;
|
|
2213
2225
|
this.__binder.__componentBinder.__forEachBindableDescendant(
|
|
2214
2226
|
element,
|
|
2215
2227
|
(el) => {
|
|
@@ -2697,6 +2709,8 @@ var Regor = (() => {
|
|
|
2697
2709
|
if (isForElement) this.__bindFor(element);
|
|
2698
2710
|
const isDynamicElement = element.hasAttribute(this.__binder.__config.__builtInNames.is) || element.hasAttribute("is");
|
|
2699
2711
|
if (isDynamicElement) return isForElement;
|
|
2712
|
+
if (this.__binder.__componentBinder.__isComponentHost(element))
|
|
2713
|
+
return isForElement;
|
|
2700
2714
|
this.__binder.__componentBinder.__forEachBindableDescendant(
|
|
2701
2715
|
element,
|
|
2702
2716
|
(el) => {
|