regor 1.1.7 → 1.1.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/regor.d.ts +3 -4
- package/dist/regor.es2015.cjs.js +36 -15
- package/dist/regor.es2015.cjs.prod.js +3 -3
- package/dist/regor.es2015.esm.js +36 -15
- package/dist/regor.es2015.esm.prod.js +3 -3
- package/dist/regor.es2015.iife.js +36 -15
- package/dist/regor.es2015.iife.prod.js +3 -3
- package/dist/regor.es2019.cjs.js +36 -15
- package/dist/regor.es2019.cjs.prod.js +3 -3
- package/dist/regor.es2019.esm.js +36 -15
- package/dist/regor.es2019.esm.prod.js +3 -3
- package/dist/regor.es2019.iife.js +36 -15
- package/dist/regor.es2019.iife.prod.js +3 -3
- package/dist/regor.es2022.cjs.js +31 -13
- package/dist/regor.es2022.cjs.prod.js +3 -3
- package/dist/regor.es2022.esm.js +31 -13
- package/dist/regor.es2022.esm.prod.js +3 -3
- package/dist/regor.es2022.iife.js +31 -13
- package/dist/regor.es2022.iife.prod.js +3 -3
- package/package.json +1 -1
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
"use strict";var ct=Object.defineProperty;var Xr=Object.getOwnPropertyDescriptor;var Yr=Object.getOwnPropertyNames;var Zr=Object.prototype.hasOwnProperty;var eo=(t,e,n)=>e in t?ct(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var to=(t,e)=>{for(var n in e)ct(t,n,{get:e[n],enumerable:!0})},no=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of Yr(e))!Zr.call(t,o)&&o!==n&&ct(t,o,{get:()=>e[o],enumerable:!(r=Xr(e,o))||r.enumerable});return t};var ro=t=>no(ct({},"__esModule",{value:!0}),t);var m=(t,e,n)=>eo(t,typeof e!="symbol"?e+"":e,n);var gs={};to(gs,{ComponentHead:()=>Fe,RegorConfig:()=>Z,addUnbinder:()=>_,batch:()=>Jr,collectRefs:()=>bt,computeMany:()=>$r,computeRef:()=>Fr,computed:()=>Vr,createApp:()=>Pr,createComponent:()=>jr,endBatch:()=>wn,entangle:()=>wt,flatten:()=>X,getBindData:()=>ge,html:()=>vn,isDeepRef:()=>Ie,isRaw:()=>Ve,isRef:()=>h,markRaw:()=>qr,observe:()=>w,observeMany:()=>Wr,observerCount:()=>Gr,onMounted:()=>Qr,onUnmounted:()=>J,pause:()=>$t,persist:()=>zr,raw:()=>Kr,ref:()=>xe,removeNode:()=>F,resume:()=>Ft,silence:()=>gt,sref:()=>G,startBatch:()=>Sn,toFragment:()=>De,toJsonTemplate:()=>Je,trigger:()=>K,unbind:()=>ae,unref:()=>D,useScope:()=>St,warningHandler:()=>tt,watchEffect:()=>Le});module.exports=ro(gs);var P=t=>typeof t=="function",j=t=>typeof t=="string",On=t=>typeof t=="undefined",te=t=>t==null||typeof t=="undefined",z=t=>typeof t!="string"||!(t!=null&&t.trim()),oo=Object.prototype.toString,Wt=t=>oo.call(t),he=t=>Wt(t)==="[object Map]",Y=t=>Wt(t)==="[object Set]",Gt=t=>Wt(t)==="[object Date]",et=t=>typeof t=="symbol",T=Array.isArray,A=t=>t!==null&&typeof t=="object";var An={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."},I=(t,...e)=>{let n=An[t];return new Error(P(n)?n.call(An,...e):n)};var He=Symbol(":regor");var ge=t=>{let e=t[He];if(e)return e;let n={unbinders:[],data:{}};return t[He]=n,n};var _=(t,e)=>{ge(t).unbinders.push(e)};var pt=[],Nn=()=>{let t={onMounted:[],onUnmounted:[]};return pt.push(t),t},Ae=t=>{let e=pt[pt.length-1];if(!e&&!t)throw I(2);return e},Mn=t=>{let e=Ae();return t&&Qt(t),pt.pop(),e},Jt=Symbol("csp"),Qt=t=>{let e=t,n=e[Jt];if(n){let r=Ae();if(n===r)return;r.onMounted.length>0&&n.onMounted.push(...r.onMounted),r.onUnmounted.length>0&&n.onUnmounted.push(...r.onUnmounted);return}e[Jt]=Ae()},ft=t=>t[Jt];var J=(t,e)=>{var n;(n=Ae(e))==null||n.onUnmounted.push(t)};var lt=Symbol("ref"),Q=Symbol("sref"),mt=Symbol("raw");var h=t=>(t==null?void 0:t[Q])===1;var w=(t,e,n)=>{if(!h(t))throw I(3,"observe");n&&e(t());let o=t(void 0,void 0,0,e);return J(o,!0),o};var ae=t=>{let e=[t];for(;e.length>0;){let n=e.shift();so(n);let r=n.childNodes;if(r)for(let o of r)e.push(o)}},so=t=>{let e=t[He];if(e){for(let n of e.unbinders)n();e.unbinders.splice(0),delete t[He]}};var F=t=>{t.remove(),setTimeout(()=>ae(t),1)};var Ln={8:t=>`Model binding requires a ref at ${t.outerHTML}`,7:t=>`Model binding is not supported on ${t.tagName} element at ${t.outerHTML}`,0:(t,e)=>`${t} binding expression is missing at ${e.outerHTML}`,1:(t,e,n)=>`invalid ${t} expression: ${e} at ${n.outerHTML}`,2:(t,e)=>`${t} requires object expression at ${e.outerHTML}`,3:(t,e)=>`${t} binder: key is empty on ${e.outerHTML}.`,4:(t,e,n,r)=>({msg:`Failed setting prop "${t}" on <${e.toLowerCase()}>: value ${n} is invalid.`,args:[r]}),5:(t,e)=>`${t} binding missing event type at ${e.outerHTML}`,6:(t,e)=>({msg:t,args:[e]})},M=(t,...e)=>{let n=Ln[t],r=P(n)?n.call(Ln,...e):n,o=tt.warning;o&&(j(r)?o(r):o(r,...r.args))},tt={warning:console.warn};var dt={},ut={},kn=1,In=t=>{let e=(kn++).toString();return dt[e]=t,ut[e]=0,e},Xt=t=>{ut[t]+=1},Yt=t=>{--ut[t]===0&&(delete dt[t],delete ut[t])},Dn=t=>dt[t],Zt=()=>kn!==1&&Object.keys(dt).length>0,nt="r-switch",io=t=>{let e=t.filter(r=>Ne(r)).map(r=>[...r.querySelectorAll("[r-switch]")].map(o=>o.getAttribute(nt))),n=new Set;return e.forEach(r=>{r.forEach(o=>o&&n.add(o))}),[...n]},_e=(t,e)=>{if(!Zt())return;let n=io(e);n.length!==0&&(n.forEach(Xt),_(t,()=>{n.forEach(Yt)}))};var en=(t,e,n,r)=>{let o=[];for(let s of t){let i=s.cloneNode(!0);n.insertBefore(i,r),o.push(i)}Te(e,o)},tn=Symbol("r-if"),Un=Symbol("r-else"),Hn=t=>t[Un]===1,yt=class{constructor(e){m(this,"p");m(this,"P");m(this,"q");m(this,"K");m(this,"z");m(this,"b");m(this,"T");this.p=e,this.P=e.o.f.if,this.q=Pe(e.o.f.if),this.K=e.o.f.else,this.z=e.o.f.elseif,this.b=e.o.f.for,this.T=e.o.f.pre}qe(e,n){let r=e.parentElement;for(;r!==null&&r!==document.documentElement;){if(r.hasAttribute(n))return!0;r=r.parentElement}return!1}N(e){let n=e.hasAttribute(this.P),r=be(e,this.q);for(let o of r)this.x(o);return n}W(e){return e[tn]?!0:(e[tn]=!0,be(e,this.q).forEach(n=>n[tn]=!0),!1)}x(e){if(e.hasAttribute(this.T)||this.W(e)||this.qe(e,this.b))return;let n=e.getAttribute(this.P);if(!n){M(0,this.P,e);return}e.removeAttribute(this.P),this.k(e,n)}B(e,n,r){let o=Be(e),s=e.parentNode,i=document.createComment(`__begin__ :${n}${r!=null?r:""}`);s.insertBefore(i,e),_e(i,o),o.forEach(c=>{F(c)}),e.remove(),n!=="if"&&(e[Un]=1);let a=document.createComment(`__end__ :${n}${r!=null?r:""}`);return s.insertBefore(a,i.nextSibling),{nodes:o,parent:s,commentBegin:i,commentEnd:a}}pe(e,n){if(!e)return[];let r=e.nextElementSibling;if(e.hasAttribute(this.K)){e.removeAttribute(this.K);let{nodes:o,parent:s,commentBegin:i,commentEnd:a}=this.B(e,"else");return[{mount:()=>{en(o,this.p,s,a)},unmount:()=>{le(i,a)},isTrue:()=>!0,isMounted:!1}]}else{let o=e.getAttribute(this.z);if(!o)return[];e.removeAttribute(this.z);let{nodes:s,parent:i,commentBegin:a,commentEnd:c}=this.B(e,"elseif",` => ${o} `),p=this.p.h.C(o),f=p.value,l=this.pe(r,n),u=[];_(a,()=>{p.stop();for(let R of u)R();u.length=0});let d=w(f,n);return u.push(d),[{mount:()=>{en(s,this.p,i,c)},unmount:()=>{le(a,c)},isTrue:()=>!!f()[0],isMounted:!1}].concat(l)}}k(e,n){let r=e.nextElementSibling,{nodes:o,parent:s,commentBegin:i,commentEnd:a}=this.B(e,"if",` => ${n} `),c=this.p.h.C(n),p=c.value,f=!1,l=this.p.h,u=l.V(),y=()=>{l.v(u,()=>{if(p()[0])f||(en(o,this.p,s,a),f=!0),d.forEach(b=>{b.unmount(),b.isMounted=!1});else{le(i,a),f=!1;let b=!1;for(let L of d)!b&&L.isTrue()?(L.isMounted||(L.mount(),L.isMounted=!0),b=!0):(L.unmount(),L.isMounted=!1)}})},d=this.pe(r,y),R=[];_(i,()=>{c.stop();for(let b of R)b();R.length=0}),y();let E=w(p,y);R.push(E)}};var Be=t=>{let e=ce(t)?t.content.childNodes:[t];return Array.from(e).filter(n=>{let r=n==null?void 0:n.tagName;return r!=="SCRIPT"&&r!=="STYLE"})},Te=(t,e)=>{for(let n of e)!Hn(n)&&t.G(n)},be=(t,e)=>{var r;let n=t.querySelectorAll(e);return(r=t.matches)!=null&&r.call(t,e)?[t,...n]:n},ce=t=>t instanceof HTMLTemplateElement,Ne=t=>t.nodeType===Node.ELEMENT_NODE,rt=t=>t.nodeType===Node.ELEMENT_NODE,_n=t=>t instanceof HTMLSlotElement,me=t=>ce(t)?t.content.childNodes:t.childNodes,le=(t,e)=>{let n=t.nextSibling;for(;n!=null&&n!==e;){let r=n.nextSibling;F(n),n=r}},Ee=(t,e)=>{Object.defineProperty(t,"value",{get(){return t()},set(n){if(e)throw new Error("value is readonly.");return t(n)},enumerable:!0,configurable:!1})},Bn=(t,e)=>{if(!t)return!1;if(t.startsWith("["))return t.substring(1,t.length-1);let n=e.length;return t.startsWith(e)?t.substring(n,t.length-n):!1},Pe=t=>`[${CSS.escape(t)}]`,ht=(t,e)=>(t.startsWith("@")&&(t=e.f.on+":"+t.slice(1)),t.includes("[")&&(t=t.replace(/[[\]]/g,e.f.dynamic)),t),nn=t=>{let e=Object.create(null);return n=>e[n]||(e[n]=t(n))},ao=/-(\w)/g,V=nn(t=>t&&t.replace(ao,(e,n)=>n?n.toUpperCase():"")),co=/\B([A-Z])/g,je=nn(t=>t&&t.replace(co,"-$1").toLowerCase()),ot=nn(t=>t&&t.charAt(0).toUpperCase()+t.slice(1));var ne=[],Pn=t=>{var e;ne.length!==0&&((e=ne[ne.length-1])==null||e.add(t))},Le=t=>{if(!t)return()=>{};let e={stop:()=>{}};return po(t,e),J(()=>e.stop(),!0),e.stop},po=(t,e)=>{if(!t)return;let n=[],r=!1,o=()=>{for(let s of n)s();n=[],r=!0};e.stop=o;try{let s=new Set;if(ne.push(s),t(i=>n.push(i)),r)return;for(let i of[...s]){let a=w(i,()=>{o(),Le(t)});n.push(a)}}finally{ne.pop()}},gt=t=>{let e=ne.length,n=e>0&&ne[e-1];try{return n&&ne.push(null),t()}finally{n&&ne.pop()}},bt=t=>{try{let e=new Set;return ne.push(e),{value:t(),refs:[...e]}}finally{ne.pop()}};var Ve=t=>!!t&&t[mt]===1;var K=(t,e,n)=>{if(!h(t))return;let r=t;if(r(void 0,e,1),!n)return;let o=r();if(o){if(T(o)||Y(o))for(let s of o)K(s,e,!0);else if(he(o))for(let s of o)K(s[0],e,!0),K(s[1],e,!0);if(A(o))for(let s in o)K(o[s],e,!0)}};function fo(t,e,n){Object.defineProperty(t,e,{value:n,enumerable:!1,writable:!0,configurable:!0})}var $e=(t,e,n)=>{n.forEach(function(r){let o=t[r];fo(e,r,function(...i){let a=o.apply(this,i),c=this[Q];for(let p of c)K(p);return a})})},Tt=(t,e)=>{Object.defineProperty(t,Symbol.toStringTag,{value:e,writable:!1,enumerable:!1,configurable:!0})};var jn=Array.prototype,rn=Object.create(jn),lo=["push","pop","shift","unshift","splice","sort","reverse"];$e(jn,rn,lo);var Vn=Map.prototype,Et=Object.create(Vn),mo=["set","clear","delete"];Tt(Et,"Map");$e(Vn,Et,mo);var $n=Set.prototype,Ct=Object.create($n),uo=["add","clear","delete"];Tt(Ct,"Set");$e($n,Ct,uo);var pe={},G=t=>{if(h(t)||Ve(t))return t;let e={auto:!0,_value:t},n=c=>A(c)?Q in c?!0:T(c)?(Object.setPrototypeOf(c,rn),!0):Y(c)?(Object.setPrototypeOf(c,Ct),!0):he(c)?(Object.setPrototypeOf(c,Et),!0):!1:!1,r=n(t),o=new Set,s=(c,p)=>{if(pe.stack&&pe.stack.length){pe.stack[pe.stack.length-1].add(a);return}o.size!==0&>(()=>{for(let f of[...o.keys()])o.has(f)&&f(c,p)})},i=c=>{let p=c[Q];p||(c[Q]=p=new Set),p.add(a)},a=(...c)=>{if(!(2 in c)){let f=c[0],l=c[1];return 0 in c?e._value===f||h(f)&&(f=f(),e._value===f)?f:(n(f)&&i(f),e._value=f,e.auto&&s(f,l),e._value):(Pn(a),e._value)}switch(c[2]){case 0:{let f=c[3];if(!f)return()=>{};let l=u=>{o.delete(u)};return o.add(f),()=>{l(f)}}case 1:{let f=c[1],l=e._value;s(l,f);break}case 2:return o.size;case 3:{e.auto=!1;break}case 4:e.auto=!0}return e._value};return a[Q]=1,Ee(a,!1),r&&i(t),a};var D=t=>h(t)?t():t;var st=class{constructor(e){m(this,"E",[]);m(this,"_",new Map);m(this,"J");this.J=e}get S(){return this.E.length}Q(e){let n=this.J(e.value);n!==void 0&&this._.set(n,e)}X(e){var r;let n=this.J((r=this.E[e])==null?void 0:r.value);n!==void 0&&this._.delete(n)}static Ke(e,n){return{items:[],index:e,value:n,order:-1}}w(e){e.order=this.S,this.E.push(e),this.Q(e)}ze(e,n){let r=this.S;for(let o=e;o<r;++o)this.E[o].order=o+1;n.order=e,this.E.splice(e,0,n),this.Q(n)}I(e){return this.E[e]}Y(e,n){this.X(e),this.E[e]=n,this.Q(n),n.order=e}ce(e){this.X(e),this.E.splice(e,1);let n=this.S;for(let r=e;r<n;++r)this.E[r].order=r}fe(e){let n=this.S;for(let r=e;r<n;++r)this.X(r);this.E.splice(e)}Ct(e){return this._.has(e)}We(e){var r;let n=this._.get(e);return(r=n==null?void 0:n.order)!=null?r:-1}};var on=Symbol("r-for"),xt=class xt{constructor(e){m(this,"p");m(this,"b");m(this,"Z");m(this,"T");this.p=e,this.b=e.o.f.for,this.Z=Pe(this.b),this.T=e.o.f.pre}N(e){let n=e.hasAttribute(this.b),r=be(e,this.Z);for(let o of r)this.Ge(o);return n}W(e){return e[on]?!0:(e[on]=!0,be(e,this.Z).forEach(n=>n[on]=!0),!1)}Ge(e){if(e.hasAttribute(this.T)||this.W(e))return;let n=e.getAttribute(this.b);if(!n){M(0,this.b,e);return}e.removeAttribute(this.b),this.Je(e,n)}le(e){return te(e)?[]:(P(e)&&(e=e()),Symbol.iterator in Object(e)?e:typeof e=="number"?(r=>({*[Symbol.iterator](){for(let o=1;o<=r;o++)yield o}}))(e):Object.entries(e))}Je(e,n){var oe;let r=this.Qe(n);if(!(r!=null&&r.list)){M(1,this.b,n,e);return}let o=this.p.o.f.key,s=this.p.o.f.keyBind,i=(oe=e.getAttribute(o))!=null?oe:e.getAttribute(s);e.removeAttribute(o),e.removeAttribute(s);let a=i?v=>{var N;return D((N=D(v))==null?void 0:N[i])}:v=>v,c=(v,N)=>a(v)===a(N),p=Be(e),f=e.parentNode;if(!f)return;let l=`${this.b} => ${n}`,u=new Comment(`__begin__ ${l}`);f.insertBefore(u,e),_e(u,p),p.forEach(v=>{F(v)}),e.remove();let y=new Comment(`__end__ ${l}`);f.insertBefore(y,u.nextSibling);let d=this.p,R=d.h,U=R.V(),E=(v,N,q)=>{let S=r.createContext(N,v),ee=st.Ke(S.index,N);return R.v(U,()=>{R.w(S.ctx);let se=q.previousSibling,Ue=[];for(let Ze of p){let g=Ze.cloneNode(!0);f.insertBefore(g,q),Ue.push(g)}for(Te(d,Ue),se=se.nextSibling;se!==q;)ee.items.push(se),se=se.nextSibling}),ee},b=(v,N)=>{let q=k.I(v).items,S=q[q.length-1].nextSibling;for(let ee of q)F(ee);k.Y(v,E(v,N,S))},L=(v,N)=>{k.w(E(v,N,y))},H=v=>{for(let N of k.I(v).items)F(N)},re=v=>{let N=k.S;for(let q=v;q<N;++q)k.I(q).index(q)},Qe=v=>{let N=k.S;P(v)&&(v=v());let q=D(v[0]);if(T(q)&&q.length===0){le(u,y),k.fe(0);return}let S=0,ee=Number.MAX_SAFE_INTEGER,se=N,Ue=this.p.o.forGrowThreshold,Ze=()=>k.S<se+Ue;for(let O of this.le(v[0])){let C=()=>{if(S<N){let W=k.I(S++);if(c(W.value,O))return;let $=k.We(a(O));if($>=S&&$-S<10){if(--S,ee=Math.min(ee,S),H(S),k.ce(S),--N,$>S+1)for(let x=S;x<$-1&&x<N&&!c(k.I(S).value,O);)++x,H(S),k.ce(S),--N;C();return}Ze()?(k.ze(S-1,E(S,O,k.I(S-1).items[0])),ee=Math.min(ee,S-1),++N):b(S-1,O)}else L(S++,O)};C()}let g=S;for(N=k.S;S<N;)H(S++);k.fe(g),re(ee)},Xe=()=>{at=w(ye,Qe)},zt=()=>{Ye.stop(),at()},Ye=R.C(r.list),ye=Ye.value,at,Se=0,k=new st(a);for(let v of this.le(ye()[0]))k.w(E(Se++,v,y));_(u,zt),Xe()}Qe(e){var c,p;let n=xt.Xe.exec(e);if(!n)return;let r=(n[1]+((c=n[2])!=null?c:"")).split(",").map(f=>f.trim()),o=r.length>1?r.length-1:-1,s=o!==-1&&(r[o]==="index"||(p=r[o])!=null&&p.startsWith("#"))?r[o]:"";s&&r.splice(o,1);let i=n[3];if(!i||r.length===0)return;let a=/[{[]/.test(e);return{list:i,createContext:(f,l)=>{let u={},y=D(f);if(!a&&r.length===1)u[r[0]]=f;else if(T(y)){let R=0;for(let U of r)u[U]=y[R++]}else for(let R of r)u[R]=y[R];let d={ctx:u,index:G(-1)};return s&&(d.index=u[s.startsWith("#")?s.substring(1):s]=G(l)),d}}}};m(xt,"Xe",/\{?\[?\(?([^)}\]]+)\)?\]?\}?([^)]+)?\s+\b(?:in|of)\b\s+(.*)\s*$/);var Rt=xt;var yo=(t,e)=>{for(let n of t){let r=n.cloneNode(!0);e.appendChild(r)}},vt=class{constructor(e){m(this,"p");m(this,"D");m(this,"ue");this.p=e,this.D=e.o.f.is,this.ue=Pe(this.D)+", [is]"}N(e){let n=e.hasAttribute(this.D),r=be(e,this.ue);for(let o of r)this.x(o);return n}x(e){let n=e.getAttribute(this.D);if(!n){if(n=e.getAttribute("is"),!n||!n.startsWith("regor:"))return;n=`'${n.slice(6)}'`,e.removeAttribute("is")}e.removeAttribute(this.D),this.k(e,n)}B(e,n){let r=Be(e),o=e.parentNode,s=document.createComment(`__begin__ dynamic ${n!=null?n:""}`);o.insertBefore(s,e),_e(s,r),r.forEach(a=>{F(a)}),e.remove();let i=document.createComment(`__end__ dynamic ${n!=null?n:""}`);return o.insertBefore(i,s.nextSibling),{nodes:r,parent:o,commentBegin:s,commentEnd:i}}k(e,n){let{nodes:r,parent:o,commentBegin:s,commentEnd:i}=this.B(e,` => ${n} `),a=this.p.h.C(n),c=a.value,p=this.p.h,f=p.V(),l={name:""},u=ce(e)?r:[...r[0].childNodes],y=()=>{p.v(f,()=>{var L;let E=c()[0];if(A(E)&&(E.name?E=E.name:E=(L=Object.entries(p.me()).filter(H=>H[1]===E)[0])==null?void 0:L[0]),!j(E)||z(E)){le(s,i);return}if(l.name===E)return;le(s,i);let b=document.createElement(E);for(let H of e.getAttributeNames())H!==this.D&&b.setAttribute(H,e.getAttribute(H));yo(u,b),o.insertBefore(b,i),this.p.G(b),l.name=E})},d=[];_(s,()=>{a.stop();for(let E of d)E();d.length=0}),y();let U=w(c,y);d.push(U)}};var Fn={collectRefObj:!0,onBind:(t,e)=>w(e.value,()=>{let r=e.value(),o=e.context,s=r[0];if(A(s))for(let i of Object.entries(s)){let a=i[0],c=i[1],p=o[a];p!==c&&(h(p)?p(c):o[a]=c)}},!0)};var qn={collectRefObj:!0,once:!0,onBind:(t,e)=>{let n=e.value(),r=e.context,o=n[0];if(!A(o))return()=>{};for(let s of Object.entries(o)){let i=s[0],a=s[1],c=r[i];c!==a&&(h(c)?c(a):r[i]=a)}return()=>{}}};var Ce=t=>{var n,r;let e=(n=ft(t))==null?void 0:n.onUnmounted;e==null||e.forEach(o=>{o()}),(r=t.unmounted)==null||r.call(t)};var Fe=class{constructor(e,n,r,o,s){m(this,"props");m(this,"start");m(this,"end");m(this,"ctx");m(this,"autoProps",!0);m(this,"entangle",!0);m(this,"enableSwitch",!1);m(this,"onAutoPropsAssigned");m(this,"de");m(this,"emit",(e,n)=>{this.de.dispatchEvent(new CustomEvent(e,{detail:n}))});this.props=e,this.de=n,this.ctx=r,this.start=o,this.end=s}unmount(){let e=this.start.nextSibling,n=this.end;for(;e&&e!==n;)F(e),e=e.nextSibling;Ce(this)}};var sn=Symbol("scope"),St=t=>{try{Nn();let e=t();Qt(e);let n={context:e,unmount:()=>Ce(e),[sn]:1};return n[sn]=1,n}finally{Mn()}},zn=t=>A(t)?sn in t:!1;var wt=(t,e)=>{if(t===e)return()=>{};let n=w(t,o=>e(o)),r=w(e,o=>t(o));return e(t()),()=>{n(),r()}};var Ot=t=>{var n,r;let e=(n=ft(t))==null?void 0:n.onMounted;e==null||e.forEach(o=>{o()}),(r=t.mounted)==null||r.call(t)};var Kn={collectRefObj:!0,onBind:(t,e,n,r,o,s)=>{if(!r)return()=>{};let i=V(r);return w(e.value,()=>{var l;let c=(l=e.refs[0])!=null?l:e.value()[0],p=e.context,f=p[r];f!==c&&(h(f)?f(c):p[i]=c)},!0)}};var At=class{constructor(e){m(this,"p");m(this,"ye");this.p=e,this.ye=e.o.f.inherit}N(e){this.Ye(e)}Ye(e){var l;let n=this.p,r=n.h,o=n.o.he,s=n.o.ge,i=r.me(),a=r.Ze(),c=[...o.keys(),...a,...[...o.keys()].map(je),...a.map(je)].join(",");if(z(c))return;let p=e.querySelectorAll(c),f=(l=e.matches)!=null&&l.call(e,c)?[e,...p]:p;for(let u of f){if(u.hasAttribute(n.T))continue;let y=u.parentNode;if(!y)continue;let d=u.nextSibling,R=V(u.tagName).toUpperCase(),U=i[R],E=U!=null?U:s.get(R);if(!E)continue;let b=E.template;if(!b)continue;let L=u.parentElement;if(!L)continue;let H=new Comment(" begin component: "+u.tagName),re=new Comment(" end component: "+u.tagName);L.insertBefore(H,u),u.remove();let Qe=n.o.f.props,Xe=n.o.f.propsOnce,zt=n.o.f.bind,Ye=(g,O)=>{let C={},W=g.hasAttribute(Qe),$=g.hasAttribute(Xe);return r.v(O,()=>{r.w(C),W&&n.x(Fn,g,Qe),$&&n.x(qn,g,Xe);let x=E.props;if(!x||x.length===0)return;x=x.map(V);for(let we of x.concat(x.map(je))){let fe=g.getAttribute(we);fe!==null&&(C[V(we)]=fe,g.removeAttribute(we))}let B=n.ee.be(g,!1);for(let[we,fe]of B.entries()){let[Oe,Kt]=fe.te;Kt&&x.includes(V(Kt))&&(Oe!=="."&&Oe!==":"&&Oe!==zt||n.x(Kn,g,we,!0,Kt,fe.ne))}}),C},ye=[...r.V()],at=()=>{var W;let g=Ye(u,ye),O=new Fe(g,u,ye,H,re),C=St(()=>{var $;return($=E.context(O))!=null?$:{}}).context;if(O.autoProps){for(let[$,x]of Object.entries(g))if($ in C){let B=C[$];if(B===x)continue;O.entangle&&h(B)&&h(x)?_(H,wt(x,B)):h(B)?B(x):C[$]=D(x)}else C[$]=x;(W=O.onAutoPropsAssigned)==null||W.call(O)}return{componentCtx:C,head:O}},{componentCtx:Se,head:k}=at(),oe=[...me(b)],v=oe.length,N=u.childNodes.length===0,q=g=>{let O=g.parentElement;if(N){for(let x of[...g.childNodes])O.insertBefore(x,g);return}let C=g.name;z(C)&&(C=g.getAttributeNames().filter(x=>x.startsWith("#"))[0],z(C)?C="default":C=C.substring(1));let W=u.querySelector(`template[name='${C}'], template[\\#${C}]`);!W&&C==="default"&&(W=u.querySelector("template:not([name])"),W&&W.getAttributeNames().filter(x=>x.startsWith("#")).length>0&&(W=null));let $=x=>{k.enableSwitch&&r.v(ye,()=>{r.w(Se);let B=Ye(g,r.V());r.v(ye,()=>{r.w(B);let we=r.V(),fe=In(we);for(let Oe of x)Ne(Oe)&&(Oe.setAttribute(nt,fe),Xt(fe),_(Oe,()=>{Yt(fe)}))})})};if(W){let x=[...me(W)];for(let B of x)O.insertBefore(B,g);$(x)}else{if(C!=="default"){for(let B of[...me(g)])O.insertBefore(B,g);return}let x=[...me(u)].filter(B=>!ce(B));for(let B of x)O.insertBefore(B,g);$(x)}},S=g=>{if(!Ne(g))return;let O=g.querySelectorAll("slot");if(_n(g)){q(g),g.remove();return}for(let C of O)q(C),C.remove()};(()=>{for(let g=0;g<v;++g)oe[g]=oe[g].cloneNode(!0),y.insertBefore(oe[g],d),S(oe[g])})(),L.insertBefore(re,d);let se=()=>{if(!E.inheritAttrs)return;let g=oe.filter(C=>C.nodeType===Node.ELEMENT_NODE);g.length>1&&(g=g.filter(C=>C.hasAttribute(this.ye)));let O=g[0];if(O)for(let C of u.getAttributeNames()){if(C===Qe||C===Xe)continue;let W=u.getAttribute(C);if(C==="class")O.classList.add(...W.split(" "));else if(C==="style"){let $=O.style,x=u.style;for(let B of x)$.setProperty(B,x.getPropertyValue(B))}else O.setAttribute(ht(C,n.o),W)}},Ue=()=>{for(let g of u.getAttributeNames())!g.startsWith("@")&&!g.startsWith(n.o.f.on)&&u.removeAttribute(g)},Ze=()=>{se(),Ue(),r.w(Se),n.Te(u,!1),Se.$emit=k.emit,Te(n,oe),_(u,()=>{Ce(Se)}),_(H,()=>{ae(u)}),Ot(Se)};r.v(ye,Ze)}}};var an=class{constructor(e){m(this,"xe");m(this,"te",[]);m(this,"ne",[]);m(this,"Ee",[]);this.xe=e,this.C()}C(){let e=this.xe,n=e.startsWith(".");n&&(e=":"+e.slice(1));let r=e.indexOf("."),o=this.te=(r<0?e:e.substring(0,r)).split(/[:@]/);if(z(o[0])&&(o[0]=n?".":e[0]),r>=0){let s=this.ne=e.slice(r+1).split(".");if(s.includes("camel")){let i=o.length-1;o[i]=V(o[i])}s.includes("prop")&&(o[0]=".")}}},Nt=class{constructor(e){m(this,"p");m(this,"Re");this.p=e,this.Re=e.o.et()}be(e,n){let r=new Map;if(!rt(e))return r;let o=this.Re,s=a=>{let c=a.getAttributeNames().filter(p=>o.some(f=>p.startsWith(f)));for(let p of c)r.has(p)||r.set(p,new an(p)),r.get(p).Ee.push(a)};if(s(e),!n)return r;let i=e.querySelectorAll("*");for(let a of i)s(a);return r}};var Mt={};var Lt=class{constructor(e){m(this,"h");m(this,"Ce");m(this,"ve");m(this,"Se");m(this,"we");m(this,"ee");m(this,"o");m(this,"T");m(this,"Oe");this.h=e,this.o=e.o,this.ve=new Rt(this),this.Ce=new yt(this),this.Se=new vt(this),this.we=new At(this),this.ee=new Nt(this),this.T=this.o.f.pre,this.Oe=this.o.f.dynamic}tt(e){let n=ce(e)?[e]:e.querySelectorAll("template");for(let r of n){if(r.hasAttribute(this.T))continue;let o=r.parentNode;if(!o)continue;let s=r.nextSibling;if(r.remove(),!r.content)continue;let i=[...r.content.childNodes];for(let a of i)o.insertBefore(a,s);Te(this,i)}}G(e){e.nodeType!==Node.ELEMENT_NODE||e.hasAttribute(this.T)||this.Ce.N(e)||this.ve.N(e)||this.Se.N(e)||(this.we.N(e),this.tt(e),this.Te(e,!0))}Te(e,n){var s;let r=this.ee.be(e,n),o=this.o.H;for(let[i,a]of r.entries()){let[c,p]=a.te,f=(s=o[i])!=null?s:o[c];if(!f){console.error("directive not found:",c);continue}a.Ee.forEach(l=>{this.x(f,l,i,!1,p,a.ne)})}}x(e,n,r,o,s,i){if(n.hasAttribute(this.T))return;let a=n.getAttribute(r);n.removeAttribute(r);let c=p=>{let f=p.getAttribute(nt);return f||(p.parentElement?c(p.parentElement):null)};if(Zt()){let p=c(n);if(p){this.h.v(Dn(p),()=>{this.k(e,n,a,s,i)});return}}this.k(e,n,a,s,i)}nt(e,n,r){if(e!==Mt)return!1;if(z(r))return!0;let o=document.querySelector(r);if(o){let s=n.parentElement;if(!s)return!0;let i=new Comment(`teleported => '${r}'`);s.insertBefore(i,n),n.teleportedFrom=i,i.teleportedTo=n,_(i,()=>{F(n)}),o.appendChild(n)}return!0}k(e,n,r,o,s){var U;if(n.nodeType!==Node.ELEMENT_NODE||r==null||this.nt(e,n,r))return;let i=this.h.C(r,e.isLazy,e.isLazyKey,e.collectRefObj,e.once),a=[];_(n,()=>{i.stop(),f==null||f.stop();for(let E of a)E();a.length=0});let p=Bn(o,this.Oe),f;p&&(f=this.h.C(V(p),void 0,void 0,void 0,e.once));let l,u=()=>(l=i.value(),l),y,d=()=>f?(y=f.value()[0],y):(y=o,o),R=()=>{if(!e.onChange)return;let E=w(i.value,b=>{var re;let L=l,H=y;(re=e.onChange)==null||re.call(e,n,u(),L,d(),H,s)});if(a.push(E),f){let b=w(f.value,L=>{var re;let H=y;(re=e.onChange)==null||re.call(e,n,u(),H,d(),H,s)});a.push(b)}};e.once||R(),e.onBind&&a.push(e.onBind(n,i,r,o,f,s)),(U=e.onChange)==null||U.call(e,n,u(),void 0,d(),void 0,s)}};var ho=9,go=10,bo=13,To=32,Re=46,kt=44,Eo=39,Co=34,It=40,qe=41,Dt=91,Ut=93,cn=63,Ro=59,Wn=58,xo=123,Ht=125,fn=43,vo=45,Gn=96,Jn=47,So=92,Qn=[2,3],Xn=[fn,vo],rr={"-":1,"!":1,"~":1,"+":1,new:1},or={"=":2.5,"*=":2.5,"**=":2.5,"/=":2.5,"%=":2.5,"+=":2.5,"-=":2.5,"<<=":2.5,">>=":2.5,">>>=":2.5,"&=":2.5,"^=":2.5,"|=":2.5},Ke={"=>":2,...or,"||":3,"??":3,"&&":4,"|":5,"^":6,"&":7,"==":8,"!=":8,"===":8,"!==":8,"<":9,">":9,"<=":9,">=":9,in:9,"<<":10,">>":10,">>>":10,"+":11,"-":11,"*":12,"/":12,"%":12,"**":13},sr=Object.keys(or),wo=new Set(sr),_t=new Set;_t.add("=>");sr.forEach(t=>_t.add(t));var Oo=new Set(["$","_"]),Yn={true:!0,false:!1,null:null},Ao="this";function ir(t){return Math.max(0,...Object.keys(t).map(e=>e.length))}var No=ir(rr),Mo=ir(Ke),We="Expected ",ke="Unexpected ",mn="Unclosed ",Lo=We+":",Zn=We+"expression",ko="missing }",Io=ke+"object property",Do=mn+"(",er=We+"comma",tr=ke+"token ",Uo=ke+"period",pn=We+"expression after ",Ho="missing unaryOp argument",_o=mn+"[",Bo=We+"exponent (",Po="Variable names cannot start with a number (",jo=mn+'quote after "';var ze=t=>t>=48&&t<=57,nr=t=>Ke[t]||0,ln=class{constructor(e){m(this,"rt",{0:[this.ot],1:[this.st,this.it,this.at],2:[this.pt,this.ct,this.ft,this.Ae,this.lt],3:[this.ut,this.mt,this.dt]});m(this,"r");m(this,"e");this.r=e,this.e=0}get M(){return this.r.charAt(this.e)}get l(){return this.r.charCodeAt(this.e)}m(e){return this.r.charCodeAt(this.e)===e}U(e){let n=String.fromCharCode(e);return e>=65&&e<=90||e>=97&&e<=122||e>=128&&!(n in Ke)||Oo.has(n)}re(e){return this.U(e)||ze(e)}i(e){return new Error(`${e} at character ${this.e}`)}L(e,n,r){let o=this.rt[e];if(!o)return r;let s={node:r},i=a=>{a.call(this,s)};return n===0?o.forEach(i):o.find(i),s.node}y(){let e=this.l,n=this.r,r=this.e;for(;e===To||e===ho||e===go||e===bo;)e=n.charCodeAt(++r);this.e=r}parse(){let e=this.oe();return e.length===1?e[0]:{type:0,body:e}}oe(e){let n=[];for(;this.e<this.r.length;){let r=this.l;if(r===Ro||r===kt)this.e++;else{let o=this.O();if(o)n.push(o);else if(this.e<this.r.length){if(r===e)break;throw this.i(ke+'"'+this.M+'"')}}}return n}O(){var n;let e=(n=this.L(0,1))!=null?n:this.Ne();return this.y(),this.L(1,0,e)}se(){this.y();let e=this.e,n=this.r,r=n.substr(e,Mo),o=r.length;for(;o>0;){if(r in Ke&&(!this.U(this.l)||e+r.length<n.length&&!this.re(n.charCodeAt(e+r.length))))return e+=o,this.e=e,r;r=r.substr(0,--o)}return!1}Ne(){let e,n,r,o,s,i,a,c;if(s=this.j(),!s||(n=this.se(),!n))return s;if(o={value:n,prec:nr(n),right_a:_t.has(n)},i=this.j(),!i)throw this.i(pn+n);let p=[s,o,i];for(;n=this.se();){if(r=nr(n),r===0){this.e-=n.length;break}o={value:n,prec:r,right_a:_t.has(n)},c=n;let f=l=>o.right_a&&l.right_a?r>l.prec:r<=l.prec;for(;p.length>2&&f(p[p.length-2]);)i=p.pop(),n=p.pop().value,s=p.pop(),e={type:8,operator:n,left:s,right:i},p.push(e);if(e=this.j(),!e)throw this.i(pn+c);p.push(o,e)}for(a=p.length-1,e=p[a];a>1;)e={type:8,operator:p[a-1].value,left:p[a-2],right:e},a-=2;return e}j(){let e,n,r;if(this.y(),r=this.L(2,1),r)return this.L(3,0,r);let o=this.l;if(ze(o)||o===Re)return this.yt();if(o===Eo||o===Co)r=this.ht();else if(o===Dt)r=this.gt();else{for(e=this.r.substr(this.e,No),n=e.length;n>0;){if(Object.prototype.hasOwnProperty.call(rr,e)&&(!this.U(this.l)||this.e+e.length<this.r.length&&!this.re(this.r.charCodeAt(this.e+e.length)))){this.e+=n;let s=this.j();if(!s)throw this.i(Ho);return this.L(3,0,{type:7,operator:e,argument:s})}e=e.substr(0,--n)}this.U(o)?(r=this.ie(),r.name in Yn?r={type:4,value:Yn[r.name],raw:r.name}:r.name===Ao&&(r={type:5})):o===It&&(r=this.bt())}return r?(r=this.$(r),this.L(3,0,r)):this.L(3,0,!1)}$(e){this.y();let n=this.l;for(;n===Re||n===Dt||n===It||n===cn;){let r;if(n===cn){if(this.r.charCodeAt(this.e+1)!==Re)break;r=!0,this.e+=2,this.y(),n=this.l}if(this.e++,n===Dt){if(e={type:3,computed:!0,object:e,property:this.O()},this.y(),n=this.l,n!==Ut)throw this.i(_o);this.e++}else n===It?e={type:6,arguments:this.Me(qe),callee:e}:(n===Re||r)&&(r&&this.e--,this.y(),e={type:3,computed:!1,object:e,property:this.ie()});r&&(e.optional=!0),this.y(),n=this.l}return e}yt(){let e="",n;for(;ze(this.l);)e+=this.r.charAt(this.e++);if(this.m(Re))for(e+=this.r.charAt(this.e++);ze(this.l);)e+=this.r.charAt(this.e++);if(n=this.M,n==="e"||n==="E"){for(e+=this.r.charAt(this.e++),n=this.M,(n==="+"||n==="-")&&(e+=this.r.charAt(this.e++));ze(this.l);)e+=this.r.charAt(this.e++);if(!ze(this.r.charCodeAt(this.e-1)))throw this.i(Bo+e+this.M+")")}let r=this.l;if(this.U(r))throw this.i(Po+e+this.M+")");if(r===Re||e.length===1&&e.charCodeAt(0)===Re)throw this.i(Uo);return{type:4,value:parseFloat(e),raw:e}}ht(){let e="",n=this.e,r=this.r.charAt(this.e++),o=!1;for(;this.e<this.r.length;){let s=this.r.charAt(this.e++);if(s===r){o=!0;break}else if(s==="\\")switch(s=this.r.charAt(this.e++),s){case"n":e+=`
|
|
2
|
-
`;break;case"r":e+="\r";break;case"t":e+=" ";break;case"b":e+="\b";break;case"f":e+="\f";break;case"v":e+="\v";break;default:e+=s}else e+=s}if(!o)throw this.i(
|
|
3
|
-
`;break;case"r":r+="\r";break;case"t":r+=" ";break;case"b":r+="\b";break;case"f":r+="\f";break;case"v":r+="\v";break;default:r+=c}else r+=c,o+=c}throw this.i("Unclosed `")}ut(e){var o;let n=e.node;if(!n||n.operator!=="new"||!n.argument)return;if(!n.argument||![6,3].includes(n.argument.type))throw this.i("Expected new function()");e.node=n.argument;let r=e.node;for(;r.type===3||r.type===6&&((o=r==null?void 0:r.callee)==null?void 0:o.type)===3;)r=r.type===3?r.object:r.callee.object;r.type=20}lt(e){if(!this.m(Jn))return;let n=++this.e,r=!1;for(;this.e<this.r.length;){if(this.l===Jn&&!r){let o=this.r.slice(n,this.e),s="";for(;++this.e<this.r.length;){let a=this.l;if(a>=97&&a<=122||a>=65&&a<=90||a>=48&&a<=57)s+=this.M;else break}let i;try{i=new RegExp(o,s)}catch(a){throw this.i(a.message)}return e.node={type:4,value:i,raw:this.r.slice(n-1,this.e)},e.node=this.$(e.node),e.node}this.m(Dt)?r=!0:r&&this.m(Ut)&&(r=!1),this.e+=this.m(So)?2:1}throw this.i("Unclosed Regex")}},ar=t=>new ln(t).parse();var Vo={"=>":(t,e)=>{},"=":(t,e)=>{},"*=":(t,e)=>{},"**=":(t,e)=>{},"/=":(t,e)=>{},"%=":(t,e)=>{},"+=":(t,e)=>{},"-=":(t,e)=>{},"<<=":(t,e)=>{},">>=":(t,e)=>{},">>>=":(t,e)=>{},"&=":(t,e)=>{},"^=":(t,e)=>{},"|=":(t,e)=>{},"||":(t,e)=>t()||e(),"??":(t,e)=>{var n;return(n=t())!=null?n:e()},"&&":(t,e)=>t()&&e(),"|":(t,e)=>t|e,"^":(t,e)=>t^e,"&":(t,e)=>t&e,"==":(t,e)=>t==e,"!=":(t,e)=>t!=e,"===":(t,e)=>t===e,"!==":(t,e)=>t!==e,"<":(t,e)=>t<e,">":(t,e)=>t>e,"<=":(t,e)=>t<=e,">=":(t,e)=>t>=e,in:(t,e)=>t in e,"<<":(t,e)=>t<<e,">>":(t,e)=>t>>e,">>>":(t,e)=>t>>>e,"+":(t,e)=>t+e,"-":(t,e)=>t-e,"*":(t,e)=>t*e,"/":(t,e)=>t/e,"%":(t,e)=>t%e,"**":(t,e)=>t**e},$o={"-":t=>-t,"+":t=>+t,"!":t=>!t,"~":t=>~t,new:t=>t},lr=t=>{if(!(t!=null&&t.some(fr)))return t;let e=[];return t.forEach(n=>fr(n)?e.push(...n):e.push(n)),e},cr=(...t)=>lr(t),un=(t,e)=>{if(!t)return e;let n=Object.create(e!=null?e:{});return n.$event=t,n},Fo={"++":(t,e)=>{let n=t[e];if(h(n)){let r=n();return n(++r),r}return++t[e]},"--":(t,e)=>{let n=t[e];if(h(n)){let r=n();return n(--r),r}return--t[e]}},qo={"++":(t,e)=>{let n=t[e];if(h(n)){let r=n();return n(r+1),r}return t[e]++},"--":(t,e)=>{let n=t[e];if(h(n)){let r=n();return n(r-1),r}return t[e]--}},pr={"=":(t,e,n)=>{let r=t[e];return h(r)?r(n):t[e]=n},"+=":(t,e,n)=>{let r=t[e];return h(r)?r(r()+n):t[e]+=n},"-=":(t,e,n)=>{let r=t[e];return h(r)?r(r()-n):t[e]-=n},"*=":(t,e,n)=>{let r=t[e];return h(r)?r(r()*n):t[e]*=n},"/=":(t,e,n)=>{let r=t[e];return h(r)?r(r()/n):t[e]/=n},"%=":(t,e,n)=>{let r=t[e];return h(r)?r(r()%n):t[e]%=n},"**=":(t,e,n)=>{let r=t[e];return h(r)?r(r()**n):t[e]**=n},"<<=":(t,e,n)=>{let r=t[e];return h(r)?r(r()<<n):t[e]<<=n},">>=":(t,e,n)=>{let r=t[e];return h(r)?r(r()>>n):t[e]>>=n},">>>=":(t,e,n)=>{let r=t[e];return h(r)?r(r()>>>n):t[e]>>>=n},"|=":(t,e,n)=>{let r=t[e];return h(r)?r(r()|n):t[e]|=n},"&=":(t,e,n)=>{let r=t[e];return h(r)?r(r()&n):t[e]&=n},"^=":(t,e,n)=>{let r=t[e];return h(r)?r(r()^n):t[e]^=n}},Bt=(t,e)=>P(t)?t.bind(e):t,dn=class{constructor(e,n,r,o,s){m(this,"u");m(this,"ke");m(this,"Ve");m(this,"Ie");m(this,"A");m(this,"De");m(this,"Ue");this.u=T(e)?e:[e],this.ke=n,this.Ve=r,this.Ie=o,this.Ue=!!s}Pe(e,n){if(n&&e in n)return n;for(let r of this.u)if(e in r)return r}2(e,n,r){let o=e.name;if(o==="$root")return this.u[this.u.length-1];if(o==="$parent")return this.u[1];if(o==="$ctx")return[...this.u];if(r&&o in r)return this.A=r[o],Bt(D(r[o]),r);for(let i of this.u)if(o in i)return this.A=i[o],Bt(D(i[o]),i);let s=this.ke;if(s&&o in s)return this.A=s[o],Bt(D(s[o]),s)}5(e,n,r){return this.u[0]}0(e,n,r){return this.Be(n,r,cr,...e.body)}1(e,n,r){return this.R(n,r,(...o)=>o.pop(),...e.expressions)}3(e,n,r){let{obj:o,key:s}=this.ae(e,n,r),i=o==null?void 0:o[s];return this.A=i,Bt(D(i),o)}4(e,n,r){return e.value}6(e,n,r){let o=(i,...a)=>P(i)?i(...lr(a)):i,s=this.R(++n,r,o,e.callee,...e.arguments);return this.A=s,s}7(e,n,r){return this.R(n,r,$o[e.operator],e.argument)}8(e,n,r){let o=Vo[e.operator];switch(e.operator){case"||":case"&&":case"??":return o(()=>this.g(e.left,n,r),()=>this.g(e.right,n,r))}return this.R(n,r,o,e.left,e.right)}9(e,n,r){return this.Be(++n,r,cr,...e.elements)}10(e,n,r){let o={},s=(...i)=>{i.forEach(a=>{Object.assign(o,a)})};return this.R(++n,r,s,...e.properties),o}11(e,n,r){return this.R(n,r,o=>this.g(o?e.consequent:e.alternate,n,r),e.test)}12(e,n,r){var f;let o={},s=l=>(l==null?void 0:l.type)!==15,i=(f=this.Ie)!=null?f:()=>!1,a=n===0&&this.Ue,c=l=>this._e(a,e.key,n,un(l,r)),p=l=>this._e(a,e.value,n,un(l,r));if(e.shorthand){let l=e.key.name;o[l]=s(e.key)&&i(l,n)?c:c()}else if(e.computed){let l=D(c());o[l]=s(e.value)&&i(l,n)?p:p()}else{let l=e.key.type===4?e.key.value:e.key.name;o[l]=s(e.value)&&i(l,n)?()=>p:p()}return o}ae(e,n,r){let o=this.g(e.object,n,r),s=e.computed?this.g(e.property,n,r):e.property.name;return{obj:o,key:s}}13(e,n,r){let o=e.argument,s=e.operator,i=e.prefix?Fo:qo;if(o.type===2){let a=o.name,c=this.Pe(a,r);return te(c)?void 0:i[s](c,a)}if(o.type===3){let{obj:a,key:c}=this.ae(o,n,r);return i[s](a,c)}}16(e,n,r){let o=e.left,s=e.operator;if(o.type===2){let i=o.name,a=this.Pe(i,r);if(te(a))return;let c=this.g(e.right,n,r);return pr[s](a,i,c)}if(o.type===3){let{obj:i,key:a}=this.ae(o,n,r),c=this.g(e.right,n,r);return pr[s](i,a,c)}}14(e,n,r){let o=this.g(e.argument,n,r);return T(o)&&(o.s=mr),o}17(e,n,r){return this[6]({type:6,callee:e.tag,arguments:[{type:9,elements:e.quasi.quasis},...e.quasi.expressions]},n,r)}19(e,n,r){let o=(...s)=>s.reduce((i,a,c)=>i+=a+e.quasis[c+1].value.cooked,e.quasis[0].value.cooked);return this.R(n,r,o,...e.expressions)}18(e,n,r){return e.value.cooked}20(e,n,r){let o=(s,...i)=>new s(...i);return this.R(n,r,o,e.callee,...e.arguments)}15(e,n,r){return(...o)=>{let s=Object.create(r!=null?r:{}),i=e.params;if(i){let a=0;for(let c of i)s[c.name]=o[a++]}return this.g(e.body,n,s)}}g(e,n,r){let o=D(this[e.type](e,n,r));return this.De=e.type,o}_e(e,n,r,o){let s=this.g(n,r,o);return e&&this.He()?this.A:s}He(){let e=this.De;return(e===2||e===3||e===6)&&h(this.A)}eval(e,n){let{value:r,refs:o}=bt(()=>this.g(e,-1,n)),s={value:r,refs:o};return this.He()&&(s.ref=this.A),s}R(e,n,r,...o){let s=o.map(i=>i&&this.g(i,e,n));return r(...s)}Be(e,n,r,...o){let s=this.Ve;if(!s)return this.R(e,n,r,...o);let i=o.map((a,c)=>a&&(a.type!==15&&s(c,e)?p=>this.g(a,e,un(p,n)):this.g(a,e,n)));return r(...i)}},mr=Symbol("s"),fr=t=>(t==null?void 0:t.s)===mr,ur=(t,e,n,r,o,s,i)=>new dn(e,n,r,o,i).eval(t,s);var dr={},Pt=class{constructor(e,n){m(this,"u");m(this,"o");m(this,"je",[]);this.u=e,this.o=n}w(e){this.u=[e,...this.u]}me(){return this.u.map(n=>n.components).filter(n=>!!n).reverse().reduce((n,r)=>{for(let[o,s]of Object.entries(r))n[o.toUpperCase()]=s;return n},{})}Ze(){let e=[],n=new Set,r=this.u.map(o=>o.components).filter(o=>!!o).reverse();for(let o of r)for(let s of Object.keys(o))n.has(s)||(n.add(s),e.push(s));return e}C(e,n,r,o,s){var y;let i=G([]),a=[],c=()=>{for(let d of a)d();a.length=0},p={value:i,stop:c,refs:[],context:this.u[0]};if(z(e))return p;let f=this.o.globalContext,l=[],u=(d,R,U,E)=>{try{let b=ur(d,R,f,n,r,E,o);return U&&l.push(...b.refs),{value:b.value,refs:b.refs,ref:b.ref}}catch(b){M(6,`evaluation error: ${e}`,b)}return{value:void 0,refs:[]}};try{let d=(y=dr[e])!=null?y:ar("["+e+"]");dr[e]=d;let R=this.u,U=()=>{l.splice(0),c();let E=d.elements.map((b,L)=>n!=null&&n(L,-1)?{value:H=>u(b,R,!1,{$event:H}).value,refs:[]}:u(b,R,!0));if(!s)for(let b of l){let L=w(b,U);a.push(L)}i(E.map(b=>b.value)),p.refs=E.map(b=>b.ref)};U()}catch(d){M(6,`parse error: ${e}`,d)}return p}V(){return this.u}Y(e){this.je.push(this.u),this.u=e}v(e,n){try{this.Y(e),n()}finally{this.Tt()}}Tt(){var e;this.u=(e=this.je.pop())!=null?e:[]}};var yr="http://www.w3.org/1999/xlink",zo={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 Ko(t){return!!t||t===""}var yn={onChange:(t,e,n,r,o,s)=>{var a;if(r){s&&s.includes("camel")&&(r=V(r)),jt(t,r,e[0],o);return}let i=e.length;for(let c=0;c<i;++c){let p=e[c];if(T(p)){let f=(a=n==null?void 0:n[c])==null?void 0:a[0],l=p[0],u=p[1];jt(t,l,u,f)}else if(A(p))for(let f of Object.entries(p)){let l=f[0],u=f[1],y=n==null?void 0:n[c],d=y&&l in y?l:void 0;jt(t,l,u,d)}else{let f=n==null?void 0:n[c],l=e[c++],u=e[c];jt(t,l,u,f)}}}},jt=(t,e,n,r)=>{if(r&&r!==e&&t.removeAttribute(r),te(e)){M(3,name,t);return}if(!j(e)){M(6,`Attribute key is not string at ${t.outerHTML}`,e);return}if(e.startsWith("xlink:")){te(n)?t.removeAttributeNS(yr,e.slice(6,e.length)):t.setAttributeNS(yr,e,n);return}let o=e in zo;te(n)||o&&!Ko(n)?t.removeAttribute(e):t.setAttribute(e,o?"":n)};var hn={onChange:(t,e,n)=>{let r=e.length;for(let o=0;o<r;++o){let s=e[o],i=n==null?void 0:n[o];if(T(s)){let a=s.length;for(let c=0;c<a;++c)hr(t,s[c],i==null?void 0:i[c])}else hr(t,s,i)}}},hr=(t,e,n)=>{let r=t.classList,o=j(e),s=j(n);if(e&&!o){if(n&&!s)for(let i in n)(!(i in e)||!e[i])&&r.remove(i);for(let i in e)e[i]&&r.add(i)}else o?n!==e&&(s&&r.remove(...n.trim().split(/\s+/)),r.add(...e.trim().split(/\s+/))):n&&s&&r.remove(...n.trim().split(/\s+/))};var gr={onChange:(t,e)=>{let[n,r]=e;P(r)?r(t,n):t.innerHTML=n==null?void 0:n.toString()}};function Wo(t,e){if(t.length!==e.length)return!1;let n=!0;for(let r=0;n&&r<t.length;r++)n=ue(t[r],e[r]);return n}function ue(t,e){if(t===e)return!0;let n=Gt(t),r=Gt(e);if(n||r)return n&&r?t.getTime()===e.getTime():!1;if(n=et(t),r=et(e),n||r)return t===e;if(n=T(t),r=T(e),n||r)return n&&r?Wo(t,e):!1;if(n=A(t),r=A(e),n||r){if(!n||!r)return!1;let o=Object.keys(t).length,s=Object.keys(e).length;if(o!==s)return!1;for(let i in t){let a=t.hasOwnProperty(i),c=e.hasOwnProperty(i);if(a&&!c||!a&&c||!ue(t[i],e[i]))return!1}}return String(t)===String(e)}function Vt(t,e){return t.findIndex(n=>ue(n,e))}var br=t=>{let e=parseFloat(t);return isNaN(e)?t:e};var $t=t=>{if(!h(t))throw I(3,"pause");t(void 0,void 0,3)};var Ft=t=>{if(!h(t))throw I(3,"resume");t(void 0,void 0,4)};var Er={onChange:(t,e)=>{Go(t,e[0])},onBind:(t,e,n,r,o,s)=>Jo(t,e,s)},Go=(t,e)=>{let n=vr(t);if(n&&Cr(t))T(e)?e=Vt(e,de(t))>-1:Y(e)?e=e.has(de(t)):e=ts(t,e),t.checked=e;else if(n&&Rr(t))t.checked=ue(e,de(t));else if(n||Sr(t))xr(t)?t.value!==(e==null?void 0:e.toString())&&(t.value=e):t.value!==e&&(t.value=e);else if(wr(t)){let r=t.options,o=r.length,s=t.multiple;for(let i=0;i<o;i++){let a=r[i],c=de(a);if(s)T(e)?a.selected=Vt(e,c)>-1:a.selected=e.has(c);else if(ue(de(a),e)){t.selectedIndex!==i&&(t.selectedIndex=i);return}}!s&&t.selectedIndex!==-1&&(t.selectedIndex=-1)}else M(7,t)},it=t=>(h(t)&&(t=t()),P(t)&&(t=t()),t?j(t)?{trim:t.includes("trim"),lazy:t.includes("lazy"),number:t.includes("number"),int:t.includes("int")}:{trim:!!t.trim,lazy:!!t.lazy,number:!!t.number,int:!!t.int}:{trim:!1,lazy:!1,number:!1,int:!1}),Cr=t=>t.type==="checkbox",Rr=t=>t.type==="radio",xr=t=>t.type==="number"||t.type==="range",vr=t=>t.tagName==="INPUT",Sr=t=>t.tagName==="TEXTAREA",wr=t=>t.tagName==="SELECT",Jo=(t,e,n)=>{let r=e.value,o=it(n==null?void 0:n.join(",")),s=it(r()[1]),i={int:o.int||s.int,lazy:o.lazy||s.lazy,number:o.number||s.number,trim:o.trim||s.trim},a=e.refs[0];if(!a)return M(8,t),()=>{};let c=vr(t);return c&&Cr(t)?Xo(t,a):c&&Rr(t)?ns(t,a):c||Sr(t)?Qo(t,i,a,r):wr(t)?rs(t,a,r):(M(7,t),()=>{})},Tr=/[.,' ·٫]/,Qo=(t,e,n,r)=>{let s=e.lazy?"change":"input",i=xr(t),a=()=>{!e.trim&&!it(r()[1]).trim||(t.value=t.value.trim())},c=u=>{let y=u.target;y.composing=1},p=u=>{let y=u.target;y.composing&&(y.composing=0,y.dispatchEvent(new Event(s)))},f=()=>{t.removeEventListener(s,l),t.removeEventListener("change",a),t.removeEventListener("compositionstart",c),t.removeEventListener("compositionend",p),t.removeEventListener("change",p)},l=u=>{let y=u.target;if(!y||y.composing)return;let d=y.value,R=it(r()[1]);if(i||R.number||R.int){if(R.int)d=parseInt(d);else{if(Tr.test(d[d.length-1])&&d.split(Tr).length===2){if(d+="0",d=parseFloat(d),isNaN(d))d="";else if(n()===d)return}d=parseFloat(d)}isNaN(d)&&(d=""),t.value=d}else R.trim&&(d=d.trim());n(d)};return t.addEventListener(s,l),t.addEventListener("change",a),t.addEventListener("compositionstart",c),t.addEventListener("compositionend",p),t.addEventListener("change",p),f},Xo=(t,e)=>{let n="change",r=()=>{t.removeEventListener(n,o)},o=()=>{let s=de(t),i=t.checked,a=e();if(T(a)){let c=Vt(a,s),p=c!==-1;i&&!p?a.push(s):!i&&p&&a.splice(c,1)}else Y(a)?i?a.add(s):a.delete(s):e(es(t,i))};return t.addEventListener(n,o),r},de=t=>"_value"in t?t._value:t.value,Or="trueValue",Yo="falseValue",Ar="true-value",Zo="false-value",es=(t,e)=>{let n=e?Or:Yo;if(n in t)return t[n];let r=e?Ar:Zo;return t.hasAttribute(r)?t.getAttribute(r):e},ts=(t,e)=>{if(Or in t)return ue(e,t.trueValue);let r=Ar;return t.hasAttribute(r)?ue(e,t.getAttribute(r)):ue(e,!0)},ns=(t,e)=>{let n="change",r=()=>{t.removeEventListener(n,o)},o=()=>{let s=de(t);e(s)};return t.addEventListener(n,o),r},rs=(t,e,n)=>{let r="change",o=()=>{t.removeEventListener(r,s)},s=()=>{let a=it(n()[1]).number,c=Array.prototype.filter.call(t.options,p=>p.selected).map(p=>a?br(de(p)):de(p));if(t.multiple){let p=e();try{if($t(e),Y(p)){p.clear();for(let f of c)p.add(f)}else T(p)?(p.splice(0),p.push(...c)):e(c)}finally{Ft(e),K(e)}}else e(c[0])};return t.addEventListener(r,s),o};var os=["stop","prevent","capture","self","once","left","right","middle","passive"],ss=t=>{let e={};if(z(t))return;let n=t.split(",");for(let r of os)e[r]=n.includes(r);return e},bn={isLazy:(t,e)=>e===-1&&t%2===0,isLazyKey:(t,e)=>e===0&&!t.endsWith("_flags"),once:!1,collectRefObj:!0,onBind:(t,e,n,r,o,s)=>{var f,l;if(o){let u=e.value(),y=D(o.value()[0]);return j(y)?gn(t,V(y),()=>e.value()[0],(f=s==null?void 0:s.join(","))!=null?f:u[1]):()=>{}}else if(r){let u=e.value();return gn(t,V(r),()=>e.value()[0],(l=s==null?void 0:s.join(","))!=null?l:u[1])}let i=[],a=()=>{i.forEach(u=>u())},c=e.value(),p=c.length;for(let u=0;u<p;++u){let y=c[u];if(P(y)&&(y=y()),A(y))for(let d of Object.entries(y)){let R=d[0],U=()=>{let b=e.value()[u];return P(b)&&(b=b()),b=b[R],P(b)&&(b=b()),b},E=y[R+"_flags"];i.push(gn(t,R,U,E))}else M(2,name,t)}return a}},is=(t,e)=>{if(t.startsWith("keydown")||t.startsWith("keyup")||t.startsWith("keypress")){e!=null||(e="");let n=t.split(".").concat(e.split(","));t=n[0];let r=n[1],o=n.includes("ctrl"),s=n.includes("shift"),i=n.includes("alt"),a=n.includes("meta"),c=p=>!(o&&!p.ctrlKey||s&&!p.shiftKey||i&&!p.altKey||a&&!p.metaKey);return r?[t,p=>c(p)?p.key.toUpperCase()===r.toUpperCase():!1]:[t,c]}return[t,n=>!0]},gn=(t,e,n,r)=>{if(z(e))return M(5,name,t),()=>{};let o=ss(r),s=o?{capture:o.capture,passive:o.passive,once:o.once}:void 0,i;[e,i]=is(e,r);let a=f=>{if(!i(f)||!n&&e==="submit"&&(o!=null&&o.prevent))return;let l=n(f);P(l)&&(l=l(f)),P(l)&&l(f)},c=()=>{t.removeEventListener(e,p,s)},p=f=>{if(!o){a(f);return}try{if(o.left&&f.button!==0||o.middle&&f.button!==1||o.right&&f.button!==2||o.self&&f.target!==t)return;o.stop&&f.stopPropagation(),o.prevent&&f.preventDefault(),a(f)}finally{o.once&&c()}};return t.addEventListener(e,p,s),c};var Nr={onChange:(t,e,n,r,o,s)=>{if(r){s&&s.includes("camel")&&(r=V(r)),Ge(t,r,e[0]);return}let i=e.length;for(let a=0;a<i;++a){let c=e[a];if(T(c)){let p=c[0],f=c[1];Ge(t,p,f)}else if(A(c))for(let p of Object.entries(c)){let f=p[0],l=p[1];Ge(t,f,l)}else{let p=e[a++],f=e[a];Ge(t,p,f)}}}};function as(t){return!!t||t===""}var Ge=(t,e,n)=>{if(te(e)){M(3,name,t);return}if(e==="innerHTML"||e==="textContent"){let s=[...t.childNodes];setTimeout(()=>s.forEach(ae),1),t[e]=n!=null?n:"";return}let r=t.tagName;if(e==="value"&&r!=="PROGRESS"&&!r.includes("-")){t._value=n;let s=r==="OPTION"?t.getAttribute("value"):t.value,i=n!=null?n:"";s!==i&&(t.value=i),n==null&&t.removeAttribute(e);return}let o=!1;if(n===""||n==null){let s=typeof t[e];s==="boolean"?n=as(n):n==null&&s==="string"?(n="",o=!0):s==="number"&&(n=0,o=!0)}try{t[e]=n}catch(s){o||M(4,e,r,n,s)}o&&t.removeAttribute(e)};var Mr={once:!0,onBind:(t,e,n)=>{let r=e.value()[0],o=T(r),s=e.refs[0];return o?r.push(t):s?s==null||s(t):e.context[n]=t,()=>{if(o){let i=r.indexOf(t);i!==-1&&r.splice(i,1)}else s==null||s(null)}}};var Lr={onChange:(t,e)=>{let n=ge(t).data,r=n._ord;On(r)&&(r=n._ord=t.style.display),!!e[0]?t.style.display=r:t.style.display="none"}};var Cn={onChange:(t,e,n)=>{let r=e.length;for(let o=0;o<r;++o){let s=e[o],i=n==null?void 0:n[o];if(T(s)){let a=s.length;for(let c=0;c<a;++c)kr(t,s[c],i==null?void 0:i[c])}else kr(t,s,i)}}},kr=(t,e,n)=>{let r=t.style,o=j(e);if(e&&!o){if(n&&!j(n))for(let s in n)e[s]==null&&En(r,s,"");for(let s in e)En(r,s,e[s])}else{let s=r.display;if(o?n!==e&&(r.cssText=e):n&&t.removeAttribute("style"),"_ord"in ge(t).data)return;r.display=s}},Ir=/\s*!important$/;function En(t,e,n){if(T(n))n.forEach(r=>{En(t,e,r)});else if(n==null&&(n=""),e.startsWith("--"))t.setProperty(e,n);else{let r=cs(t,e);Ir.test(n)?t.setProperty(je(r),n.replace(Ir,""),"important"):t[r]=n}}var Dr=["Webkit","Moz","ms"],Tn={};function cs(t,e){let n=Tn[e];if(n)return n;let r=V(e);if(r!=="filter"&&r in t)return Tn[e]=r;r=ot(r);for(let o=0;o<Dr.length;o++){let s=Dr[o]+r;if(s in t)return Tn[e]=s}return e}var X=t=>Ur(D(t)),Ur=(t,e=new WeakMap)=>{if(!t||!A(t))return t;if(T(t))return t.map(X);if(Y(t)){let r=new Set;for(let o of t.keys())r.add(X(o));return r}if(he(t)){let r=new Map;for(let o of t)r.set(X(o[0]),X(o[1]));return r}if(e.has(t))return D(e.get(t));let n={...t};e.set(t,n);for(let r of Object.entries(n))n[r[0]]=Ur(D(r[1]),e);return n};var Hr={onChange:(t,e)=>{var r;let n=e[0];t.textContent=Y(n)?JSON.stringify(X([...n])):he(n)?JSON.stringify(X([...n])):A(n)?JSON.stringify(X(n)):(r=n==null?void 0:n.toString())!=null?r:""}};var _r={onChange:(t,e)=>{Ge(t,"value",e[0])}};var Ie=t=>(t==null?void 0:t[lt])===1;var xe=t=>{if(Ve(t))return t;let e;if(h(t)?(e=t,t=e()):e=G(t),t instanceof Node||t instanceof Date||t instanceof RegExp||t instanceof Promise||t instanceof Error)return e;if(e[lt]=1,T(t)){let n=t.length;for(let r=0;r<n;++r){let o=t[r];Ie(o)||(t[r]=xe(o))}return e}if(!A(t))return e;for(let n of Object.entries(t)){let r=n[1];if(Ie(r))continue;let o=n[0];et(o)||(t[o]=null,t[o]=xe(r))}return e};var ve=class ve{constructor(e){m(this,"H",{});m(this,"f",{});m(this,"et",()=>Object.keys(this.H).filter(e=>e.length===1||!e.startsWith(":")));m(this,"he",new Map);m(this,"ge",new Map);m(this,"forGrowThreshold",10);m(this,"globalContext");m(this,"useInterpolation",!0);m(this,"useBracketInterpolation",!1);if(this.setDirectives("r-"),e){this.globalContext=e;return}this.globalContext=this.Et()}static getDefault(){var e;return(e=ve.$e)!=null?e:ve.$e=new ve}Et(){let e={},n=globalThis;for(let r of ve.xt.split(","))e[r]=n[r];return e.ref=xe,e.sref=G,e.flatten=X,e}addComponent(...e){for(let n of e){if(!n.defaultName){tt.warning("Registered component's default name is not defined",n);continue}this.he.set(ot(n.defaultName),n),this.ge.set(ot(n.defaultName).toLocaleUpperCase(),n)}}setDirectives(e){this.H={".":Nr,":":yn,"@":bn,[`${e}on`]:bn,[`${e}bind`]:yn,[`${e}html`]:gr,[`${e}text`]:Hr,[`${e}show`]:Lr,[`${e}model`]:Er,":style":Cn,[`${e}bind:style`]:Cn,":class":hn,[`${e}bind:class`]:hn,":ref":Mr,":value":_r,teleport:Mt},this.f={for:`${e}for`,if:`${e}if`,else:`${e}else`,elseif:`${e}else-if`,pre:`${e}pre`,inherit:`${e}inherit`,text:`${e}text`,props:":props",propsOnce:":props-once",bind:`${e}bind`,on:`${e}on`,keyBind:":key",key:"key",is:":is",teleport:`${e}teleport`,dynamic:"_d_"}}updateDirectives(e){e(this.H,this.f)}};m(ve,"$e"),m(ve,"xt","Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console");var Z=ve;var qt=(t,e)=>{if(!t)return;let n=e!=null?e:Z.getDefault(),r=n.f,o=n.useBracketInterpolation?"[[":"{{",s=n.useBracketInterpolation?"]]":"}}",i=n.useBracketInterpolation?/(\[\[[^]*?\]\])/g:/({{[^]*?}})/g;for(let a of fs(t,r.pre,o))ps(a,r.text,i,o,s)},ps=(t,e,n,r,o)=>{var p;let s=t.textContent;if(!s)return;let i=n,a=s.split(i);if(a.length<=1)return;if(((p=t.parentElement)==null?void 0:p.childNodes.length)===1&&a.length===3){let f=a[1];if(z(a[0])&&z(a[2])&&f.startsWith(r)&&f.endsWith(o)){let l=t.parentElement;l.setAttribute(e,f.substring(2,f.length-2)),l.innerText="";return}}let c=document.createDocumentFragment();for(let f of a)if(f.startsWith(r)&&f.endsWith(o)){let l=document.createElement("span");l.setAttribute(e,f.substring(2,f.length-2)),c.appendChild(l)}else c.appendChild(document.createTextNode(f));t.replaceWith(c)},fs=(t,e,n)=>{let r=[],o=s=>{var i,a;if(s.nodeType===Node.TEXT_NODE)(i=s.textContent)!=null&&i.includes(n)&&r.push(s);else{if((a=s==null?void 0:s.hasAttribute)!=null&&a.call(s,e))return;for(let c of me(s))o(c)}};return o(t),r};var ls="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",ms=new Set(ls.toUpperCase().split(",")),us="http://www.w3.org/2000/svg",Br=(t,e)=>{ce(t)?t.content.appendChild(e):t.appendChild(e)},Rn=(t,e,n,r)=>{var i;let o=t.t;if(o){let a=n&&ms.has(o.toUpperCase())?document.createElementNS(us,o.toLowerCase()):document.createElement(o),c=t.a;if(c)for(let f of Object.entries(c)){let l=f[0],u=f[1];l.startsWith("#")&&(u=l.substring(1),l="name"),a.setAttribute(ht(l,r),u)}let p=t.c;if(p)for(let f of p)Rn(f,a,n,r);Br(e,a);return}let s=t.d;if(s){let a;switch((i=t.n)!=null?i:Node.TEXT_NODE){case Node.COMMENT_NODE:a=document.createComment(s);break;case Node.TEXT_NODE:a=document.createTextNode(s);break}if(a)Br(e,a);else throw new Error("unsupported node type.")}},De=(t,e,n)=>{n!=null||(n=Z.getDefault());let r=document.createDocumentFragment();if(!T(t))return Rn(t,r,!!e,n),r;for(let o of t)Rn(o,r,!!e,n);return r};var Pr=(t,e={selector:"#app"},n)=>{j(e)&&(e={selector:"#app",template:e}),zn(t)&&(t=t.context);let r=e.element?e.element:e.selector?document.querySelector(e.selector):null;if(!r||!Ne(r))throw I(0);n||(n=Z.getDefault());let o=()=>{for(let a of[...r.childNodes])F(a)},s=a=>{for(let c of a)r.appendChild(c)};if(e.template){let a=document.createRange().createContextualFragment(e.template);o(),s(a.childNodes),e.element=a}else if(e.json){let a=De(e.json,e.isSVG,n);o(),s(a.childNodes)}return n.useInterpolation&&qt(r,n),new xn(t,r,n).x(),_(r,()=>{Ce(t)}),Ot(t),{context:t,unmount:()=>{F(r)},unbind:()=>{ae(r)}}},xn=class{constructor(e,n,r){m(this,"Rt");m(this,"Fe");m(this,"o");m(this,"h");m(this,"p");this.Rt=e,this.Fe=n,this.o=r,this.h=new Pt([e],r),this.p=new Lt(this.h)}x(){this.p.G(this.Fe)}};var Je=t=>{if(T(t))return t.map(o=>Je(o));let e={};if(t.tagName)e.t=t.tagName;else return t.nodeType===Node.COMMENT_NODE&&(e.n=Node.COMMENT_NODE),t.textContent&&(e.d=t.textContent),e;let n=t.getAttributeNames();n.length>0&&(e.a=Object.fromEntries(n.map(o=>[o,t.getAttribute(o)])));let r=me(t);return r.length>0&&(e.c=[...r].map(o=>Je(o))),e};var jr=(t,e={})=>{var s,i,a,c,p,f;T(e)&&(e={props:e}),j(t)&&(t={template:t});let n=(s=e.context)!=null?s:()=>({}),r=!1;if(t.element){let l=t.element;l.remove(),t.element=l}else if(t.selector){let l=document.querySelector(t.selector);if(!l)throw I(1,t.selector);l.remove(),t.element=l}else if(t.template){let l=document.createRange().createContextualFragment(t.template);t.element=l}else t.json&&(t.element=De(t.json,t.isSVG,e.config),r=!0);t.element||(t.element=document.createDocumentFragment()),((i=e.useInterpolation)==null||i)&&qt(t.element,(a=e.config)!=null?a:Z.getDefault());let o=t.element;if(!r&&(((p=t.isSVG)!=null?p:rt(o)&&((c=o.hasAttribute)!=null&&c.call(o,"isSVG")))||rt(o)&&o.querySelector("[isSVG]"))){let l=t.element.content,u=l?[...l.childNodes]:[...o.childNodes],y=Je(u);t.element=De(y,!0,e.config)}return{context:n,template:t.element,inheritAttrs:(f=e.inheritAttrs)!=null?f:!0,props:e.props,defaultName:e.defaultName}};var Vr=t=>{let e,n={},r=(...o)=>{if(o.length<=2&&0 in o)throw I(4);return e&&!n.isStopped?e(...o):(e=ds(t,n),e(...o))};return r[Q]=1,Ee(r,!0),r.stop=()=>{var o,s;return(s=(o=n.ref)==null?void 0:o.stop)==null?void 0:s.call(o)},J(()=>r.stop(),!0),r},ds=(t,e)=>{var s;let n=(s=e.ref)!=null?s:G(null);e.ref=n,e.isStopped=!1;let r=0,o=Le(()=>{if(r>0){o(),e.isStopped=!0,K(n);return}n(t()),++r});return n.stop=o,n};var $r=(t,e)=>{let n={},r,o=(...s)=>{if(s.length<=2&&0 in s)throw I(4);return r&&!n.isStopped?r(...s):(r=ys(t,e,n),r(...s))};return o[Q]=1,Ee(o,!0),o.stop=()=>{var s,i;return(i=(s=n.ref)==null?void 0:s.stop)==null?void 0:i.call(s)},J(()=>o.stop(),!0),o},ys=(t,e,n)=>{var a;let r=(a=n.ref)!=null?a:G(null);n.ref=r,n.isStopped=!1;let o=0,s=c=>{if(o>0){r.stop(),n.isStopped=!0,K(r);return}r(e(...t.map(p=>p()))),++o},i=[];for(let c of t){let p=w(c,s);i.push(p)}return s(null),r.stop=()=>{i.forEach(c=>{c()})},r};var Fr=(t,e)=>{let n={},r,o=(...s)=>{if(s.length<=2&&0 in s)throw I(4);return r&&!n.isStopped?r(...s):(r=hs(t,e,n),r(...s))};return o[Q]=1,Ee(o,!0),o.stop=()=>{var s,i;return(i=(s=n.ref)==null?void 0:s.stop)==null?void 0:i.call(s)},J(()=>o.stop(),!0),o},hs=(t,e,n)=>{var s;let r=(s=n.ref)!=null?s:G(null);n.ref=r,n.isStopped=!1;let o=0;return r.stop=w(t,i=>{if(o>0){r.stop(),n.isStopped=!0,K(r);return}r(e(i)),++o},!0),r};var qr=t=>(t[mt]=1,t);var zr=(t,e)=>{if(!e)throw I(5);let r=Ie(t)?xe:a=>a,o=()=>localStorage.setItem(e,JSON.stringify(X(t()))),s=localStorage.getItem(e);if(s!=null)try{t(r(JSON.parse(s)))}catch(a){M(6,`persist: failed to parse data for key ${e}`,a),o()}else o();let i=Le(o);return J(i,!0),t};var vn=(t,...e)=>{let n="",r=t,o=e,s=r.length,i=o.length;for(let a=0;a<s;++a)n+=r[a],a<i&&(n+=o[a]);return n},Kr=vn;var Wr=(t,e,n)=>{let r=[],o=()=>{e(t.map(i=>i()))};for(let i of t)r.push(w(i,o));n&&o();let s=()=>{for(let i of r)i()};return J(s,!0),s};var Gr=t=>{if(!h(t))throw I(3,"observerCount");return t(void 0,void 0,2)};var Jr=t=>{Sn();try{t()}finally{wn()}},Sn=()=>{pe.stack||(pe.stack=[]),pe.stack.push(new Set)},wn=()=>{let t=pe.stack;if(!t||t.length===0)return;let e=t.pop();if(t.length){let n=t[t.length-1];for(let r of e)n.add(r);return}delete pe.stack;for(let n of e)try{K(n)}catch(r){console.error(r)}};var Qr=t=>{var e;(e=Ae())==null||e.onMounted.push(t)};
|
|
1
|
+
"use strict";var ct=Object.defineProperty;var Yr=Object.getOwnPropertyDescriptor;var Zr=Object.getOwnPropertyNames;var eo=Object.prototype.hasOwnProperty;var to=(t,e,n)=>e in t?ct(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var no=(t,e)=>{for(var n in e)ct(t,n,{get:e[n],enumerable:!0})},ro=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of Zr(e))!eo.call(t,o)&&o!==n&&ct(t,o,{get:()=>e[o],enumerable:!(r=Yr(e,o))||r.enumerable});return t};var oo=t=>ro(ct({},"__esModule",{value:!0}),t);var m=(t,e,n)=>to(t,typeof e!="symbol"?e+"":e,n);var bs={};no(bs,{ComponentHead:()=>Fe,RegorConfig:()=>Z,addUnbinder:()=>_,batch:()=>Qr,collectRefs:()=>bt,computeMany:()=>Fr,computeRef:()=>qr,computed:()=>$r,createApp:()=>jr,createComponent:()=>Vr,endBatch:()=>wn,entangle:()=>wt,flatten:()=>X,getBindData:()=>ge,html:()=>vn,isDeepRef:()=>Ie,isRaw:()=>Ve,isRef:()=>h,markRaw:()=>zr,observe:()=>w,observeMany:()=>Gr,observerCount:()=>Jr,onMounted:()=>Xr,onUnmounted:()=>J,pause:()=>$t,persist:()=>Kr,raw:()=>Wr,ref:()=>xe,removeNode:()=>F,resume:()=>Ft,silence:()=>gt,sref:()=>G,startBatch:()=>Sn,toFragment:()=>De,toJsonTemplate:()=>Je,trigger:()=>K,unbind:()=>ae,unref:()=>D,useScope:()=>St,warningHandler:()=>tt,watchEffect:()=>Le});module.exports=oo(bs);var P=t=>typeof t=="function",j=t=>typeof t=="string",On=t=>typeof t=="undefined",te=t=>t==null||typeof t=="undefined",z=t=>typeof t!="string"||!(t!=null&&t.trim()),so=Object.prototype.toString,Wt=t=>so.call(t),he=t=>Wt(t)==="[object Map]",Y=t=>Wt(t)==="[object Set]",Gt=t=>Wt(t)==="[object Date]",et=t=>typeof t=="symbol",T=Array.isArray,A=t=>t!==null&&typeof t=="object";var An={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."},I=(t,...e)=>{let n=An[t];return new Error(P(n)?n.call(An,...e):n)};var He=Symbol(":regor");var ge=t=>{let e=t[He];if(e)return e;let n={unbinders:[],data:{}};return t[He]=n,n};var _=(t,e)=>{ge(t).unbinders.push(e)};var pt=[],Nn=()=>{let t={onMounted:[],onUnmounted:[]};return pt.push(t),t},Ae=t=>{let e=pt[pt.length-1];if(!e&&!t)throw I(2);return e},Mn=t=>{let e=Ae();return t&&Qt(t),pt.pop(),e},Jt=Symbol("csp"),Qt=t=>{let e=t,n=e[Jt];if(n){let r=Ae();if(n===r)return;r.onMounted.length>0&&n.onMounted.push(...r.onMounted),r.onUnmounted.length>0&&n.onUnmounted.push(...r.onUnmounted);return}e[Jt]=Ae()},ft=t=>t[Jt];var J=(t,e)=>{var n;(n=Ae(e))==null||n.onUnmounted.push(t)};var lt=Symbol("ref"),Q=Symbol("sref"),mt=Symbol("raw");var h=t=>(t==null?void 0:t[Q])===1;var w=(t,e,n)=>{if(!h(t))throw I(3,"observe");n&&e(t());let o=t(void 0,void 0,0,e);return J(o,!0),o};var ae=t=>{let e=[t];for(;e.length>0;){let n=e.shift();io(n);let r=n.childNodes;if(r)for(let o of r)e.push(o)}},io=t=>{let e=t[He];if(e){for(let n of e.unbinders)n();e.unbinders.splice(0),delete t[He]}};var F=t=>{t.remove(),setTimeout(()=>ae(t),1)};var Ln={8:t=>`Model binding requires a ref at ${t.outerHTML}`,7:t=>`Model binding is not supported on ${t.tagName} element at ${t.outerHTML}`,0:(t,e)=>`${t} binding expression is missing at ${e.outerHTML}`,1:(t,e,n)=>`invalid ${t} expression: ${e} at ${n.outerHTML}`,2:(t,e)=>`${t} requires object expression at ${e.outerHTML}`,3:(t,e)=>`${t} binder: key is empty on ${e.outerHTML}.`,4:(t,e,n,r)=>({msg:`Failed setting prop "${t}" on <${e.toLowerCase()}>: value ${n} is invalid.`,args:[r]}),5:(t,e)=>`${t} binding missing event type at ${e.outerHTML}`,6:(t,e)=>({msg:t,args:[e]})},M=(t,...e)=>{let n=Ln[t],r=P(n)?n.call(Ln,...e):n,o=tt.warning;o&&(j(r)?o(r):o(r,...r.args))},tt={warning:console.warn};var dt={},ut={},kn=1,In=t=>{let e=(kn++).toString();return dt[e]=t,ut[e]=0,e},Xt=t=>{ut[t]+=1},Yt=t=>{--ut[t]===0&&(delete dt[t],delete ut[t])},Dn=t=>dt[t],Zt=()=>kn!==1&&Object.keys(dt).length>0,nt="r-switch",ao=t=>{let e=t.filter(r=>Ne(r)).map(r=>[...r.querySelectorAll("[r-switch]")].map(o=>o.getAttribute(nt))),n=new Set;return e.forEach(r=>{r.forEach(o=>o&&n.add(o))}),[...n]},_e=(t,e)=>{if(!Zt())return;let n=ao(e);n.length!==0&&(n.forEach(Xt),_(t,()=>{n.forEach(Yt)}))};var en=(t,e,n,r)=>{let o=[];for(let s of t){let i=s.cloneNode(!0);n.insertBefore(i,r),o.push(i)}Te(e,o)},tn=Symbol("r-if"),Un=Symbol("r-else"),Hn=t=>t[Un]===1,yt=class{constructor(e){m(this,"p");m(this,"P");m(this,"q");m(this,"K");m(this,"z");m(this,"b");m(this,"T");this.p=e,this.P=e.o.f.if,this.q=Pe(e.o.f.if),this.K=e.o.f.else,this.z=e.o.f.elseif,this.b=e.o.f.for,this.T=e.o.f.pre}qe(e,n){let r=e.parentElement;for(;r!==null&&r!==document.documentElement;){if(r.hasAttribute(n))return!0;r=r.parentElement}return!1}N(e){let n=e.hasAttribute(this.P),r=be(e,this.q);for(let o of r)this.x(o);return n}W(e){return e[tn]?!0:(e[tn]=!0,be(e,this.q).forEach(n=>n[tn]=!0),!1)}x(e){if(e.hasAttribute(this.T)||this.W(e)||this.qe(e,this.b))return;let n=e.getAttribute(this.P);if(!n){M(0,this.P,e);return}e.removeAttribute(this.P),this.k(e,n)}B(e,n,r){let o=Be(e),s=e.parentNode,i=document.createComment(`__begin__ :${n}${r!=null?r:""}`);s.insertBefore(i,e),_e(i,o),o.forEach(c=>{F(c)}),e.remove(),n!=="if"&&(e[Un]=1);let a=document.createComment(`__end__ :${n}${r!=null?r:""}`);return s.insertBefore(a,i.nextSibling),{nodes:o,parent:s,commentBegin:i,commentEnd:a}}pe(e,n){if(!e)return[];let r=e.nextElementSibling;if(e.hasAttribute(this.K)){e.removeAttribute(this.K);let{nodes:o,parent:s,commentBegin:i,commentEnd:a}=this.B(e,"else");return[{mount:()=>{en(o,this.p,s,a)},unmount:()=>{le(i,a)},isTrue:()=>!0,isMounted:!1}]}else{let o=e.getAttribute(this.z);if(!o)return[];e.removeAttribute(this.z);let{nodes:s,parent:i,commentBegin:a,commentEnd:c}=this.B(e,"elseif",` => ${o} `),p=this.p.h.C(o),f=p.value,l=this.pe(r,n),u=[];_(a,()=>{p.stop();for(let R of u)R();u.length=0});let d=w(f,n);return u.push(d),[{mount:()=>{en(s,this.p,i,c)},unmount:()=>{le(a,c)},isTrue:()=>!!f()[0],isMounted:!1}].concat(l)}}k(e,n){let r=e.nextElementSibling,{nodes:o,parent:s,commentBegin:i,commentEnd:a}=this.B(e,"if",` => ${n} `),c=this.p.h.C(n),p=c.value,f=!1,l=this.p.h,u=l.V(),y=()=>{l.v(u,()=>{if(p()[0])f||(en(o,this.p,s,a),f=!0),d.forEach(b=>{b.unmount(),b.isMounted=!1});else{le(i,a),f=!1;let b=!1;for(let L of d)!b&&L.isTrue()?(L.isMounted||(L.mount(),L.isMounted=!0),b=!0):(L.unmount(),L.isMounted=!1)}})},d=this.pe(r,y),R=[];_(i,()=>{c.stop();for(let b of R)b();R.length=0}),y();let E=w(p,y);R.push(E)}};var Be=t=>{let e=ce(t)?t.content.childNodes:[t];return Array.from(e).filter(n=>{let r=n==null?void 0:n.tagName;return r!=="SCRIPT"&&r!=="STYLE"})},Te=(t,e)=>{for(let n of e)!Hn(n)&&t.G(n)},be=(t,e)=>{var r;let n=t.querySelectorAll(e);return(r=t.matches)!=null&&r.call(t,e)?[t,...n]:n},ce=t=>t instanceof HTMLTemplateElement,Ne=t=>t.nodeType===Node.ELEMENT_NODE,rt=t=>t.nodeType===Node.ELEMENT_NODE,_n=t=>t instanceof HTMLSlotElement,me=t=>ce(t)?t.content.childNodes:t.childNodes,le=(t,e)=>{let n=t.nextSibling;for(;n!=null&&n!==e;){let r=n.nextSibling;F(n),n=r}},Ee=(t,e)=>{Object.defineProperty(t,"value",{get(){return t()},set(n){if(e)throw new Error("value is readonly.");return t(n)},enumerable:!0,configurable:!1})},Bn=(t,e)=>{if(!t)return!1;if(t.startsWith("["))return t.substring(1,t.length-1);let n=e.length;return t.startsWith(e)?t.substring(n,t.length-n):!1},Pe=t=>`[${CSS.escape(t)}]`,ht=(t,e)=>(t.startsWith("@")&&(t=e.f.on+":"+t.slice(1)),t.includes("[")&&(t=t.replace(/[[\]]/g,e.f.dynamic)),t),nn=t=>{let e=Object.create(null);return n=>e[n]||(e[n]=t(n))},co=/-(\w)/g,V=nn(t=>t&&t.replace(co,(e,n)=>n?n.toUpperCase():"")),po=/\B([A-Z])/g,je=nn(t=>t&&t.replace(po,"-$1").toLowerCase()),ot=nn(t=>t&&t.charAt(0).toUpperCase()+t.slice(1));var ne=[],Pn=t=>{var e;ne.length!==0&&((e=ne[ne.length-1])==null||e.add(t))},Le=t=>{if(!t)return()=>{};let e={stop:()=>{}};return fo(t,e),J(()=>e.stop(),!0),e.stop},fo=(t,e)=>{if(!t)return;let n=[],r=!1,o=()=>{for(let s of n)s();n=[],r=!0};e.stop=o;try{let s=new Set;if(ne.push(s),t(i=>n.push(i)),r)return;for(let i of[...s]){let a=w(i,()=>{o(),Le(t)});n.push(a)}}finally{ne.pop()}},gt=t=>{let e=ne.length,n=e>0&&ne[e-1];try{return n&&ne.push(null),t()}finally{n&&ne.pop()}},bt=t=>{try{let e=new Set;return ne.push(e),{value:t(),refs:[...e]}}finally{ne.pop()}};var Ve=t=>!!t&&t[mt]===1;var K=(t,e,n)=>{if(!h(t))return;let r=t;if(r(void 0,e,1),!n)return;let o=r();if(o){if(T(o)||Y(o))for(let s of o)K(s,e,!0);else if(he(o))for(let s of o)K(s[0],e,!0),K(s[1],e,!0);if(A(o))for(let s in o)K(o[s],e,!0)}};function lo(t,e,n){Object.defineProperty(t,e,{value:n,enumerable:!1,writable:!0,configurable:!0})}var $e=(t,e,n)=>{n.forEach(function(r){let o=t[r];lo(e,r,function(...i){let a=o.apply(this,i),c=this[Q];for(let p of c)K(p);return a})})},Tt=(t,e)=>{Object.defineProperty(t,Symbol.toStringTag,{value:e,writable:!1,enumerable:!1,configurable:!0})};var jn=Array.prototype,rn=Object.create(jn),mo=["push","pop","shift","unshift","splice","sort","reverse"];$e(jn,rn,mo);var Vn=Map.prototype,Et=Object.create(Vn),uo=["set","clear","delete"];Tt(Et,"Map");$e(Vn,Et,uo);var $n=Set.prototype,Ct=Object.create($n),yo=["add","clear","delete"];Tt(Ct,"Set");$e($n,Ct,yo);var pe={},G=t=>{if(h(t)||Ve(t))return t;let e={auto:!0,_value:t},n=c=>A(c)?Q in c?!0:T(c)?(Object.setPrototypeOf(c,rn),!0):Y(c)?(Object.setPrototypeOf(c,Ct),!0):he(c)?(Object.setPrototypeOf(c,Et),!0):!1:!1,r=n(t),o=new Set,s=(c,p)=>{if(pe.stack&&pe.stack.length){pe.stack[pe.stack.length-1].add(a);return}o.size!==0&>(()=>{for(let f of[...o.keys()])o.has(f)&&f(c,p)})},i=c=>{let p=c[Q];p||(c[Q]=p=new Set),p.add(a)},a=(...c)=>{if(!(2 in c)){let f=c[0],l=c[1];return 0 in c?e._value===f||h(f)&&(f=f(),e._value===f)?f:(n(f)&&i(f),e._value=f,e.auto&&s(f,l),e._value):(Pn(a),e._value)}switch(c[2]){case 0:{let f=c[3];if(!f)return()=>{};let l=u=>{o.delete(u)};return o.add(f),()=>{l(f)}}case 1:{let f=c[1],l=e._value;s(l,f);break}case 2:return o.size;case 3:{e.auto=!1;break}case 4:e.auto=!0}return e._value};return a[Q]=1,Ee(a,!1),r&&i(t),a};var D=t=>h(t)?t():t;var st=class{constructor(e){m(this,"E",[]);m(this,"_",new Map);m(this,"J");this.J=e}get S(){return this.E.length}Q(e){let n=this.J(e.value);n!==void 0&&this._.set(n,e)}X(e){var r;let n=this.J((r=this.E[e])==null?void 0:r.value);n!==void 0&&this._.delete(n)}static Ke(e,n){return{items:[],index:e,value:n,order:-1}}w(e){e.order=this.S,this.E.push(e),this.Q(e)}ze(e,n){let r=this.S;for(let o=e;o<r;++o)this.E[o].order=o+1;n.order=e,this.E.splice(e,0,n),this.Q(n)}I(e){return this.E[e]}Y(e,n){this.X(e),this.E[e]=n,this.Q(n),n.order=e}ce(e){this.X(e),this.E.splice(e,1);let n=this.S;for(let r=e;r<n;++r)this.E[r].order=r}fe(e){let n=this.S;for(let r=e;r<n;++r)this.X(r);this.E.splice(e)}Ct(e){return this._.has(e)}We(e){var r;let n=this._.get(e);return(r=n==null?void 0:n.order)!=null?r:-1}};var on=Symbol("r-for"),xt=class xt{constructor(e){m(this,"p");m(this,"b");m(this,"Z");m(this,"T");this.p=e,this.b=e.o.f.for,this.Z=Pe(this.b),this.T=e.o.f.pre}N(e){let n=e.hasAttribute(this.b),r=be(e,this.Z);for(let o of r)this.Ge(o);return n}W(e){return e[on]?!0:(e[on]=!0,be(e,this.Z).forEach(n=>n[on]=!0),!1)}Ge(e){if(e.hasAttribute(this.T)||this.W(e))return;let n=e.getAttribute(this.b);if(!n){M(0,this.b,e);return}e.removeAttribute(this.b),this.Je(e,n)}le(e){return te(e)?[]:(P(e)&&(e=e()),Symbol.iterator in Object(e)?e:typeof e=="number"?(r=>({*[Symbol.iterator](){for(let o=1;o<=r;o++)yield o}}))(e):Object.entries(e))}Je(e,n){var oe;let r=this.Qe(n);if(!(r!=null&&r.list)){M(1,this.b,n,e);return}let o=this.p.o.f.key,s=this.p.o.f.keyBind,i=(oe=e.getAttribute(o))!=null?oe:e.getAttribute(s);e.removeAttribute(o),e.removeAttribute(s);let a=i?v=>{var N;return D((N=D(v))==null?void 0:N[i])}:v=>v,c=(v,N)=>a(v)===a(N),p=Be(e),f=e.parentNode;if(!f)return;let l=`${this.b} => ${n}`,u=new Comment(`__begin__ ${l}`);f.insertBefore(u,e),_e(u,p),p.forEach(v=>{F(v)}),e.remove();let y=new Comment(`__end__ ${l}`);f.insertBefore(y,u.nextSibling);let d=this.p,R=d.h,U=R.V(),E=(v,N,q)=>{let S=r.createContext(N,v),ee=st.Ke(S.index,N);return R.v(U,()=>{R.w(S.ctx);let se=q.previousSibling,Ue=[];for(let Ze of p){let g=Ze.cloneNode(!0);f.insertBefore(g,q),Ue.push(g)}for(Te(d,Ue),se=se.nextSibling;se!==q;)ee.items.push(se),se=se.nextSibling}),ee},b=(v,N)=>{let q=k.I(v).items,S=q[q.length-1].nextSibling;for(let ee of q)F(ee);k.Y(v,E(v,N,S))},L=(v,N)=>{k.w(E(v,N,y))},H=v=>{for(let N of k.I(v).items)F(N)},re=v=>{let N=k.S;for(let q=v;q<N;++q)k.I(q).index(q)},Qe=v=>{let N=k.S;P(v)&&(v=v());let q=D(v[0]);if(T(q)&&q.length===0){le(u,y),k.fe(0);return}let S=0,ee=Number.MAX_SAFE_INTEGER,se=N,Ue=this.p.o.forGrowThreshold,Ze=()=>k.S<se+Ue;for(let O of this.le(v[0])){let C=()=>{if(S<N){let W=k.I(S++);if(c(W.value,O))return;let $=k.We(a(O));if($>=S&&$-S<10){if(--S,ee=Math.min(ee,S),H(S),k.ce(S),--N,$>S+1)for(let x=S;x<$-1&&x<N&&!c(k.I(S).value,O);)++x,H(S),k.ce(S),--N;C();return}Ze()?(k.ze(S-1,E(S,O,k.I(S-1).items[0])),ee=Math.min(ee,S-1),++N):b(S-1,O)}else L(S++,O)};C()}let g=S;for(N=k.S;S<N;)H(S++);k.fe(g),re(ee)},Xe=()=>{at=w(ye,Qe)},zt=()=>{Ye.stop(),at()},Ye=R.C(r.list),ye=Ye.value,at,Se=0,k=new st(a);for(let v of this.le(ye()[0]))k.w(E(Se++,v,y));_(u,zt),Xe()}Qe(e){var c,p;let n=xt.Xe.exec(e);if(!n)return;let r=(n[1]+((c=n[2])!=null?c:"")).split(",").map(f=>f.trim()),o=r.length>1?r.length-1:-1,s=o!==-1&&(r[o]==="index"||(p=r[o])!=null&&p.startsWith("#"))?r[o]:"";s&&r.splice(o,1);let i=n[3];if(!i||r.length===0)return;let a=/[{[]/.test(e);return{list:i,createContext:(f,l)=>{let u={},y=D(f);if(!a&&r.length===1)u[r[0]]=f;else if(T(y)){let R=0;for(let U of r)u[U]=y[R++]}else for(let R of r)u[R]=y[R];let d={ctx:u,index:G(-1)};return s&&(d.index=u[s.startsWith("#")?s.substring(1):s]=G(l)),d}}}};m(xt,"Xe",/\{?\[?\(?([^)}\]]+)\)?\]?\}?([^)]+)?\s+\b(?:in|of)\b\s+(.*)\s*$/);var Rt=xt;var ho=(t,e)=>{for(let n of t){let r=n.cloneNode(!0);e.appendChild(r)}},vt=class{constructor(e){m(this,"p");m(this,"D");m(this,"ue");this.p=e,this.D=e.o.f.is,this.ue=Pe(this.D)+", [is]"}N(e){let n=e.hasAttribute(this.D),r=be(e,this.ue);for(let o of r)this.x(o);return n}x(e){let n=e.getAttribute(this.D);if(!n){if(n=e.getAttribute("is"),!n||!n.startsWith("regor:"))return;n=`'${n.slice(6)}'`,e.removeAttribute("is")}e.removeAttribute(this.D),this.k(e,n)}B(e,n){let r=Be(e),o=e.parentNode,s=document.createComment(`__begin__ dynamic ${n!=null?n:""}`);o.insertBefore(s,e),_e(s,r),r.forEach(a=>{F(a)}),e.remove();let i=document.createComment(`__end__ dynamic ${n!=null?n:""}`);return o.insertBefore(i,s.nextSibling),{nodes:r,parent:o,commentBegin:s,commentEnd:i}}k(e,n){let{nodes:r,parent:o,commentBegin:s,commentEnd:i}=this.B(e,` => ${n} `),a=this.p.h.C(n),c=a.value,p=this.p.h,f=p.V(),l={name:""},u=ce(e)?r:[...r[0].childNodes],y=()=>{p.v(f,()=>{var L;let E=c()[0];if(A(E)&&(E.name?E=E.name:E=(L=Object.entries(p.me()).filter(H=>H[1]===E)[0])==null?void 0:L[0]),!j(E)||z(E)){le(s,i);return}if(l.name===E)return;le(s,i);let b=document.createElement(E);for(let H of e.getAttributeNames())H!==this.D&&b.setAttribute(H,e.getAttribute(H));ho(u,b),o.insertBefore(b,i),this.p.G(b),l.name=E})},d=[];_(s,()=>{a.stop();for(let E of d)E();d.length=0}),y();let U=w(c,y);d.push(U)}};var Fn={collectRefObj:!0,onBind:(t,e)=>w(e.value,()=>{let r=e.value(),o=e.context,s=r[0];if(A(s))for(let i of Object.entries(s)){let a=i[0],c=i[1],p=o[a];p!==c&&(h(p)?p(c):o[a]=c)}},!0)};var qn={collectRefObj:!0,once:!0,onBind:(t,e)=>{let n=e.value(),r=e.context,o=n[0];if(!A(o))return()=>{};for(let s of Object.entries(o)){let i=s[0],a=s[1],c=r[i];c!==a&&(h(c)?c(a):r[i]=a)}return()=>{}}};var Ce=t=>{var n,r;let e=(n=ft(t))==null?void 0:n.onUnmounted;e==null||e.forEach(o=>{o()}),(r=t.unmounted)==null||r.call(t)};var Fe=class{constructor(e,n,r,o,s){m(this,"props");m(this,"start");m(this,"end");m(this,"ctx");m(this,"autoProps",!0);m(this,"entangle",!0);m(this,"enableSwitch",!1);m(this,"onAutoPropsAssigned");m(this,"de");m(this,"emit",(e,n)=>{this.de.dispatchEvent(new CustomEvent(e,{detail:n}))});this.props=e,this.de=n,this.ctx=r,this.start=o,this.end=s}unmount(){let e=this.start.nextSibling,n=this.end;for(;e&&e!==n;)F(e),e=e.nextSibling;Ce(this)}};var sn=Symbol("scope"),St=t=>{try{Nn();let e=t();Qt(e);let n={context:e,unmount:()=>Ce(e),[sn]:1};return n[sn]=1,n}finally{Mn()}},zn=t=>A(t)?sn in t:!1;var wt=(t,e)=>{if(t===e)return()=>{};let n=w(t,o=>e(o)),r=w(e,o=>t(o));return e(t()),()=>{n(),r()}};var Ot=t=>{var n,r;let e=(n=ft(t))==null?void 0:n.onMounted;e==null||e.forEach(o=>{o()}),(r=t.mounted)==null||r.call(t)};var Kn={collectRefObj:!0,onBind:(t,e,n,r,o,s)=>{if(!r)return()=>{};let i=V(r);return w(e.value,()=>{var l;let c=(l=e.refs[0])!=null?l:e.value()[0],p=e.context,f=p[r];f!==c&&(h(f)?f(c):p[i]=c)},!0)}};var At=class{constructor(e){m(this,"p");m(this,"ye");this.p=e,this.ye=e.o.f.inherit}N(e){this.Ye(e)}Ye(e){var l;let n=this.p,r=n.h,o=n.o.he,s=n.o.ge,i=r.me(),a=r.Ze(),c=[...o.keys(),...a,...[...o.keys()].map(je),...a.map(je)].join(",");if(z(c))return;let p=e.querySelectorAll(c),f=(l=e.matches)!=null&&l.call(e,c)?[e,...p]:p;for(let u of f){if(u.hasAttribute(n.T))continue;let y=u.parentNode;if(!y)continue;let d=u.nextSibling,R=V(u.tagName).toUpperCase(),U=i[R],E=U!=null?U:s.get(R);if(!E)continue;let b=E.template;if(!b)continue;let L=u.parentElement;if(!L)continue;let H=new Comment(" begin component: "+u.tagName),re=new Comment(" end component: "+u.tagName);L.insertBefore(H,u),u.remove();let Qe=n.o.f.props,Xe=n.o.f.propsOnce,zt=n.o.f.bind,Ye=(g,O)=>{let C={},W=g.hasAttribute(Qe),$=g.hasAttribute(Xe);return r.v(O,()=>{r.w(C),W&&n.x(Fn,g,Qe),$&&n.x(qn,g,Xe);let x=E.props;if(!x||x.length===0)return;x=x.map(V);for(let we of x.concat(x.map(je))){let fe=g.getAttribute(we);fe!==null&&(C[V(we)]=fe,g.removeAttribute(we))}let B=n.ee.be(g,!1);for(let[we,fe]of B.entries()){let[Oe,Kt]=fe.te;Kt&&x.includes(V(Kt))&&(Oe!=="."&&Oe!==":"&&Oe!==zt||n.x(Kn,g,we,!0,Kt,fe.ne))}}),C},ye=[...r.V()],at=()=>{var W;let g=Ye(u,ye),O=new Fe(g,u,ye,H,re),C=St(()=>{var $;return($=E.context(O))!=null?$:{}}).context;if(O.autoProps){for(let[$,x]of Object.entries(g))if($ in C){let B=C[$];if(B===x)continue;O.entangle&&h(B)&&h(x)?_(H,wt(x,B)):h(B)?B(x):C[$]=D(x)}else C[$]=x;(W=O.onAutoPropsAssigned)==null||W.call(O)}return{componentCtx:C,head:O}},{componentCtx:Se,head:k}=at(),oe=[...me(b)],v=oe.length,N=u.childNodes.length===0,q=g=>{let O=g.parentElement;if(N){for(let x of[...g.childNodes])O.insertBefore(x,g);return}let C=g.name;z(C)&&(C=g.getAttributeNames().filter(x=>x.startsWith("#"))[0],z(C)?C="default":C=C.substring(1));let W=u.querySelector(`template[name='${C}'], template[\\#${C}]`);!W&&C==="default"&&(W=u.querySelector("template:not([name])"),W&&W.getAttributeNames().filter(x=>x.startsWith("#")).length>0&&(W=null));let $=x=>{k.enableSwitch&&r.v(ye,()=>{r.w(Se);let B=Ye(g,r.V());r.v(ye,()=>{r.w(B);let we=r.V(),fe=In(we);for(let Oe of x)Ne(Oe)&&(Oe.setAttribute(nt,fe),Xt(fe),_(Oe,()=>{Yt(fe)}))})})};if(W){let x=[...me(W)];for(let B of x)O.insertBefore(B,g);$(x)}else{if(C!=="default"){for(let B of[...me(g)])O.insertBefore(B,g);return}let x=[...me(u)].filter(B=>!ce(B));for(let B of x)O.insertBefore(B,g);$(x)}},S=g=>{if(!Ne(g))return;let O=g.querySelectorAll("slot");if(_n(g)){q(g),g.remove();return}for(let C of O)q(C),C.remove()};(()=>{for(let g=0;g<v;++g)oe[g]=oe[g].cloneNode(!0),y.insertBefore(oe[g],d),S(oe[g])})(),L.insertBefore(re,d);let se=()=>{if(!E.inheritAttrs)return;let g=oe.filter(C=>C.nodeType===Node.ELEMENT_NODE);g.length>1&&(g=g.filter(C=>C.hasAttribute(this.ye)));let O=g[0];if(O)for(let C of u.getAttributeNames()){if(C===Qe||C===Xe)continue;let W=u.getAttribute(C);if(C==="class")O.classList.add(...W.split(" "));else if(C==="style"){let $=O.style,x=u.style;for(let B of x)$.setProperty(B,x.getPropertyValue(B))}else O.setAttribute(ht(C,n.o),W)}},Ue=()=>{for(let g of u.getAttributeNames())!g.startsWith("@")&&!g.startsWith(n.o.f.on)&&u.removeAttribute(g)},Ze=()=>{se(),Ue(),r.w(Se),n.Te(u,!1),Se.$emit=k.emit,Te(n,oe),_(u,()=>{Ce(Se)}),_(H,()=>{ae(u)}),Ot(Se)};r.v(ye,Ze)}}};var an=class{constructor(e){m(this,"xe");m(this,"te",[]);m(this,"ne",[]);m(this,"Ee",[]);this.xe=e,this.C()}C(){let e=this.xe,n=e.startsWith(".");n&&(e=":"+e.slice(1));let r=e.indexOf("."),o=this.te=(r<0?e:e.substring(0,r)).split(/[:@]/);if(z(o[0])&&(o[0]=n?".":e[0]),r>=0){let s=this.ne=e.slice(r+1).split(".");if(s.includes("camel")){let i=o.length-1;o[i]=V(o[i])}s.includes("prop")&&(o[0]=".")}}},Nt=class{constructor(e){m(this,"p");m(this,"Re");this.p=e,this.Re=e.o.et()}be(e,n){let r=new Map;if(!rt(e))return r;let o=this.Re,s=a=>{let c=a.getAttributeNames().filter(p=>o.some(f=>p.startsWith(f)));for(let p of c)r.has(p)||r.set(p,new an(p)),r.get(p).Ee.push(a)};if(s(e),!n)return r;let i=e.querySelectorAll("*");for(let a of i)s(a);return r}};var Mt={};var Lt=class{constructor(e){m(this,"h");m(this,"Ce");m(this,"ve");m(this,"Se");m(this,"we");m(this,"ee");m(this,"o");m(this,"T");m(this,"Oe");this.h=e,this.o=e.o,this.ve=new Rt(this),this.Ce=new yt(this),this.Se=new vt(this),this.we=new At(this),this.ee=new Nt(this),this.T=this.o.f.pre,this.Oe=this.o.f.dynamic}tt(e){let n=ce(e)?[e]:e.querySelectorAll("template");for(let r of n){if(r.hasAttribute(this.T))continue;let o=r.parentNode;if(!o)continue;let s=r.nextSibling;if(r.remove(),!r.content)continue;let i=[...r.content.childNodes];for(let a of i)o.insertBefore(a,s);Te(this,i)}}G(e){e.nodeType!==Node.ELEMENT_NODE||e.hasAttribute(this.T)||this.Ce.N(e)||this.ve.N(e)||this.Se.N(e)||(this.we.N(e),this.tt(e),this.Te(e,!0))}Te(e,n){var s;let r=this.ee.be(e,n),o=this.o.H;for(let[i,a]of r.entries()){let[c,p]=a.te,f=(s=o[i])!=null?s:o[c];if(!f){console.error("directive not found:",c);continue}a.Ee.forEach(l=>{this.x(f,l,i,!1,p,a.ne)})}}x(e,n,r,o,s,i){if(n.hasAttribute(this.T))return;let a=n.getAttribute(r);n.removeAttribute(r);let c=p=>{let f=p.getAttribute(nt);return f||(p.parentElement?c(p.parentElement):null)};if(Zt()){let p=c(n);if(p){this.h.v(Dn(p),()=>{this.k(e,n,a,s,i)});return}}this.k(e,n,a,s,i)}nt(e,n,r){if(e!==Mt)return!1;if(z(r))return!0;let o=document.querySelector(r);if(o){let s=n.parentElement;if(!s)return!0;let i=new Comment(`teleported => '${r}'`);s.insertBefore(i,n),n.teleportedFrom=i,i.teleportedTo=n,_(i,()=>{F(n)}),o.appendChild(n)}return!0}k(e,n,r,o,s){var U;if(n.nodeType!==Node.ELEMENT_NODE||r==null||this.nt(e,n,r))return;let i=this.h.C(r,e.isLazy,e.isLazyKey,e.collectRefObj,e.once),a=[];_(n,()=>{i.stop(),f==null||f.stop();for(let E of a)E();a.length=0});let p=Bn(o,this.Oe),f;p&&(f=this.h.C(V(p),void 0,void 0,void 0,e.once));let l,u=()=>(l=i.value(),l),y,d=()=>f?(y=f.value()[0],y):(y=o,o),R=()=>{if(!e.onChange)return;let E=w(i.value,b=>{var re;let L=l,H=y;(re=e.onChange)==null||re.call(e,n,u(),L,d(),H,s)});if(a.push(E),f){let b=w(f.value,L=>{var re;let H=y;(re=e.onChange)==null||re.call(e,n,u(),H,d(),H,s)});a.push(b)}};e.once||R(),e.onBind&&a.push(e.onBind(n,i,r,o,f,s)),(U=e.onChange)==null||U.call(e,n,u(),void 0,d(),void 0,s)}};var go=9,bo=10,To=13,Eo=32,Re=46,kt=44,Co=39,Ro=34,It=40,qe=41,Dt=91,Ut=93,cn=63,xo=59,Wn=58,vo=123,Ht=125,fn=43,So=45,Gn=96,Jn=47,wo=92,Qn=[2,3],Xn=[fn,So],rr={"-":1,"!":1,"~":1,"+":1,new:1},or={"=":2.5,"*=":2.5,"**=":2.5,"/=":2.5,"%=":2.5,"+=":2.5,"-=":2.5,"<<=":2.5,">>=":2.5,">>>=":2.5,"&=":2.5,"^=":2.5,"|=":2.5},Ke={"=>":2,...or,"||":3,"??":3,"&&":4,"|":5,"^":6,"&":7,"==":8,"!=":8,"===":8,"!==":8,"<":9,">":9,"<=":9,">=":9,in:9,"<<":10,">>":10,">>>":10,"+":11,"-":11,"*":12,"/":12,"%":12,"**":13},sr=Object.keys(or),Oo=new Set(sr),_t=new Set;_t.add("=>");sr.forEach(t=>_t.add(t));var Ao=new Set(["$","_"]),Yn={true:!0,false:!1,null:null},No="this";function ir(t){return Math.max(0,...Object.keys(t).map(e=>e.length))}var Mo=ir(rr),Lo=ir(Ke),We="Expected ",ke="Unexpected ",mn="Unclosed ",ko=We+":",Zn=We+"expression",Io="missing }",Do=ke+"object property",Uo=mn+"(",er=We+"comma",tr=ke+"token ",Ho=ke+"period",pn=We+"expression after ",_o="missing unaryOp argument",Bo=mn+"[",Po=We+"exponent (",jo="Variable names cannot start with a number (",Vo=mn+'quote after "';var ze=t=>t>=48&&t<=57,nr=t=>Ke[t]||0,ln=class{constructor(e){m(this,"rt",{0:[this.ot],1:[this.st,this.it,this.at],2:[this.pt,this.ct,this.ft,this.Ae,this.lt],3:[this.ut,this.mt,this.dt]});m(this,"r");m(this,"e");this.r=e,this.e=0}get M(){return this.r.charAt(this.e)}get l(){return this.r.charCodeAt(this.e)}m(e){return this.r.charCodeAt(this.e)===e}U(e){let n=String.fromCharCode(e);return e>=65&&e<=90||e>=97&&e<=122||e>=128&&!(n in Ke)||Ao.has(n)}re(e){return this.U(e)||ze(e)}i(e){return new Error(`${e} at character ${this.e}`)}L(e,n,r){let o=this.rt[e];if(!o)return r;let s={node:r},i=a=>{a.call(this,s)};return n===0?o.forEach(i):o.find(i),s.node}y(){let e=this.l,n=this.r,r=this.e;for(;e===Eo||e===go||e===bo||e===To;)e=n.charCodeAt(++r);this.e=r}parse(){let e=this.oe();return e.length===1?e[0]:{type:0,body:e}}oe(e){let n=[];for(;this.e<this.r.length;){let r=this.l;if(r===xo||r===kt)this.e++;else{let o=this.O();if(o)n.push(o);else if(this.e<this.r.length){if(r===e)break;throw this.i(ke+'"'+this.M+'"')}}}return n}O(){var n;let e=(n=this.L(0,1))!=null?n:this.Ne();return this.y(),this.L(1,0,e)}se(){this.y();let e=this.e,n=this.r,r=n.substr(e,Lo),o=r.length;for(;o>0;){if(r in Ke&&(!this.U(this.l)||e+r.length<n.length&&!this.re(n.charCodeAt(e+r.length))))return e+=o,this.e=e,r;r=r.substr(0,--o)}return!1}Ne(){let e,n,r,o,s,i,a,c;if(s=this.j(),!s||(n=this.se(),!n))return s;if(o={value:n,prec:nr(n),right_a:_t.has(n)},i=this.j(),!i)throw this.i(pn+n);let p=[s,o,i];for(;n=this.se();){if(r=nr(n),r===0){this.e-=n.length;break}o={value:n,prec:r,right_a:_t.has(n)},c=n;let f=l=>o.right_a&&l.right_a?r>l.prec:r<=l.prec;for(;p.length>2&&f(p[p.length-2]);)i=p.pop(),n=p.pop().value,s=p.pop(),e={type:8,operator:n,left:s,right:i},p.push(e);if(e=this.j(),!e)throw this.i(pn+c);p.push(o,e)}for(a=p.length-1,e=p[a];a>1;)e={type:8,operator:p[a-1].value,left:p[a-2],right:e},a-=2;return e}j(){let e,n,r;if(this.y(),r=this.L(2,1),r)return this.L(3,0,r);let o=this.l;if(ze(o)||o===Re)return this.yt();if(o===Co||o===Ro)r=this.ht();else if(o===Dt)r=this.gt();else{for(e=this.r.substr(this.e,Mo),n=e.length;n>0;){if(Object.prototype.hasOwnProperty.call(rr,e)&&(!this.U(this.l)||this.e+e.length<this.r.length&&!this.re(this.r.charCodeAt(this.e+e.length)))){this.e+=n;let s=this.j();if(!s)throw this.i(_o);return this.L(3,0,{type:7,operator:e,argument:s})}e=e.substr(0,--n)}this.U(o)?(r=this.ie(),r.name in Yn?r={type:4,value:Yn[r.name],raw:r.name}:r.name===No&&(r={type:5})):o===It&&(r=this.bt())}return r?(r=this.$(r),this.L(3,0,r)):this.L(3,0,!1)}$(e){this.y();let n=this.l;for(;n===Re||n===Dt||n===It||n===cn;){let r;if(n===cn){if(this.r.charCodeAt(this.e+1)!==Re)break;r=!0,this.e+=2,this.y(),n=this.l}if(this.e++,n===Dt){if(e={type:3,computed:!0,object:e,property:this.O()},this.y(),n=this.l,n!==Ut)throw this.i(Bo);this.e++}else n===It?e={type:6,arguments:this.Me(qe),callee:e}:(n===Re||r)&&(r&&this.e--,this.y(),e={type:3,computed:!1,object:e,property:this.ie()});r&&(e.optional=!0),this.y(),n=this.l}return e}yt(){let e="",n;for(;ze(this.l);)e+=this.r.charAt(this.e++);if(this.m(Re))for(e+=this.r.charAt(this.e++);ze(this.l);)e+=this.r.charAt(this.e++);if(n=this.M,n==="e"||n==="E"){for(e+=this.r.charAt(this.e++),n=this.M,(n==="+"||n==="-")&&(e+=this.r.charAt(this.e++));ze(this.l);)e+=this.r.charAt(this.e++);if(!ze(this.r.charCodeAt(this.e-1)))throw this.i(Po+e+this.M+")")}let r=this.l;if(this.U(r))throw this.i(jo+e+this.M+")");if(r===Re||e.length===1&&e.charCodeAt(0)===Re)throw this.i(Ho);return{type:4,value:parseFloat(e),raw:e}}ht(){let e="",n=this.e,r=this.r.charAt(this.e++),o=!1;for(;this.e<this.r.length;){let s=this.r.charAt(this.e++);if(s===r){o=!0;break}else if(s==="\\")switch(s=this.r.charAt(this.e++),s){case"n":e+=`
|
|
2
|
+
`;break;case"r":e+="\r";break;case"t":e+=" ";break;case"b":e+="\b";break;case"f":e+="\f";break;case"v":e+="\v";break;default:e+=s}else e+=s}if(!o)throw this.i(Vo+e+'"');return{type:4,value:e,raw:this.r.substring(n,this.e)}}ie(){let e=this.l,n=this.e;if(this.U(e))this.e++;else throw this.i(ke+this.M);for(;this.e<this.r.length&&(e=this.l,this.re(e));)this.e++;return{type:2,name:this.r.slice(n,this.e)}}Me(e){let n=[],r=!1,o=0;for(;this.e<this.r.length;){this.y();let s=this.l;if(s===e){if(r=!0,this.e++,e===qe&&o&&o>=n.length)throw this.i(tr+String.fromCharCode(e));break}else if(s===kt){if(this.e++,o++,o!==n.length){if(e===qe)throw this.i(tr+",");if(e===Ut)for(let i=n.length;i<o;i++)n.push(null)}}else{if(n.length!==o&&o!==0)throw this.i(er);{let i=this.O();if(!i||i.type===0)throw this.i(er);n.push(i)}}}if(!r)throw this.i(We+String.fromCharCode(e));return n}bt(){this.e++;let e=this.oe(qe);if(this.m(qe))return this.e++,e.length===1?e[0]:e.length?{type:1,expressions:e}:!1;throw this.i(Uo)}gt(){return this.e++,{type:9,elements:this.Me(Ut)}}pt(e){if(this.m(vo)){this.e++;let n=[];for(;!isNaN(this.l);){if(this.y(),this.m(Ht)){this.e++,e.node=this.$({type:10,properties:n});return}let r=this.O();if(!r)break;if(this.y(),r.type===2&&(this.m(kt)||this.m(Ht)))n.push({type:12,computed:!1,key:r,value:r,shorthand:!0});else if(this.m(Wn)){this.e++;let o=this.O();if(!o)throw this.i(Do);let s=r.type===9;n.push({type:12,computed:s,key:s?r.elements[0]:r,value:o,shorthand:!1}),this.y()}else r&&n.push(r);this.m(kt)&&this.e++}throw this.i(Io)}}ct(e){let n=this.l;if(Xn.some(r=>r===n&&r===this.r.charCodeAt(this.e+1))){this.e+=2;let r=e.node={type:13,operator:n===fn?"++":"--",argument:this.$(this.ie()),prefix:!0};if(!r.argument||!Qn.includes(r.argument.type))throw this.i(ke+r.operator)}}mt(e){if(e.node){let n=this.l;if(Xn.some(r=>r===n&&r===this.r.charCodeAt(this.e+1))){if(!Qn.includes(e.node.type))throw this.i(ke+e.node.operator);this.e+=2,e.node={type:13,operator:n===fn?"++":"--",argument:e.node,prefix:!1}}}}ft(e){[0,1,2].every(n=>this.r.charCodeAt(this.e+n)===Re)&&(this.e+=3,e.node={type:14,argument:this.O()})}at(e){if(e.node&&this.m(cn)){this.e++;let n=e.node,r=this.O();if(!r)throw this.i(Zn);if(this.y(),this.m(Wn)){this.e++;let o=this.O();if(!o)throw this.i(Zn);if(e.node={type:11,test:n,consequent:r,alternate:o},n.operator&&Ke[n.operator]<=.9){let s=n;for(;s.right.operator&&Ke[s.right.operator]<=.9;)s=s.right;e.node.test=s.right,s.right=e.node,e.node=n}}else throw this.i(ko)}}ot(e){if(this.y(),this.m(It)){let n=this.e;if(this.e++,this.y(),this.m(qe)){this.e++;let r=this.se();if(r==="=>"){let o=this.Ne();if(!o)throw this.i(pn+r);e.node={type:15,params:null,body:o};return}}this.e=n}}st(e){this.Le(e.node)}Le(e){e&&(Object.values(e).forEach(n=>{n&&typeof n=="object"&&this.Le(n)}),e.operator==="=>"&&(e.type=15,e.params=e.left?[e.left]:null,e.body=e.right,e.params&&e.params[0].type===1&&(e.params=e.params[0].expressions),delete e.left,delete e.right,delete e.operator))}it(e){e.node&&this.F(e.node)}F(e){Oo.has(e.operator)?(e.type=16,this.F(e.left),this.F(e.right)):e.operator||Object.values(e).forEach(n=>{n&&typeof n=="object"&&this.F(n)})}dt(e){if(!e.node)return;let n=e.node.type;(n===2||n===3)&&this.m(Gn)&&(e.node={type:17,tag:e.node,quasi:this.Ae(e)})}Ae(e){if(!this.m(Gn))return;let n={type:19,quasis:[],expressions:[]},r="",o="",s=!1,i=this.r.length,a=()=>n.quasis.push({type:18,value:{raw:o,cooked:r},tail:s});for(;this.e<i;){let c=this.r.charAt(++this.e);if(c==="`")return this.e+=1,s=!0,a(),e.node=n,n;if(c==="$"&&this.r.charAt(this.e+1)==="{"){if(this.e+=2,a(),o="",r="",n.expressions.push(...this.oe(Ht)),!this.m(Ht))throw this.i("unclosed ${")}else if(c==="\\")switch(o+=c,c=this.r.charAt(++this.e),o+=c,c){case"n":r+=`
|
|
3
|
+
`;break;case"r":r+="\r";break;case"t":r+=" ";break;case"b":r+="\b";break;case"f":r+="\f";break;case"v":r+="\v";break;default:r+=c}else r+=c,o+=c}throw this.i("Unclosed `")}ut(e){var o;let n=e.node;if(!n||n.operator!=="new"||!n.argument)return;if(!n.argument||![6,3].includes(n.argument.type))throw this.i("Expected new function()");e.node=n.argument;let r=e.node;for(;r.type===3||r.type===6&&((o=r==null?void 0:r.callee)==null?void 0:o.type)===3;)r=r.type===3?r.object:r.callee.object;r.type=20}lt(e){if(!this.m(Jn))return;let n=++this.e,r=!1;for(;this.e<this.r.length;){if(this.l===Jn&&!r){let o=this.r.slice(n,this.e),s="";for(;++this.e<this.r.length;){let a=this.l;if(a>=97&&a<=122||a>=65&&a<=90||a>=48&&a<=57)s+=this.M;else break}let i;try{i=new RegExp(o,s)}catch(a){throw this.i(a.message)}return e.node={type:4,value:i,raw:this.r.slice(n-1,this.e)},e.node=this.$(e.node),e.node}this.m(Dt)?r=!0:r&&this.m(Ut)&&(r=!1),this.e+=this.m(wo)?2:1}throw this.i("Unclosed Regex")}},ar=t=>new ln(t).parse();var $o={"=>":(t,e)=>{},"=":(t,e)=>{},"*=":(t,e)=>{},"**=":(t,e)=>{},"/=":(t,e)=>{},"%=":(t,e)=>{},"+=":(t,e)=>{},"-=":(t,e)=>{},"<<=":(t,e)=>{},">>=":(t,e)=>{},">>>=":(t,e)=>{},"&=":(t,e)=>{},"^=":(t,e)=>{},"|=":(t,e)=>{},"||":(t,e)=>t()||e(),"??":(t,e)=>{var n;return(n=t())!=null?n:e()},"&&":(t,e)=>t()&&e(),"|":(t,e)=>t|e,"^":(t,e)=>t^e,"&":(t,e)=>t&e,"==":(t,e)=>t==e,"!=":(t,e)=>t!=e,"===":(t,e)=>t===e,"!==":(t,e)=>t!==e,"<":(t,e)=>t<e,">":(t,e)=>t>e,"<=":(t,e)=>t<=e,">=":(t,e)=>t>=e,in:(t,e)=>t in e,"<<":(t,e)=>t<<e,">>":(t,e)=>t>>e,">>>":(t,e)=>t>>>e,"+":(t,e)=>t+e,"-":(t,e)=>t-e,"*":(t,e)=>t*e,"/":(t,e)=>t/e,"%":(t,e)=>t%e,"**":(t,e)=>t**e},Fo={"-":t=>-t,"+":t=>+t,"!":t=>!t,"~":t=>~t,new:t=>t},lr=t=>{if(!(t!=null&&t.some(fr)))return t;let e=[];return t.forEach(n=>fr(n)?e.push(...n):e.push(n)),e},cr=(...t)=>lr(t),un=(t,e)=>{if(!t)return e;let n=Object.create(e!=null?e:{});return n.$event=t,n},qo={"++":(t,e)=>{let n=t[e];if(h(n)){let r=n();return n(++r),r}return++t[e]},"--":(t,e)=>{let n=t[e];if(h(n)){let r=n();return n(--r),r}return--t[e]}},zo={"++":(t,e)=>{let n=t[e];if(h(n)){let r=n();return n(r+1),r}return t[e]++},"--":(t,e)=>{let n=t[e];if(h(n)){let r=n();return n(r-1),r}return t[e]--}},pr={"=":(t,e,n)=>{let r=t[e];return h(r)?r(n):t[e]=n},"+=":(t,e,n)=>{let r=t[e];return h(r)?r(r()+n):t[e]+=n},"-=":(t,e,n)=>{let r=t[e];return h(r)?r(r()-n):t[e]-=n},"*=":(t,e,n)=>{let r=t[e];return h(r)?r(r()*n):t[e]*=n},"/=":(t,e,n)=>{let r=t[e];return h(r)?r(r()/n):t[e]/=n},"%=":(t,e,n)=>{let r=t[e];return h(r)?r(r()%n):t[e]%=n},"**=":(t,e,n)=>{let r=t[e];return h(r)?r(r()**n):t[e]**=n},"<<=":(t,e,n)=>{let r=t[e];return h(r)?r(r()<<n):t[e]<<=n},">>=":(t,e,n)=>{let r=t[e];return h(r)?r(r()>>n):t[e]>>=n},">>>=":(t,e,n)=>{let r=t[e];return h(r)?r(r()>>>n):t[e]>>>=n},"|=":(t,e,n)=>{let r=t[e];return h(r)?r(r()|n):t[e]|=n},"&=":(t,e,n)=>{let r=t[e];return h(r)?r(r()&n):t[e]&=n},"^=":(t,e,n)=>{let r=t[e];return h(r)?r(r()^n):t[e]^=n}},Bt=(t,e)=>P(t)?t.bind(e):t,dn=class{constructor(e,n,r,o,s){m(this,"u");m(this,"ke");m(this,"Ve");m(this,"Ie");m(this,"A");m(this,"De");m(this,"Ue");this.u=T(e)?e:[e],this.ke=n,this.Ve=r,this.Ie=o,this.Ue=!!s}Pe(e,n){if(n&&e in n)return n;for(let r of this.u)if(e in r)return r}2(e,n,r){let o=e.name;if(o==="$root")return this.u[this.u.length-1];if(o==="$parent")return this.u[1];if(o==="$ctx")return[...this.u];if(r&&o in r)return this.A=r[o],Bt(D(r[o]),r);for(let i of this.u)if(o in i)return this.A=i[o],Bt(D(i[o]),i);let s=this.ke;if(s&&o in s)return this.A=s[o],Bt(D(s[o]),s)}5(e,n,r){return this.u[0]}0(e,n,r){return this.Be(n,r,cr,...e.body)}1(e,n,r){return this.R(n,r,(...o)=>o.pop(),...e.expressions)}3(e,n,r){let{obj:o,key:s}=this.ae(e,n,r),i=o==null?void 0:o[s];return this.A=i,Bt(D(i),o)}4(e,n,r){return e.value}6(e,n,r){let o=(i,...a)=>P(i)?i(...lr(a)):i,s=this.R(++n,r,o,e.callee,...e.arguments);return this.A=s,s}7(e,n,r){return this.R(n,r,Fo[e.operator],e.argument)}8(e,n,r){let o=$o[e.operator];switch(e.operator){case"||":case"&&":case"??":return o(()=>this.g(e.left,n,r),()=>this.g(e.right,n,r))}return this.R(n,r,o,e.left,e.right)}9(e,n,r){return this.Be(++n,r,cr,...e.elements)}10(e,n,r){let o={},s=(...i)=>{i.forEach(a=>{Object.assign(o,a)})};return this.R(++n,r,s,...e.properties),o}11(e,n,r){return this.R(n,r,o=>this.g(o?e.consequent:e.alternate,n,r),e.test)}12(e,n,r){var f;let o={},s=l=>(l==null?void 0:l.type)!==15,i=(f=this.Ie)!=null?f:()=>!1,a=n===0&&this.Ue,c=l=>this._e(a,e.key,n,un(l,r)),p=l=>this._e(a,e.value,n,un(l,r));if(e.shorthand){let l=e.key.name;o[l]=s(e.key)&&i(l,n)?c:c()}else if(e.computed){let l=D(c());o[l]=s(e.value)&&i(l,n)?p:p()}else{let l=e.key.type===4?e.key.value:e.key.name;o[l]=s(e.value)&&i(l,n)?()=>p:p()}return o}ae(e,n,r){let o=this.g(e.object,n,r),s=e.computed?this.g(e.property,n,r):e.property.name;return{obj:o,key:s}}13(e,n,r){let o=e.argument,s=e.operator,i=e.prefix?qo:zo;if(o.type===2){let a=o.name,c=this.Pe(a,r);return te(c)?void 0:i[s](c,a)}if(o.type===3){let{obj:a,key:c}=this.ae(o,n,r);return i[s](a,c)}}16(e,n,r){let o=e.left,s=e.operator;if(o.type===2){let i=o.name,a=this.Pe(i,r);if(te(a))return;let c=this.g(e.right,n,r);return pr[s](a,i,c)}if(o.type===3){let{obj:i,key:a}=this.ae(o,n,r),c=this.g(e.right,n,r);return pr[s](i,a,c)}}14(e,n,r){let o=this.g(e.argument,n,r);return T(o)&&(o.s=mr),o}17(e,n,r){return this[6]({type:6,callee:e.tag,arguments:[{type:9,elements:e.quasi.quasis},...e.quasi.expressions]},n,r)}19(e,n,r){let o=(...s)=>s.reduce((i,a,c)=>i+=a+e.quasis[c+1].value.cooked,e.quasis[0].value.cooked);return this.R(n,r,o,...e.expressions)}18(e,n,r){return e.value.cooked}20(e,n,r){let o=(s,...i)=>new s(...i);return this.R(n,r,o,e.callee,...e.arguments)}15(e,n,r){return(...o)=>{let s=Object.create(r!=null?r:{}),i=e.params;if(i){let a=0;for(let c of i)s[c.name]=o[a++]}return this.g(e.body,n,s)}}g(e,n,r){let o=D(this[e.type](e,n,r));return this.De=e.type,o}_e(e,n,r,o){let s=this.g(n,r,o);return e&&this.He()?this.A:s}He(){let e=this.De;return(e===2||e===3||e===6)&&h(this.A)}eval(e,n){let{value:r,refs:o}=bt(()=>this.g(e,-1,n)),s={value:r,refs:o};return this.He()&&(s.ref=this.A),s}R(e,n,r,...o){let s=o.map(i=>i&&this.g(i,e,n));return r(...s)}Be(e,n,r,...o){let s=this.Ve;if(!s)return this.R(e,n,r,...o);let i=o.map((a,c)=>a&&(a.type!==15&&s(c,e)?p=>this.g(a,e,un(p,n)):this.g(a,e,n)));return r(...i)}},mr=Symbol("s"),fr=t=>(t==null?void 0:t.s)===mr,ur=(t,e,n,r,o,s,i)=>new dn(e,n,r,o,i).eval(t,s);var dr={},Pt=class{constructor(e,n){m(this,"u");m(this,"o");m(this,"je",[]);this.u=e,this.o=n}w(e){this.u=[e,...this.u]}me(){return this.u.map(n=>n.components).filter(n=>!!n).reverse().reduce((n,r)=>{for(let[o,s]of Object.entries(r))n[o.toUpperCase()]=s;return n},{})}Ze(){let e=[],n=new Set,r=this.u.map(o=>o.components).filter(o=>!!o).reverse();for(let o of r)for(let s of Object.keys(o))n.has(s)||(n.add(s),e.push(s));return e}C(e,n,r,o,s){var y;let i=G([]),a=[],c=()=>{for(let d of a)d();a.length=0},p={value:i,stop:c,refs:[],context:this.u[0]};if(z(e))return p;let f=this.o.globalContext,l=[],u=(d,R,U,E)=>{try{let b=ur(d,R,f,n,r,E,o);return U&&l.push(...b.refs),{value:b.value,refs:b.refs,ref:b.ref}}catch(b){M(6,`evaluation error: ${e}`,b)}return{value:void 0,refs:[]}};try{let d=(y=dr[e])!=null?y:ar("["+e+"]");dr[e]=d;let R=this.u,U=()=>{l.splice(0),c();let E=d.elements.map((b,L)=>n!=null&&n(L,-1)?{value:H=>u(b,R,!1,{$event:H}).value,refs:[]}:u(b,R,!0));if(!s)for(let b of l){let L=w(b,U);a.push(L)}i(E.map(b=>b.value)),p.refs=E.map(b=>b.ref)};U()}catch(d){M(6,`parse error: ${e}`,d)}return p}V(){return this.u}Y(e){this.je.push(this.u),this.u=e}v(e,n){try{this.Y(e),n()}finally{this.Tt()}}Tt(){var e;this.u=(e=this.je.pop())!=null?e:[]}};var yr="http://www.w3.org/1999/xlink",Ko={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 Wo(t){return!!t||t===""}var yn={onChange:(t,e,n,r,o,s)=>{var a;if(r){s&&s.includes("camel")&&(r=V(r)),jt(t,r,e[0],o);return}let i=e.length;for(let c=0;c<i;++c){let p=e[c];if(T(p)){let f=(a=n==null?void 0:n[c])==null?void 0:a[0],l=p[0],u=p[1];jt(t,l,u,f)}else if(A(p))for(let f of Object.entries(p)){let l=f[0],u=f[1],y=n==null?void 0:n[c],d=y&&l in y?l:void 0;jt(t,l,u,d)}else{let f=n==null?void 0:n[c],l=e[c++],u=e[c];jt(t,l,u,f)}}}},jt=(t,e,n,r)=>{if(r&&r!==e&&t.removeAttribute(r),te(e)){M(3,name,t);return}if(!j(e)){M(6,`Attribute key is not string at ${t.outerHTML}`,e);return}if(e.startsWith("xlink:")){te(n)?t.removeAttributeNS(yr,e.slice(6,e.length)):t.setAttributeNS(yr,e,n);return}let o=e in Ko;te(n)||o&&!Wo(n)?t.removeAttribute(e):t.setAttribute(e,o?"":n)};var hn={onChange:(t,e,n)=>{let r=e.length;for(let o=0;o<r;++o){let s=e[o],i=n==null?void 0:n[o];if(T(s)){let a=s.length;for(let c=0;c<a;++c)hr(t,s[c],i==null?void 0:i[c])}else hr(t,s,i)}}},hr=(t,e,n)=>{let r=t.classList,o=j(e),s=j(n);if(e&&!o){if(n&&!s)for(let i in n)(!(i in e)||!e[i])&&r.remove(i);for(let i in e)e[i]&&r.add(i)}else o?n!==e&&(s&&r.remove(...n.trim().split(/\s+/)),r.add(...e.trim().split(/\s+/))):n&&s&&r.remove(...n.trim().split(/\s+/))};var gr={onChange:(t,e)=>{let[n,r]=e;P(r)?r(t,n):t.innerHTML=n==null?void 0:n.toString()}};function Go(t,e){if(t.length!==e.length)return!1;let n=!0;for(let r=0;n&&r<t.length;r++)n=ue(t[r],e[r]);return n}function ue(t,e){if(t===e)return!0;let n=Gt(t),r=Gt(e);if(n||r)return n&&r?t.getTime()===e.getTime():!1;if(n=et(t),r=et(e),n||r)return t===e;if(n=T(t),r=T(e),n||r)return n&&r?Go(t,e):!1;if(n=A(t),r=A(e),n||r){if(!n||!r)return!1;let o=Object.keys(t).length,s=Object.keys(e).length;if(o!==s)return!1;for(let i in t){let a=t.hasOwnProperty(i),c=e.hasOwnProperty(i);if(a&&!c||!a&&c||!ue(t[i],e[i]))return!1}}return String(t)===String(e)}function Vt(t,e){return t.findIndex(n=>ue(n,e))}var br=t=>{let e=parseFloat(t);return isNaN(e)?t:e};var $t=t=>{if(!h(t))throw I(3,"pause");t(void 0,void 0,3)};var Ft=t=>{if(!h(t))throw I(3,"resume");t(void 0,void 0,4)};var Er={onChange:(t,e)=>{Jo(t,e[0])},onBind:(t,e,n,r,o,s)=>Qo(t,e,s)},Jo=(t,e)=>{let n=vr(t);if(n&&Cr(t))T(e)?e=Vt(e,de(t))>-1:Y(e)?e=e.has(de(t)):e=ns(t,e),t.checked=e;else if(n&&Rr(t))t.checked=ue(e,de(t));else if(n||Sr(t))xr(t)?t.value!==(e==null?void 0:e.toString())&&(t.value=e):t.value!==e&&(t.value=e);else if(wr(t)){let r=t.options,o=r.length,s=t.multiple;for(let i=0;i<o;i++){let a=r[i],c=de(a);if(s)T(e)?a.selected=Vt(e,c)>-1:a.selected=e.has(c);else if(ue(de(a),e)){t.selectedIndex!==i&&(t.selectedIndex=i);return}}!s&&t.selectedIndex!==-1&&(t.selectedIndex=-1)}else M(7,t)},it=t=>(h(t)&&(t=t()),P(t)&&(t=t()),t?j(t)?{trim:t.includes("trim"),lazy:t.includes("lazy"),number:t.includes("number"),int:t.includes("int")}:{trim:!!t.trim,lazy:!!t.lazy,number:!!t.number,int:!!t.int}:{trim:!1,lazy:!1,number:!1,int:!1}),Cr=t=>t.type==="checkbox",Rr=t=>t.type==="radio",xr=t=>t.type==="number"||t.type==="range",vr=t=>t.tagName==="INPUT",Sr=t=>t.tagName==="TEXTAREA",wr=t=>t.tagName==="SELECT",Qo=(t,e,n)=>{let r=e.value,o=it(n==null?void 0:n.join(",")),s=it(r()[1]),i={int:o.int||s.int,lazy:o.lazy||s.lazy,number:o.number||s.number,trim:o.trim||s.trim},a=e.refs[0];if(!a)return M(8,t),()=>{};let c=vr(t);return c&&Cr(t)?Yo(t,a):c&&Rr(t)?rs(t,a):c||Sr(t)?Xo(t,i,a,r):wr(t)?os(t,a,r):(M(7,t),()=>{})},Tr=/[.,' ·٫]/,Xo=(t,e,n,r)=>{let s=e.lazy?"change":"input",i=xr(t),a=()=>{!e.trim&&!it(r()[1]).trim||(t.value=t.value.trim())},c=u=>{let y=u.target;y.composing=1},p=u=>{let y=u.target;y.composing&&(y.composing=0,y.dispatchEvent(new Event(s)))},f=()=>{t.removeEventListener(s,l),t.removeEventListener("change",a),t.removeEventListener("compositionstart",c),t.removeEventListener("compositionend",p),t.removeEventListener("change",p)},l=u=>{let y=u.target;if(!y||y.composing)return;let d=y.value,R=it(r()[1]);if(i||R.number||R.int){if(R.int)d=parseInt(d);else{if(Tr.test(d[d.length-1])&&d.split(Tr).length===2){if(d+="0",d=parseFloat(d),isNaN(d))d="";else if(n()===d)return}d=parseFloat(d)}isNaN(d)&&(d=""),t.value=d}else R.trim&&(d=d.trim());n(d)};return t.addEventListener(s,l),t.addEventListener("change",a),t.addEventListener("compositionstart",c),t.addEventListener("compositionend",p),t.addEventListener("change",p),f},Yo=(t,e)=>{let n="change",r=()=>{t.removeEventListener(n,o)},o=()=>{let s=de(t),i=t.checked,a=e();if(T(a)){let c=Vt(a,s),p=c!==-1;i&&!p?a.push(s):!i&&p&&a.splice(c,1)}else Y(a)?i?a.add(s):a.delete(s):e(ts(t,i))};return t.addEventListener(n,o),r},de=t=>"_value"in t?t._value:t.value,Or="trueValue",Zo="falseValue",Ar="true-value",es="false-value",ts=(t,e)=>{let n=e?Or:Zo;if(n in t)return t[n];let r=e?Ar:es;return t.hasAttribute(r)?t.getAttribute(r):e},ns=(t,e)=>{if(Or in t)return ue(e,t.trueValue);let r=Ar;return t.hasAttribute(r)?ue(e,t.getAttribute(r)):ue(e,!0)},rs=(t,e)=>{let n="change",r=()=>{t.removeEventListener(n,o)},o=()=>{let s=de(t);e(s)};return t.addEventListener(n,o),r},os=(t,e,n)=>{let r="change",o=()=>{t.removeEventListener(r,s)},s=()=>{let a=it(n()[1]).number,c=Array.prototype.filter.call(t.options,p=>p.selected).map(p=>a?br(de(p)):de(p));if(t.multiple){let p=e();try{if($t(e),Y(p)){p.clear();for(let f of c)p.add(f)}else T(p)?(p.splice(0),p.push(...c)):e(c)}finally{Ft(e),K(e)}}else e(c[0])};return t.addEventListener(r,s),o};var ss=["stop","prevent","capture","self","once","left","right","middle","passive"],is=t=>{let e={};if(z(t))return;let n=t.split(",");for(let r of ss)e[r]=n.includes(r);return e},bn={isLazy:(t,e)=>e===-1&&t%2===0,isLazyKey:(t,e)=>e===0&&!t.endsWith("_flags"),once:!1,collectRefObj:!0,onBind:(t,e,n,r,o,s)=>{var f,l;if(o){let u=e.value(),y=D(o.value()[0]);return j(y)?gn(t,V(y),()=>e.value()[0],(f=s==null?void 0:s.join(","))!=null?f:u[1]):()=>{}}else if(r){let u=e.value();return gn(t,V(r),()=>e.value()[0],(l=s==null?void 0:s.join(","))!=null?l:u[1])}let i=[],a=()=>{i.forEach(u=>u())},c=e.value(),p=c.length;for(let u=0;u<p;++u){let y=c[u];if(P(y)&&(y=y()),A(y))for(let d of Object.entries(y)){let R=d[0],U=()=>{let b=e.value()[u];return P(b)&&(b=b()),b=b[R],P(b)&&(b=b()),b},E=y[R+"_flags"];i.push(gn(t,R,U,E))}else M(2,name,t)}return a}},as=(t,e)=>{if(t.startsWith("keydown")||t.startsWith("keyup")||t.startsWith("keypress")){e!=null||(e="");let n=t.split(".").concat(e.split(","));t=n[0];let r=n[1],o=n.includes("ctrl"),s=n.includes("shift"),i=n.includes("alt"),a=n.includes("meta"),c=p=>!(o&&!p.ctrlKey||s&&!p.shiftKey||i&&!p.altKey||a&&!p.metaKey);return r?[t,p=>c(p)?p.key.toUpperCase()===r.toUpperCase():!1]:[t,c]}return[t,n=>!0]},gn=(t,e,n,r)=>{if(z(e))return M(5,name,t),()=>{};let o=is(r),s=o?{capture:o.capture,passive:o.passive,once:o.once}:void 0,i;[e,i]=as(e,r);let a=f=>{if(!i(f)||!n&&e==="submit"&&(o!=null&&o.prevent))return;let l=n(f);P(l)&&(l=l(f)),P(l)&&l(f)},c=()=>{t.removeEventListener(e,p,s)},p=f=>{if(!o){a(f);return}try{if(o.left&&f.button!==0||o.middle&&f.button!==1||o.right&&f.button!==2||o.self&&f.target!==t)return;o.stop&&f.stopPropagation(),o.prevent&&f.preventDefault(),a(f)}finally{o.once&&c()}};return t.addEventListener(e,p,s),c};var Nr={onChange:(t,e,n,r,o,s)=>{if(r){s&&s.includes("camel")&&(r=V(r)),Ge(t,r,e[0]);return}let i=e.length;for(let a=0;a<i;++a){let c=e[a];if(T(c)){let p=c[0],f=c[1];Ge(t,p,f)}else if(A(c))for(let p of Object.entries(c)){let f=p[0],l=p[1];Ge(t,f,l)}else{let p=e[a++],f=e[a];Ge(t,p,f)}}}};function cs(t){return!!t||t===""}var Ge=(t,e,n)=>{if(te(e)){M(3,name,t);return}if(e==="innerHTML"||e==="textContent"){let s=[...t.childNodes];setTimeout(()=>s.forEach(ae),1),t[e]=n!=null?n:"";return}let r=t.tagName;if(e==="value"&&r!=="PROGRESS"&&!r.includes("-")){t._value=n;let s=r==="OPTION"?t.getAttribute("value"):t.value,i=n!=null?n:"";s!==i&&(t.value=i),n==null&&t.removeAttribute(e);return}let o=!1;if(n===""||n==null){let s=typeof t[e];s==="boolean"?n=cs(n):n==null&&s==="string"?(n="",o=!0):s==="number"&&(n=0,o=!0)}try{t[e]=n}catch(s){o||M(4,e,r,n,s)}o&&t.removeAttribute(e)};var Mr={once:!0,onBind:(t,e,n)=>{let r=e.value()[0],o=T(r),s=e.refs[0];return o?r.push(t):s?s==null||s(t):e.context[n]=t,()=>{if(o){let i=r.indexOf(t);i!==-1&&r.splice(i,1)}else s==null||s(null)}}};var Lr={onChange:(t,e)=>{let n=ge(t).data,r=n._ord;On(r)&&(r=n._ord=t.style.display),!!e[0]?t.style.display=r:t.style.display="none"}};var Cn={onChange:(t,e,n)=>{let r=e.length;for(let o=0;o<r;++o){let s=e[o],i=n==null?void 0:n[o];if(T(s)){let a=s.length;for(let c=0;c<a;++c)kr(t,s[c],i==null?void 0:i[c])}else kr(t,s,i)}}},kr=(t,e,n)=>{let r=t.style,o=j(e);if(e&&!o){if(n&&!j(n))for(let s in n)e[s]==null&&En(r,s,"");for(let s in e)En(r,s,e[s])}else{let s=r.display;if(o?n!==e&&(r.cssText=e):n&&t.removeAttribute("style"),"_ord"in ge(t).data)return;r.display=s}},Ir=/\s*!important$/;function En(t,e,n){if(T(n))n.forEach(r=>{En(t,e,r)});else if(n==null&&(n=""),e.startsWith("--"))t.setProperty(e,n);else{let r=ps(t,e);Ir.test(n)?t.setProperty(je(r),n.replace(Ir,""),"important"):t[r]=n}}var Dr=["Webkit","Moz","ms"],Tn={};function ps(t,e){let n=Tn[e];if(n)return n;let r=V(e);if(r!=="filter"&&r in t)return Tn[e]=r;r=ot(r);for(let o=0;o<Dr.length;o++){let s=Dr[o]+r;if(s in t)return Tn[e]=s}return e}var X=t=>Ur(D(t)),Ur=(t,e=new WeakMap)=>{if(!t||!A(t))return t;if(T(t))return t.map(X);if(Y(t)){let r=new Set;for(let o of t.keys())r.add(X(o));return r}if(he(t)){let r=new Map;for(let o of t)r.set(X(o[0]),X(o[1]));return r}if(e.has(t))return D(e.get(t));let n={...t};e.set(t,n);for(let r of Object.entries(n))n[r[0]]=Ur(D(r[1]),e);return n};var Hr={onChange:(t,e)=>{var r;let n=e[0];t.textContent=Y(n)?JSON.stringify(X([...n])):he(n)?JSON.stringify(X([...n])):A(n)?JSON.stringify(X(n)):(r=n==null?void 0:n.toString())!=null?r:""}};var _r={onChange:(t,e)=>{Ge(t,"value",e[0])}};var Ie=t=>(t==null?void 0:t[lt])===1;var xe=t=>{if(Ve(t))return t;let e;if(h(t)?(e=t,t=e()):e=G(t),t instanceof Node||t instanceof Date||t instanceof RegExp||t instanceof Promise||t instanceof Error)return e;if(e[lt]=1,T(t)){let n=t.length;for(let r=0;r<n;++r){let o=t[r];Ie(o)||(t[r]=xe(o))}return e}if(!A(t))return e;for(let n of Object.entries(t)){let r=n[1];if(Ie(r))continue;let o=n[0];et(o)||(t[o]=null,t[o]=xe(r))}return e};var ve=class ve{constructor(e){m(this,"H",{});m(this,"f",{});m(this,"et",()=>Object.keys(this.H).filter(e=>e.length===1||!e.startsWith(":")));m(this,"he",new Map);m(this,"ge",new Map);m(this,"forGrowThreshold",10);m(this,"globalContext");m(this,"useInterpolation",!0);if(this.setDirectives("r-"),e){this.globalContext=e;return}this.globalContext=this.Et()}static getDefault(){var e;return(e=ve.$e)!=null?e:ve.$e=new ve}Et(){let e={},n=globalThis;for(let r of ve.xt.split(","))e[r]=n[r];return e.ref=xe,e.sref=G,e.flatten=X,e}addComponent(...e){for(let n of e){if(!n.defaultName){tt.warning("Registered component's default name is not defined",n);continue}this.he.set(ot(n.defaultName),n),this.ge.set(ot(n.defaultName).toLocaleUpperCase(),n)}}setDirectives(e){this.H={".":Nr,":":yn,"@":bn,[`${e}on`]:bn,[`${e}bind`]:yn,[`${e}html`]:gr,[`${e}text`]:Hr,[`${e}show`]:Lr,[`${e}model`]:Er,":style":Cn,[`${e}bind:style`]:Cn,":class":hn,[`${e}bind:class`]:hn,":ref":Mr,":value":_r,teleport:Mt},this.f={for:`${e}for`,if:`${e}if`,else:`${e}else`,elseif:`${e}else-if`,pre:`${e}pre`,inherit:`${e}inherit`,text:`${e}text`,props:":props",propsOnce:":props-once",bind:`${e}bind`,on:`${e}on`,keyBind:":key",key:"key",is:":is",teleport:`${e}teleport`,dynamic:"_d_"}}updateDirectives(e){e(this.H,this.f)}};m(ve,"$e"),m(ve,"xt","Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console");var Z=ve;var qt=(t,e)=>{if(!t)return;let r=(e!=null?e:Z.getDefault()).f,o=/(\{\{[^]*?\}\}|\[\[[^]*?\]\])/g,s=[{start:"{{",end:"}}"},{start:"[[",end:"]]"}];for(let i of ls(t,r.pre,s))fs(i,r.text,o,s)},fs=(t,e,n,r)=>{var c;let o=t.textContent;if(!o)return;let s=n,i=o.split(s);if(i.length<=1)return;if(((c=t.parentElement)==null?void 0:c.childNodes.length)===1&&i.length===3){let p=i[1],f=Br(p,r);if(f&&z(i[0])&&z(i[2])){let l=t.parentElement;l.setAttribute(e,p.substring(f.start.length,p.length-f.end.length)),l.innerText="";return}}let a=document.createDocumentFragment();for(let p of i){let f=Br(p,r);if(f){let l=document.createElement("span");l.setAttribute(e,p.substring(f.start.length,p.length-f.end.length)),a.appendChild(l)}else a.appendChild(document.createTextNode(p))}t.replaceWith(a)},ls=(t,e,n)=>{let r=[],o=s=>{var i;if(s.nodeType===Node.TEXT_NODE)n.some(a=>{var c;return(c=s.textContent)==null?void 0:c.includes(a.start)})&&r.push(s);else{if((i=s==null?void 0:s.hasAttribute)!=null&&i.call(s,e))return;for(let a of me(s))o(a)}};return o(t),r},Br=(t,e)=>e.find(n=>t.startsWith(n.start)&&t.endsWith(n.end));var ms="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",us=new Set(ms.toUpperCase().split(",")),ds="http://www.w3.org/2000/svg",Pr=(t,e)=>{ce(t)?t.content.appendChild(e):t.appendChild(e)},Rn=(t,e,n,r)=>{var i;let o=t.t;if(o){let a=n&&us.has(o.toUpperCase())?document.createElementNS(ds,o.toLowerCase()):document.createElement(o),c=t.a;if(c)for(let f of Object.entries(c)){let l=f[0],u=f[1];l.startsWith("#")&&(u=l.substring(1),l="name"),a.setAttribute(ht(l,r),u)}let p=t.c;if(p)for(let f of p)Rn(f,a,n,r);Pr(e,a);return}let s=t.d;if(s){let a;switch((i=t.n)!=null?i:Node.TEXT_NODE){case Node.COMMENT_NODE:a=document.createComment(s);break;case Node.TEXT_NODE:a=document.createTextNode(s);break}if(a)Pr(e,a);else throw new Error("unsupported node type.")}},De=(t,e,n)=>{n!=null||(n=Z.getDefault());let r=document.createDocumentFragment();if(!T(t))return Rn(t,r,!!e,n),r;for(let o of t)Rn(o,r,!!e,n);return r};var jr=(t,e={selector:"#app"},n)=>{j(e)&&(e={selector:"#app",template:e}),zn(t)&&(t=t.context);let r=e.element?e.element:e.selector?document.querySelector(e.selector):null;if(!r||!Ne(r))throw I(0);n||(n=Z.getDefault());let o=()=>{for(let a of[...r.childNodes])F(a)},s=a=>{for(let c of a)r.appendChild(c)};if(e.template){let a=document.createRange().createContextualFragment(e.template);o(),s(a.childNodes),e.element=a}else if(e.json){let a=De(e.json,e.isSVG,n);o(),s(a.childNodes)}return n.useInterpolation&&qt(r,n),new xn(t,r,n).x(),_(r,()=>{Ce(t)}),Ot(t),{context:t,unmount:()=>{F(r)},unbind:()=>{ae(r)}}},xn=class{constructor(e,n,r){m(this,"Rt");m(this,"Fe");m(this,"o");m(this,"h");m(this,"p");this.Rt=e,this.Fe=n,this.o=r,this.h=new Pt([e],r),this.p=new Lt(this.h)}x(){this.p.G(this.Fe)}};var Je=t=>{if(T(t))return t.map(o=>Je(o));let e={};if(t.tagName)e.t=t.tagName;else return t.nodeType===Node.COMMENT_NODE&&(e.n=Node.COMMENT_NODE),t.textContent&&(e.d=t.textContent),e;let n=t.getAttributeNames();n.length>0&&(e.a=Object.fromEntries(n.map(o=>[o,t.getAttribute(o)])));let r=me(t);return r.length>0&&(e.c=[...r].map(o=>Je(o))),e};var Vr=(t,e={})=>{var s,i,a,c,p,f;T(e)&&(e={props:e}),j(t)&&(t={template:t});let n=(s=e.context)!=null?s:()=>({}),r=!1;if(t.element){let l=t.element;l.remove(),t.element=l}else if(t.selector){let l=document.querySelector(t.selector);if(!l)throw I(1,t.selector);l.remove(),t.element=l}else if(t.template){let l=document.createRange().createContextualFragment(t.template);t.element=l}else t.json&&(t.element=De(t.json,t.isSVG,e.config),r=!0);t.element||(t.element=document.createDocumentFragment()),((i=e.useInterpolation)==null||i)&&qt(t.element,(a=e.config)!=null?a:Z.getDefault());let o=t.element;if(!r&&(((p=t.isSVG)!=null?p:rt(o)&&((c=o.hasAttribute)!=null&&c.call(o,"isSVG")))||rt(o)&&o.querySelector("[isSVG]"))){let l=t.element.content,u=l?[...l.childNodes]:[...o.childNodes],y=Je(u);t.element=De(y,!0,e.config)}return{context:n,template:t.element,inheritAttrs:(f=e.inheritAttrs)!=null?f:!0,props:e.props,defaultName:e.defaultName}};var $r=t=>{let e,n={},r=(...o)=>{if(o.length<=2&&0 in o)throw I(4);return e&&!n.isStopped?e(...o):(e=ys(t,n),e(...o))};return r[Q]=1,Ee(r,!0),r.stop=()=>{var o,s;return(s=(o=n.ref)==null?void 0:o.stop)==null?void 0:s.call(o)},J(()=>r.stop(),!0),r},ys=(t,e)=>{var s;let n=(s=e.ref)!=null?s:G(null);e.ref=n,e.isStopped=!1;let r=0,o=Le(()=>{if(r>0){o(),e.isStopped=!0,K(n);return}n(t()),++r});return n.stop=o,n};var Fr=(t,e)=>{let n={},r,o=(...s)=>{if(s.length<=2&&0 in s)throw I(4);return r&&!n.isStopped?r(...s):(r=hs(t,e,n),r(...s))};return o[Q]=1,Ee(o,!0),o.stop=()=>{var s,i;return(i=(s=n.ref)==null?void 0:s.stop)==null?void 0:i.call(s)},J(()=>o.stop(),!0),o},hs=(t,e,n)=>{var a;let r=(a=n.ref)!=null?a:G(null);n.ref=r,n.isStopped=!1;let o=0,s=c=>{if(o>0){r.stop(),n.isStopped=!0,K(r);return}r(e(...t.map(p=>p()))),++o},i=[];for(let c of t){let p=w(c,s);i.push(p)}return s(null),r.stop=()=>{i.forEach(c=>{c()})},r};var qr=(t,e)=>{let n={},r,o=(...s)=>{if(s.length<=2&&0 in s)throw I(4);return r&&!n.isStopped?r(...s):(r=gs(t,e,n),r(...s))};return o[Q]=1,Ee(o,!0),o.stop=()=>{var s,i;return(i=(s=n.ref)==null?void 0:s.stop)==null?void 0:i.call(s)},J(()=>o.stop(),!0),o},gs=(t,e,n)=>{var s;let r=(s=n.ref)!=null?s:G(null);n.ref=r,n.isStopped=!1;let o=0;return r.stop=w(t,i=>{if(o>0){r.stop(),n.isStopped=!0,K(r);return}r(e(i)),++o},!0),r};var zr=t=>(t[mt]=1,t);var Kr=(t,e)=>{if(!e)throw I(5);let r=Ie(t)?xe:a=>a,o=()=>localStorage.setItem(e,JSON.stringify(X(t()))),s=localStorage.getItem(e);if(s!=null)try{t(r(JSON.parse(s)))}catch(a){M(6,`persist: failed to parse data for key ${e}`,a),o()}else o();let i=Le(o);return J(i,!0),t};var vn=(t,...e)=>{let n="",r=t,o=e,s=r.length,i=o.length;for(let a=0;a<s;++a)n+=r[a],a<i&&(n+=o[a]);return n},Wr=vn;var Gr=(t,e,n)=>{let r=[],o=()=>{e(t.map(i=>i()))};for(let i of t)r.push(w(i,o));n&&o();let s=()=>{for(let i of r)i()};return J(s,!0),s};var Jr=t=>{if(!h(t))throw I(3,"observerCount");return t(void 0,void 0,2)};var Qr=t=>{Sn();try{t()}finally{wn()}},Sn=()=>{pe.stack||(pe.stack=[]),pe.stack.push(new Set)},wn=()=>{let t=pe.stack;if(!t||t.length===0)return;let e=t.pop();if(t.length){let n=t[t.length-1];for(let r of e)n.add(r);return}delete pe.stack;for(let n of e)try{K(n)}catch(r){console.error(r)}};var Xr=t=>{var e;(e=Ae())==null||e.onMounted.push(t)};
|
package/dist/regor.es2019.esm.js
CHANGED
|
@@ -4538,7 +4538,6 @@ var _RegorConfig = class _RegorConfig {
|
|
|
4538
4538
|
__publicField(this, "forGrowThreshold", 10);
|
|
4539
4539
|
__publicField(this, "globalContext");
|
|
4540
4540
|
__publicField(this, "useInterpolation", true);
|
|
4541
|
-
__publicField(this, "useBracketInterpolation", false);
|
|
4542
4541
|
this.setDirectives("r-");
|
|
4543
4542
|
if (globalContext) {
|
|
4544
4543
|
this.globalContext = globalContext;
|
|
@@ -4641,14 +4640,16 @@ var interpolate = (element, config) => {
|
|
|
4641
4640
|
if (!element) return;
|
|
4642
4641
|
const resolvedConfig = config != null ? config : RegorConfig.getDefault();
|
|
4643
4642
|
const builtInNames = resolvedConfig.__builtInNames;
|
|
4644
|
-
const
|
|
4645
|
-
const
|
|
4646
|
-
|
|
4647
|
-
|
|
4648
|
-
|
|
4643
|
+
const interpolationRegex = /(\{\{[^]*?\}\}|\[\[[^]*?\]\])/g;
|
|
4644
|
+
const delimiters = [
|
|
4645
|
+
{ start: "{{", end: "}}" },
|
|
4646
|
+
{ start: "[[", end: "]]" }
|
|
4647
|
+
];
|
|
4648
|
+
for (const textNode of getTextNodes(element, builtInNames.pre, delimiters)) {
|
|
4649
|
+
interpolateTextNode(textNode, builtInNames.text, interpolationRegex, delimiters);
|
|
4649
4650
|
}
|
|
4650
4651
|
};
|
|
4651
|
-
var interpolateTextNode = (textNode, textDirective2, interpolationRegex,
|
|
4652
|
+
var interpolateTextNode = (textNode, textDirective2, interpolationRegex, delimiters) => {
|
|
4652
4653
|
var _a;
|
|
4653
4654
|
const text = textNode.textContent;
|
|
4654
4655
|
if (!text) return;
|
|
@@ -4657,18 +4658,32 @@ var interpolateTextNode = (textNode, textDirective2, interpolationRegex, start,
|
|
|
4657
4658
|
if (parts.length <= 1) return;
|
|
4658
4659
|
if (((_a = textNode.parentElement) == null ? void 0 : _a.childNodes.length) === 1 && parts.length === 3) {
|
|
4659
4660
|
const part = parts[1];
|
|
4660
|
-
|
|
4661
|
+
const delimiter = getInterpolationDelimiter(part, delimiters);
|
|
4662
|
+
if (delimiter && isNullOrWhitespace(parts[0]) && isNullOrWhitespace(parts[2])) {
|
|
4661
4663
|
const parent = textNode.parentElement;
|
|
4662
|
-
parent.setAttribute(
|
|
4664
|
+
parent.setAttribute(
|
|
4665
|
+
textDirective2,
|
|
4666
|
+
part.substring(
|
|
4667
|
+
delimiter.start.length,
|
|
4668
|
+
part.length - delimiter.end.length
|
|
4669
|
+
)
|
|
4670
|
+
);
|
|
4663
4671
|
parent.innerText = "";
|
|
4664
4672
|
return;
|
|
4665
4673
|
}
|
|
4666
4674
|
}
|
|
4667
4675
|
const fragment = document.createDocumentFragment();
|
|
4668
4676
|
for (const part of parts) {
|
|
4669
|
-
|
|
4677
|
+
const delimiter = getInterpolationDelimiter(part, delimiters);
|
|
4678
|
+
if (delimiter) {
|
|
4670
4679
|
const spanTag = document.createElement("span");
|
|
4671
|
-
spanTag.setAttribute(
|
|
4680
|
+
spanTag.setAttribute(
|
|
4681
|
+
textDirective2,
|
|
4682
|
+
part.substring(
|
|
4683
|
+
delimiter.start.length,
|
|
4684
|
+
part.length - delimiter.end.length
|
|
4685
|
+
)
|
|
4686
|
+
);
|
|
4672
4687
|
fragment.appendChild(spanTag);
|
|
4673
4688
|
} else {
|
|
4674
4689
|
fragment.appendChild(document.createTextNode(part));
|
|
@@ -4677,16 +4692,19 @@ var interpolateTextNode = (textNode, textDirective2, interpolationRegex, start,
|
|
|
4677
4692
|
;
|
|
4678
4693
|
textNode.replaceWith(fragment);
|
|
4679
4694
|
};
|
|
4680
|
-
var getTextNodes = (node, preDirective,
|
|
4695
|
+
var getTextNodes = (node, preDirective, delimiters) => {
|
|
4681
4696
|
const textNodes = [];
|
|
4682
4697
|
const traverseTextNodes = (node2) => {
|
|
4683
|
-
var _a
|
|
4698
|
+
var _a;
|
|
4684
4699
|
if (node2.nodeType === Node.TEXT_NODE) {
|
|
4685
|
-
if ((
|
|
4700
|
+
if (delimiters.some((delimiter) => {
|
|
4701
|
+
var _a2;
|
|
4702
|
+
return (_a2 = node2.textContent) == null ? void 0 : _a2.includes(delimiter.start);
|
|
4703
|
+
})) {
|
|
4686
4704
|
textNodes.push(node2);
|
|
4687
4705
|
}
|
|
4688
4706
|
} else {
|
|
4689
|
-
if ((
|
|
4707
|
+
if ((_a = node2 == null ? void 0 : node2.hasAttribute) == null ? void 0 : _a.call(node2, preDirective)) return;
|
|
4690
4708
|
for (const child of getChildNodes(node2)) {
|
|
4691
4709
|
traverseTextNodes(child);
|
|
4692
4710
|
}
|
|
@@ -4695,6 +4713,9 @@ var getTextNodes = (node, preDirective, start) => {
|
|
|
4695
4713
|
traverseTextNodes(node);
|
|
4696
4714
|
return textNodes;
|
|
4697
4715
|
};
|
|
4716
|
+
var getInterpolationDelimiter = (part, delimiters) => delimiters.find(
|
|
4717
|
+
(delimiter) => part.startsWith(delimiter.start) && part.endsWith(delimiter.end)
|
|
4718
|
+
);
|
|
4698
4719
|
|
|
4699
4720
|
// src/app/toFragment.ts
|
|
4700
4721
|
var svgTags = "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";
|