regor 1.5.7 → 1.5.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/regor.es2015.cjs.js +40 -7
- package/dist/regor.es2015.cjs.prod.js +3 -3
- package/dist/regor.es2015.esm.js +40 -7
- package/dist/regor.es2015.esm.prod.js +3 -3
- package/dist/regor.es2015.iife.js +40 -7
- package/dist/regor.es2015.iife.prod.js +3 -3
- package/dist/regor.es2019.cjs.js +40 -7
- package/dist/regor.es2019.cjs.prod.js +3 -3
- package/dist/regor.es2019.esm.js +40 -7
- package/dist/regor.es2019.esm.prod.js +3 -3
- package/dist/regor.es2019.iife.js +40 -7
- package/dist/regor.es2019.iife.prod.js +3 -3
- package/dist/regor.es2022.cjs.js +40 -7
- package/dist/regor.es2022.cjs.prod.js +3 -3
- package/dist/regor.es2022.esm.js +40 -7
- package/dist/regor.es2022.esm.prod.js +3 -3
- package/dist/regor.es2022.iife.js +40 -7
- package/dist/regor.es2022.iife.prod.js +3 -3
- package/package.json +1 -1
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
var He=Symbol(":regor");var be=t=>{let e=[t];for(let n=0;n<e.length;++n){let o=e[n];cr(o);for(let r=o.lastChild;r!=null;r=r.previousSibling)e.push(r)}},cr=t=>{let e=t[He];if(!e)return;let n=e.unbinders;for(let o=0;o<n.length;++o)n[o]();n.length=0,t[He]=void 0};var Be=[],dt=!1,ht,_n=()=>{if(dt=!1,ht=void 0,Be.length!==0){for(let t=0;t<Be.length;++t)be(Be[t]);Be.length=0}},K=t=>{t.remove(),Be.push(t),dt||(dt=!0,ht=setTimeout(_n,1))},ur=async()=>{Be.length===0&&!dt||(ht&&clearTimeout(ht),_n())};var F=t=>typeof t=="function",q=t=>typeof t=="string",Fn=t=>typeof t>"u",ue=t=>t==null||typeof t>"u",$=t=>typeof t!="string"||!t?.trim(),lr=Object.prototype.toString,tn=t=>lr.call(t),Se=t=>tn(t)==="[object Map]",ce=t=>tn(t)==="[object Set]",nn=t=>tn(t)==="[object Date]",Ze=t=>typeof t=="symbol",v=Array.isArray,O=t=>t!==null&&typeof t=="object";var qn={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=qn[t];return new Error(F(n)?n.call(qn,...e):n)};var yt=[],zn=()=>{let t={onMounted:[],onUnmounted:[]};return yt.push(t),t},Le=t=>{let e=yt[yt.length-1];if(!e&&!t)throw B(2);return e},Kn=t=>{let e=Le();return t&&rn(t),yt.pop(),e},on=Symbol("csp"),rn=t=>{let e=t,n=e[on];if(n){let o=Le();if(n===o)return;o.onMounted.length>0&&n.onMounted.push(...o.onMounted),o.onUnmounted.length>0&&n.onUnmounted.push(...o.onUnmounted);return}e[on]=Le()},gt=t=>t[on];var Ae=t=>{gt(t)?.onUnmounted?.forEach(n=>{n()}),t.unmounted?.()};var Wn={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=Wn[t],o=F(n)?n.call(Wn,...e):n,r=je.warning;r&&(q(o)?r(o):r(o,...o.args))},je={warning:console.warn};var bt=Symbol("ref"),Q=Symbol("sref"),xt=Symbol("raw");var x=t=>t!=null&&t[Q]===1;var Ne=class extends Error{propPath;detail;constructor(e,n){super(n),this.name="PropValidationError",this.propPath=e,this.detail=n}},he=(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"},pr=t=>t.length>60?`${t.slice(0,57)}...`:t,et=(t,e=0)=>{if(e>1)return"unknown";if(x(t)){let s=t();return`ref(${et(s,e+1)})`}if(typeof t=="string")return pr(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=>et(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=et(c,e+1);return`${i}: ${u}`}).join(", ");return Object.keys(t).length>5?`{ ${a}, ... }`:`{ ${a} }`}return"unknown"},re=t=>{if(x(t))return`got ${Tt(t)}(${et(t())})`;let e=Tt(t),n=et(t);return`got ${e} (${n})`},fr=t=>t instanceof Ne?t.detail:t instanceof Error?t.message:String(t),Gn=(t,e)=>{let n=`, ${re(e)}.`;return t.endsWith(n)?t.slice(0,-n.length):t},mr=(t,e,n)=>{if(e instanceof Ne){if(e.propPath===t)return Gn(e.detail,n);if(e.propPath===`${t}.value`&&x(n)){let o=Gn(e.detail,n());return o.startsWith("expected ")?`expected ref<${o.slice(9)}>`:`expected ref where ${o}`}}return fr(e)},dr=(t,e,n)=>{let o=[];for(let r of e){let s=mr(t,r,n);o.includes(s)||o.push(s)}return o.length===0?re(n):o.length===1?`${o[0]}, ${re(n)}`:`${o.join(" or ")}, ${re(n)}`},hr=t=>typeof t=="string"?`"${t}"`:typeof t=="number"||typeof t=="boolean"?String(t):t===null?"null":t===void 0?"undefined":Tt(t),yr=(t,e)=>{typeof t!="string"&&he(e,`expected string, ${re(t)}`)},gr=(t,e)=>{typeof t!="number"&&he(e,`expected number, ${re(t)}`)},br=(t,e)=>{typeof t!="boolean"&&he(e,`expected boolean, ${re(t)}`)},xr=t=>(e,n)=>{e instanceof t||he(n,`expected instance of ${t.name||"provided class"}, ${re(e)}`)},Tr=t=>(e,n,o)=>{e!==void 0&&t(e,n,o)},Cr=t=>(e,n,o)=>{e!==null&&t(e,n,o)},Er=(...t)=>(e,n,o)=>{let r=[];for(let s of t)try{s(e,n,o);return}catch(a){r.push(a)}he(n,dr(n,r,e))},vr=t=>(e,n)=>{t.includes(e)||he(n,`expected one of ${t.map(o=>hr(o)).join(", ")}, ${re(e)}`)},Rr=t=>(e,n,o)=>{v(e)||he(n,`expected array, ${re(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)=>{O(e)||he(n,`expected object, ${re(e)}`);let r=e;for(let s in t){let a=t[s];if(!a)continue;a(r[s],`${n}.${s}`,o)}}}var Sr=t=>(e,n,o)=>{if(x(e)){t(e(),`${n}.value`,o);return}he(n,`expected ref, ${re(e)}`)},Ar={fail:he,describe:re,isString:yr,isNumber:gr,isBoolean:br,isClass:xr,optional:Tr,nullable:Cr,or:Er,oneOf:vr,arrayOf:Rr,shape:wr,refOf:Sr};var Nr=(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})},tt=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=Nr(this.G,o,a);if(this.J==="warn"){je.warning(i.message,i);continue}throw i}}}unmount(){let e=this.start.nextSibling,n=this.end;for(;e&&e!==n;)K(e),e=e.nextSibling;for(let o of this.ctx)Ae(o)}};var Ve=t=>{let e=t,n=e[He];if(n)return n;let o={unbinders:[],data:{}};return e[He]=o,o};var z=(t,e)=>{Ve(t).unbinders.push(e)};var nt=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={},Jn=1,Qn=t=>{let e=(Jn++).toString();return Et[e]=t,Ct[e]=0,e},sn=t=>{Ct[t]+=1},an=t=>{--Ct[t]===0&&(delete Et[t],delete Ct[t])},Xn=t=>Et[t],cn=()=>Jn!==1&&Object.keys(Et).length>0,ot="r-switch",kr=t=>{let e=t.filter(o=>xe(o)).map(o=>[...o.querySelectorAll("[r-switch]")].map(r=>r.getAttribute(ot))),n=new Set;return e.forEach(o=>{o.forEach(r=>r&&n.add(r))}),[...n]},$e=(t,e)=>{if(!cn())return;let n=kr(e);n.length!==0&&(n.forEach(sn),z(t,()=>{n.forEach(an)}))};var vt=()=>{},un=(t,e,n,o)=>{let r=[];for(let s of t){let a=s.cloneNode(!0);n.insertBefore(a,o),r.push(a)}ke(e,r)},ln=Symbol("r-if"),Yn=Symbol("r-else"),Zn=t=>t[Yn]===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[ln]?!0:(e[ln]=!0,wt(e,this.ge).forEach(n=>n[ln]=!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=_e(e),s=e.parentNode,a=document.createComment(`__begin__ :${n}${o??""}`);s.insertBefore(a,e),$e(a,r),r.forEach(c=>{K(c)}),e.remove(),n!=="if"&&(e[Yn]=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:()=>{un(r,this.r,s,i)},unmount:()=>{Te(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 z(i,()=>{u.stop(),f(),f=vt}),f=u.subscribe(n),[{mount:()=>{un(s,this.r,a,c)},unmount:()=>{Te(i,c)},isTrue:()=>nt(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(nt(u()[0]))l||(un(r,this.r,s,i),l=!0),m.forEach(C=>{C.unmount(),C.isMounted=!1});else{Te(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;z(a,()=>{c.stop(),d(),d=vt}),h(),d=c.subscribe(h)}};var _e=t=>{let e=le(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},ke=(t,e)=>{for(let n=0;n<e.length;++n){let o=e[n];o.nodeType===Node.ELEMENT_NODE&&(Zn(o)||t.$(o))}},wt=(t,e)=>{let n=t.querySelectorAll(e);return t.matches?.(e)?[t,...n]:n},le=t=>t instanceof HTMLTemplateElement,xe=t=>t.nodeType===Node.ELEMENT_NODE,rt=t=>t.nodeType===Node.ELEMENT_NODE,eo=t=>t instanceof HTMLSlotElement,Ce=t=>le(t)?t.content.childNodes:t.childNodes,Te=(t,e)=>{let n=t.nextSibling;for(;n!=null&&n!==e;){let o=n.nextSibling;K(n),n=o}},to=function(){return this()},Or=function(t){return this(t)},Mr=()=>{throw new Error("value is readonly.")},Lr={get:to,set:Or,enumerable:!0,configurable:!1},Vr={get:to,set:Mr,enumerable:!0,configurable:!1},Oe=(t,e)=>{Object.defineProperty(t,"value",e?Vr:Lr)},no=(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),pn=t=>{let e=Object.create(null);return n=>e[n]||(e[n]=t(n))},Ir=/-(\w)/g,j=pn(t=>t&&t.replace(Ir,(e,n)=>n?n.toUpperCase():"")),Pr=/\B([A-Z])/g,Fe=pn(t=>t&&t.replace(Pr,"-$1").toLowerCase()),st=pn(t=>t&&t.charAt(0).toUpperCase()+t.slice(1));var Nt={mount:()=>{}};var qe=t=>{let e=t.trim();return e?e.split(/\s+/):[]};var kt=t=>{gt(t)?.onMounted?.forEach(n=>{n()}),t.mounted?.()};var fn=Symbol("scope"),mn=t=>{try{zn();let e=t();rn(e);let n={context:e,unmount:()=>Ae(e),[fn]:1};return n[fn]=1,n}finally{Kn()}},oo=t=>O(t)?fn in t:!1;var dn={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)=>{Le(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 it=(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 at=t=>!!t&&t[xt]===1;var ze=t=>t?.[bt]===1;var pe=[],ro=t=>{pe.length!==0&&pe[pe.length-1]?.add(t)},Ke=t=>{if(!t)return()=>{};let e={stop:()=>{}};return Dr(t,e),te(()=>e.stop(),!0),e.stop},Dr=(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(pe.push(s),t(a=>n.push(a)),o)return;for(let a of[...s]){let i=ne(a,()=>{r(),Ke(t)});n.push(i)}}finally{pe.pop()}},hn=t=>{let e=pe.length,n=e>0&&pe[e-1];try{return n&&pe.push(null),t()}finally{n&&pe.pop()}},yn=t=>{try{let e=new Set;return pe.push(e),{value:t(),refs:[...e]}}finally{pe.pop()}};var X=(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)X(s,e,!0);else if(Se(r))for(let s of r)X(s[0],e,!0),X(s[1],e,!0);if(O(r))for(let s in r)X(r[s],e,!0)}};function Ur(t,e,n){Object.defineProperty(t,e,{value:n,enumerable:!1,writable:!0,configurable:!0})}var We=(t,e,n)=>{n.forEach(function(o){let r=t[o];Ur(e,o,function(...a){let i=r.apply(this,a),c=this[Q];for(let u of c)X(u);return i})})},Ot=(t,e)=>{Object.defineProperty(t,Symbol.toStringTag,{value:e,writable:!1,enumerable:!1,configurable:!0})};var so=Array.prototype,gn=Object.create(so),Hr=["push","pop","shift","unshift","splice","sort","reverse"];We(so,gn,Hr);var io=Map.prototype,Mt=Object.create(io),Br=["set","clear","delete"];Ot(Mt,"Map");We(io,Mt,Br);var ao=Set.prototype,Lt=Object.create(ao),jr=["add","clear","delete"];Ot(Lt,"Set");We(ao,Lt,jr);var ye={},se=t=>{if(x(t)||at(t))return t;let e={auto:!0,_value:t},n=c=>O(c)?Q in c?!0:v(c)?(Object.setPrototypeOf(c,gn),!0):ce(c)?(Object.setPrototypeOf(c,Lt),!0):Se(c)?(Object.setPrototypeOf(c,Mt),!0):!1:!1,o=n(t),r=new Set,s=(c,u)=>{if(ye.stack&&ye.stack.length){ye.stack[ye.stack.length-1].add(i);return}r.size!==0&&hn(()=>{for(let l of[...r.keys()])r.has(l)&&l(c,u)})},a=c=>{let u=c[Q];u||(c[Q]=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):(ro(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[Q]=1,Oe(i,!1),o&&a(t),i};var Ee=t=>{if(at(t))return t;let e;if(x(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,v(t)){let n=t.length;for(let o=0;o<n;++o){let r=t[o];ze(r)||(t[o]=Ee(r))}return e}if(!O(t))return e;for(let n of Object.entries(t)){let o=n[1];if(ze(o))continue;let r=n[0];Ze(r)||(t[r]=null,t[r]=Ee(o))}return e};var co=Symbol("modelBridge"),Vt=()=>{},$r=t=>!!t?.[co],_r=t=>{t[co]=1},Fr=t=>{let e=Ee(t());return _r(e),e},uo={collectRefObj:!0,mount:({parseResult:t,option:e})=>{if(typeof e!="string"||!e)return Vt;let n=j(e),o,r,s=Vt,a=()=>{s(),s=Vt,o=void 0,r=void 0},i=()=>{s(),s=Vt},c=(l,p)=>{o!==l&&(i(),s=it(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($r(l)){if(f===l)return;x(f)?c(l,f):p[n]=l;return}r||(r=Fr(l)),p[n]=r,c(l,r)};return{update:()=>{u()},unmount:()=>{s()}}}};var It=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(Fe)].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(!le(e))return!1;let n=e.getAttributeNames();return e.hasAttribute("name")?!0:n.some(o=>o.startsWith("#"))}ct(e){return le(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 _=n.o.p.context,W=n.o.p.contextAlias,D=n.o.p.bind,J=m.props?.map(j)??[],oe=(b,L)=>{let E={},T=b.hasAttribute(_);return o.C(L,()=>{if(o.v(E),T?n.y(dn,b,_):b.hasAttribute(W)&&n.y(dn,b,W),J.length===0)return;let I=new Map(J.map(N=>[N.toLowerCase(),N]));for(let N of[...J,...J.map(Fe)]){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[ge,k]=ae.te;if(!k)continue;let ee=I.get(j(k).toLowerCase());ee&&(ge!=="."&&ge!==":"&&ge!==D||n.y(uo,b,N,!0,ee,ae.ne))}}),E},A=[...o.L()],me=()=>{let b=oe(u,A),L=new tt(b,u,A,C,R,n.o.propValidationMode),E=mn(()=>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?z(C,it(I,w)):w(I()):w(I);continue}}else E[T]=I;for(let T of J)T in E||(E[T]=void 0);L.onAutoPropsAssigned?.()}return{componentCtx:E,head:L}},{componentCtx:g,head:M}=me(),H=[...Ce(d)],Ue=H.length,Ye=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)),Ye){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=oe(b,o.L());o.C(A,()=>{o.v(N);let ae=o.L(),ge=Qn(ae);for(let k of w)xe(k)&&(k.setAttribute(ot,ge),sn(ge),z(k,()=>{an(ge)}))})})};if(T){let w=[...Ce(T)];for(let N of w)L.insertBefore(N,b);I(w)}else{if(E!=="default"){for(let N of[...Ce(b)])L.insertBefore(N,b);return}let w=[...Ce(u)].filter(N=>!this.at(N));for(let N of w)L.insertBefore(N,b);I(w)}},P=b=>{if(!xe(b))return;let L=b.querySelectorAll("slot");if(eo(b)){ft(b),b.remove();return}for(let E of L)ft(E),E.remove()};(()=>{for(let b=0;b<Ue;++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===_||E===W)continue;let T=u.getAttribute(E);if(E==="class"){let I=qe(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,ke(n,H),z(u,()=>{Ae(g)}),z(C,()=>{be(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(Fe)].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];xe(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];xe(a)&&r.push(a)}return r}return[]}};var bn=class{te;ne;we=[];constructor(e,n){this.te=e,this.ne=n}},Pt=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(!rt(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 bn(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 lo=()=>{},qr=(t,e)=>{for(let n of t){let o=n.cloneNode(!0);e.appendChild(o)}},Dt=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=_e(e),r=e.parentNode,s=document.createComment(`__begin__ dynamic ${n??""}`);r.insertBefore(s,e),$e(s,o),o.forEach(i=>{K(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=le(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]),!q(y)||$(y)){Te(s,a);return}if(p.name===y)return;Te(s,a);let C=document.createElement(y);for(let R of e.getAttributeNames())R!==this.I&&C.setAttribute(R,e.getAttribute(R));qr(f,C),r.insertBefore(C,a),this.r.$(C),p.name=y})},m=lo;z(s,()=>{i.stop(),m(),m=lo}),h(),m=i.subscribe(h)}};var S=t=>{let e=t;return e!=null&&e[Q]===1?e():e};var zr=(t,e)=>{let[n,o]=e;F(o)?o(t,n):t.innerHTML=n?.toString()},Ut={mount:()=>({update:({el:t,values:e})=>{zr(t,e)}})};var Ht=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 _=C.item(R)?.name;if(!_)continue;if(a.has(_))return;let{terms:W,flags:D}=u.ke(_),[J,oe]=W,A=i[_]??i[J];if(A){if(A===Ut)return;l.push({nodeIndex:p,attrName:_,directive:A,option:oe,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 Kr=(t,e)=>{let n=e.parentNode;if(n)for(let o=0;o<t.items.length;++o)n.insertBefore(t.items[o],e)},Wr=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},Bt=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,_=y-R+1,W=new Array(_).fill(0),D=new Map;for(let g=R;g<=y;++g)D.set(p[g],g);let J=!1,oe=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>=oe?oe=H:J=!0}let A=J?Wr(W):[],me=A.length-1;for(let g=_-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 Ue=h[M];J&&(me>=0&&A[me]===g?--me:Ue&&Kr(Ue,H))}return h}};var ct=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 xn=Symbol("r-for"),Gr=t=>-1,po=()=>{},jt=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[xn]?!0:(e[xn]=!0,wt(e,this.Oe).forEach(n=>n[xn]=!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 ue(e)?[]:(F(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=_e(e),c=Ht.ft(this.r,i),u=e.parentNode;if(!u)return;let l=`${this.x} => ${n}`,p=new Comment(`__begin__ ${l}`);u.insertBefore(p,e),$e(p,i),i.forEach(V=>{K(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),_=(V,G)=>R(V)===R(G),W=(V,G)=>V===G,D=(V,G,Y)=>{let Z=o.createContext(G,V),b=ct.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):ke(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},J=(V,G)=>{let Y=P.D(V).items,Z=Y[Y.length-1].nextSibling;for(let b of Y)K(b);P.ce(V,D(V,G,Z))},oe=(V,G)=>{P.v(D(V,G,f))},A=V=>{for(let G of P.D(V).items)K(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;F(V)&&(V=V());let b=S(V[0]);if(v(b)&&b.length===0){Te(p,f),P.Ne(0);return}let L=[];for(let k of this.Le(V[0]))L.push(k);let E=Bt.dt({oldItems:P.T,newValues:L,getKey:R,isSameValue:W,mountNewValue:(k,ee,Me)=>D(k,ee,Me),removeMountItem:k=>{for(let ee=0;ee<k.items.length;++ee)K(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 Me=R(ee.value);Me!==void 0&&P.P.set(Me,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 Me=P.D(T++);if(_(Me.value,k)){if(W(Me.value,k))return;J(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 en=T;en<mt-1&&en<Z&&!_(P.D(T).value,k);)++en,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):J(T-1,k)}else oe(T++,k)};ee()}let ge=T;for(Z=P.w;T<Z;)A(T++);P.Ne(ge),me(I)},M=()=>{H.stop(),Ye(),Ye=po},H=m.M(o.list),Ue=H.value,Ye=po,ft=0,P=new ct(R);for(let V of this.Le(Ue()[0]))P.v(D(ft++,V,f));z(p,M),Ye=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:Gr};return s&&(f.index=l[s.startsWith("#")?s.substring(1):s]=se(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 $t=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 jt(this),this.Pe=new Rt(this),this.Ue=new Dt(this),this.N=new It(this),this.F=new Pt(this),this.R=this.o.p.pre,this.Be=this.o.p.dynamic}Ct(e){let n=le(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);ke(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,z(s,()=>{K(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(ot);if(p)return p;l=l.parentElement}return null};if(cn()){let u=c(n);if(u){this.m.C(Xn(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);z(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=no(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 fo="http://www.w3.org/1999/xlink",Jr={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 Qr(t){return!!t||t===""}var Xr=(t,e,n,o,r,s)=>{if(o){s&&s.includes("camel")&&(o=j(o)),_t(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];_t(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;_t(t,l,p,h)}else{let u=n?.[i],l=e[i++],p=e[i];_t(t,l,p,u)}}},Tn={mount:()=>({update:({el:t,values:e,previousValues:n,option:o,previousOption:r,flags:s})=>{Xr(t,e,n,o,r,s)}})},_t=(t,e,n,o)=>{if(o&&o!==e&&t.removeAttribute(o),ue(e)){U(3,"r-bind",t);return}if(!q(e)){U(6,`Attribute key is not string at ${t.outerHTML}`,e);return}if(e.startsWith("xlink:")){ue(n)?t.removeAttributeNS(fo,e.slice(6,e.length)):t.setAttributeNS(fo,e,n);return}let r=e in Jr;ue(n)||r&&!Qr(n)?t.removeAttribute(e):t.setAttribute(e,r?"":n)};var Yr=(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)mo(t,s[c],a?.[c])}else mo(t,s,a)}},Cn={mount:()=>({update:({el:t,values:e,previousValues:n})=>{Yr(t,e,n)}})},mo=(t,e,n)=>{let o=S(e),r=S(n),s=t.classList,a=q(o),i=q(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?qe(r):[],u=qe(o);c.length>0&&s.remove(...c),u.length>0&&s.add(...u)}}else if(r){let c=i?qe(r):[];c.length>0&&s.remove(...c)}};function Zr(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=nn(t),o=nn(e);if(n||o)return n&&o?t.getTime()===e.getTime():!1;if(n=Ze(t),o=Ze(e),n||o)return t===e;if(n=v(t),o=v(e),n||o)return n&&o?Zr(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 Ft(t,e){return t.findIndex(n=>ve(n,e))}var ho=t=>{let e=parseFloat(t);return isNaN(e)?t:e};var En=t=>{if(!x(t))throw B(3,"pause");t(void 0,void 0,3)};var vn=t=>{if(!x(t))throw B(3,"resume");t(void 0,void 0,4)};var go={mount:({el:t,parseResult:e,flags:n})=>({update:({values:o})=>{es(t,o[0])},unmount:ts(t,e,n)})},es=(t,e)=>{let n=Co(t);if(n&&bo(t))v(e)?e=Ft(e,Re(t))>-1:ce(e)?e=e.has(Re(t)):e=as(t,e),t.checked=e;else if(n&&xo(t))t.checked=ve(e,Re(t));else if(n||Eo(t))To(t)?t.value!==e?.toString()&&(t.value=e):t.value!==e&&(t.value=e);else if(vo(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=Ft(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)},ut=t=>(x(t)&&(t=t()),F(t)&&(t=t()),t?q(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}),bo=t=>t.type==="checkbox",xo=t=>t.type==="radio",To=t=>t.type==="number"||t.type==="range",Co=t=>t.tagName==="INPUT",Eo=t=>t.tagName==="TEXTAREA",vo=t=>t.tagName==="SELECT",ts=(t,e,n)=>{let o=e.value,r=ut(n?.join(",")),s=ut(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=Co(t);return c&&bo(t)?os(t,i):c&&xo(t)?cs(t,i):c||Eo(t)?ns(t,a,i,o):vo(t)?us(t,i,o):(U(7,t),()=>{})},yo=/[.,' ·٫]/,ns=(t,e,n,o)=>{let s=e.lazy?"change":"input",a=To(t),i=()=>{!e.trim&&!ut(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=ut(o()[1]);if(a||y.number||y.int){if(y.int)d=parseInt(d);else{if(yo.test(d[d.length-1])&&d.split(yo).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},os=(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=Ft(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(is(t,i))};return t.addEventListener(n,r),o},Re=t=>"_value"in t?t._value:t.value,Ro="trueValue",rs="falseValue",wo="true-value",ss="false-value",is=(t,e)=>{let n=e?Ro:rs;if(n in t)return t[n];let o=e?wo:ss;return t.hasAttribute(o)?t.getAttribute(o):e},as=(t,e)=>{if(Ro in t)return ve(e,t.trueValue);let o=wo;return t.hasAttribute(o)?ve(e,t.getAttribute(o)):ve(e,!0)},cs=(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},us=(t,e,n)=>{let o="change",r=()=>{t.removeEventListener(o,s)},s=()=>{let a=e();if(!a)return;let c=ut(n()[1]).number,u=Array.prototype.filter.call(t.options,l=>l.selected).map(l=>c?ho(Re(l)):Re(l));if(t.multiple){let l=a();try{if(En(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{vn(a),X(a)}}else a(u[0])};return t.addEventListener(o,s),r};var ls=["stop","prevent","capture","self","once","left","right","middle","passive"],ps=t=>{let e={};if($(t))return;let n=t.split(",");for(let o of ls)e[o]=n.includes(o);return e},fs=(t,e,n,o,r)=>{if(o){let u=e.value(),l=S(o.value()[0]);return q(l)?Rn(t,j(l),()=>e.value()[0],r?.join(",")??u[1]):()=>{}}else if(n){let u=e.value();return Rn(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(F(l)&&(l=l()),O(l))for(let p of Object.entries(l)){let f=p[0],h=()=>{let d=e.value()[u];return F(d)&&(d=d()),d=d[f],F(d)&&(d=d()),d},m=l[f+"_flags"];s.push(Rn(t,f,h,m))}else U(2,"r-on",t)}return a},wn={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})=>fs(t,e,n,o,r)},ms=(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]},Rn=(t,e,n,o)=>{if($(e))return U(5,"r-on",t),()=>{};let r=ps(o),s=r?{capture:r.capture,passive:r.passive,once:r.once}:void 0,a;[e,a]=ms(e,o);let i=l=>{if(!a(l)||!n&&e==="submit"&&r?.prevent)return;let p=n(l);F(p)&&(p=p(l)),F(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 ds=(t,e,n,o)=>{if(n){o&&o.includes("camel")&&(n=j(n)),Ge(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];Ge(t,i,c)}else if(O(a))for(let i of Object.entries(a)){let c=i[0],u=i[1];Ge(t,c,u)}else{let i=e[s++],c=e[s];Ge(t,i,c)}}},So={mount:()=>({update:({el:t,values:e,option:n,flags:o})=>{ds(t,e,n,o)}})};function hs(t){return!!t||t===""}var Ge=(t,e,n)=>{if(ue(e)){U(3,":prop",t);return}if(e==="innerHTML"||e==="textContent"){let s=[...t.childNodes];setTimeout(()=>s.forEach(be),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=hs(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 Ao={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 ys=(t,e)=>{let n=Ve(t).data,o=n._ord;Fn(o)&&(o=n._ord=t.style.display),nt(e[0])?t.style.display=o:t.style.display="none"},No={mount:()=>({update:({el:t,values:e})=>{ys(t,e)}})};var gs=(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)ko(t,s[c],a?.[c])}else ko(t,s,a)}},qt={mount:()=>({update:({el:t,values:e,previousValues:n})=>{gs(t,e,n)}})},ko=(t,e,n)=>{let o=S(e),r=S(n),s=t.style,a=q(o);if(o&&!a){let i=o;if(r&&!q(r)){let c=r;for(let u in c)S(i[u])==null&&An(s,u,"")}for(let c in i)An(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}},Oo=/\s*!important$/;function An(t,e,n){let o=S(n);if(v(o))o.forEach(r=>{An(t,e,r)});else{let r=o==null?"":String(o);if(e.startsWith("--"))t.setProperty(e,r);else{let s=bs(t,e);Oo.test(r)?t.setProperty(Fe(s),r.replace(Oo,""),"important"):t[s]=r}}}var Mo=["Webkit","Moz","ms"],Sn={};function bs(t,e){let n=Sn[e];if(n)return n;let o=j(e);if(o!=="filter"&&o in t)return Sn[e]=o;o=st(o);for(let r=0;r<Mo.length;r++){let s=Mo[r]+o;if(s in t)return Sn[e]=s}return e}var ie=t=>Lo(S(t)),Lo=(t,e=new WeakMap)=>{if(!t||!O(t))return t;if(v(t))return t.map(ie);if(ce(t)){let o=new Set;for(let r of t.keys())o.add(ie(r));return o}if(Se(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 S(e.get(t));let n={...t};e.set(t,n);for(let o of Object.entries(n))n[o[0]]=Lo(S(o[1]),e);return n};var xs=(t,e)=>{let n=e[0];t.textContent=ce(n)?JSON.stringify(ie([...n])):Se(n)?JSON.stringify(ie([...n])):O(n)?JSON.stringify(ie(n)):n?.toString()??""},Vo={mount:()=>({update:({el:t,values:e})=>{xs(t,e)}})};var Io={mount:()=>({update:({el:t,values:e})=>{Ge(t,"value",e[0])}})};var fe=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=Ee,e.sref=se,e.flatten=ie,e}addComponent(...e){for(let n of e){if(!n.defaultName){je.warning("Registered component's default name is not defined",n);continue}this.Z.set(st(n.defaultName),n),this._.set(st(n.defaultName).toLocaleUpperCase(),n)}}setDirectives(e){this.B={".":So,":":Tn,"@":wn,[`${e}on`]:wn,[`${e}bind`]:Tn,[`${e}html`]:Ut,[`${e}text`]:Vo,[`${e}show`]:No,[`${e}model`]:go,":style":qt,[`${e}style`]:qt,[`${e}bind:style`]:qt,":class":Cn,[`${e}bind:class`]:Cn,":ref":Ao,":value":Io,[`${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 zt=(t,e)=>{if(!t)return;let o=(e??fe.getDefault()).p,r=/(\{\{[^]*?\}\}|\[\[[^]*?\]\])/g,s=[{start:"{{",end:"}}"},{start:"[[",end:"]]"}];for(let a of Cs(t,o.pre,s))Ts(a,o.text,r,s)},Ts=(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=Po(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=Po(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)},Cs=(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 Ce(s))r(a)}};return r(t),o},Po=(t,e)=>e.find(n=>t.startsWith(n.start)&&t.endsWith(n.end));var Es=9,vs=10,Rs=13,ws=32,we=46,Kt=44,Ss=39,As=34,Wt=40,Je=41,Gt=91,Nn=93,kn=63,Ns=59,Do=58,Uo=123,Jt=125,Pe=43,Qt=45,On=96,Ho=47,Mn=92,Bo=new Set([2,3]),zo={"=":2.5,"*=":2.5,"**=":2.5,"/=":2.5,"%=":2.5,"+=":2.5,"-=":2.5,"<<=":2.5,">>=":2.5,">>>=":2.5,"&=":2.5,"^=":2.5,"|=":2.5},ks={"=>":2,...zo,"||":3,"??":3,"&&":4,"|":5,"^":6,"&":7,"==":8,"!=":8,"===":8,"!==":8,"<":9,">":9,"<=":9,">=":9,in:9,"<<":10,">>":10,">>>":10,"+":11,"-":11,"*":12,"/":12,"%":12,"**":13},Ko=Object.keys(zo),Os=new Set(Ko),Vn=new Set(["=>"]);Ko.forEach(t=>Vn.add(t));var jo={true:!0,false:!1,null:null},Ms="this",Qe="Expected ",De="Unexpected ",Pn="Unclosed ",Ls=Qe+":",$o=Qe+"expression",Vs="missing }",Is=De+"object property",Ps=Pn+"(",_o=Qe+"comma",Fo=De+"token ",Ds=De+"period",Ln=Qe+"expression after ",Us="missing unaryOp argument",Hs=Pn+"[",Bs=Qe+"exponent (",js="Variable names cannot start with a number (",$s=Pn+'quote after "',lt=t=>t>=48&&t<=57,qo=t=>ks[t],In=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)||lt(e)}i(e){return new Error(`${e} at character ${this.e}`)}g(){let e=this.h,n=this.u,o=this.e;for(;e===ws||e===Es||e===vs||e===Rs;)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===Ns||o===Kt)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(De+'"'+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:qo(n),right_a:Vn.has(n)},a=this.z(),!a)throw this.i(Ln+n);let u=[s,r,a];for(;n=this.de();){o=qo(n),r={value:n,prec:o,right_a:Vn.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(Ln+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(lt(n)||n===we)return this.Bt();if(n===Ss||n===As)e=this.Ht();else if(n===Gt)e=this.jt();else{let o=this.$t();if(o){let r=this.z();if(!r)throw this.i(Us);return this.me({type:7,operator:o,argument:r})}this.K(n)?(e=this.ye(),e.name in jo?e={type:4,value:jo[e.name],raw:e.name}:e.name===Ms&&(e={type:5})):n===Wt&&(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 Os.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===Qt?(this.e++,"-"):o===33?(this.e++,"!"):o===126?(this.e++,"~"):o===Pe?(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===Gt||n===Wt||n===kn;){let o;if(n===kn){if(this.u.charCodeAt(this.e+1)!==we)break;o=!0,this.e+=2,this.g(),n=this.h}if(this.e++,n===Gt){if(e={type:3,computed:!0,object:e,property:this.S()},this.g(),n=this.h,n!==Nn)throw this.i(Hs);this.e++}else n===Wt?e={type:6,arguments:this.qe(Je),callee:e}:(o&&this.e--,this.g(),e={type:3,computed:!1,object:e,property:this.ye()});o&&(e.optional=!0),this.g(),n=this.h}return e}Bt(){let e=this.u,n=this.e,o=n;for(;lt(e.charCodeAt(o));)o++;if(e.charCodeAt(o)===we)for(o++;lt(e.charCodeAt(o));)o++;let r=e.charCodeAt(o);if(r===101||r===69){o++;let i=e.charCodeAt(o);(i===Pe||i===Qt)&&o++;let c=o;for(;lt(e.charCodeAt(o));)o++;if(c===o){this.e=o;let u=e.slice(n,o);throw this.i(Bs+u+this.H+")")}}this.e=o;let s=e.slice(n,o),a=e.charCodeAt(o);if(this.K(a))throw this.i(js+s+this.H+")");if(a===we||s.length===1&&s.charCodeAt(0)===we)throw this.i(Ds);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===Mn){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($s+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(De+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===Je&&r&&r>=n.length)throw this.i(Fo+String.fromCharCode(e));break}else if(s===Kt){if(this.e++,r++,r!==n.length){if(e===Je)throw this.i(Fo+",");for(let a=n.length;a<r;a++)n.push(null)}}else{if(n.length!==r&&r!==0)throw this.i(_o);{let a=this.S();if(!a||a.type===0)throw this.i(_o);n.push(a)}}}if(!o)throw this.i(Qe+String.fromCharCode(e));return n}_t(){this.e++;let e=this.fe(Je);if(this.f(Je))return this.e++,e.length===1?e[0]:e.length?{type:1,expressions:e}:!1;throw this.i(Ps)}jt(){return this.e++,{type:9,elements:this.qe(Nn)}}Ft(e){if(this.f(Uo)){this.e++;let n=[];for(;!isNaN(this.h);){if(this.g(),this.f(Jt)){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(Kt)||this.f(Jt)))n.push({type:12,computed:!1,key:o,value:o,shorthand:!0});else if(this.f(Do)){this.e++;let r=this.S();if(!r)throw this.i(Is);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(Kt)&&this.e++}throw this.i(Vs)}}qt(e){let n=this.h;if((n===Pe||n===Qt)&&n===this.u.charCodeAt(this.e+1)){this.e+=2;let o=e.node={type:13,operator:n===Pe?"++":"--",argument:this.W(this.ye()),prefix:!0};if(!o.argument||!Bo.has(o.argument.type))throw this.i(De+o.operator)}}Gt(e){let n=e.node,o=this.h;if((o===Pe||o===Qt)&&o===this.u.charCodeAt(this.e+1)){if(!Bo.has(n.type))throw this.i(De+(o===Pe?"++":"--"));this.e+=2,e.node={type:13,operator:o===Pe?"++":"--",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(kn)){this.e++;let n=e.node,o=this.S();if(!o)throw this.i($o);if(this.g(),this.f(Do)){this.e++;let r=this.S();if(!r)throw this.i($o);e.node={type:11,test:n,consequent:o,alternate:r}}else throw this.i(Ls)}}Qt(e){if(this.g(),this.f(Wt)){let n=this.e;if(this.e++,this.g(),this.f(Je)){this.e++;let o=this.de();if(o==="=>"){let r=this.$e();if(!r)throw this.i(Ln+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(On)&&(e.node={type:17,tag:n,quasi:this.Fe(e)})}Fe(e){if(!this.f(On))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===On)return u(!0),this.e+=1,e.node=r,r;if(l===36&&n.charCodeAt(this.e+1)===Uo){if(u(!1),this.e+=2,r.expressions.push(...this.fe(Jt)),!this.f(Jt))throw this.i("unclosed ${");this.e+=1,s=this.e}else if(l===Mn){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(Ho))return;let n=++this.e,o=!1;for(;this.e<this.u.length;){if(this.h===Ho&&!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(Gt)?o=!0:o&&this.f(Nn)&&(o=!1),this.e+=this.f(Mn)?2:1}throw this.i("Unclosed Regex")}},Wo=t=>new In(t).parse();var _s={"=>":(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},Fs={"-":t=>-t,"+":t=>+t,"!":t=>!t,"~":t=>~t,new:t=>t},Xo=t=>{if(!t?.some(Qo))return t;let e=[];return t.forEach(n=>Qo(n)?e.push(...n):e.push(n)),e},Go=(...t)=>Xo(t),Dn=(t,e)=>{if(!t)return e;let n=Object.create(e??{});return n.$event=t,n},qs={"++":(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]}},zs={"++":(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]--}},Jo={"=":(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}},Xt=(t,e)=>F(t)?t.bind(e):t,Un=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],Xt(S(o[r]),o);for(let a of this.l)if(r in a)return this.A=a[r],Xt(S(a[r]),a);let s=this.ze;if(s&&r in s)return this.A=s[r],Xt(S(s[r]),s)}5(e,n,o){return this.l[0]}0(e,n,o){return this.Ye(n,o,Go,...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,Xt(S(a),r)}4(e,n,o){return e.value}6(e,n,o){let r=(a,...i)=>F(a)?a(...Xo(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,Fs[e.operator],e.argument)}8(e,n,o){let r=_s[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,Go,...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,Dn(l,o)),u=l=>this.Ze(i,e.value,n,Dn(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?qs:zs;if(r.type===2){let i=r.name,c=this.Xe(i,o);return ue(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(ue(i))return;let c=this.b(e.right,n,o);return Jo[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 Jo[s](a,i,c)}}14(e,n,o){let r=this.b(e.argument,n,o);return v(r)&&(r.s=Yo),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}=yn(()=>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,Dn(u,n)):this.b(i,e,n)));return o(...a)}},Yo=Symbol("s"),Qo=t=>t?.s===Yo,Zo=(t,e,n,o,r,s,a)=>new Un(e,n,o,r,a).eval(t,s);var er={},tr=t=>!!t,Yt=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(tr).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(tr).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,_,W)=>{try{let D=Zo(C,R,h,n,o,W,r);return _&&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=er[e]??Wo("["+e+"]");er[e]=C;let R=this.l.slice(),_=C.elements,W=_.length,D=new Array(W);f.refs=D;let J=()=>{m.length=0,s||(d.clear(),u());let oe=new Array(W);for(let A=0;A<W;++A){let me=_[A];if(n?.(A,-1)){oe[A]=M=>y(me,R,!1,{$event:M}).value;continue}let g=y(me,R,!0);oe[A]=g.value,D[A]=g.ref}if(!s)for(let A of m)d.has(A)||(d.add(A),i.push(ne(A,J)));if(a=oe,c.size!==0)for(let A of c)c.has(A)&&A(a)};J()}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 nr=t=>{let e=t.charCodeAt(0);return e>=48&&e<=57||e>=65&&e<=90||e>=97&&e<=122||t==="-"||t==="_"||t===":"},Ks=(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},Ws=(t,e)=>{let n=e?2:1;for(;n<t.length&&(t[n]===" "||t[n]===`
|
|
3
|
-
`);)++n;if(n>=t.length||!
|
|
1
|
+
var $e=Symbol(":regor");var Te=t=>{let e=[t];for(let n=0;n<e.length;++n){let o=e[n];ur(o);for(let r=o.lastChild;r!=null;r=r.previousSibling)e.push(r)}},ur=t=>{let e=t[$e];if(!e)return;let n=e.unbinders;for(let o=0;o<n.length;++o)n[o]();n.length=0,t[$e]=void 0};var _e=[],dt=!1,ht,Fn=()=>{if(dt=!1,ht=void 0,_e.length!==0){for(let t=0;t<_e.length;++t)Te(_e[t]);_e.length=0}},G=t=>{t.remove(),_e.push(t),dt||(dt=!0,ht=setTimeout(Fn,1))},lr=async()=>{_e.length===0&&!dt||(ht&&clearTimeout(ht),Fn())};var q=t=>typeof t=="function",z=t=>typeof t=="string",qn=t=>typeof t>"u",fe=t=>t==null||typeof t>"u",B=t=>typeof t!="string"||!t?.trim(),pr=Object.prototype.toString,tn=t=>pr.call(t),Ne=t=>tn(t)==="[object Map]",ue=t=>tn(t)==="[object Set]",nn=t=>tn(t)==="[object Date]",tt=t=>typeof t=="symbol",v=Array.isArray,L=t=>t!==null&&typeof t=="object";var zn={0:"createApp can't find root element. You must define either a valid `selector` or an `element`. Example: createApp({}, {selector: '#app', html: '...'})",1:t=>`Component template cannot be found. selector: ${t} .`,2:"Use composables in scope. usage: useScope(() => new MyApp()).",3:t=>`${t} requires ref source argument`,4:"computed is readonly.",5:"persist requires a string key."},j=(t,...e)=>{let n=zn[t];return new Error(q(n)?n.call(zn,...e):n)};var yt=[],Kn=()=>{let t={onMounted:[],onUnmounted:[]};return yt.push(t),t},De=t=>{let e=yt[yt.length-1];if(!e&&!t)throw j(2);return e},Wn=t=>{let e=De();return t&&rn(t),yt.pop(),e},on=Symbol("csp"),rn=t=>{let e=t,n=e[on];if(n){let o=De();if(n===o)return;o.onMounted.length>0&&n.onMounted.push(...o.onMounted),o.onUnmounted.length>0&&n.onUnmounted.push(...o.onUnmounted);return}e[on]=De()},gt=t=>t[on];var Oe=t=>{gt(t)?.onUnmounted?.forEach(n=>{n()}),t.unmounted?.()};var Gn={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]})},H=(t,...e)=>{let n=Gn[t],o=q(n)?n.call(Gn,...e):n,r=Fe.warning;r&&(z(o)?r(o):r(o,...o.args))},Fe={warning:console.warn};var bt=Symbol("ref"),Y=Symbol("sref"),xt=Symbol("raw");var T=t=>t!=null&&t[Y]===1;var Me=class extends Error{propPath;detail;constructor(e,n){super(n),this.name="PropValidationError",this.propPath=e,this.detail=n}},ge=(t,e)=>{throw new Me(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(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"},fr=t=>t.length>60?`${t.slice(0,57)}...`:t,nt=(t,e=0)=>{if(e>1)return"unknown";if(T(t)){let s=t();return`ref(${nt(s,e+1)})`}if(typeof t=="string")return fr(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=>nt(a,e+1)).join(", ");return t.length>5?`[${s}, ...]`:`[${s}]`}if(L(t)){let s=Object.entries(t).slice(0,5);if(s.length===0)return"{}";let a=s.map(([i,c])=>{let u=nt(c,e+1);return`${i}: ${u}`}).join(", ");return Object.keys(t).length>5?`{ ${a}, ... }`:`{ ${a} }`}return"unknown"},ie=t=>{if(T(t))return`got ${Tt(t)}(${nt(t())})`;let e=Tt(t),n=nt(t);return`got ${e} (${n})`},mr=t=>t instanceof Me?t.detail:t instanceof Error?t.message:String(t),Jn=(t,e)=>{let n=`, ${ie(e)}.`;return t.endsWith(n)?t.slice(0,-n.length):t},dr=(t,e,n)=>{if(e instanceof Me){if(e.propPath===t)return Jn(e.detail,n);if(e.propPath===`${t}.value`&&T(n)){let o=Jn(e.detail,n());return o.startsWith("expected ")?`expected ref<${o.slice(9)}>`:`expected ref where ${o}`}}return mr(e)},hr=(t,e,n)=>{let o=[];for(let r of e){let s=dr(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)}`},yr=t=>typeof t=="string"?`"${t}"`:typeof t=="number"||typeof t=="boolean"?String(t):t===null?"null":t===void 0?"undefined":Tt(t),gr=(t,e)=>{typeof t!="string"&&ge(e,`expected string, ${ie(t)}`)},br=(t,e)=>{typeof t!="number"&&ge(e,`expected number, ${ie(t)}`)},xr=(t,e)=>{typeof t!="boolean"&&ge(e,`expected boolean, ${ie(t)}`)},Tr=t=>(e,n)=>{e instanceof t||ge(n,`expected instance of ${t.name||"provided class"}, ${ie(e)}`)},Cr=t=>(e,n,o)=>{e!==void 0&&t(e,n,o)},Er=t=>(e,n,o)=>{e!==null&&t(e,n,o)},vr=(...t)=>(e,n,o)=>{let r=[];for(let s of t)try{s(e,n,o);return}catch(a){r.push(a)}ge(n,hr(n,r,e))},Rr=t=>(e,n)=>{t.includes(e)||ge(n,`expected one of ${t.map(o=>yr(o)).join(", ")}, ${ie(e)}`)},wr=t=>(e,n,o)=>{v(e)||ge(n,`expected array, ${ie(e)}`);let r=e;for(let s=0;s<r.length;++s)t(r[s],`${n}[${s}]`,o)};function Sr(t){return(e,n,o)=>{L(e)||ge(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 Ar=t=>(e,n,o)=>{if(T(e)){t(e(),`${n}.value`,o);return}ge(n,`expected ref, ${ie(e)}`)},kr={fail:ge,describe:ie,isString:gr,isNumber:br,isBoolean:xr,isClass:Tr,optional:Cr,nullable:Er,or:vr,oneOf:Rr,arrayOf:wr,shape:Sr,refOf:Ar};var Nr=(t,e,n)=>{let o=t.tagName?.toLowerCase?.()||"unknown",r=n instanceof Me?n.propPath:e,s=n instanceof Me?n.detail:n instanceof Error?n.message:String(n);return n instanceof Error?new Error(`Invalid prop "${r}" on <${o}>: ${s}`,{cause:n}):new Error(`Invalid prop "${r}" on <${o}>: ${s}`,{cause:n})},ot=class{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=Nr(this.G,o,a);if(this.J==="warn"){Fe.warning(i.message,i);continue}throw i}}}unmount(){let e=this.start.nextSibling,n=this.end;for(;e&&e!==n;)G(e),e=e.nextSibling;for(let o of this.ctx)Oe(o)}};var Ue=t=>{let e=t,n=e[$e];if(n)return n;let o={unbinders:[],data:{}};return e[$e]=o,o};var K=(t,e)=>{Ue(t).unbinders.push(e)};var rt=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={},Qn=1,Xn=t=>{let e=(Qn++).toString();return Et[e]=t,Ct[e]=0,e},sn=t=>{Ct[t]+=1},an=t=>{--Ct[t]===0&&(delete Et[t],delete Ct[t])},Yn=t=>Et[t],cn=()=>Qn!==1&&Object.keys(Et).length>0,st="r-switch",Or=t=>{let e=t.filter(o=>Ce(o)).map(o=>[...o.querySelectorAll("[r-switch]")].map(r=>r.getAttribute(st))),n=new Set;return e.forEach(o=>{o.forEach(r=>r&&n.add(r))}),[...n]},qe=(t,e)=>{if(!cn())return;let n=Or(e);n.length!==0&&(n.forEach(sn),K(t,()=>{n.forEach(an)}))};var vt=()=>{},un=(t,e,n,o)=>{let r=[];for(let s of t){let a=s.cloneNode(!0);n.insertBefore(a,o),r.push(a)}Le(e,r)},ln=Symbol("r-if"),Zn=Symbol("r-else"),eo=t=>t[Zn]===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.O.j(e,o=>{o.hasAttribute(this.V)&&this.y(o)}),n}Y(e){return e[ln]?!0:(e[ln]=!0,wt(e,this.ge).forEach(n=>n[ln]=!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){H(0,this.V,e);return}e.removeAttribute(this.V),this.M(e,n)}U(e,n,o){let r=ze(e),s=e.parentNode,a=document.createComment(`__begin__ :${n}${o??""}`);s.insertBefore(a,e),qe(a,r),r.forEach(c=>{G(c)}),e.remove(),n!=="if"&&(e[Zn]=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:()=>{un(r,this.r,s,i)},unmount:()=>{Ee(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.be(o,n),f=vt;return K(i,()=>{u.stop(),f(),f=vt}),f=u.subscribe(n),[{mount:()=>{un(s,this.r,a,c)},unmount:()=>{Ee(i,c)},isTrue:()=>rt(l()[0]),isMounted:!1},...p]}}M(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.C(f,()=>{if(rt(u()[0]))l||(un(r,this.r,s,i),l=!0),m.forEach(E=>{E.unmount(),E.isMounted=!1});else{Ee(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.be(o,h),d=vt;K(a,()=>{c.stop(),d(),d=vt}),h(),d=c.subscribe(h)}};var ze=t=>{let e=me(t)?t.content.childNodes:[t],n=[];for(let o=0;o<e.length;++o){let r=e[o];if(r.nodeType===1){let s=r?.tagName;if(s==="SCRIPT"||s==="STYLE")continue}n.push(r)}return n},Le=(t,e)=>{for(let n=0;n<e.length;++n){let o=e[n];o.nodeType===Node.ELEMENT_NODE&&(eo(o)||t.$(o))}},wt=(t,e)=>{let n=t.querySelectorAll(e);return t.matches?.(e)?[t,...n]:n},me=t=>t instanceof HTMLTemplateElement,Ce=t=>t.nodeType===Node.ELEMENT_NODE,it=t=>t.nodeType===Node.ELEMENT_NODE,to=t=>t instanceof HTMLSlotElement,ve=t=>me(t)?t.content.childNodes:t.childNodes,Ee=(t,e)=>{let n=t.nextSibling;for(;n!=null&&n!==e;){let o=n.nextSibling;G(n),n=o}},no=function(){return this()},Mr=function(t){return this(t)},Lr=()=>{throw new Error("value is readonly.")},Vr={get:no,set:Mr,enumerable:!0,configurable:!1},Ir={get:no,set:Lr,enumerable:!0,configurable:!1},Ve=(t,e)=>{Object.defineProperty(t,"value",e?Ir:Vr)},oo=(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),pn=t=>{let e=Object.create(null);return n=>e[n]||(e[n]=t(n))},Pr=/-(\w)/g,$=pn(t=>t&&t.replace(Pr,(e,n)=>n?n.toUpperCase():"")),Dr=/\B([A-Z])/g,Ke=pn(t=>t&&t.replace(Dr,"-$1").toLowerCase()),at=pn(t=>t&&t.charAt(0).toUpperCase()+t.slice(1));var kt={mount:()=>{}};var We=t=>{let e=t.trim();return e?e.split(/\s+/):[]};var Nt=t=>{gt(t)?.onMounted?.forEach(n=>{n()}),t.mounted?.()};var fn=Symbol("scope"),mn=t=>{try{Kn();let e=t();rn(e);let n={context:e,unmount:()=>Oe(e),[fn]:1};return n[fn]=1,n}finally{Wn()}},ro=t=>L(t)?fn in t:!1;var dn={collectRefObj:!0,mount:({parseResult:t})=>({update:({values:e})=>{let n=t.context,o=e[0];if(L(o))for(let r of Object.entries(o)){let s=r[0],a=r[1],i=n[s];i!==a&&(T(i)?i(a):n[s]=a)}}})};var ne=(t,e)=>{De(e)?.onUnmounted.push(t)};var re=(t,e,n,o=!0)=>{if(!T(t))throw j(3,"observe");n&&e(t());let s=t(void 0,void 0,0,e);return o&&ne(s,!0),s};var ct=(t,e)=>{if(t===e)return()=>{};let n=re(t,r=>e(r)),o=re(e,r=>t(r));return e(t()),()=>{n(),o()}};var ut=t=>!!t&&t[xt]===1;var Ge=t=>t?.[bt]===1;var de=[],so=t=>{de.length!==0&&de[de.length-1]?.add(t)},Je=t=>{if(!t)return()=>{};let e={stop:()=>{}};return Ur(t,e),ne(()=>e.stop(),!0),e.stop},Ur=(t,e)=>{if(!t)return;let n=[],o=!1,r=()=>{for(let s of n)s();n=[],o=!0};e.stop=r;try{let s=new Set;if(de.push(s),t(a=>n.push(a)),o)return;for(let a of[...s]){let i=re(a,()=>{r(),Je(t)});n.push(i)}}finally{de.pop()}},hn=t=>{let e=de.length,n=e>0&&de[e-1];try{return n&&de.push(null),t()}finally{n&&de.pop()}},yn=t=>{try{let e=new Set;return de.push(e),{value:t(),refs:[...e]}}finally{de.pop()}};var Z=(t,e,n)=>{if(!T(t))return;let o=t;if(o(void 0,e,1),!n)return;let r=o();if(r){if(v(r)||ue(r))for(let s of r)Z(s,e,!0);else if(Ne(r))for(let s of r)Z(s[0],e,!0),Z(s[1],e,!0);if(L(r))for(let s in r)Z(r[s],e,!0)}};function Hr(t,e,n){Object.defineProperty(t,e,{value:n,enumerable:!1,writable:!0,configurable:!0})}var Qe=(t,e,n)=>{n.forEach(function(o){let r=t[o];Hr(e,o,function(...a){let i=r.apply(this,a),c=this[Y];for(let u of c)Z(u);return i})})},Ot=(t,e)=>{Object.defineProperty(t,Symbol.toStringTag,{value:e,writable:!1,enumerable:!1,configurable:!0})};var io=Array.prototype,gn=Object.create(io),Br=["push","pop","shift","unshift","splice","sort","reverse"];Qe(io,gn,Br);var ao=Map.prototype,Mt=Object.create(ao),jr=["set","clear","delete"];Ot(Mt,"Map");Qe(ao,Mt,jr);var co=Set.prototype,Lt=Object.create(co),$r=["add","clear","delete"];Ot(Lt,"Set");Qe(co,Lt,$r);var be={},ae=t=>{if(T(t)||ut(t))return t;let e={auto:!0,_value:t},n=c=>L(c)?Y in c?!0:v(c)?(Object.setPrototypeOf(c,gn),!0):ue(c)?(Object.setPrototypeOf(c,Lt),!0):Ne(c)?(Object.setPrototypeOf(c,Mt),!0):!1:!1,o=n(t),r=new Set,s=(c,u)=>{if(be.stack&&be.stack.length){be.stack[be.stack.length-1].add(i);return}r.size!==0&&hn(()=>{for(let l of[...r.keys()])r.has(l)&&l(c,u)})},a=c=>{let u=c[Y];u||(c[Y]=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):(so(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[Y]=1,Ve(i,!1),o&&a(t),i};var Re=t=>{if(ut(t))return t;let e;if(T(t)?(e=t,t=e()):e=ae(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];Ge(r)||(t[o]=Re(r))}return e}if(!L(t))return e;for(let n of Object.entries(t)){let o=n[1];if(Ge(o))continue;let r=n[0];tt(r)||(t[r]=null,t[r]=Re(o))}return e};var uo=Symbol("modelBridge"),Vt=()=>{},_r=t=>!!t?.[uo],Fr=t=>{t[uo]=1},qr=t=>{let e=Re(t());return Fr(e),e},lo={collectRefObj:!0,mount:({parseResult:t,option:e})=>{if(typeof e!="string"||!e)return Vt;let n=$(e),o,r,s=Vt,a=()=>{s(),s=Vt,o=void 0,r=void 0},i=()=>{s(),s=Vt},c=(l,p)=>{o!==l&&(i(),s=ct(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(_r(l)){if(f===l)return;T(f)?c(l,f):p[n]=l;return}r||(r=qr(l)),p[n]=r,c(l,r)};return{update:()=>{u()},unmount:()=>{s()}}}};var It=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(Ke)].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(!me(e))return!1;let n=e.getAttributeNames();return e.hasAttribute("name")?!0:n.some(o=>o.startsWith("#"))}ct(e){return me(e)&&e.getAttributeNames().length===0}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(B(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=$(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,X=m.props?.map($)??[],oe=[],N=y=>y==="class"||y==="style",le=(y,g,S=!1)=>{let U={},W=y.hasAttribute(_);return o.C(g,()=>{if(o.v(U),W?n.y(dn,y,_):y.hasAttribute(J)&&n.y(dn,y,J),X.length===0)return;let M=new Map(X.map(C=>[C.toLowerCase(),C]));for(let C of[...X,...X.map(Ke)]){let A=y.getAttribute(C);if(A===null)continue;let D=$(C);U[D]=A,S&&m.inheritAttrs===!0&&N(D)&&oe.push({name:C,value:A}),y.removeAttribute(C)}let R=n.F.Ee(y,!1);for(let[C,A]of R.entries()){let[D,se]=A.te;if(!se)continue;let Pe=M.get($(se).toLowerCase());if(Pe&&!(D!=="."&&D!==":"&&D!==I)){if(S&&D!=="."&&m.inheritAttrs===!0&&N(Pe)){let _n=y.getAttribute(C);_n!==null&&oe.push({name:C,value:_n})}n.y(lo,y,C,!0,Pe,A.ne)}}}),U},x=[...o.L()],V=()=>{let y=le(u,x,!0),g=new ot(y,u,x,E,w,n.o.propValidationMode),S=mn(()=>m.context(g)??{}).context;if(g.autoProps){for(let[U,W]of Object.entries(y))if(U in S){let M=S[U];if(M===W)continue;if(T(M)){T(W)?g.entangle?K(E,ct(W,M)):M(W()):M(W);continue}}else S[U]=W;for(let U of X)U in S||(S[U]=void 0);g.onAutoPropsAssigned?.()}return{componentCtx:S,head:g}},{componentCtx:F,head:Ie}=V(),pe=[...ve(d)],en=pe.length,P=u.childNodes.length===0,O=y=>{let g=y.parentElement,S=y.name;if(B(S)&&(S=y.getAttributeNames().filter(M=>M.startsWith("#"))[0],B(S)?S="default":S=S.substring(1)),P){if(S==="default"){let M=n.o.p.text,R=u.getAttribute(M);if(!B(R)){let C=document.createElement("span");C.setAttribute(M,R),g.insertBefore(C,y),u.removeAttribute(M);return}}for(let M of[...y.childNodes])g.insertBefore(M,y);return}let U=u.querySelector(`template[name='${S}'], template[\\#${S}]`);!U&&S==="default"&&(U=[...u.querySelectorAll("template:not([name])")].find(R=>this.ct(R))??null);let W=M=>{Ie.enableSwitch&&o.C(x,()=>{o.v(F);let R=le(y,o.L());o.C(x,()=>{o.v(R);let C=o.L(),A=Xn(C);for(let D of M)Ce(D)&&(D.setAttribute(st,A),sn(A),K(D,()=>{an(A)}))})})};if(U){let M=[...ve(U)];for(let R of M)g.insertBefore(R,y);W(M)}else{if(S!=="default"){for(let R of[...ve(y)])g.insertBefore(R,y);return}let M=[...ve(u)].filter(R=>!this.at(R));for(let R of M)g.insertBefore(R,y);W(M)}},Q=y=>{if(!Ce(y))return;let g=y.querySelectorAll("slot");if(to(y)){O(y),y.remove();return}for(let S of g)O(S),S.remove()};(()=>{for(let y=0;y<en;++y)pe[y]=pe[y].cloneNode(!0),l.insertBefore(pe[y],p),Q(pe[y])})(),b.insertBefore(w,p);let ee=()=>{if(!m.inheritAttrs)return;let y=pe.filter(R=>R.nodeType===Node.ELEMENT_NODE);y.length>1&&(y=y.filter(R=>R.hasAttribute(this.xe)));let g=y[0];if(!g)return;let S=`${I}:class`,U=`${I}:style`,W=(R,C,A)=>{let D=g.hasAttribute(R)?R:g.hasAttribute(C)?C:R,se=g.getAttribute(D);g.setAttribute(D,B(se)?A:`${se}, ${A}`)},M=(R,C)=>{if(R==="class"){let A=We(C);A.length>0&&g.classList.add(...A)}else if(R===":class"||R===S)W(":class",S,C);else if(R==="style"){let A=g.style,D=u.style;for(let se of D)A.setProperty(se,D.getPropertyValue(se))}else R===":style"||R===U?W(":style",U,C):g.setAttribute(At(R,n.o),C)};for(let{name:R,value:C}of oe)u.setAttribute(R,C);for(let R of u.getAttributeNames())R===_||R===J||M(R,u.getAttribute(R))},xe=()=>{for(let y of u.getAttributeNames())!y.startsWith("@")&&!y.startsWith(n.o.p.on)&&u.removeAttribute(y)},ke=()=>{ee(),xe(),o.v(F),n.ve(u,!1),F.$emit=Ie.emit,Le(n,pe),K(u,()=>{Oe(F)}),K(E,()=>{Te(u)}),Nt(F)};o.C(x,ke)}}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(Ke)].join(",")}pt(e,n){let o=[];if(B(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),!(!B(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];Ce(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];Ce(a)&&r.push(a)}return r}return[]}};var bn=class{te;ne;we=[];constructor(e,n){this.te=e,this.ne=n}},Pt=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(/[:@]/);B(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]=$(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(!it(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 bn(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.O.j(e,a),o}};var po=()=>{},zr=(t,e)=>{for(let n of t){let o=n.cloneNode(!0);e.appendChild(o)}},Dt=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.O.j(e,o=>{(o.hasAttribute(this.I)||o.hasAttribute("is"))&&this.y(o)}),n}y(e){let n=e.getAttribute(this.I);if(!n){if(n=e.getAttribute("is"),!n)return;if(!n.startsWith("regor:")){if(!n.startsWith("r-"))return;let o=n.slice(2).trim().toLowerCase();if(!o)return;let r=e.parentNode;if(!r)return;let s=document.createElement(o);for(let 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.M(e,n)}U(e,n){let o=ze(e),r=e.parentNode,s=document.createComment(`__begin__ dynamic ${n??""}`);r.insertBefore(s,e),qe(s,o),o.forEach(i=>{G(i)}),e.remove();let a=document.createComment(`__end__ dynamic ${n??""}`);return r.insertBefore(a,s.nextSibling),{nodes:o,parent:r,commentBegin:s,commentEnd:a}}M(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=me(e)?o:[...o[0].childNodes],h=()=>{u.C(l,()=>{let b=c()[0];if(L(b)&&(b.name?b=b.name:b=Object.entries(u.ee()).filter(w=>w[1]===b)[0]?.[0]),!z(b)||B(b)){Ee(s,a);return}if(p.name===b)return;Ee(s,a);let E=document.createElement(b);for(let w of e.getAttributeNames())w!==this.I&&E.setAttribute(w,e.getAttribute(w));zr(f,E),r.insertBefore(E,a),this.r.$(E),p.name=b})},m=po;K(s,()=>{i.stop(),m(),m=po}),h(),m=i.subscribe(h)}};var k=t=>{let e=t;return e!=null&&e[Y]===1?e():e};var Kr=(t,e)=>{let[n,o]=e;q(o)?o(t,n):t.innerHTML=n?.toString()},Ut={mount:()=>({update:({el:t,values:e})=>{Kr(t,e)}})};var Ht=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 b=$(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(_),[X,oe]=J,N=i[_]??i[X];if(N){if(N===Ut)return;l.push({nodeIndex:p,attrName:_,directive:N,option:oe,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.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 Wr=(t,e)=>{let n=e.parentNode;if(n)for(let o=0;o<t.items.length;++o)n.insertBefore(t.items[o],e)},Gr=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},Bt=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 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 X=!1,oe=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>=oe?oe=F:X=!0}let N=X?Gr(J):[],le=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 Ie=h[V];X&&(le>=0&&N[le]===x?--le:Ie&&Wr(Ie,F))}return h}};var lt=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}Oe(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 xn=Symbol("r-for"),Jr=t=>-1,fo=()=>{},jt=class t{r;x;Me;R;constructor(e){this.r=e,this.x=e.o.p.for,this.Me=St(this.x),this.R=e.o.p.pre}k(e){let n=e.hasAttribute(this.x);return n&&this.Ne(e),this.r.O.j(e,o=>{o.hasAttribute(this.x)&&this.Ne(o)}),n}Y(e){return e[xn]?!0:(e[xn]=!0,wt(e,this.Me).forEach(n=>n[xn]=!0),!1)}Ne(e){if(e.hasAttribute(this.R)||this.Y(e))return;let n=e.getAttribute(this.x);if(!n){H(0,this.x,e);return}e.removeAttribute(this.x),this.gt(e,n)}Le(e){return fe(e)?[]:(q(e)&&(e=e()),Symbol.iterator in Object(e)?e:typeof e=="number"?(o=>({*[Symbol.iterator](){for(let r=1;r<=o;r++)yield r}}))(e):Object.entries(e))}gt(e,n){let o=this.bt(n);if(!o?.list){H(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=ze(e),c=Ht.ft(this.r,i),u=e.parentNode;if(!u)return;let l=`${this.x} => ${n}`,p=new Comment(`__begin__ ${l}`);u.insertBefore(p,e),qe(p,i),i.forEach(O=>{G(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.xt(a),_=(O,Q)=>w(O)===w(Q),J=(O,Q)=>O===Q,I=(O,Q,te)=>{let ee=o.createContext(Q,O),xe=lt.mt(ee.index,Q),ke=()=>{let y=f.parentNode??p.parentNode??u,g=te.previousSibling,S=[];for(let U=0;U<i.length;++U){let W=i[U].cloneNode(!0);y.insertBefore(W,te),S.push(W)}for(c?c.y(h,S):Le(h,S),g=g.nextSibling;g!==te;)xe.items.push(g),g=g.nextSibling};return E?(E[0]=ee.ctx,m.C(E,ke)):m.C(d,()=>{m.v(ee.ctx),ke()}),xe},X=(O,Q)=>{let te=P.D(O).items,ee=te[te.length-1].nextSibling;for(let xe of te)G(xe);P.ce(O,I(O,Q,ee))},oe=(O,Q)=>{P.v(I(O,Q,f))},N=O=>{for(let Q of P.D(O).items)G(Q)},le=O=>{let Q=P.w;for(let te=O;te<Q;++te)P.D(te).index(te)},x=O=>{let Q=p.parentNode,te=f.parentNode;if(!Q||!te)return;let ee=P.w;q(O)&&(O=O());let xe=k(O[0]);if(v(xe)&&xe.length===0){Ee(p,f),P.Oe(0);return}let ke=[];for(let C of this.Le(O[0]))ke.push(C);let y=Bt.dt({oldItems:P.T,newValues:ke,getKey:w,isSameValue:J,mountNewValue:(C,A,D)=>I(C,A,D),removeMountItem:C=>{for(let A=0;A<C.items.length;++A)G(C.items[A])},endAnchor:f});if(y){P.T=y,P.P.clear();for(let C=0;C<y.length;++C){let A=y[C];A.order=C,A.index(C);let D=w(A.value);D!==void 0&&P.P.set(D,A)}return}let g=0,S=Number.MAX_SAFE_INTEGER,U=ee,W=this.r.o.forGrowThreshold,M=()=>P.w<U+W;for(let C of ke){let A=()=>{if(g<ee){let D=P.D(g++);if(_(D.value,C)){if(J(D.value,C))return;X(g-1,C);return}let se=P.ht(w(C));if(se>=g&&se-g<10){if(--g,S=Math.min(S,g),N(g),P.Ve(g),--ee,se>g+1)for(let Pe=g;Pe<se-1&&Pe<ee&&!_(P.D(g).value,C);)++Pe,N(g),P.Ve(g),--ee;A();return}M()?(P.yt(g-1,I(g,C,P.D(g-1).items[0])),S=Math.min(S,g-1),++ee):X(g-1,C)}else oe(g++,C)};A()}let R=g;for(ee=P.w;g<ee;)N(g++);P.Oe(R),le(S)},V=()=>{F.stop(),pe(),pe=fo},F=m.N(o.list),Ie=F.value,pe=fo,en=0,P=new lt(w);for(let O of this.Le(Ie()[0]))P.v(I(en++,O,f));K(p,V),pe=F.subscribe(x)}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=k(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:Jr};return s&&(f.index=l[s.startsWith("#")?s.substring(1):s]=ae(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=k(s),i=this.Ie(a,o);return i!==void 0||!r?i:this.Ie(a,r)}}return o=>k(k(o)?.[n])}Rt(e){return e.split(".").filter(n=>n.length>0)}Ie(e,n){let o=e;for(let r of n)o=k(o)?.[r];return k(o)}};var $t=class{pe=0;ue=new Map;m;Pe;De;Ue;O;F;o;R;Be;constructor(e){this.m=e,this.o=e.o,this.De=new jt(this),this.Pe=new Rt(this),this.Ue=new Dt(this),this.O=new It(this),this.F=new Pt(this),this.R=this.o.p.pre,this.Be=this.o.p.dynamic}Ct(e){let n=me(e)?[e]:e.querySelectorAll("template");for(let o of n){if(o.hasAttribute(this.R))continue;let r=o.parentNode;if(!r)continue;let s=o.nextSibling;if(o.remove(),!o.content)continue;let a=[...o.content.childNodes];for(let i of a)r.insertBefore(i,s);Le(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.O.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,K(s,()=>{G(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(st);if(p)return p;l=l.parentElement}return null};if(cn()){let u=c(n);if(u){this.m.C(Yn(u),()=>{this.M(e,n,i,s,a)});return}}this.M(e,n,i,s,a)}St(e,n,o){return e!==kt?!1:(B(o)||this.He(n,o)||this.wt(n,o),!0)}M(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);K(n,c.stop);let u=this.Ot(n,o,i,a,r,s),l=this.Mt(e,u,c);if(!l)return;let p=this.Nt(u,i,a,r,l);p(),e.once||(c.result=i.subscribe(p),a&&(c.dynamic=a.subscribe(p)))}At(e,n){let o=oo(e,this.Be);if(o)return this.m.N($(o),void 0,void 0,void 0,n)}kt(e,n){return this.m.N(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}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}}Mt(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}Nt(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 mo="http://www.w3.org/1999/xlink",Qr={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 Xr(t){return!!t||t===""}var Yr=(t,e,n,o,r,s)=>{if(o){s&&s.includes("camel")&&(o=$(o)),_t(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];_t(t,l,p,u)}else if(L(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;_t(t,l,p,h)}else{let u=n?.[i],l=e[i++],p=e[i];_t(t,l,p,u)}}},Tn={mount:()=>({update:({el:t,values:e,previousValues:n,option:o,previousOption:r,flags:s})=>{Yr(t,e,n,o,r,s)}})},_t=(t,e,n,o)=>{if(o&&o!==e&&t.removeAttribute(o),fe(e)){H(3,"r-bind",t);return}if(!z(e)){H(6,`Attribute key is not string at ${t.outerHTML}`,e);return}if(e.startsWith("xlink:")){fe(n)?t.removeAttributeNS(mo,e.slice(6,e.length)):t.setAttributeNS(mo,e,n);return}let r=e in Qr;fe(n)||r&&!Xr(n)?t.removeAttribute(e):t.setAttribute(e,r?"":n)};var Zr=(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)ho(t,s[c],a?.[c])}else ho(t,s,a)}},Cn={mount:()=>({update:({el:t,values:e,previousValues:n})=>{Zr(t,e,n)}})},ho=(t,e,n)=>{let o=k(e),r=k(n),s=t.classList,a=z(o),i=z(r);if(o&&!a){let c=o;if(r&&!i){let u=r;for(let l in u)(!(l in c)||!k(c[l]))&&s.remove(l)}for(let u in c)k(c[u])&&s.add(u)}else if(a){if(r!==o){let c=i?We(r):[],u=We(o);c.length>0&&s.remove(...c),u.length>0&&s.add(...u)}}else if(r){let c=i?We(r):[];c.length>0&&s.remove(...c)}};function es(t,e){if(t.length!==e.length)return!1;let n=!0;for(let o=0;n&&o<t.length;o++)n=we(t[o],e[o]);return n}function we(t,e){if(t===e)return!0;let n=nn(t),o=nn(e);if(n||o)return n&&o?t.getTime()===e.getTime():!1;if(n=tt(t),o=tt(e),n||o)return t===e;if(n=v(t),o=v(e),n||o)return n&&o?es(t,e):!1;if(n=L(t),o=L(e),n||o){if(!n||!o)return!1;let r=Object.keys(t).length,s=Object.keys(e).length;if(r!==s)return!1;for(let a in t){let i=Object.prototype.hasOwnProperty.call(t,a),c=Object.prototype.hasOwnProperty.call(e,a);if(i&&!c||!we(t[a],e[a]))return!1}return!0}return String(t)===String(e)}function Ft(t,e){return t.findIndex(n=>we(n,e))}var yo=t=>{let e=parseFloat(t);return isNaN(e)?t:e};var En=t=>{if(!T(t))throw j(3,"pause");t(void 0,void 0,3)};var vn=t=>{if(!T(t))throw j(3,"resume");t(void 0,void 0,4)};var bo={mount:({el:t,parseResult:e,flags:n})=>({update:({values:o})=>{ts(t,o[0])},unmount:ns(t,e,n)})},ts=(t,e)=>{let n=Eo(t);if(n&&xo(t))v(e)?e=Ft(e,Se(t))>-1:ue(e)?e=e.has(Se(t)):e=cs(t,e),t.checked=e;else if(n&&To(t))t.checked=we(e,Se(t));else if(n||vo(t))Co(t)?t.value!==e?.toString()&&(t.value=e):t.value!==e&&(t.value=e);else if(Ro(t)){let o=t.options,r=o.length,s=t.multiple;for(let a=0;a<r;a++){let i=o[a],c=Se(i);if(s)v(e)?i.selected=Ft(e,c)>-1:i.selected=e.has(c);else if(we(Se(i),e)){t.selectedIndex!==a&&(t.selectedIndex=a);return}}!s&&t.selectedIndex!==-1&&(t.selectedIndex=-1)}else H(7,t)},pt=t=>(T(t)&&(t=t()),q(t)&&(t=t()),t?z(t)?{trim:t.includes("trim"),lazy:t.includes("lazy"),number:t.includes("number"),int:t.includes("int")}:{trim:!!t.trim,lazy:!!t.lazy,number:!!t.number,int:!!t.int}:{trim:!1,lazy:!1,number:!1,int:!1}),xo=t=>t.type==="checkbox",To=t=>t.type==="radio",Co=t=>t.type==="number"||t.type==="range",Eo=t=>t.tagName==="INPUT",vo=t=>t.tagName==="TEXTAREA",Ro=t=>t.tagName==="SELECT",ns=(t,e,n)=>{let o=e.value,r=pt(n?.join(",")),s=pt(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 H(8,t),()=>{};let i=()=>e.refs[0],c=Eo(t);return c&&xo(t)?rs(t,i):c&&To(t)?us(t,i):c||vo(t)?os(t,a,i,o):Ro(t)?ls(t,i,o):(H(7,t),()=>{})},go=/[.,' ·٫]/,os=(t,e,n,o)=>{let s=e.lazy?"change":"input",a=Co(t),i=()=>{!e.trim&&!pt(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=pt(o()[1]);if(a||b.number||b.int){if(b.int)d=parseInt(d);else{if(go.test(d[d.length-1])&&d.split(go).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=Se(t),i=t.checked,c=s();if(v(c)){let u=Ft(c,a),l=u!==-1;i&&!l?c.push(a):!i&&l&&c.splice(u,1)}else ue(c)?i?c.add(a):c.delete(a):s(as(t,i))};return t.addEventListener(n,r),o},Se=t=>"_value"in t?t._value:t.value,wo="trueValue",ss="falseValue",So="true-value",is="false-value",as=(t,e)=>{let n=e?wo:ss;if(n in t)return t[n];let o=e?So:is;return t.hasAttribute(o)?t.getAttribute(o):e},cs=(t,e)=>{if(wo in t)return we(e,t.trueValue);let o=So;return t.hasAttribute(o)?we(e,t.getAttribute(o)):we(e,!0)},us=(t,e)=>{let n="change",o=()=>{t.removeEventListener(n,r)},r=()=>{let s=e();if(!s)return;let a=Se(t);s(a)};return t.addEventListener(n,r),o},ls=(t,e,n)=>{let o="change",r=()=>{t.removeEventListener(o,s)},s=()=>{let a=e();if(!a)return;let c=pt(n()[1]).number,u=Array.prototype.filter.call(t.options,l=>l.selected).map(l=>c?yo(Se(l)):Se(l));if(t.multiple){let l=a();try{if(En(a),ue(l)){l.clear();for(let p of u)l.add(p)}else v(l)?(l.splice(0),l.push(...u)):a(u)}finally{vn(a),Z(a)}}else a(u[0])};return t.addEventListener(o,s),r};var ps=["stop","prevent","capture","self","once","left","right","middle","passive"],fs=t=>{let e={};if(B(t))return;let n=t.split(",");for(let o of ps)e[o]=n.includes(o);return e},ms=(t,e,n,o,r)=>{if(o){let u=e.value(),l=k(o.value()[0]);return z(l)?Rn(t,$(l),()=>e.value()[0],r?.join(",")??u[1]):()=>{}}else if(n){let u=e.value();return Rn(t,$(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(q(l)&&(l=l()),L(l))for(let p of Object.entries(l)){let f=p[0],h=()=>{let d=e.value()[u];return q(d)&&(d=d()),d=d[f],q(d)&&(d=d()),d},m=l[f+"_flags"];s.push(Rn(t,f,h,m))}else H(2,"r-on",t)}return a},wn={isLazy:(t,e)=>e===-1&&t%2===0,isLazyKey:(t,e)=>e===0&&!t.endsWith("_flags"),once:!1,collectRefObj:!0,mount:({el:t,parseResult:e,option:n,dynamicOption:o,flags:r})=>ms(t,e,n,o,r)},ds=(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]},Rn=(t,e,n,o)=>{if(B(e))return H(5,"r-on",t),()=>{};let r=fs(o),s=r?{capture:r.capture,passive:r.passive,once:r.once}:void 0,a;[e,a]=ds(e,o);let i=l=>{if(!a(l)||!n&&e==="submit"&&r?.prevent)return;let p=n(l);q(p)&&(p=p(l)),q(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 hs=(t,e,n,o)=>{if(n){o&&o.includes("camel")&&(n=$(n)),Xe(t,n,e[0]);return}let r=e.length;for(let s=0;s<r;++s){let a=e[s];if(v(a)){let i=a[0],c=a[1];Xe(t,i,c)}else if(L(a))for(let i of Object.entries(a)){let c=i[0],u=i[1];Xe(t,c,u)}else{let i=e[s++],c=e[s];Xe(t,i,c)}}},Ao={mount:()=>({update:({el:t,values:e,option:n,flags:o})=>{hs(t,e,n,o)}})};function ys(t){return!!t||t===""}var Xe=(t,e,n)=>{if(fe(e)){H(3,":prop",t);return}if(e==="innerHTML"||e==="textContent"){let s=[...t.childNodes];setTimeout(()=>s.forEach(Te),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=ys(n):n==null&&s==="string"?(n="",r=!0):s==="number"&&(n=0,r=!0)}try{t[e]=n}catch(s){r||H(4,e,o,n,s)}r&&t.removeAttribute(e)};var ko={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 gs=(t,e)=>{let n=Ue(t).data,o=n._ord;qn(o)&&(o=n._ord=t.style.display),rt(e[0])?t.style.display=o:t.style.display="none"},No={mount:()=>({update:({el:t,values:e})=>{gs(t,e)}})};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)Oo(t,s[c],a?.[c])}else Oo(t,s,a)}},qt={mount:()=>({update:({el:t,values:e,previousValues:n})=>{bs(t,e,n)}})},Oo=(t,e,n)=>{let o=k(e),r=k(n),s=t.style,a=z(o);if(o&&!a){let i=o;if(r&&!z(r)){let c=r;for(let u in c)k(i[u])==null&&An(s,u,"")}for(let c in i)An(s,c,i[c])}else{let i=s.display;if(a?r!==o&&(s.cssText=o):r&&t.removeAttribute("style"),"_ord"in Ue(t).data)return;s.display=i}},Mo=/\s*!important$/;function An(t,e,n){let o=k(n);if(v(o))o.forEach(r=>{An(t,e,r)});else{let r=o==null?"":String(o);if(e.startsWith("--"))t.setProperty(e,r);else{let s=xs(t,e);Mo.test(r)?t.setProperty(Ke(s),r.replace(Mo,""),"important"):t[s]=r}}}var Lo=["Webkit","Moz","ms"],Sn={};function xs(t,e){let n=Sn[e];if(n)return n;let o=$(e);if(o!=="filter"&&o in t)return Sn[e]=o;o=at(o);for(let r=0;r<Lo.length;r++){let s=Lo[r]+o;if(s in t)return Sn[e]=s}return e}var ce=t=>Vo(k(t)),Vo=(t,e=new WeakMap)=>{if(!t||!L(t))return t;if(v(t))return t.map(ce);if(ue(t)){let o=new Set;for(let r of t.keys())o.add(ce(r));return o}if(Ne(t)){let o=new Map;for(let r of t)o.set(ce(r[0]),ce(r[1]));return o}if(e.has(t))return k(e.get(t));let n={...t};e.set(t,n);for(let o of Object.entries(n))n[o[0]]=Vo(k(o[1]),e);return n};var Ts=(t,e)=>{let n=e[0];t.textContent=ue(n)?JSON.stringify(ce([...n])):Ne(n)?JSON.stringify(ce([...n])):L(n)?JSON.stringify(ce(n)):n?.toString()??""},Io={mount:()=>({update:({el:t,values:e})=>{Ts(t,e)}})};var Po={mount:()=>({update:({el:t,values:e})=>{Xe(t,"value",e[0])}})};var he=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=Re,e.sref=ae,e.flatten=ce,e}addComponent(...e){for(let n of e){if(!n.defaultName){Fe.warning("Registered component's default name is not defined",n);continue}this.Z.set(at(n.defaultName),n),this._.set(at(n.defaultName).toLocaleUpperCase(),n)}}setDirectives(e){this.B={".":Ao,":":Tn,"@":wn,[`${e}on`]:wn,[`${e}bind`]:Tn,[`${e}html`]:Ut,[`${e}text`]:Io,[`${e}show`]:No,[`${e}model`]:bo,":style":qt,[`${e}style`]:qt,[`${e}bind:style`]:qt,":class":Cn,[`${e}bind:class`]:Cn,":ref":ko,":value":Po,[`${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 zt=(t,e)=>{if(!t)return;let o=(e??he.getDefault()).p,r=/(\{\{[^]*?\}\}|\[\[[^]*?\]\])/g,s=[{start:"{{",end:"}}"},{start:"[[",end:"]]"}];for(let a of Es(t,o.pre,s))Cs(a,o.text,r,s)},Cs=(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=Do(c,o);if(u&&B(a[0])&&B(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=Do(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)},Es=(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 ve(s))r(a)}};return r(t),o},Do=(t,e)=>e.find(n=>t.startsWith(n.start)&&t.endsWith(n.end));var vs=9,Rs=10,ws=13,Ss=32,Ae=46,Kt=44,As=39,ks=34,Wt=40,Ye=41,Gt=91,kn=93,Nn=63,Ns=59,Uo=58,Ho=123,Jt=125,Be=43,Qt=45,On=96,Bo=47,Mn=92,jo=new Set([2,3]),Ko={"=":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},Os={"=>":2,...Ko,"||":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},Wo=Object.keys(Ko),Ms=new Set(Wo),Vn=new Set(["=>"]);Wo.forEach(t=>Vn.add(t));var $o={true:!0,false:!1,null:null},Ls="this",Ze="Expected ",je="Unexpected ",Pn="Unclosed ",Vs=Ze+":",_o=Ze+"expression",Is="missing }",Ps=je+"object property",Ds=Pn+"(",Fo=Ze+"comma",qo=je+"token ",Us=je+"period",Ln=Ze+"expression after ",Hs="missing unaryOp argument",Bs=Pn+"[",js=Ze+"exponent (",$s="Variable names cannot start with a number (",_s=Pn+'quote after "',ft=t=>t>=48&&t<=57,zo=t=>Os[t],In=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)||ft(e)}i(e){return new Error(`${e} at character ${this.e}`)}g(){let e=this.h,n=this.u,o=this.e;for(;e===Ss||e===vs||e===Rs||e===ws;)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===Ns||o===Kt)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(je+'"'+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:zo(n),right_a:Vn.has(n)},a=this.z(),!a)throw this.i(Ln+n);let u=[s,r,a];for(;n=this.de();){o=zo(n),r={value:n,prec:o,right_a:Vn.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(Ln+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(ft(n)||n===Ae)return this.Bt();if(n===As||n===ks)e=this.Ht();else if(n===Gt)e=this.jt();else{let o=this.$t();if(o){let r=this.z();if(!r)throw this.i(Hs);return this.me({type:7,operator:o,argument:r})}this.K(n)?(e=this.ye(),e.name in $o?e={type:4,value:$o[e.name],raw:e.name}:e.name===Ls&&(e={type:5})):n===Wt&&(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 Ms.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===Qt?(this.e++,"-"):o===33?(this.e++,"!"):o===126?(this.e++,"~"):o===Be?(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===Ae||n===Gt||n===Wt||n===Nn;){let o;if(n===Nn){if(this.u.charCodeAt(this.e+1)!==Ae)break;o=!0,this.e+=2,this.g(),n=this.h}if(this.e++,n===Gt){if(e={type:3,computed:!0,object:e,property:this.S()},this.g(),n=this.h,n!==kn)throw this.i(Bs);this.e++}else n===Wt?e={type:6,arguments:this.qe(Ye),callee:e}:(o&&this.e--,this.g(),e={type:3,computed:!1,object:e,property:this.ye()});o&&(e.optional=!0),this.g(),n=this.h}return e}Bt(){let e=this.u,n=this.e,o=n;for(;ft(e.charCodeAt(o));)o++;if(e.charCodeAt(o)===Ae)for(o++;ft(e.charCodeAt(o));)o++;let r=e.charCodeAt(o);if(r===101||r===69){o++;let i=e.charCodeAt(o);(i===Be||i===Qt)&&o++;let c=o;for(;ft(e.charCodeAt(o));)o++;if(c===o){this.e=o;let u=e.slice(n,o);throw this.i(js+u+this.H+")")}}this.e=o;let s=e.slice(n,o),a=e.charCodeAt(o);if(this.K(a))throw this.i($s+s+this.H+")");if(a===Ae||s.length===1&&s.charCodeAt(0)===Ae)throw this.i(Us);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===Mn){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(_s+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(je+this.H);for(;this.e<this.u.length&&(e=this.h,this.le(e));)this.e++;return{type:2,name:this.u.slice(n,this.e)}}qe(e){let n=[],o=!1,r=0;for(;this.e<this.u.length;){this.g();let s=this.h;if(s===e){if(o=!0,this.e++,e===Ye&&r&&r>=n.length)throw this.i(qo+String.fromCharCode(e));break}else if(s===Kt){if(this.e++,r++,r!==n.length){if(e===Ye)throw this.i(qo+",");for(let a=n.length;a<r;a++)n.push(null)}}else{if(n.length!==r&&r!==0)throw this.i(Fo);{let a=this.S();if(!a||a.type===0)throw this.i(Fo);n.push(a)}}}if(!o)throw this.i(Ze+String.fromCharCode(e));return n}_t(){this.e++;let e=this.fe(Ye);if(this.f(Ye))return this.e++,e.length===1?e[0]:e.length?{type:1,expressions:e}:!1;throw this.i(Ds)}jt(){return this.e++,{type:9,elements:this.qe(kn)}}Ft(e){if(this.f(Ho)){this.e++;let n=[];for(;!isNaN(this.h);){if(this.g(),this.f(Jt)){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(Kt)||this.f(Jt)))n.push({type:12,computed:!1,key:o,value:o,shorthand:!0});else if(this.f(Uo)){this.e++;let r=this.S();if(!r)throw this.i(Ps);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(Kt)&&this.e++}throw this.i(Is)}}qt(e){let n=this.h;if((n===Be||n===Qt)&&n===this.u.charCodeAt(this.e+1)){this.e+=2;let o=e.node={type:13,operator:n===Be?"++":"--",argument:this.W(this.ye()),prefix:!0};if(!o.argument||!jo.has(o.argument.type))throw this.i(je+o.operator)}}Gt(e){let n=e.node,o=this.h;if((o===Be||o===Qt)&&o===this.u.charCodeAt(this.e+1)){if(!jo.has(n.type))throw this.i(je+(o===Be?"++":"--"));this.e+=2,e.node={type:13,operator:o===Be?"++":"--",argument:n,prefix:!1}}}Kt(e){this.u.charCodeAt(this.e)===Ae&&this.u.charCodeAt(this.e+1)===Ae&&this.u.charCodeAt(this.e+2)===Ae&&(this.e+=3,e.node={type:14,argument:this.S()})}Xt(e){if(e.node&&this.f(Nn)){this.e++;let n=e.node,o=this.S();if(!o)throw this.i(_o);if(this.g(),this.f(Uo)){this.e++;let r=this.S();if(!r)throw this.i(_o);e.node={type:11,test:n,consequent:o,alternate:r}}else throw this.i(Vs)}}Qt(e){if(this.g(),this.f(Wt)){let n=this.e;if(this.e++,this.g(),this.f(Ye)){this.e++;let o=this.de();if(o==="=>"){let r=this.$e();if(!r)throw this.i(Ln+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(On)&&(e.node={type:17,tag:n,quasi:this.Fe(e)})}Fe(e){if(!this.f(On))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===On)return u(!0),this.e+=1,e.node=r,r;if(l===36&&n.charCodeAt(this.e+1)===Ho){if(u(!1),this.e+=2,r.expressions.push(...this.fe(Jt)),!this.f(Jt))throw this.i("unclosed ${");this.e+=1,s=this.e}else if(l===Mn){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(Bo))return;let n=++this.e,o=!1;for(;this.e<this.u.length;){if(this.h===Bo&&!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(Gt)?o=!0:o&&this.f(kn)&&(o=!1),this.e+=this.f(Mn)?2:1}throw this.i("Unclosed Regex")}},Go=t=>new In(t).parse();var Fs={"=>":(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},qs={"-":t=>-t,"+":t=>+t,"!":t=>!t,"~":t=>~t,new:t=>t},Yo=t=>{if(!t?.some(Xo))return t;let e=[];return t.forEach(n=>Xo(n)?e.push(...n):e.push(n)),e},Jo=(...t)=>Yo(t),Dn=(t,e)=>{if(!t)return e;let n=Object.create(e??{});return n.$event=t,n},zs={"++":(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]}},Ks={"++":(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]--}},Qo={"=":(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}},Xt=(t,e)=>q(t)?t.bind(e):t,Un=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],Xt(k(o[r]),o);for(let a of this.l)if(r in a)return this.A=a[r],Xt(k(a[r]),a);let s=this.ze;if(s&&r in s)return this.A=s[r],Xt(k(s[r]),s)}5(e,n,o){return this.l[0]}0(e,n,o){return this.Ye(n,o,Jo,...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,Xt(k(a),r)}4(e,n,o){return e.value}6(e,n,o){let r=(a,...i)=>q(a)?a(...Yo(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,qs[e.operator],e.argument)}8(e,n,o){let r=Fs[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,Jo,...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,Dn(l,o)),u=l=>this.Ze(i,e.value,n,Dn(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=k(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?zs:Ks;if(r.type===2){let i=r.name,c=this.Xe(i,o);return fe(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(fe(i))return;let c=this.b(e.right,n,o);return Qo[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 Qo[s](a,i,c)}}14(e,n,o){let r=this.b(e.argument,n,o);return v(r)&&(r.s=Zo),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=k(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}=yn(()=>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,Dn(u,n)):this.b(i,e,n)));return o(...a)}},Zo=Symbol("s"),Xo=t=>t?.s===Zo,er=(t,e,n,o,r,s,a)=>new Un(e,n,o,r,a).eval(t,s);var tr={},nr=t=>!!t,Yt=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(nr).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(nr).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(B(e))return f;let h=this.o.globalContext,m=[],d=new Set,b=(E,w,_,J)=>{try{let I=er(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){H(6,`evaluation error: ${e}`,I)}return{value:void 0,refs:[]}};try{let E=tr[e]??Go("["+e+"]");tr[e]=E;let w=this.l.slice(),_=E.elements,J=_.length,I=new Array(J);f.refs=I;let X=()=>{m.length=0,s||(d.clear(),u());let oe=new Array(J);for(let N=0;N<J;++N){let le=_[N];if(n?.(N,-1)){oe[N]=V=>b(le,w,!1,{$event:V}).value;continue}let x=b(le,w,!0);oe[N]=x.value,I[N]=x.ref}if(!s)for(let N of m)d.has(N)||(d.add(N),i.push(re(N,X)));if(a=oe,c.size!==0)for(let N of c)c.has(N)&&N(a)};X()}catch(E){H(6,`parse error: ${e}`,E)}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 or=t=>{let e=t.charCodeAt(0);return e>=48&&e<=57||e>=65&&e<=90||e>=97&&e<=122||t==="-"||t==="_"||t===":"},Ws=(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},Gs=(t,e)=>{let n=e?2:1;for(;n<t.length&&(t[n]===" "||t[n]===`
|
|
3
|
+
`);)++n;if(n>=t.length||!or(t[n]))return null;let o=n;for(;n<t.length&&or(t[n]);)++n;return{start:o,end:n}},rr=new Set(["table","thead","tbody","tfoot"]),Js=new Set(["thead","tbody","tfoot"]),Qs=new Set(["caption","colgroup","thead","tbody","tfoot","tr"]),Xs=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),sr=(t,e)=>`${t.slice(0,t.length-2)}></${e}>`,Zt=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=Ws(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=Gs(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),rr.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"):Js.has(h?.effectiveTag??"")?m=p==="tr"?null:"tr":h?.effectiveTag==="table"?m=Qs.has(p)?null:"tr":h?.effectiveTag==="tr"&&(m=p==="td"||p==="th"?null:"td");let d=f&&!Xs.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?sr(E,m):E)}else n.push(d?sr(i,p):i);if(!f){let b=m==="trx"?"tr":m==="tdx"?"td":m==="thx"?"th":m||p;o.push({replacementHost:m,effectiveTag:b}),rr.has(b)&&++r}e=a+1}return n.join("")};var Ys="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",Zs=new Set(Ys.toUpperCase().split(",")),ei="http://www.w3.org/2000/svg",ir=(t,e)=>{me(t)?t.content.appendChild(e):t.appendChild(e)},Hn=(t,e,n,o)=>{let r=t.t;if(r){let a=n&&Zs.has(r.toUpperCase())?document.createElementNS(ei,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)Hn(u,a,n,o);ir(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)ir(e,a);else throw new Error("unsupported node type.")}},et=(t,e,n)=>{n??=he.getDefault();let o=document.createDocumentFragment();if(!v(t))return Hn(t,o,!!e,n),o;for(let r of t)Hn(r,o,!!e,n);return o};var ti=(t,e={selector:"#app"},n)=>{z(e)&&(e={selector:"#app",template:e}),ro(t)&&(t=t.context);let o=e.element?e.element:e.selector?document.querySelector(e.selector):null;if(!o||!Ce(o))throw j(0);n||(n=he.getDefault());let r=()=>{for(let i of[...o.childNodes])G(i)},s=i=>{for(;i.length>0;)o.appendChild(i[0])};if(e.template){let i=document.createRange().createContextualFragment(Zt(e.template));r(),s(i.childNodes),e.element=i}else if(e.json){let i=et(e.json,e.isSVG,n);r(),s(i.childNodes)}return n.useInterpolation&&zt(o,n),new Bn(t,o,n).y(),K(o,()=>{Oe(t)}),Nt(t),{context:t,unmount:()=>{G(o)},unbind:()=>{Te(o)}}},Bn=class{Zt;nt;o;m;r;constructor(e,n,o){this.Zt=e,this.nt=n,this.o=o,this.m=new Yt([e],o),this.r=new $t(this.m)}y(){this.r.$(this.nt)}};var mt=t=>{if(v(t))return t.map(r=>mt(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=ve(t);return o.length>0&&(e.c=[...o].map(r=>mt(r))),e};var ni=(t,e={})=>{v(e)&&(e={props:e}),z(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 j(1,t.selector);s.remove(),t.element=s}else if(t.template){let s=document.createRange().createContextualFragment(Zt(t.template));t.element=s}else t.json&&(t.element=et(t.json,t.isSVG,e.config),o=!0);t.element||(t.element=document.createDocumentFragment()),(e.useInterpolation??!0)&&zt(t.element,e.config??he.getDefault());let r=t.element;if(!o&&((t.isSVG??(it(r)&&r.hasAttribute?.("isSVG")))||it(r)&&r.querySelector("[isSVG]"))){let s=r.content,a=s?[...s.childNodes]:[...r.childNodes],i=mt(a);t.element=et(i,!0,e.config)}return{context:n,template:t.element,inheritAttrs:e.inheritAttrs??!0,props:e.props,defaultName:e.defaultName}};var jn=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 oi=t=>{De()?.onMounted.push(t)};var ri=t=>{let e,n={},o=(...r)=>{if(r.length<=2&&0 in r)throw j(4);return e&&!n.isStopped?e(...r):(e=si(t,n),e(...r))};return o[Y]=1,Ve(o,!0),o.stop=()=>n.ref?.stop?.(),ne(()=>o.stop(),!0),o},si=(t,e)=>{let n=e.ref??ae(null);e.ref=n,e.isStopped=!1;let o=0,r=Je(()=>{if(o>0){r(),e.isStopped=!0,Z(n);return}n(t()),++o});return n.stop=r,n};var ii=(t,e)=>{let n={},o,r=(...s)=>{if(s.length<=2&&0 in s)throw j(4);return o&&!n.isStopped?o(...s):(o=ai(t,e,n),o(...s))};return r[Y]=1,Ve(r,!0),r.stop=()=>n.ref?.stop?.(),ne(()=>r.stop(),!0),r},ai=(t,e,n)=>{let o=n.ref??ae(null);n.ref=o,n.isStopped=!1;let r=0,s=i=>{if(r>0){o.stop(),n.isStopped=!0,Z(o);return}let c=t.map(u=>u());o(e(...c)),++r},a=[];for(let i of t){let c=re(i,s);a.push(c)}return s(null),o.stop=()=>{a.forEach(i=>{i()})},o};var ci=(t,e)=>{let n={},o,r=(...s)=>{if(s.length<=2&&0 in s)throw j(4);return o&&!n.isStopped?o(...s):(o=ui(t,e,n),o(...s))};return r[Y]=1,Ve(r,!0),r.stop=()=>n.ref?.stop?.(),ne(()=>r.stop(),!0),r},ui=(t,e,n)=>{let o=n.ref??ae(null);n.ref=o,n.isStopped=!1;let r=0;return o.stop=re(t,s=>{if(r>0){o.stop(),n.isStopped=!0,Z(o);return}o(e(s)),++r},!0),o};var li=t=>(t[xt]=1,t);var pi=(t,e)=>{if(!e)throw j(5);let o=Ge(t)?Re:i=>i,r=()=>localStorage.setItem(e,JSON.stringify(ce(t()))),s=localStorage.getItem(e);if(s!=null)try{t(o(JSON.parse(s)))}catch(i){H(6,`persist: failed to parse data for key ${e}`,i),r()}else r();let a=Je(r);return ne(a,!0),t};var $n=(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},fi=$n,mi=$n;var di=(t,e,n)=>{let o=[],r=()=>{e(t.map(a=>a()))};for(let a of t)o.push(re(a,r));n&&r();let s=()=>{for(let a of o)a()};return ne(s,!0),s};var hi=t=>{if(!T(t))throw j(3,"observerCount");return t(void 0,void 0,2)};var yi=t=>{ar();try{t()}finally{cr()}},ar=()=>{be.stack||(be.stack=[]),be.stack.push(new Set)},cr=()=>{let t=be.stack;if(!t||t.length===0)return;let e=t.pop();if(t.length){let n=t[t.length-1];for(let o of e)n.add(o);return}delete be.stack;for(let n of e)try{Z(n)}catch(o){console.error(o)}};export{ot as ComponentHead,jn as ContextRegistry,he as RegorConfig,K as addUnbinder,yi as batch,yn as collectRefs,ii as computeMany,ci as computeRef,ri as computed,ti as createApp,ni as defineComponent,lr as drainUnbind,cr as endBatch,ct as entangle,ce as flatten,Ue as getBindData,$n as html,Ge as isDeepRef,ut as isRaw,T as isRef,li as markRaw,re as observe,di as observeMany,hi as observerCount,oi as onMounted,ne as onUnmounted,En as pause,pi as persist,kr as pval,fi as raw,Re as ref,G as removeNode,vn as resume,hn as silence,ae as sref,ar as startBatch,mi as svg,et as toFragment,mt as toJsonTemplate,Z as trigger,Te as unbind,k as unref,mn as useScope,Fe as warningHandler,Je as watchEffect};
|
|
@@ -1690,7 +1690,9 @@ var Regor = (() => {
|
|
|
1690
1690
|
const contextAliasName = binder.__config.__builtInNames.contextAlias;
|
|
1691
1691
|
const bindName = binder.__config.__builtInNames.bind;
|
|
1692
1692
|
const definedProps = registeredComponent.props?.map(camelize) ?? [];
|
|
1693
|
-
const
|
|
1693
|
+
const inheritedPropAttrs = [];
|
|
1694
|
+
const isInheritableSpecialProp = (propName) => propName === "class" || propName === "style";
|
|
1695
|
+
const getProps = (component2, capturedContext2, collectInheritedPropAttrs = false) => {
|
|
1694
1696
|
const props = {};
|
|
1695
1697
|
const hasContext = component2.hasAttribute(contextName);
|
|
1696
1698
|
parser.__scoped(capturedContext2, () => {
|
|
@@ -1713,7 +1715,11 @@ var Regor = (() => {
|
|
|
1713
1715
|
]) {
|
|
1714
1716
|
const value = component2.getAttribute(name);
|
|
1715
1717
|
if (value === null) continue;
|
|
1716
|
-
|
|
1718
|
+
const propName = camelize(name);
|
|
1719
|
+
props[propName] = value;
|
|
1720
|
+
if (collectInheritedPropAttrs && registeredComponent.inheritAttrs === true && isInheritableSpecialProp(propName)) {
|
|
1721
|
+
inheritedPropAttrs.push({ name, value });
|
|
1722
|
+
}
|
|
1717
1723
|
component2.removeAttribute(name);
|
|
1718
1724
|
}
|
|
1719
1725
|
const map = binder.__directiveCollector.__collect(component2, false);
|
|
@@ -1725,6 +1731,11 @@ var Regor = (() => {
|
|
|
1725
1731
|
);
|
|
1726
1732
|
if (!propName) continue;
|
|
1727
1733
|
if (name !== "." && name !== ":" && name !== bindName) continue;
|
|
1734
|
+
if (collectInheritedPropAttrs && name !== "." && registeredComponent.inheritAttrs === true && isInheritableSpecialProp(propName)) {
|
|
1735
|
+
const value = component2.getAttribute(attrName);
|
|
1736
|
+
if (value !== null)
|
|
1737
|
+
inheritedPropAttrs.push({ name: attrName, value });
|
|
1738
|
+
}
|
|
1728
1739
|
binder.__bind(
|
|
1729
1740
|
singlePropDirective,
|
|
1730
1741
|
component2,
|
|
@@ -1739,7 +1750,7 @@ var Regor = (() => {
|
|
|
1739
1750
|
};
|
|
1740
1751
|
const capturedContext = [...parser.__capture()];
|
|
1741
1752
|
const createComponentCtx = () => {
|
|
1742
|
-
const props = getProps(component, capturedContext);
|
|
1753
|
+
const props = getProps(component, capturedContext, true);
|
|
1743
1754
|
const head2 = new ComponentHead(
|
|
1744
1755
|
props,
|
|
1745
1756
|
component,
|
|
@@ -1897,25 +1908,47 @@ var Regor = (() => {
|
|
|
1897
1908
|
);
|
|
1898
1909
|
const inheritor = inheritorChildNodes[0];
|
|
1899
1910
|
if (!inheritor) return;
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
|
|
1903
|
-
const
|
|
1911
|
+
const bindClassName = `${bindName}:class`;
|
|
1912
|
+
const bindStyleName = `${bindName}:style`;
|
|
1913
|
+
const mergeBinding = (shortName, longName, value) => {
|
|
1914
|
+
const existingAttr = inheritor.hasAttribute(shortName) ? shortName : inheritor.hasAttribute(longName) ? longName : shortName;
|
|
1915
|
+
const existingValue = inheritor.getAttribute(existingAttr);
|
|
1916
|
+
inheritor.setAttribute(
|
|
1917
|
+
existingAttr,
|
|
1918
|
+
isNullOrWhitespace(existingValue) ? value : `${existingValue}, ${value}`
|
|
1919
|
+
);
|
|
1920
|
+
};
|
|
1921
|
+
const transferAttribute = (attrName, value) => {
|
|
1904
1922
|
if (attrName === "class") {
|
|
1905
1923
|
const classTokens = toClassTokens(value);
|
|
1906
1924
|
if (classTokens.length > 0) inheritor.classList.add(...classTokens);
|
|
1925
|
+
} else if (attrName === ":class" || attrName === bindClassName) {
|
|
1926
|
+
mergeBinding(":class", bindClassName, value);
|
|
1907
1927
|
} else if (attrName === "style") {
|
|
1908
1928
|
const inheritorStyle = inheritor.style;
|
|
1909
1929
|
const componentStyle = component.style;
|
|
1910
1930
|
for (const s of componentStyle) {
|
|
1911
1931
|
inheritorStyle.setProperty(s, componentStyle.getPropertyValue(s));
|
|
1912
1932
|
}
|
|
1933
|
+
} else if (attrName === ":style" || attrName === bindStyleName) {
|
|
1934
|
+
mergeBinding(":style", bindStyleName, value);
|
|
1913
1935
|
} else {
|
|
1914
1936
|
inheritor.setAttribute(
|
|
1915
1937
|
normalizeAttributeName(attrName, binder.__config),
|
|
1916
1938
|
value
|
|
1917
1939
|
);
|
|
1918
1940
|
}
|
|
1941
|
+
};
|
|
1942
|
+
for (const { name, value } of inheritedPropAttrs) {
|
|
1943
|
+
component.setAttribute(name, value);
|
|
1944
|
+
}
|
|
1945
|
+
for (const attrName of component.getAttributeNames()) {
|
|
1946
|
+
if (attrName === contextName || attrName === contextAliasName)
|
|
1947
|
+
continue;
|
|
1948
|
+
transferAttribute(
|
|
1949
|
+
attrName,
|
|
1950
|
+
component.getAttribute(attrName)
|
|
1951
|
+
);
|
|
1919
1952
|
}
|
|
1920
1953
|
};
|
|
1921
1954
|
const clearUnusedAttributes = () => {
|