regor 1.5.7 → 1.5.9

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