sprae 13.3.7 → 13.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- var xe=Object.defineProperty;var Mt=(t,e)=>{for(var r in e)xe(t,r,{get:e[r],enumerable:!0})};var m=Symbol.dispose||(Symbol.dispose=Symbol("dispose")),h=Symbol("state"),ct=Symbol("on"),L=Symbol("off"),yt=Symbol("init"),gt=":",H=t=>t.localName?.includes("-"),D,B,X,rt=t=>t(),I=rt,G={},J={},lt=null,bt=null,we=t=>{if(!t?.tagName)return"";let e=t.tagName.toLowerCase();return t.id?e+="#"+t.id:t.className&&(e+="."+t.className.split(" ")[0]),`<${e}>`},mt=(t,e,r=bt)=>{let o=`\u2234 ${t}`;if(r&&(o+=`
2
- in ${we(r)}`),e){let i=e.length>100?e.slice(0,80)+`\u2026 (${e.length} chars)`:e;o+=lt?`
3
- ${lt}="${i}"`:`
4
- ="${i}"`}console.error(o)},vt=(t=document.body,e)=>{if(t[h])return Object.assign(t[h],e);e=it(e||{});let r=t,o=[],i=[];r[ct]=()=>{if(i)return i;i=Array(o.length);for(let s=0;s<o.length;s++)i[s]=o[s]();return i},r[L]=()=>{if(!i)return;let s=i;i=null;for(let c=0;c<s.length;c++)s[c]?.()},r[m]||(r[m]=()=>{r[L]?.(),q?._root===r&&(q.disconnect(),q=null),r[L]=r[ct]=r[m]=r[yt]=r[h]=null});let n=r[yt]=s=>{let c=s.attributes,l;if(c)for(let f=0;f<c.length;){let{name:a,value:_}=c[f];if(a.startsWith(gt)){s.removeAttribute(a);let T=s[h];if(lt=a,bt=s,o.push(l=$t(s,a.slice(gt.length),_,e)),i.push(l()),s[h]!==T)return}else f++}if(!(s!==t&&H(s)))if(s.firstChild!==void 0){let f=s.firstChild,a;for(;f;)a=f.nextSibling,f.nodeType==1&&n(f),f=a}else for(let f of s.childNodes)f.nodeType==1&&n(f)};return n(r),lt=bt=null,r[h]===void 0&&!H(t)&&(r[h]=e),e};vt.version="13.3.7";var $t,Rt,b=t=>{let e=Pt[t=t.trim()];if(e)return e;try{e=Rt(t||"undefined")}catch(r){mt(r,t)}return Pt[t]=function(r,o,i){try{let n=e?.call(this,r);return o?n?.then?(n.then(s=>i=o(s)).catch(s=>mt(s,t,this)),()=>typeof i=="function"&&i()):o(n):n}catch(n){mt(n,t,this)}}},Pt={},ot=t=>(t.compile&&(Rt=t.compile),t.prefix&&(gt=t.prefix),t.signal&&(D=t.signal),t.effect&&(B=t.effect),t.computed&&(X=t.computed),t.batch&&(rt=t.batch),t.untracked&&(I=t.untracked),t.dir&&($t=t.dir)),O=(t,e)=>{for(;e.length;){let[r,...o]=e.pop().split("-"),i=J[r],n;if(i&&(n=i(t,...o))!==t){for(let s in t)n[s]??(n[s]=t[s]);t=n}}return t},q=null,Q=t=>{q?.disconnect(),t(),q?.observe(q._root,{childList:!0,subtree:!0})},Wt=(t=document.body,e)=>{let r=it(e);return vt(t,r),q=new MutationObserver(o=>{for(let i of o){for(let n of i.addedNodes)n.nodeType===1&&n[h]===void 0&&t.contains(n)&&t[yt](n);for(let n of i.removedNodes)n.nodeType===1&&!t.contains(n)&&n[m]?.()}}),q._root=t,q.observe(t,{childList:!0,subtree:!0}),r},E=t=>{if(!t.nodeType)return t;let e=t.ownerDocument,r=t.content.cloneNode(!0),o=[...t.attributes],i=e.createTextNode(""),n=(r.append(i),[...r.childNodes]);return{ownerDocument:e,childNodes:n,content:r,remove:()=>r.append(...n),replaceWith(s){s!==i&&(i.before(s),r.append(...n))},attributes:o,removeAttribute(s){o.splice(o.findIndex(c=>c.name===s),1)}}},qt=t=>t.replace(/[A-Z\u00C0-\u00D6\u00D8-\u00DE]/g,(e,r)=>(r?"-":"")+e.toLowerCase()),Se=t=>t.replace(/-([a-z])/g,(e,r)=>r.toUpperCase()),$=(t,e,r)=>r==null||r===!1?t.removeAttribute(e):H(t)?t[Se(e)]=r:t.setAttribute(e,r===!0?"":r),_t=t=>t?typeof t=="string"?t:(Array.isArray(t)?t.map(_t):Object.entries(t).reduce((e,[r,o])=>(o&&e.push(r),e),[])).join(" "):"",Y=(t,e)=>{let r=0,o=0,i,n=typeof e=="function"?e:e?c=>setTimeout(c,e):queueMicrotask,s=c=>{i=c,r++||(t(i),n(()=>{let l=r>1;if(r=0,l){if(++o>50){o=0,console.error("\u2234 Reactive loop detected");return}s(i)}else o=0}))};return s},Ht=(t,e,r)=>{let o=typeof e=="function"?e:e?i=>setTimeout(i,e):queueMicrotask;return r?(i=>n=>!i&&(t(n),i=1,o(()=>i=0)))():((i=0)=>(n,s=++i)=>o(()=>s==i&&t(n)))()},g=vt;var N=Symbol("signals"),P=Symbol("change"),nt=Symbol("set"),wt=Symbol("parent"),xt=!0,tt=(t,e)=>{if(!t||t[Symbol.toStringTag]||t[N])return t;if(t.constructor!==Object)return Array.isArray(t)?It(t):t;let r=Object.keys(t).length,o={},i=new Proxy(Object.assign(o,{[P]:D(r),[N]:o}),{get:(s,c)=>c in o?o.hasOwnProperty(c)&&typeof o[c]=="function"&&!o[c].prototype?o[c].bind(i):o[c]?o[c].valueOf():o[c]:e?e[c]:typeof globalThis[c]=="function"&&!globalThis[c].prototype?globalThis[c].bind(globalThis):globalThis[c],set:(s,c,l)=>c in o?(kt(o,c,l),1):(xt=!1,e&&c in e?e[c]=l:(at(o,c,l),o[P].value=++r),xt=!0,1),deleteProperty:(s,c)=>(c in o&&(c[0]!="_"&&o[c]?.[Symbol.dispose]?.(),delete o[c],o[P].value=--r),1),ownKeys:()=>(o[P].value,Reflect.ownKeys(o).filter(s=>s!==wt)),has:(s,c)=>c in o?!0:e?c in e:xt});Object.defineProperty(o,wt,{value:e,configurable:!0});let n=Object.getOwnPropertyDescriptors(t);for(let s in t)n[s]?.get?(o[s]=X(n[s].get.bind(i)))[nt]=n[s].set?.bind(i):at(o,s,t[s]);return i},It=(t,e=globalThis)=>{let r=t.map(c=>D(ft(c))),o=!1,i=c=>function(){return o=!0,c.apply(this,arguments)},n=D(t.length),s=new Proxy(Object.assign(r,{[P]:n,[N]:r,push:i(r.push),pop:i(r.pop),shift:i(r.shift),unshift:i(r.unshift),splice:i(r.splice)}),{get(c,l){return l==="length"?o?(o=!1,r.length):n.value:typeof l=="symbol"||isNaN(l)?r[l]?.valueOf()??e[l]:(r[l]??(r[l]=D(void 0))).valueOf()},set(c,l,f){if(l==="length"){for(let a=f;a<r.length;a++)delete s[a];n.value=r.length=f}else l>=r.length?(at(r,l,f,ft),s.length=+l+1):r[l]?kt(r,l,f,ft):at(r,l,f,ft);return 1},deleteProperty:(c,l)=>(r[l]?.[Symbol.dispose]?.(),delete r[l],1)});return Object.defineProperty(r,wt,{value:e,configurable:!0}),s},at=(t,e,r,o=tt)=>t[e]=e[0]=="_"||r?.peek||typeof r=="function"?r:D(o(r)),ft=t=>{if(!t||typeof t!="object"||t.constructor!==Object||t[P])return t;let e=D(0);return new Proxy(t,{get:(r,o)=>o===N?r:o===P?e:(e.value,r[o]),set:(r,o,i)=>{let n=r[o];return r[o]=i,n!==i&&e.value++,1},has:()=>!0})},kt=(t,e,r,o=tt)=>{if(e[0]==="_"||typeof t[e]=="function")return t[e]=r;let i=t[e],n=i.peek?.()??i;if(r!==n){if(i[nt])return i[nt](r);Array.isArray(r)&&Array.isArray(n)?P in n?I(()=>rt(()=>{for(let s=0;s<r.length;s++)n[s]=r[s];n.length=r.length})):i.value=P in r?r:It(r):i.value=o(r)}},it=tt;var Ot={};Mt(Ot,{batch:()=>Ne,computed:()=>Oe,effect:()=>Ut,signal:()=>Kt,untracked:()=>Ce});var k,St=0,et,Kt=(t,e,r=new Set,o=()=>e.value)=>e={get value(){return k?.deps.add(r.add(k)),t},set value(i){if(i!==t){t=i;for(let n of r)et?et.add(n):n()}},peek(){return t},toJSON:o,toString:o,valueOf:o},Ut=(t,e,r,o)=>(r=i=>{if(!t)return;let n=e;if(e=null,n?.call?.(),i=k,k=r,St++>50){St--,k=i,e=t=r.fn=null;for(let s of o)s.delete(r);o.clear(),console.error("\u2234 Reactive loop detected");return}try{e=t()}finally{k=i,St--}},r.fn=t,o=r.deps=new Set,r(),i=>{e?.call?.(),e=t=r.fn=null;for(i of o)i.delete(r);o.clear()}),Oe=(t,e=Kt(),r,o,i=()=>r.value)=>r={get value(){return o||(o=Ut(()=>e.value=t())),e.value},peek:e.peek,toJSON:i,toString:i,valueOf:i},Ne=(t,e=!et,r)=>{et??(et=new Set);try{t()}finally{if(e){[et,r]=[null,et];for(let o of r)o()}}},Ce=(t,e,r)=>(e=k,k=null,r=t(),k=e,r);var zt=(t,e)=>{var n,s;let r,o;t._holder?g(o=t,e):(t[n=h]??(t[n]=null),o=t.content?E(t):t,o[s=h]??(o[s]=null),Q(()=>t.replaceWith(r=t.ownerDocument.createTextNode(""))),o._holder=r._holder=r,r._clauses=[o._clause=[o,!1]],r._match=null,r.update=Y(()=>{let c=r._clauses.find(([,l])=>l);c!=r._match&&Q(()=>{r._match?.[0].remove(),r._match?.[0][L]?.(),(r._match=c)&&(r.before(r._match[0].content||r._match[0]),r._match[0][h]?r._match[0][ct]?.():(delete r._match[0][h],g(r._match[0],e)))})}));let i=c=>{o._clause[1]=c,o._holder.update()};return i[L]=()=>{o._holder._match?.[0][L]?.(),o._holder._match=null},i};var Vt=t=>{var o;let e,r=t;for(e=t.content?E(t):t,e[o=h]??(e[o]=null);r&&!(e._holder=r._holder);)r=r.previousSibling;return t.remove(),t[h]=null,e._holder._clauses.push(e._clause=[e,!0]),e._holder.update};var Zt=t=>(t.content&&t.replaceWith(t=E(t).childNodes[0]),e=>{e=typeof e=="function"?e(t.textContent):e,e=e==null?"":""+e;let r=t.textContent;if(r===e)return;let o=t.firstChild;if(o&&e.startsWith(r)){o.appendData(e.slice(r.length));return}let i=t.ownerDocument,n=i.activeElement,s=n&&(n===t||t.contains(n))?i.getSelection?.():null,c=s?.rangeCount&&t.contains(s.anchorNode)?s.getRangeAt(0).startOffset:-1;if(t.textContent=e,c>=0&&t.firstChild){let l=Math.min(c,t.firstChild.textContent.length),f=new Range;f.setStart(t.firstChild,l),f.collapse(!0),s.removeAllRanges(),s.addRange(f)}});var Jt=(t,e,r,o)=>{let i=null,n,s=null,c=()=>!t.classList.length&&t.removeAttribute("class");return l=>{if(l=typeof l=="function"?l(t.className):l,l?.constructor===Object){if(s=null,i)for(let f of i)l[f]||(t.classList.remove(f),i.delete(f));i?.size||(i=null);for(let f in l)l[f]&&!i?.has(f)&&(t.classList.add(f),(i||(i=new Set)).add(f));i||c();return}if(l=_t(l),l!==s){if(s=l,n=null,l)for(let f of l.split(" "))f&&(n||(n=new Set)).add(f);if(i)for(let f of i)n?.has(f)||t.classList.remove(f);if(n)for(let f of n)i?.has(f)||t.classList.add(f);n||c(),i=n}}};var Ft=(t,e,r,o)=>{let i;return n=>{if(i===void 0&&(i=t.getAttribute("style")??""),n=typeof n=="function"?n(t.style):n,typeof n=="string")$(t,"style",i?i+"; "+n:n);else{i&&$(t,"style",i);for(let s in n)s[0]=="-"?t.style.setProperty(s,n[s]):s[0]>="A"&&(t.style[s]=n[s])}}};var Bt=()=>t=>typeof t=="function"&&t();var Xt=(t,e)=>(t.type?.startsWith("select")&&g(t,e),t.type==="text"||t.type===""||t.tagName==="TEXTAREA"?(r,o,i)=>(o=t.selectionStart,i=t.selectionEnd,t.setAttribute("value",t.value=r??""),o&&t.setSelectionRange(o,i)):t.type==="checkbox"?r=>(t.checked=r,$(t,"checked",r)):t.type==="radio"?r=>(t.checked=t.value===r,$(t,"checked",t.checked||null)):t.type==="select-one"?r=>{for(let o of t.options)o.value==r?o.setAttribute("selected",""):o.removeAttribute("selected");t.value=r}:t.type==="select-multiple"?r=>{for(let o of t.options)r.some(i=>i==o.value)?o.setAttribute("selected",""):o.removeAttribute("selected")}:r=>t.value=r);var Ae=(t,e=b(`${t}=__`))=>(r,o)=>{r.__=o,e(r),delete r.__},Gt=(t,e,r)=>{let o=b(r).call(t,e);typeof o=="function"?o(t):Ae(r)(e,t)};var Qt=(t,e)=>{let r=t[h]=tt({},e),o=!1,i,n=t.content&&E(t);return n&&t.replaceWith(i=t.ownerDocument.createTextNode("")),s=>{if(s=typeof s=="function"?s(r):s,s!==r)for(let c in s){let l=Object.getOwnPropertyDescriptor(s,c);if(l?.get){(r[N][c]=X(l.get.bind(r)))[nt]=l.set?.bind(r);continue}let f=typeof s[c]=="function"?s[c].bind(r):s[c];c in r[N]?r[c]=f:r[N][c]=c[0]=="_"||f?.peek?f:D(tt(f))}return!o&&(o=!0,!i&&delete t[h],I(()=>(i?.before(n.content||t),g(n||t,r))))}};var Ee={get:(t,e)=>e===t.v?t.c?.[t.i]:e===t.k?t.o?t.o[t.i]:t.i:e===N?t:t.l?.[e]!==void 0?t.l[e]:t.p?.[e],set:(t,e,r)=>(e===t.v?t.c&&(t.c[t.i]=r):e===t.k||(t.l?.[e]!==void 0?t.l[e]=r:e in(t.p?.[N]||{})?t.p[e]=r:(t.l||(t.l={}))[e]=r),1),has:()=>!0},Yt={get:(t,e)=>e===t.v?t.r:e===t.k?t.i:e===N?t:t.l?.[e]!==void 0?t.l[e]:t.p?.[e],set:(t,e,r)=>(e===t.v?t.r=r:e===t.k||(t.l?.[e]!==void 0?t.l[e]=r:e in(t.p?.[N]||{})?t.p[e]=r:(t.l||(t.l={}))[e]=r),1),has:()=>!0},ut=t=>{t.el[Symbol.dispose]?.(),t.el.remove()},te=(t,e,r)=>{let[o,i]=r.split(/\bin|of\b/),[n,s="$"]=o.trim().replace(/\(|\)/g,"").split(/\s*,\s*/),c=t.ownerDocument,l=t._eachHolder||(t._eachHolder=c.createTextNode("")),f=new Map,a=[],_,T,K,C=!1,R=(p,v)=>{let y=new Proxy(p,v),u=t.content?E(t):t.cloneNode(!0);return{el:u,scope:p,proxy:y,node:u.content||u}},M=p=>{if(!p.length)return;let v=p.length>1?c.createDocumentFragment():null;for(let y of p)v?v.appendChild(y.node):l.before(y.node);v&&l.before(v);for(let y of p)g(y.el,y.proxy)},S=Y(()=>Q(()=>{let p=_,v=p.length,y=a.length;C=!1;for(let u=0;u<v;u++)if(p[u]!=null){C=typeof p[u]=="object";break}if(C&&y){let u=[],W=[],Z=new Set,ht=!1;for(let A=0;A<v;A++){let x=p[A];if(x!=null&&typeof x=="object"){if(Z.has(x))return;Z.add(x)}let j=f.get(x);j?(j.scope.i!==A&&(ht=!0),j.scope.i=A,j.scope.r=x):(j=R({p:e,v:n,k:s,r:x,i:A,l:null},Yt),f.set(x,j),W.push(j)),u.push(j)}for(let[A,x]of f)Z.has(A)||(ut(x),f.delete(A),ht=!0);if(M(W),ht){let A=l;for(let x=u.length-1;x>=0;x--){let j=u[x].el._holder||u[x].el.content||u[x].el;j.nextSibling!==A&&A.before(j),A=j}}a=u}else{if(y&&K!==p){for(let u of a)ut(u);a.length=0,y=0,f.clear()}if(K=p,v<y){for(let u=v;u<y;u++)ut(a[u]);a.length=v}for(let u=0;u<Math.min(y,v);u++)a[u].scope.c=p,T&&(a[u].scope.o=T);if(v>y){let u=[];for(let W=y;W<v;W++){let Z=C?R({p:e,v:n,k:s,r:p[W],i:W,l:null},Yt):R({p:e,v:n,k:s,c:p,i:W,o:T,l:null},Ee);a.push(Z),C&&f.set(p[W],Z),u.push(Z)}M(u)}}}));t.parentNode&&Q(()=>t.replaceWith(l)),t[h]=null;let V=p=>{T=null,typeof p=="number"?_=Array.from({length:p},(y,u)=>u+1):p?.constructor===Object?(T=Object.keys(p),_=Object.values(p)):_=p||[];let v=B(()=>{if(_[P]?.value,_[N])for(let y=0,u=_.length;y<u;y++)_[y];S()});return()=>v()};return V.eval=b(i),V[L]=()=>{for(let p of a)ut(p);a.length=0,f.clear()},V};var ee=(t,e,r,o)=>i=>$(t,o,typeof i=="function"&&!H(t)?i(t.getAttribute(o)):i);var re=t=>e=>{let r=H(t);for(let o in e)$(t,r?o:qt(o),e[o])};var oe=(t,e,r,o)=>{let[i,...n]=o.slice(2).split("."),s=b(r).bind(t),c=O(Object.assign(l=>s(e,f=>typeof f=="function"?f(l):f),{target:t}),n);return c.target.addEventListener(i,c,c),{[Symbol.dispose](){c.target.removeEventListener(i,c),c[Symbol.dispose]?.()}}};var ie=(t,e,r,o)=>{let i,n,s=b(r).bind(t),c=o.split("..").map((l,f,{length:a})=>l.split(":").reduce((_,T)=>{let[K,...C]=T.slice(2).split("."),R=(S,V)=>i=typeof S=="function"?S(V):S,M=O(Object.assign(S=>(f?R(i,S):s(e,V=>R(V,S)),n(),n=c[(f+1)%a]()),{target:t}),C);return S=>(S=_?.(),M.target.addEventListener(K,M,M),()=>(S?.(),M.target.removeEventListener(K,M)))},null));return n=c[0](),{[Symbol.dispose](){n?.()}}};var ne=t=>!!t?.content,se=(t,e)=>{if(t.content){let r,o=t.innerHTML,i=t.ownerDocument,n=t._holder;return n||t.replaceWith(n=i.createTextNode("")),s=>{if(typeof s=="function"&&(s=s(o)),t._holder&&(t.remove(),t.content.replaceChildren()),r?.[m]?.(),r?.remove(),s!=null&&s!=="")return r=ne(s)?(o=s.innerHTML,E(s)):E((r=i.createElement("template"),r.innerHTML=o=s,r)),I(()=>g(r,e)),n.before(r.content),t._holder&&t.childNodes.splice(0,1/0,...r.childNodes),r[m];t._holder&&(t.childNodes.length=0,o="")}}return r=>{var o;return r=typeof r=="function"?r(t.innerHTML):r,ne(r)?t.replaceChildren(r.content.cloneNode(!0)):t.innerHTML=r??"",t[o=h]&&(t[o]=null),I(()=>g(t,e)),t[m]}};var ce=(t,e,r)=>{let o=t.ownerDocument,i=o.createComment(":portal"),n=null;return t.before(i),s=>{let c=t.getRootNode(),l=typeof s=="string"?c.querySelector?.(s)||o.querySelector(s):s?.nodeType===1?s:s?o.body:null;if(l!==n)return l?l.appendChild(t):i.after(t),n=l,()=>{n&&(i.after(t),n=null)}}};var le=t=>e=>t.hidden=!!e;var Nt=(t,e,r,o)=>{let[,...i]=o.split("."),n=b(r).bind(t),s;return O(Object.assign(()=>{let l=n(e,f=>typeof f=="function"?f(t):f);typeof l=="function"&&(s=l)},{target:t}),i)(),{[m](){s?.(),s=null}}};var Ct=(t,e,r,o)=>{let[,...i]=o.split("."),n=b(r).bind(t),s=t.type==="checkbox"?()=>t.checked:t.type==="select-multiple"?()=>[...t.selectedOptions].map(l=>l.value):/^(date|time|month|week)/.test(t.type)?()=>t.value:()=>t.selectedIndex<0?null:isNaN(t.valueAsNumber)?t.value:t.valueAsNumber,c=O(Object.assign(()=>{n(e,l=>typeof l=="function"?l(s()):l)},{target:t}),i);return t.addEventListener("input",c),t.addEventListener("change",c),{[m](){t.removeEventListener("input",c),t.removeEventListener("change",c)}}};var fe=(t,e,r,o)=>{let[,...i]=o.split("."),n=b(r).bind(t),s=i.includes("once"),c=O(Object.assign(f=>{n(e,a=>typeof a=="function"?a(f):a)},{target:t}),i),l=new IntersectionObserver(f=>{for(let a of f)a.isIntersecting&&(c(a),s&&l.disconnect())});return l.observe(t),{[m](){l.disconnect()}}};fe.observer=!0;var ae=fe;var ue=(t,e,r,o)=>{let[,...i]=o.split("."),n=b(r).bind(t),s=O(Object.assign(l=>{n(e,f=>typeof f=="function"?f(l):f)},{target:t}),i),c=new ResizeObserver(l=>{for(let f of l){let a=f.contentRect;s({width:a.width,height:a.height,entry:f})}});return c.observe(t),{[m](){c.disconnect()}}};ue.observer=!0;var de=ue;Nt.observer=Ct.observer=!0;Object.assign(G,{_:ee,"":re,class:Jt,text:Zt,html:se,style:Ft,fx:Bt,value:Xt,ref:Gt,scope:Qt,if:zt,else:Vt,each:te,portal:ce,hidden:le,mount:Nt,change:Ct,intersect:ae,resize:de});var Te=(t,e,r,o)=>{let[i,...n]=e.split("."),s=G[i]||G._,c=n.length>0;return()=>{let l=t,f,a,_,T=0;if(c&&(a=D(0),_=O(Object.assign(()=>a.value++,{target:t}),n),l=_.target??t),f=s(l,o,r,i),!f?.call)return f?.[m];let K=f.eval??b(r).bind(l),C,R=()=>(typeof C=="function"&&C(),C=null);H(l)||(o=l[h]??o);let M=c?B(()=>(a.value==T?_():(T=a.value,C=K(o,f)),R)):B(()=>(C=K(o,f),R));if(!(h in l))return M;let S=0;return()=>{S||(S=1,M(),f[L]?f[L]():l[m]?.())}}},je=t=>t?typeof t=="number"?t:(([,e,r]=t.match(/^(\d+)(ms|s|m)?$/)||[])=>(e=+e,r==="s"?e*1e3:r==="m"?e*6e4:e))():0,At=t=>t==="idle"?requestIdleCallback:t==="raf"?requestAnimationFrame:!t||t==="tick"?queueMicrotask:e=>setTimeout(e,je(t));Object.assign(J,{debounce:(t,e,r)=>Ht(t,At(e==="immediate"?r:e),e==="immediate"||r==="immediate"),throttle:(t,e)=>Y(t,At(e)),delay:(t,e)=>((r=At(e))=>o=>r(()=>t(o)))(),tick:t=>e=>queueMicrotask(()=>t(e)),raf:t=>e=>requestAnimationFrame(()=>t(e)),once:(t,e,r)=>(r=o=>!e&&(e=1,t(o)),r.once=!0,r),window:t=>(t.target=t.target.ownerDocument.defaultView,t),document:t=>(t.target=t.target.ownerDocument,t),root:t=>(t.target=t.target.ownerDocument.documentElement,t),body:t=>(t.target=t.target.ownerDocument.body,t),parent:t=>(t.target=t.target.parentNode,t),self:t=>e=>e.target===t.target&&t(e),away:(t,e)=>{let r=t.target.ownerDocument,o=n=>e=n.target,i=r.currentEvent||r.defaultView?.event;return r.addEventListener("pointerdown",o,!0),Object.assign(n=>n!==i&&!t.target.contains(n.type==="click"?e??n.target:n.target)&&n.target.isConnected&&t(n),{target:r,[m]:()=>r.removeEventListener("pointerdown",o,!0)})},prevent:t=>e=>(e?.preventDefault(),t(e)),stop:(t,e)=>r=>(e?.[0]==="i"?r?.stopImmediatePropagation():r?.stopPropagation(),t(r)),passive:t=>(t.passive=!0,t),capture:t=>(t.capture=!0,t)});J.outside=J.away;var Et={ctrl:t=>t.ctrlKey||t.key==="Control"||t.key==="Ctrl",shift:t=>t.shiftKey||t.key==="Shift",alt:t=>t.altKey||t.key==="Alt",meta:t=>t.metaKey||t.key==="Meta",cmd:t=>t.metaKey||t.key==="Command",arrow:t=>t.key?.startsWith("Arrow"),enter:t=>t.key==="Enter",esc:t=>t.key?.startsWith("Esc"),tab:t=>t.key==="Tab",space:t=>t.key==="\xA0"||t.key==="Space"||t.key===" ",delete:t=>t.key==="Delete"||t.key==="Backspace",digit:t=>/^\d$/.test(t.key),letter:t=>/^\p{L}$/gu.test(t.key),char:t=>/^\S$/.test(t.key)},pe=(t,e)=>Et[t]?.(e)||e.key?.toLowerCase()===t||e.keyCode==t;for(let t in Et)J[t]=(e,r,o)=>i=>Et[t](i)&&(!r||pe(r,i))&&(!o||pe(o,i))&&e(i);var Le=t=>{let e=0,r="",o=0;for(let i of t){if(r){o?o=0:i==="\\"?o=1:i===r&&(r="");continue}if(i===";"&&!e)return!0;i==="{"?e++:i==="}"?e--:(i==='"'||i==="'"||i==="`")&&(r=i)}return!1};ot({compile:t=>(/^(if|let|const)\b/.test(t)||Le(t)||(t=`return ${t}`),/\bawait\s/.test(t)&&(t=`return (async()=>{${t}})()`),g.constructor(`with(arguments[0]){${t}}`)),dir:(t,e,r,o)=>e.includes("..")?()=>ie(t,o,r,e)[m]:e.split(":").reduce((i,n)=>{let s=n.split(".")[0],c=G[s],l=n.startsWith("on")?()=>oe(t,o,r,n)[m]:c?.observer?()=>c(t,o,r,n)[m]:Te(t,n,r,o);return i?(f,a)=>(f=i(),a=l(),()=>{f(),a()}):l},null),...Ot});g.use=ot;g.store=it;g.directive=G;g.modifier=J;var co=g.dispose=t=>t[m]?.();g.start=Wt;var he=g;var Dt={};Mt(Dt,{Computed:()=>z,Effect:()=>F,Signal:()=>w,batch:()=>Me,computed:()=>$e,effect:()=>_e,signal:()=>Pe,untracked:()=>jt});var De=Symbol.for("preact-signals");function pt(){if(U>1)U--;else{for(var t,e=!1;st!==void 0;){var r=st;for(st=void 0,Tt++;r!==void 0;){var o=r.o;if(r.o=void 0,r.f&=-3,!(8&r.f)&&ye(r))try{r.c()}catch(i){e||(t=i,e=!0)}r=o}}if(Tt=0,U--,e)throw t}}function Me(t){if(U>0)return t();U++;try{return t()}finally{pt()}}var d=void 0;function jt(t){var e=d;d=void 0;try{return t()}finally{d=e}}var st=void 0,U=0,Tt=0,dt=0;function me(t){if(d!==void 0){var e=t.n;if(e===void 0||e.t!==d)return e={i:0,S:t,p:d.s,n:void 0,t:d,e:void 0,x:void 0,r:e},d.s!==void 0&&(d.s.n=e),d.s=e,t.n=e,32&d.f&&t.S(e),e;if(e.i===-1)return e.i=0,e.n!==void 0&&(e.n.p=e.p,e.p!==void 0&&(e.p.n=e.n),e.p=d.s,e.n=void 0,d.s.n=e,d.s=e),e}}function w(t,e){this.v=t,this.i=0,this.n=void 0,this.t=void 0,this.W=e?.watched,this.Z=e?.unwatched,this.name=e?.name}w.prototype.brand=De;w.prototype.h=function(){return!0};w.prototype.S=function(t){var e=this,r=this.t;r!==t&&t.e===void 0&&(t.x=r,this.t=t,r!==void 0?r.e=t:jt(function(){var o;(o=e.W)==null||o.call(e)}))};w.prototype.U=function(t){var e=this;if(this.t!==void 0){var r=t.e,o=t.x;r!==void 0&&(r.x=o,t.e=void 0),o!==void 0&&(o.e=r,t.x=void 0),t===this.t&&(this.t=o,o===void 0&&jt(function(){var i;(i=e.Z)==null||i.call(e)}))}};w.prototype.subscribe=function(t){var e=this;return _e(function(){var r=e.value,o=d;d=void 0;try{t(r)}finally{d=o}},{name:"sub"})};w.prototype.valueOf=function(){return this.value};w.prototype.toString=function(){return this.value+""};w.prototype.toJSON=function(){return this.value};w.prototype.peek=function(){var t=d;d=void 0;try{return this.value}finally{d=t}};Object.defineProperty(w.prototype,"value",{get:function(){var t=me(this);return t!==void 0&&(t.i=this.i),this.v},set:function(t){if(t!==this.v){if(Tt>100)throw new Error("Cycle detected");this.v=t,this.i++,dt++,U++;try{for(var e=this.t;e!==void 0;e=e.x)e.t.N()}finally{pt()}}}});function Pe(t,e){return new w(t,e)}function ye(t){for(var e=t.s;e!==void 0;e=e.n)if(e.S.i!==e.i||!e.S.h()||e.S.i!==e.i)return!0;return!1}function ge(t){for(var e=t.s;e!==void 0;e=e.n){var r=e.S.n;if(r!==void 0&&(e.r=r),e.S.n=e,e.i=-1,e.n===void 0){t.s=e;break}}}function be(t){for(var e=t.s,r=void 0;e!==void 0;){var o=e.p;e.i===-1?(e.S.U(e),o!==void 0&&(o.n=e.n),e.n!==void 0&&(e.n.p=o)):r=e,e.S.n=e.r,e.r!==void 0&&(e.r=void 0),e=o}t.s=r}function z(t,e){w.call(this,void 0),this.x=t,this.s=void 0,this.g=dt-1,this.f=4,this.W=e?.watched,this.Z=e?.unwatched,this.name=e?.name}z.prototype=new w;z.prototype.h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===dt))return!0;if(this.g=dt,this.f|=1,this.i>0&&!ye(this))return this.f&=-2,!0;var t=d;try{ge(this),d=this;var e=this.x();(16&this.f||this.v!==e||this.i===0)&&(this.v=e,this.f&=-17,this.i++)}catch(r){this.v=r,this.f|=16,this.i++}return d=t,be(this),this.f&=-2,!0};z.prototype.S=function(t){if(this.t===void 0){this.f|=36;for(var e=this.s;e!==void 0;e=e.n)e.S.S(e)}w.prototype.S.call(this,t)};z.prototype.U=function(t){if(this.t!==void 0&&(w.prototype.U.call(this,t),this.t===void 0)){this.f&=-33;for(var e=this.s;e!==void 0;e=e.n)e.S.U(e)}};z.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var t=this.t;t!==void 0;t=t.x)t.t.N()}};Object.defineProperty(z.prototype,"value",{get:function(){if(1&this.f)throw new Error("Cycle detected");var t=me(this);if(this.h(),t!==void 0&&(t.i=this.i),16&this.f)throw this.v;return this.v}});function $e(t,e){return new z(t,e)}function ve(t){var e=t.u;if(t.u=void 0,typeof e=="function"){U++;var r=d;d=void 0;try{e()}catch(o){throw t.f&=-2,t.f|=8,Lt(t),o}finally{d=r,pt()}}}function Lt(t){for(var e=t.s;e!==void 0;e=e.n)e.S.U(e);t.x=void 0,t.s=void 0,ve(t)}function Re(t){if(d!==this)throw new Error("Out-of-order effect");be(this),d=t,this.f&=-2,8&this.f&&Lt(this),pt()}function F(t,e){this.x=t,this.u=void 0,this.s=void 0,this.o=void 0,this.f=32,this.name=e?.name}F.prototype.c=function(){var t=this.S();try{if(8&this.f||this.x===void 0)return;var e=this.x();typeof e=="function"&&(this.u=e)}finally{t()}};F.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1,this.f&=-9,ve(this),ge(this),U++;var t=d;return d=this,Re.bind(this,t)};F.prototype.N=function(){2&this.f||(this.f|=2,this.o=st,st=this)};F.prototype.d=function(){this.f|=8,1&this.f||Lt(this)};F.prototype.dispose=function(){this.d()};function _e(t,e){var r=new F(t,e);try{r.c()}catch(i){throw r.d(),i}var o=r.d.bind(r);return o[Symbol.dispose]=o,o}ot(Dt);var ao=he;export{rt as batch,X as computed,Ht as debounce,ao as default,co as dispose,B as effect,D as signal,g as sprae,Wt as start,it as store,Y as throttle,I as untracked,ot as use};
1
+ var Ee=Object.defineProperty;var qt=(t,e)=>{for(var r in e)Ee(t,r,{get:e[r],enumerable:!0})};var v=Symbol.dispose||(Symbol.dispose=Symbol("dispose")),b=Symbol("state"),ft=Symbol("on"),W=Symbol("off"),bt=Symbol("init"),vt=":",z=t=>t.localName?.includes("-"),L,X,G,Q=t=>t(),M=Q,Y={},P={},at=null,_t=null,Te=t=>{if(!t?.tagName)return"";let e=t.tagName.toLowerCase();return t.id?e+="#"+t.id:t.className&&(e+="."+t.className.split(" ")[0]),`<${e}>`},gt=(t,e,r=_t)=>{let o=`\u2234 ${t}`;if(r&&(o+=`
2
+ in ${Te(r)}`),e){let i=e.length>100?e.slice(0,80)+`\u2026 (${e.length} chars)`:e;o+=at?`
3
+ ${at}="${i}"`:`
4
+ ="${i}"`}console.error(o)},Kt=Symbol("dirs"),xt=(t=document.body,e,r)=>{if(t[b])return Object.assign(t[b],e);e=st(e||{});let o=t,i=[],n=[];o[ft]=()=>{if(n)return n;n=Array(i.length);for(let c=0;c<i.length;c++)n[c]=i[c]();return n},o[W]=()=>{if(!n)return;let c=n;n=null;for(let a=0;a<c.length;a++)c[a]?.()},o[v]||(o[v]=()=>{o[W]?.(),U?._root===o&&(U.disconnect(),U=null),o[W]=o[ft]=o[v]=o[bt]=o[b]=null});let s=(c,a,u,d,h=c[b])=>(at=a,_t=c,i.push(l=zt(c,u,d,e)),n.push(l()),c[b]!==h),l,f=o[bt]=(c,a)=>{let u=a?.[Kt];if(u!==void 0){for(let[d,h,w]of u)if(c.removeAttribute(d),s(c,d,h,w))return}else{let d=c.attributes,h=a&&(a[Kt]=[]);if(d)for(let w=0;w<d.length;){let{name:A,value:T}=d[w];if(A.startsWith(vt)){c.removeAttribute(A),a?.removeAttribute(A);let j=A.slice(vt.length);if(h?.push([A,j,T]),s(c,A,j,T))return}else w++}}if(!(c!==t&&z(c)))if(c.firstChild!==void 0){let d=c.firstChild,h=a?.firstChild,w;for(;d;)w=d.nextSibling,d.nodeType==1&&f(d,h),h&&(h=h.nextSibling),d=w}else for(let d of c.childNodes)d.nodeType==1&&f(d)};return f(o,r),at=_t=null,o[b]===void 0&&!z(t)&&(o[b]=e),e};xt.version="13.4.0";var zt,Vt,N=t=>{let e=Ut[t=t.trim()];if(e)return e;try{e=Vt(t||"undefined")}catch(r){gt(r,t)}return Ut[t]=function(r,o,i){try{let n=e?.call(this,r);return o?n?.then?(n.then(s=>i=o(s)).catch(s=>gt(s,t,this)),()=>typeof i=="function"&&i()):o(n):n}catch(n){gt(n,t,this)}}},Ut={},nt=t=>(t.compile&&(Vt=t.compile),t.prefix&&(vt=t.prefix),t.signal&&(L=t.signal),t.effect&&(X=t.effect),t.computed&&(G=t.computed),t.batch&&(Q=t.batch),t.untracked&&(M=t.untracked),t.dir&&(zt=t.dir)),D=(t,e)=>{for(;e.length;){let[r,...o]=e.pop().split("-"),i=P[r],n;if(i&&(n=i(t,...o))!==t){for(let s in t)n[s]??(n[s]=t[s]);t=n}}return t},U=null,tt=t=>{U?.disconnect(),t(),U?.observe(U._root,{childList:!0,subtree:!0})},Zt=(t=document.body,e)=>{let r=st(e);return xt(t,r),U=new MutationObserver(o=>{for(let i of o){for(let n of i.addedNodes)n.nodeType===1&&n[b]===void 0&&t.contains(n)&&t[bt](n);for(let n of i.removedNodes)n.nodeType===1&&!t.contains(n)&&n[v]?.()}}),U._root=t,U.observe(t,{childList:!0,subtree:!0}),r},$=t=>{if(!t.nodeType)return t;let e=t.ownerDocument,r=t.content.cloneNode(!0),o=[...t.attributes],i=e.createTextNode(""),n=(r.append(i),[...r.childNodes]);return{ownerDocument:e,childNodes:n,content:r,remove:()=>r.append(...n),replaceWith(s){s!==i&&(i.before(s),r.append(...n))},attributes:o,removeAttribute(s){o.splice(o.findIndex(l=>l.name===s),1)}}},kt=t=>t.replace(/[A-Z\u00C0-\u00D6\u00D8-\u00DE]/g,(e,r)=>(r?"-":"")+e.toLowerCase()),je=t=>t.replace(/-([a-z])/g,(e,r)=>r.toUpperCase()),q=(t,e,r)=>r==null||r===!1?t.removeAttribute(e):z(t)?t[je(e)]=r:t.setAttribute(e,r===!0?"":r),wt=t=>t?typeof t=="string"?t:(Array.isArray(t)?t.map(wt):Object.entries(t).reduce((e,[r,o])=>(o&&e.push(r),e),[])).join(" "):"",Jt=t=>typeof t=="function"?t:t?e=>setTimeout(e,t):queueMicrotask,et=(t,e)=>{let r=0,o=0,i,n=Jt(e),s=l=>{i=l,r++||(t(i),n(()=>{let f=r>1;if(r=0,f){if(++o>50){o=0,console.error("\u2234 Reactive loop detected");return}s(i)}else o=0}))};return s},Bt=(t,e,r)=>{let o=Jt(e);return r?(i=>n=>!i&&(t(n),i=1,o(()=>i=0)))():((i=0)=>(n,s=++i)=>o(()=>s==i&&t(n)))()},S=xt;var H=Symbol("signals"),R=Symbol("change"),Nt=Symbol("touch"),lt=Symbol("set"),Ot=Symbol("parent"),St=!0,rt=(t,e)=>{if(!t||t[Symbol.toStringTag]||t[H])return t;if(t.constructor!==Object)return Array.isArray(t)?Ft(t):t;let r=Object.keys(t).length,o={},i=new Proxy(Object.assign(o,{[R]:L(r),[H]:o}),{get:(s,l)=>l in o?o.hasOwnProperty(l)&&typeof o[l]=="function"&&!o[l].prototype?o[l].bind(i):o[l]?o[l].valueOf():o[l]:e?e[l]:typeof globalThis[l]=="function"&&!globalThis[l].prototype?globalThis[l].bind(globalThis):globalThis[l],set:(s,l,f)=>l in o?(Xt(o,l,f),1):(St=!1,e&&l in e?e[l]=f:(dt(o,l,f),o[R].value=++r),St=!0,1),deleteProperty:(s,l)=>(l in o&&(l[0]!="_"&&o[l]?.[Symbol.dispose]?.(),delete o[l],o[R].value=--r),1),ownKeys:()=>(o[R].value,Reflect.ownKeys(o).filter(s=>s!==Ot)),has:(s,l)=>l in o?!0:e?l in e:St});Object.defineProperty(o,Ot,{value:e,configurable:!0});let n=Object.getOwnPropertyDescriptors(t);for(let s in t)n[s]?.get?(o[s]=G(n[s].get.bind(i)))[lt]=n[s].set?.bind(i):dt(o,s,t[s]);return i},Ft=(t,e=globalThis)=>{let r=t.map(a=>L(ut(a))),o=!1,i=a=>function(){o=!0;let u;return Q(()=>u=a.apply(this,arguments)),u},n=L(t.length),s=L(0),l=()=>{s.value++},f=r.splice,c=new Proxy(Object.assign(r,{[R]:n,[Nt]:s,[H]:r,push:i(r.push),pop:i(r.pop),shift:i(r.shift),unshift:i(r.unshift),splice:i(function(){let a=f.apply(this,arguments);return l(),a})}),{get(a,u){return u==="length"?o?(o=!1,r.length):n.value:typeof u=="symbol"||isNaN(u)?r[u]?.valueOf()??e[u]:(r[u]??(r[u]=L(void 0))).valueOf()},set(a,u,d){if(u==="length"){for(let h=d;h<r.length;h++)r[h]?.[Symbol.dispose]?.();n.value=r.length=d}else if(u>=r.length)dt(r,u,d,ut),c.length=+u+1;else if(r[u]){let h=r[u],w=h.peek?.()??h.valueOf();Xt(r,u,d,ut),(h.peek?.()??h.valueOf())!==w&&l()}else dt(r,u,d,ut);return 1},deleteProperty:(a,u)=>(r[u]?.[Symbol.dispose]?.(),delete r[u],1)});return Object.defineProperty(r,Ot,{value:e,configurable:!0}),c},dt=(t,e,r,o=rt)=>t[e]=e[0]=="_"||r?.peek||typeof r=="function"?r:L(o(r)),ut=t=>{if(!t||typeof t!="object"||t.constructor!==Object||t[R])return t;let e={},r;return new Proxy(t,{get:(o,i)=>i===H?o:i===R?r??(r=L(0)):(typeof i=="symbol"||(e[i]??(e[i]=L(0))).value,o[i]),set:(o,i,n)=>{if(o[i]!==n){let s=!(i in o);o[i]=n,e[i]&&e[i].value++,s&&r&&r.value++}return 1},has:()=>!0})},Xt=(t,e,r,o=rt)=>{if(e[0]==="_"||typeof t[e]=="function")return t[e]=r;let i=t[e],n=i.peek?.()??i;if(r!==n){if(i[lt])return i[lt](r);Array.isArray(r)&&Array.isArray(n)?R in n?M(()=>Q(()=>{for(let s=0;s<r.length;s++)n[s]=r[s];n.length=r.length})):i.value=R in r?r:Ft(r):i.value=o(r)}},st=rt;var Et={};qt(Et,{batch:()=>We,computed:()=>De,effect:()=>Gt,signal:()=>Le,untracked:()=>$e});var K,Ct=0,ot,pt=class{constructor(e){this.v=e,this.o=null}get value(){return K&&K.deps.add((this.o??(this.o=new Set)).add(K)),this.v}set value(e){if(e!==this.v&&(this.v=e,this.o))for(let r of this.o)ot?ot.add(r):r()}peek(){return this.v}valueOf(){return this.value}toString(){return this.value}toJSON(){return this.value}},Le=t=>new pt(t),Gt=(t,e,r,o)=>(r=i=>{if(!t)return;let n=e;if(e=null,n?.call?.(),i=K,K=r,Ct++>50){Ct--,K=i,e=t=r.fn=null;for(let s of o)s.delete(r);o.clear(),console.error("\u2234 Reactive loop detected");return}try{e=t()}finally{K=i,Ct--}},r.fn=t,o=r.deps=new Set,r(),i=>{e?.call?.(),e=t=r.fn=null;for(i of o)i.delete(r);o.clear()}),At=class extends pt{constructor(e){super(),this.fn=e,this.e=null}get value(){return this.e||(this.e=Gt(()=>super.value=this.fn())),super.value}},De=t=>new At(t),We=(t,e=!ot,r)=>{ot??(ot=new Set);try{t()}finally{if(e){[ot,r]=[null,ot];for(let o of r)o()}}},$e=(t,e)=>{e=K,K=null;try{return t()}finally{K=e}};var Qt=(t,e)=>{var n,s;let r,o;t._holder?S(o=t,e):(t[n=b]??(t[n]=null),o=t.content?$(t):t,o[s=b]??(o[s]=null),tt(()=>t.replaceWith(r=t.ownerDocument.createTextNode(""))),o._holder=r._holder=r,r._clauses=[o._clause=[o,!1]],r._match=null,r.update=et(()=>{let l=r._clauses.find(([,f])=>f);l!=r._match&&tt(()=>{r._match?.[0].remove(),r._match?.[0][W]?.(),(r._match=l)&&(r.before(r._match[0].content||r._match[0]),r._match[0][b]?r._match[0][ft]?.():(delete r._match[0][b],S(r._match[0],e)))})}));let i=l=>{o._clause[1]=l,o._holder.update()};return i[W]=()=>{o._holder._match?.[0][W]?.(),o._holder._match=null},i},Yt=t=>{var o;let e,r=t;for(e=t.content?$(t):t,e[o=b]??(e[o]=null);r&&!(e._holder=r._holder);)r=r.previousSibling;return t.remove(),t[b]=null,e._holder._clauses.push(e._clause=[e,!0]),e._holder.update};var te=t=>(t.content&&t.replaceWith(t=$(t).childNodes[0]),e=>{e=typeof e=="function"?e(t.textContent):e,e=e==null?"":""+e;let r=t.textContent;if(r===e)return;let o=t.firstChild;if(o&&e.startsWith(r)){o.appendData(e.slice(r.length));return}let i=t.ownerDocument,n=i.activeElement,s=n&&(n===t||t.contains(n))?i.getSelection?.():null,l=s?.rangeCount&&t.contains(s.anchorNode)?s.getRangeAt(0).startOffset:-1;if(t.textContent=e,l>=0&&t.firstChild){let f=Math.min(l,t.firstChild.textContent.length),c=new Range;c.setStart(t.firstChild,f),c.collapse(!0),s.removeAllRanges(),s.addRange(c)}});var ee=(t,e,r,o)=>{let i=null,n,s=null,l=()=>!t.classList.length&&t.removeAttribute("class");return f=>{if(f=typeof f=="function"?f(t.className):f,f?.constructor===Object){if(s=null,i)for(let c of i)f[c]||(t.classList.remove(c),i.delete(c));i?.size||(i=null);for(let c in f)f[c]&&!i?.has(c)&&(t.classList.add(c),(i||(i=new Set)).add(c));i||l();return}if(f=wt(f),f!==s){if(s=f,n=null,f)for(let c of f.split(" "))c&&(n||(n=new Set)).add(c);if(i)for(let c of i)n?.has(c)||t.classList.remove(c);if(n)for(let c of n)i?.has(c)||t.classList.add(c);n||l(),i=n}}};var re=(t,e,r,o)=>{let i;return n=>{if(i===void 0&&(i=t.getAttribute("style")??""),n=typeof n=="function"?n(t.style):n,typeof n=="string")q(t,"style",i?i+"; "+n:n);else{i&&q(t,"style",i);for(let s in n)s[0]=="-"?t.style.setProperty(s,n[s]):s[0]>="A"&&(t.style[s]=n[s])}}};var oe=()=>t=>typeof t=="function"&&t();var ie=(t,e)=>(t.type?.startsWith("select")&&S(t,e),t.type==="text"||t.type===""||t.tagName==="TEXTAREA"?(r,o,i)=>(o=t.selectionStart,i=t.selectionEnd,t.setAttribute("value",t.value=r??""),o&&t.setSelectionRange(o,i)):t.type==="checkbox"?r=>(t.checked=r,q(t,"checked",r)):t.type==="radio"?r=>(t.checked=t.value===r,q(t,"checked",t.checked||null)):t.type==="select-one"?r=>{for(let o of t.options)o.value==r?o.setAttribute("selected",""):o.removeAttribute("selected");t.value=r}:t.type==="select-multiple"?r=>{for(let o of t.options)r.some(i=>i==o.value)?o.setAttribute("selected",""):o.removeAttribute("selected")}:r=>t.value=r);var Me=(t,e=N(`${t}=__`))=>(r,o)=>{r.__=o,e(r),delete r.__},ne=(t,e,r)=>{let o=N(r).call(t,e);typeof o=="function"?o(t):Me(r)(e,t)};var se=(t,e)=>{let r=t[b]=rt({},e),o=!1,i,n=t.content&&$(t);return n&&t.replaceWith(i=t.ownerDocument.createTextNode("")),s=>{if(s=typeof s=="function"?s(r):s,s!==r)for(let l in s){let f=Object.getOwnPropertyDescriptor(s,l);if(f?.get){(r[H][l]=G(f.get.bind(r)))[lt]=f.set?.bind(r);continue}let c=typeof s[l]=="function"?s[l].bind(r):s[l];l in r[H]?r[l]=c:r[H][l]=l[0]=="_"||c?.peek?c:L(rt(c))}return!o&&(o=!0,!i&&delete t[b],M(()=>(i?.before(n.content||t),S(n||t,r))))}};var Pe={get:(t,e)=>e===t.v?t.c?t.c[t.i]:t.r:e===t.k?t.o?t.o[t.i]:t.i:e===H?t:t.l?.[e]!==void 0?t.l[e]:t.p?.[e],set:(t,e,r)=>(e===t.v?t.c?t.c[t.i]=r:t.r=r:e===t.k||(t.l?.[e]!==void 0?t.l[e]=r:e in(t.p?.[H]||{})?t.p[e]=r:(t.l||(t.l={}))[e]=r),1),has:()=>!0},le=(t,e,r)=>{let[,o,i]=r.match(/^(.*?)\b(?:in|of)\b(.*)$/s)||[],[n,s="$"]=o.trim().replace(/\(|\)/g,"").split(/\s*,\s*/),l=t.ownerDocument,f=t._eachHolder||(t._eachHolder=l.createTextNode("")),c=new Map,a=[],u,d,h,w=!1,A=m=>{c.delete(m.scope.r),m.el.remove(),m.el[Symbol.dispose]?.()},T=(m,C,O)=>{let B={p:e,v:n,k:s,r:m,c:C,i:O,o:d,l:null},p=t.content?$(t):t.cloneNode(!0);return{el:p,scope:B,proxy:new Proxy(B,Pe),node:p.content||p,_di:O}},j=m=>{if(!m.length)return;let C=m.length>1?l.createDocumentFragment():null;for(let O of m)C?C.appendChild(O.node):f.before(O.node);C&&f.before(C);for(let O of m)S(O.el,O.proxy,t.content?void 0:t)},it=et(()=>M(()=>tt(()=>{let m=u,C=m.length,O=a.length,B=C!==O;w=!1;for(let p=0;p<C;p++)if(m[p]!=null){w=typeof m[p]=="object";break}if(w&&O){let p=[],I=[],k=new Set,Ht=!1,It=!1;for(let x=0;x<C;x++){let g=m[x];if(g!=null&&typeof g=="object"){if(k.has(g))return;k.add(g)}let _=c.get(g);_?(!B&&_.scope.i!==x&&(Ht=!0),I.length&&(It=!0),_.scope.i=x,_.scope.r=g,_.scope.o=d):(_=T(g,null,x),c.set(g,_),I.push(_)),p.push(_)}for(let[x,g]of c)k.has(x)||A(g);if(j(I),It){let x=f;for(let g=p.length-1;g>=0;g--){let _=p[g].node;_.nextSibling!==x&&x.before(_),x=_,p[g]._di=g}}else if(Ht){let x=[];for(let g=0;g<p.length;g++){let _=p[g];_._di!==g&&x.push(_),_._di=g}if(x.length===2){let g=x[0].node,_=x[1].node,F=l.createTextNode("");g.replaceWith(F),_.replaceWith(g),F.replaceWith(_)}else{let g=f;for(let _=p.length-1;_>=0;_--){let F=p[_].node;F.nextSibling!==g&&g.before(F),g=F}}}else for(let x=0;x<p.length;x++)p[x]._di=x;a=p}else{if(O&&h!==m){for(let p of a)A(p);a.length=0,O=0,c.clear()}if(h=m,C<O){for(let p=C;p<O;p++)A(a[p]);a.length=C}for(let p=0;p<Math.min(O,C);p++)a[p].scope.c=m,d&&(a[p].scope.o=d);if(C>O){let p=[];for(let I=O;I<C;I++){let k=w?T(m[I],null,I):T(null,m,I);a.push(k),w&&c.set(m[I],k),p.push(k)}j(p)}}})));t.parentNode&&tt(()=>t.replaceWith(f)),t[b]=null;let yt=m=>{d=null,typeof m=="number"?u=Array.from({length:m},(O,B)=>B+1):m?.constructor===Object?(d=Object.keys(m),u=Object.values(m)):u=m||[];let C=X(()=>{u[R]?.value,u[Nt],it()});return()=>C()};return yt.eval=N(i),yt[W]=()=>{for(let m of a)A(m);a.length=0,c.clear()},yt};var ce=(t,e,r,o)=>i=>q(t,o,typeof i=="function"&&!z(t)?i(t.getAttribute(o)):i);var fe=t=>e=>{let r=z(t);for(let o in e)q(t,r?o:kt(o),e[o])};var ae=(t,e,r,o)=>{let[i,...n]=o.slice(2).split("."),s=N(r).bind(t),l=D(Object.assign(f=>s(e,c=>typeof c=="function"?c(f):c),{target:t}),n);return l.target.addEventListener(i,l,l),{[Symbol.dispose](){l.target.removeEventListener(i,l),l[Symbol.dispose]?.()}}};var ue=(t,e,r,o)=>{let i,n,s=N(r).bind(t),l=o.split("..").map((f,c,{length:a})=>f.split(":").reduce((u,d)=>{let[h,...w]=d.slice(2).split("."),A=(j,it)=>i=typeof j=="function"?j(it):j,T=D(Object.assign(j=>(c?A(i,j):s(e,it=>A(it,j)),n(),n=l[(c+1)%a]()),{target:t}),w);return j=>(j=u?.(),T.target.addEventListener(h,T,T),()=>(j?.(),T.target.removeEventListener(h,T)))},null));return n=l[0](),{[Symbol.dispose](){n?.()}}};var de=t=>!!t?.content,pe=(t,e)=>{if(t.content){let r,o=t.innerHTML,i=t.ownerDocument,n=t._holder;return n||t.replaceWith(n=i.createTextNode("")),s=>{if(typeof s=="function"&&(s=s(o)),t._holder&&(t.remove(),t.content.replaceChildren()),r?.[v]?.(),r?.remove(),s!=null&&s!=="")return r=de(s)?(o=s.innerHTML,$(s)):$((r=i.createElement("template"),r.innerHTML=o=s,r)),M(()=>S(r,e)),n.before(r.content),t._holder&&t.childNodes.splice(0,1/0,...r.childNodes),r[v];t._holder&&(t.childNodes.length=0,o="")}}return r=>{var o;return r=typeof r=="function"?r(t.innerHTML):r,de(r)?t.replaceChildren(r.content.cloneNode(!0)):t.innerHTML=r??"",t[o=b]&&(t[o]=null),M(()=>S(t,e)),t[v]}};var he=(t,e,r)=>{let o=t.ownerDocument,i=o.createComment(":portal"),n=null;return t.before(i),s=>{let l=t.getRootNode(),f=typeof s=="string"?l.querySelector?.(s)||o.querySelector(s):s?.nodeType===1?s:s?o.body:null;if(f!==n)return f?f.appendChild(t):i.after(t),n=f,()=>{n&&(i.after(t),n=null)}}};var me=t=>e=>t.hidden=!!e;var Tt=(t,e,r,o)=>{let[,...i]=o.split("."),n=N(r).bind(t),s;return D(Object.assign(()=>{let f=n(e,c=>typeof c=="function"?c(t):c);typeof f=="function"&&(s=f)},{target:t}),i)(),{[v](){s?.(),s=null}}};var jt=(t,e,r,o)=>{let[,...i]=o.split("."),n=N(r).bind(t),s=t.type==="checkbox"?()=>t.checked:t.type==="select-multiple"?()=>[...t.selectedOptions].map(f=>f.value):/^(date|time|month|week)/.test(t.type)?()=>t.value:()=>t.selectedIndex<0?null:isNaN(t.valueAsNumber)?t.value:t.valueAsNumber,l=D(Object.assign(()=>{n(e,f=>typeof f=="function"?f(s()):f)},{target:t}),i);return t.addEventListener("input",l),t.addEventListener("change",l),{[v](){t.removeEventListener("input",l),t.removeEventListener("change",l)}}};var ye=(t,e,r,o)=>{let[,...i]=o.split("."),n=N(r).bind(t),s=i.includes("once"),l=D(Object.assign(c=>{n(e,a=>typeof a=="function"?a(c):a)},{target:t}),i),f=new IntersectionObserver(c=>{for(let a of c)a.isIntersecting&&(l(a),s&&f.disconnect())});return f.observe(t),{[v](){f.disconnect()}}};ye.observer=!0;var ge=ye;var be=(t,e,r,o)=>{let[,...i]=o.split("."),n=N(r).bind(t),s=D(Object.assign(f=>{n(e,c=>typeof c=="function"?c(f):c)},{target:t}),i),l=new ResizeObserver(f=>{for(let c of f){let a=c.contentRect;s({width:a.width,height:a.height,entry:c})}});return l.observe(t),{[v](){l.disconnect()}}};be.observer=!0;var ve=be;Tt.observer=jt.observer=!0;Object.assign(Y,{_:ce,"":fe,class:ee,text:te,html:pe,style:re,fx:oe,value:ie,ref:ne,scope:se,if:Qt,else:Yt,each:le,portal:he,hidden:me,mount:Tt,change:jt,intersect:ge,resize:ve});var Re=(t,e,r,o,i)=>{let n=Y[e]||Y._,s=r.length>0;return()=>{let l=t,f,c,a,u=0;if(s&&(c=L(0),a=D(Object.assign(()=>c.value++,{target:t}),r.slice()),l=a.target??t),f=n(l,i,o,e),!f?.call)return f?.[v];let d=f.eval??N(o),h,w=()=>(typeof h=="function"&&h(),h=null);z(l)||(i=l[b]??i);let A=s?X(()=>(c.value==u?a():(u=c.value,h=d.call(l,i,f)),w)):X(()=>(h=d.call(l,i,f),w));if(!(b in l))return A;let T=0;return()=>{T||(T=1,A(),f[W]?f[W]():l[v]?.())}}},Lt={},He=t=>Lt[t]??(Lt[t]=t.includes("..")?0:t.split(":").map(e=>{let[r,...o]=e.split(".");return{str:e,dirName:r,mods:o,on:e.startsWith("on")}})),Ie=t=>t?typeof t=="number"?t:(([,e,r]=t.match(/^(\d+)(ms|s|m)?$/)||[])=>(e=+e,r==="s"?e*1e3:r==="m"?e*6e4:e))():0,Dt=t=>t==="idle"?requestIdleCallback:t==="raf"?requestAnimationFrame:!t||t==="tick"?queueMicrotask:e=>setTimeout(e,Ie(t));Object.assign(P,{debounce:(t,e,r)=>Bt(t,Dt(e==="immediate"?r:e),e==="immediate"||r==="immediate"),throttle:(t,e)=>et(t,Dt(e)),delay:(t,e)=>((r=Dt(e))=>o=>r(()=>t(o)))(),once:(t,e,r)=>(r=o=>!e&&(e=1,t(o)),r.once=!0,r),window:t=>(t.target=t.target.ownerDocument.defaultView,t),document:t=>(t.target=t.target.ownerDocument,t),root:t=>(t.target=t.target.ownerDocument.documentElement,t),body:t=>(t.target=t.target.ownerDocument.body,t),parent:t=>(t.target=t.target.parentNode,t),self:t=>e=>e.target===t.target&&t(e),away:(t,e)=>{let r=t.target.ownerDocument,o=n=>e=n.target,i=r.currentEvent||r.defaultView?.event;return r.addEventListener("pointerdown",o,!0),Object.assign(n=>n!==i&&!t.target.contains(n.type==="click"?e??n.target:n.target)&&n.target.isConnected&&t(n),{target:r,[v]:()=>r.removeEventListener("pointerdown",o,!0)})},prevent:t=>e=>(e?.preventDefault(),t(e)),stop:(t,e)=>r=>(e?.[0]==="i"?r?.stopImmediatePropagation():r?.stopPropagation(),t(r)),passive:t=>(t.passive=!0,t),capture:t=>(t.capture=!0,t)});P.outside=P.away;P.tick=t=>P.delay(t);P.raf=t=>P.delay(t,"raf");var Wt={ctrl:t=>t.ctrlKey||t.key==="Control"||t.key==="Ctrl",shift:t=>t.shiftKey||t.key==="Shift",alt:t=>t.altKey||t.key==="Alt",meta:t=>t.metaKey||t.key==="Meta",cmd:t=>t.metaKey||t.key==="Command",arrow:t=>t.key?.startsWith("Arrow"),enter:t=>t.key==="Enter",esc:t=>t.key?.startsWith("Esc"),tab:t=>t.key==="Tab",space:t=>t.key==="\xA0"||t.key==="Space"||t.key===" ",delete:t=>t.key==="Delete"||t.key==="Backspace",digit:t=>/^\d$/.test(t.key),letter:t=>/^\p{L}$/gu.test(t.key),char:t=>/^\S$/.test(t.key)},_e=(t,e)=>Wt[t]?.(e)||e.key?.toLowerCase()===t||e.keyCode==t;for(let t in Wt)P[t]=(e,r,o)=>i=>Wt[t](i)&&(!r||_e(r,i))&&(!o||_e(o,i))&&e(i);var qe=t=>{let e=0,r="",o=0;for(let i of t){if(r){o?o=0:i==="\\"?o=1:i===r&&(r="");continue}if(i===";"&&!e)return!0;i==="{"?e++:i==="}"?e--:(i==='"'||i==="'"||i==="`")&&(r=i)}return!1};nt({compile:t=>(/^(if|let|const)\b/.test(t)||qe(t)||(t=`return ${t}`),/\bawait\s/.test(t)&&(t=`return (async()=>{${t}})()`),S.constructor(`with(arguments[0]){${t}}`)),dir:(t,e,r,o)=>{let i=He(e);return i?i.reduce((n,s)=>{let l=Y[s.dirName],f=s.on?()=>ae(t,o,r,s.str)[v]:l?.observer?()=>l(t,o,r,s.str)[v]:Re(t,s.dirName,s.mods,r,o);return n?(c,a)=>(c=n(),a=f(),()=>{c(),a()}):f},null):()=>ue(t,o,r,e)[v]},...Et});S.use=nt;S.store=st;S.directive=Y;S.modifier=P;var uo=S.dispose=t=>t[v]?.();S.start=Zt;var xe=S;var Rt={};qt(Rt,{Computed:()=>Z,Effect:()=>J,Signal:()=>E,batch:()=>Ue,computed:()=>Ve,effect:()=>Ae,signal:()=>ze,untracked:()=>Mt});var Ke=Symbol.for("preact-signals");function mt(){if(V>1)V--;else{for(var t,e=!1;ct!==void 0;){var r=ct;for(ct=void 0,$t++;r!==void 0;){var o=r.o;if(r.o=void 0,r.f&=-3,!(8&r.f)&&Se(r))try{r.c()}catch(i){e||(t=i,e=!0)}r=o}}if($t=0,V--,e)throw t}}function Ue(t){if(V>0)return t();V++;try{return t()}finally{mt()}}var y=void 0;function Mt(t){var e=y;y=void 0;try{return t()}finally{y=e}}var ct=void 0,V=0,$t=0,ht=0;function we(t){if(y!==void 0){var e=t.n;if(e===void 0||e.t!==y)return e={i:0,S:t,p:y.s,n:void 0,t:y,e:void 0,x:void 0,r:e},y.s!==void 0&&(y.s.n=e),y.s=e,t.n=e,32&y.f&&t.S(e),e;if(e.i===-1)return e.i=0,e.n!==void 0&&(e.n.p=e.p,e.p!==void 0&&(e.p.n=e.n),e.p=y.s,e.n=void 0,y.s.n=e,y.s=e),e}}function E(t,e){this.v=t,this.i=0,this.n=void 0,this.t=void 0,this.W=e?.watched,this.Z=e?.unwatched,this.name=e?.name}E.prototype.brand=Ke;E.prototype.h=function(){return!0};E.prototype.S=function(t){var e=this,r=this.t;r!==t&&t.e===void 0&&(t.x=r,this.t=t,r!==void 0?r.e=t:Mt(function(){var o;(o=e.W)==null||o.call(e)}))};E.prototype.U=function(t){var e=this;if(this.t!==void 0){var r=t.e,o=t.x;r!==void 0&&(r.x=o,t.e=void 0),o!==void 0&&(o.e=r,t.x=void 0),t===this.t&&(this.t=o,o===void 0&&Mt(function(){var i;(i=e.Z)==null||i.call(e)}))}};E.prototype.subscribe=function(t){var e=this;return Ae(function(){var r=e.value,o=y;y=void 0;try{t(r)}finally{y=o}},{name:"sub"})};E.prototype.valueOf=function(){return this.value};E.prototype.toString=function(){return this.value+""};E.prototype.toJSON=function(){return this.value};E.prototype.peek=function(){var t=y;y=void 0;try{return this.value}finally{y=t}};Object.defineProperty(E.prototype,"value",{get:function(){var t=we(this);return t!==void 0&&(t.i=this.i),this.v},set:function(t){if(t!==this.v){if($t>100)throw new Error("Cycle detected");this.v=t,this.i++,ht++,V++;try{for(var e=this.t;e!==void 0;e=e.x)e.t.N()}finally{mt()}}}});function ze(t,e){return new E(t,e)}function Se(t){for(var e=t.s;e!==void 0;e=e.n)if(e.S.i!==e.i||!e.S.h()||e.S.i!==e.i)return!0;return!1}function Oe(t){for(var e=t.s;e!==void 0;e=e.n){var r=e.S.n;if(r!==void 0&&(e.r=r),e.S.n=e,e.i=-1,e.n===void 0){t.s=e;break}}}function Ne(t){for(var e=t.s,r=void 0;e!==void 0;){var o=e.p;e.i===-1?(e.S.U(e),o!==void 0&&(o.n=e.n),e.n!==void 0&&(e.n.p=o)):r=e,e.S.n=e.r,e.r!==void 0&&(e.r=void 0),e=o}t.s=r}function Z(t,e){E.call(this,void 0),this.x=t,this.s=void 0,this.g=ht-1,this.f=4,this.W=e?.watched,this.Z=e?.unwatched,this.name=e?.name}Z.prototype=new E;Z.prototype.h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===ht))return!0;if(this.g=ht,this.f|=1,this.i>0&&!Se(this))return this.f&=-2,!0;var t=y;try{Oe(this),y=this;var e=this.x();(16&this.f||this.v!==e||this.i===0)&&(this.v=e,this.f&=-17,this.i++)}catch(r){this.v=r,this.f|=16,this.i++}return y=t,Ne(this),this.f&=-2,!0};Z.prototype.S=function(t){if(this.t===void 0){this.f|=36;for(var e=this.s;e!==void 0;e=e.n)e.S.S(e)}E.prototype.S.call(this,t)};Z.prototype.U=function(t){if(this.t!==void 0&&(E.prototype.U.call(this,t),this.t===void 0)){this.f&=-33;for(var e=this.s;e!==void 0;e=e.n)e.S.U(e)}};Z.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var t=this.t;t!==void 0;t=t.x)t.t.N()}};Object.defineProperty(Z.prototype,"value",{get:function(){if(1&this.f)throw new Error("Cycle detected");var t=we(this);if(this.h(),t!==void 0&&(t.i=this.i),16&this.f)throw this.v;return this.v}});function Ve(t,e){return new Z(t,e)}function Ce(t){var e=t.u;if(t.u=void 0,typeof e=="function"){V++;var r=y;y=void 0;try{e()}catch(o){throw t.f&=-2,t.f|=8,Pt(t),o}finally{y=r,mt()}}}function Pt(t){for(var e=t.s;e!==void 0;e=e.n)e.S.U(e);t.x=void 0,t.s=void 0,Ce(t)}function Ze(t){if(y!==this)throw new Error("Out-of-order effect");Ne(this),y=t,this.f&=-2,8&this.f&&Pt(this),mt()}function J(t,e){this.x=t,this.u=void 0,this.s=void 0,this.o=void 0,this.f=32,this.name=e?.name}J.prototype.c=function(){var t=this.S();try{if(8&this.f||this.x===void 0)return;var e=this.x();typeof e=="function"&&(this.u=e)}finally{t()}};J.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1,this.f&=-9,Ce(this),Oe(this),V++;var t=y;return y=this,Ze.bind(this,t)};J.prototype.N=function(){2&this.f||(this.f|=2,this.o=ct,ct=this)};J.prototype.d=function(){this.f|=8,1&this.f||Pt(this)};J.prototype.dispose=function(){this.d()};function Ae(t,e){var r=new J(t,e);try{r.c()}catch(i){throw r.d(),i}var o=r.d.bind(r);return o[Symbol.dispose]=o,o}nt(Rt);var mo=xe;export{Q as batch,G as computed,Bt as debounce,mo as default,uo as dispose,X as effect,L as signal,S as sprae,Zt as start,st as store,et as throttle,M as untracked,nt as use};