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