@estjs/template 0.0.17-beta.5 → 0.0.17-beta.7

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/template.cjs CHANGED
@@ -1,2 +1,2 @@
1
- 'use strict';var shared=require('@estjs/shared'),signals=require('@estjs/signals');var ln=Object.getOwnPropertySymbols;var Qn=Object.prototype.hasOwnProperty,Zn=Object.prototype.propertyIsEnumerable;var an=(e,n)=>{var t={};for(var o in e)Qn.call(e,o)&&n.indexOf(o)<0&&(t[o]=e[o]);if(e!=null&&ln)for(var o of ln(e))n.indexOf(o)<0&&Zn.call(e,o)&&(t[o]=e[o]);return t};var cn=(e,n,t)=>new Promise((o,r)=>{var s=a=>{try{l(t.next(a));}catch(d){r(d);}},i=a=>{try{l(t.throw(a));}catch(d){r(d);}},l=a=>a.done?o(a.value):Promise.resolve(a.value).then(s,i);l((t=t.apply(e,n)).next());});var un="ref",fn="key",dn="http://www.w3.org/2000/svg",Oe="http://www.w3.org/2000/xlink",He="http://www.w3.org/2000/xmlns/";var Ve=Symbol(""),ue=Symbol(""),je=Symbol(""),mn=Symbol(""),$e=Symbol(""),Ke=Symbol("");var Q=null,nt=0;function D(){return Q}function ve(e){Q=e,signals.setCurrentScope(e==null?void 0:e.effectScope);}function U(e=Q){let n=e?e.effectScope.run(()=>signals.effectScope()):signals.effectScope(true),t={id:++nt,effectScope:n,parent:e,children:null,provides:null,cleanup:null,onMount:null,onUpdate:null,onDestroy:null,isMounted:false,isDestroyed:false};return e&&(e.children||(e.children=new Set),e.children.add(t)),t}function H(e,n){let t=Q;ve(e);try{return e.effectScope.run(n)}finally{ve(t);}}function L(e){var t;if(!e||e.isDestroyed)return;if(e.isDestroyed=true,(t=e.parent)!=null&&t.children&&e.parent.children.delete(e),e.parent=null,e.children&&e.children.size>0){for(let o of e.children)o&&(o.parent=null,L(o));e.children.clear();}let n=Q;if(ve(e),e.onDestroy){for(let o=0;o<e.onDestroy.length;o++)try{e.onDestroy[o]();}catch(r){}e.onDestroy=null;}if(e.cleanup){for(let o=0;o<e.cleanup.length;o++)try{e.cleanup[o]();}catch(r){}e.cleanup=null;}ve(n),e.effectScope.stop(),e.provides&&(e.provides.clear(),e.provides=null),e.onMount=null,e.onUpdate=null,e.children=null;}function j(e){let n=Q;n&&(n.cleanup||(n.cleanup=[]),n.cleanup.push(e));}var lt=/^data:\s*(?:text\/html|text\/xml|application\/xhtml\+xml|image\/svg\+xml|application\/xml)/;function at(e){let n=e.replaceAll(/[\u0000-\u0020]+/g,"").toLowerCase();return shared.startsWith(n,"javascript:")||shared.startsWith(n,"vbscript:")?true:lt.test(n)}function Z(e,n,t,o){if(n===fn){o==null?e.removeAttribute(n):e.setAttribute(n,String(o));return}if(n===shared.SPREAD_NAME){let p=shared.isObject(t)?t:null,b=shared.isObject(o)?o:null;if(p)for(let S in p)S!==shared.SPREAD_NAME&&(!b||!(S in b))&&Z(e,S,p[S],null);if(b)for(let S in b)S!==shared.SPREAD_NAME&&Z(e,S,p==null?void 0:p[S],b[S]);return}let r=(e==null?void 0:e.namespaceURI)===dn,s=r&&shared.startsWith(n,"xlink:"),i=r&&shared.startsWith(n,"xmlns:"),l=shared.isSpecialBooleanAttr(n)||shared.isBooleanAttr(n);if(t===o||n.length>2&&n.charCodeAt(0)===111&&n.charCodeAt(1)===110)return;let a=n.toLowerCase();if(a==="innerhtml"||a==="srcdoc")return;if(o==null){if(s)e.removeAttributeNS(Oe,n.slice(6));else if(i){let p=n.slice(6);e.removeAttributeNS(He,p);}else e.removeAttribute(n);return}if(l){shared.includeBooleanAttr(o)?e.setAttribute(n,""):e.removeAttribute(n);return}let d=shared.isSymbol(o)?String(o):o;if(!((a==="href"||a==="src"||a==="xlink:href"||a==="action"||a==="formaction"||a==="poster")&&shared.isString(d)&&at(d))){if(s){e.setAttributeNS(Oe,n,String(d));return}if(i){e.setAttributeNS(He,n,String(d));return}if(r)e.setAttribute(n,String(d));else if(n in e)try{e[n]=d;}catch(p){e.setAttribute(n,String(d));}else e.setAttribute(n,String(d));}}function Ce(e,n,t,o=false){if(n===t)return;let r=Se(t);if(!r){e.removeAttribute("class");return}(shared.isString(n)?n:Se(n))!==r&&(o?e.setAttribute("class",r):e.className=r);}var Se=shared.normalizeClassName;var hn=/\s*!important$/,gn=/(?:^|;)\s*([a-z][a-z\d-]*)\s*:/gi,ht=["Webkit","Moz","ms"],Ue={};function be(e,n,t){let o=e.style;if(t&&shared.isString(t)){n!==t&&(o.cssText=t);return}if(!t){n&&e.removeAttribute("style");return}if(n&&!shared.isString(n)){let r=n;for(let s in r)(!t||t[s]==null)&&ne(o,s,"");}else if(n&&shared.isString(n)){gn.lastIndex=0;let r;for(;(r=gn.exec(n))!==null;){let s=r[1].trim();s&&t&&shared.isObject(t)&&t[s]==null&&ne(o,s,"");}}if(t&&!shared.isString(t)){let r=t;for(let s in r){let i=r[s];(!n||shared.isString(n)||n[s]!==i)&&i!=null&&ne(o,s,i);}}}function ne(e,n,t){if(shared.isArray(t)){for(let s of t)ne(e,n,s);return}(t==null||t==="")&&(t="");let o=shared.isString(t)&&hn.test(t)?"important":"";if(o&&(t=t.replace(hn,"")),shared.startsWith(n,"--")){o?e.setProperty(n,t,o):e.setProperty(n,t);return}let r=vt(e,n);o?e.setProperty(gt(r),t,o):e[r]=t;}function gt(e){let n=shared.kebabCase(e);return shared.startsWith(e,"Webkit")||shared.startsWith(e,"Moz")||shared.startsWith(e,"ms")?`-${n}`:n}function vt(e,n){let t=Ue[n];if(t)return t;let o=shared.camelCase(n);if(o!=="filter"&&o in e)return Ue[n]=o;o=shared.capitalize(o);for(let r of ht){let s=r+o;if(s in e)return Ue[n]=s}return n}var Be=0;function vn(){return String(Be++)}function Nt(){Be=0;}var X=false;function oe(){return X}var te=new Map;function bt(e){let n=e.querySelectorAll("[data-hk]");for(let t of n){let o=t.dataset.hk;o!=null&&!te.has(o)&&te.set(o,t);}}var we=[],fe=new Map;function Tt(){if(typeof document=="undefined")return;let e=document.createNodeIterator(document.body,NodeFilter.SHOW_COMMENT),n;for(;n=e.nextNode();){let t=n.data;if(t==="teleport-anchor")we.push(n);else if(t==="teleport-start"){let o=n.parentElement;if(!o)continue;let r=fe.get(o);r||(r=[],fe.set(o,r)),r.push(n);}}}function Ge(){var e;return (e=we.shift())!=null?e:null}function We(e){let n=fe.get(e),t=n==null?void 0:n.shift();if(!t)return null;let o=[],r=t.nextSibling;for(;r;){if(r.nodeType===Node.COMMENT_NODE&&r.data==="teleport-end")return {start:t,end:r,nodes:o};o.push(r),r=r.nextSibling;}return null}function ze(e){X=true,Be=0,te.clear(),we.length=0,fe.clear(),bt(e),Tt();}function qe(){X=false,te.clear(),we.length=0,fe.clear();}function En(e,n,t){var s,i;if(!X||t&&t.parentNode!==e)return null;if(n.length===0)return [];let o=new Array(n.length),r=t?t.previousSibling:e.lastChild;for(let l=n.length-1;l>=0;l--){if(!r)return null;let a=n[l],d=a.nodeType;if(d===Node.TEXT_NODE){let c=(s=a.textContent)!=null?s:"";if(!c||r.nodeType!==Node.TEXT_NODE)return null;let p=(i=r.textContent)!=null?i:"";if(p===c){o[l]=r,r=r.previousSibling;continue}if(!p.endsWith(c))return null;let b=p.slice(0,p.length-c.length);if(!b)return null;let S=document.createTextNode(b);e.insertBefore(S,r),r.textContent=c,o[l]=r,r=S;continue}if(r.nodeType!==d)return null;if(d===Node.ELEMENT_NODE){if(r.tagName!==a.tagName)return null}else if(d===Node.COMMENT_NODE&&r.data!==a.data)return null;o[l]=r,r=r.previousSibling;}return o}function wt(e){var t,o,r;return (r=(o=e.dataset.hk)!=null?o:(t=e.closest("[data-hk]"))==null?void 0:t.dataset.hk)!=null?r:null}function Sn(e,n){if(X&&e){let t=wt(e);if(t)return `${t}-${n}`}return String(n)}function At(e,n){if(!e||n<0)return null;let t=Sn(e instanceof Element?e:null,n),o=0,r=e.firstChild;for(;r;){if(r.nodeType===Node.COMMENT_NODE){let s=r;if(s.data===t||!X&&s.data===""&&o++===n)return s}r=r.nextSibling;}return null}function _t(e,n){if(!(e instanceof Element)||n<0)return null;let t=Sn(e,n),o=e.firstChild;for(;o;){if(o instanceof Element&&o.getAttribute(shared.HYDRATION_ANCHOR_ATTR)===t)return o;o=o.nextSibling;}return null}function xt(e){if(!shared.isBrowser())return ()=>{throw new Error("[essor] getRenderedElement called in non-browser environment")};let n=null;return ()=>{if(!X)return n||(n=Te(e)),n();let t=vn(),o=te.get(t);return o?(te.delete(t),o):(shared.warn(`[essor] hydration mismatch: no SSR element for key "${t}"`),n||(n=Te(e)),n())}}function kt(e,n,t,o){X||Ce(e,n,t,o);}function Pt(e,n,t,o){X||Z(e,n,t,o);}function Rt(e,n,t){X||be(e,n,t);}function Xe(e,n){return n&&n.parentNode===e?n:null}function Cn(e,n,t,o){let r=Xe(e,o),s=n.length,i=t.length;if(s===0&&i===0)return t;if(s===0){for(let c=0;c<i;c++)G(e,t[c],r);return t}if(i===0){for(let c=0;c<s;c++)Y(n[c]);return []}let l=0,a=s-1,d=i-1;for(;l<=a&&l<=d&&n[l]===t[l];)l++;for(;a>=l&&d>=l&&n[a]===t[d];)a--,d--;if(l>a){if(l<=d){let c=d+1,p=Xe(e,c<i?t[c]:r);for(let b=l;b<=d;b++)G(e,t[b],p);}}else if(l>d)for(let c=l;c<=a;c++)Y(n[c]);else Dt(e,n,t,l,a,d,r);return t}function Dt(e,n,t,o,r,s,i){let l=s-o+1,a=l<=4?_=>{for(let T=o;T<=s;T++)if(t[T]===_)return T}:(()=>{let _=new Map;for(let T=o;T<=s;T++)_.set(t[T],T);return T=>_.get(T)})(),d=new Int32Array(l),c=0,p=false,b=0;for(let _=o;_<=r;_++){let T=n[_];if(c>=l){Y(T);continue}let F=a(T);F===void 0?Y(T):(d[F-o]=_+1,F>=b?b=F:p=true,c++);}let S=p?Ye(d):[],w=S.length-1;for(let _=l-1;_>=0;_--){let T=o+_,F=t[T],y=Xe(e,T+1<t.length?t[T+1]:i);d[_]===0?G(e,F,y):p&&(w<0||_!==S[w]?G(e,F,y):w--);}}function Ye(e){let n=new Int32Array(e.length),t=[0],o=e.length,r,s,i,l,a;for(r=0;r<o;r++){let d=e[r];if(d!==0){if(s=t[t.length-1],e[s]<d){n[r]=s,t.push(r);continue}for(i=0,l=t.length-1;i<l;)a=i+l>>1,e[t[a]]<d?i=a+1:l=a;d<e[t[i]]&&(i>0&&(n[r]=t[i-1]),t[i]=r);}}for(i=t.length,l=t[i-1];i-- >0;)t[i]=l,l=n[l];return t}function Y(e){if(e)if(K(e))e.destroy();else {let n=e;n.parentNode&&n.remove();}}function G(e,n,t){if(!e||!n)return;let o=K(t)?t.firstChild:t;if(K(n)){n.mount(e,o);return}o?e.insertBefore(n,o):e.appendChild(n);}function Ae(e){if(e instanceof Node||K(e))return e;let n=typeof e;return e==null||n==="string"||n==="number"||n==="boolean"||n==="symbol"?document.createTextNode(e===false||e==null?"":String(e)):document.createTextNode(String(e))}function W(e,n,t){if(!e)return;let o=D(),r=[],s=true,i=a=>{if(a instanceof Node)return [a];if(K(a))return [a];let d=typeof a;return a==null||d==="string"||d==="number"||d==="boolean"?[Ae(a)]:shared.coerceArray(a).map(c=>shared.isFunction(c)?c():c).flatMap(c=>c).map(Ae)},l=signals.effect(()=>{let a=()=>{let d=shared.isFunction(n)?n():n,c=i(d);if(s&&oe()&&c.every(p=>p instanceof Node&&p.parentNode===e)){r=c,s=false;return}if(s&&oe()){let p=En(e,c,t);if(p){r=p,s=false;return}}r=Cn(e,r,c,t),s=false;};o&&!o.isDestroyed?H(o,a):a();});return j(()=>{l.stop();for(let a of r)Y(a);r=[],o=null;}),r}function Mt(e){return (e==null?void 0:e.firstChild)||null}function It(e,n=1){for(;e&&n>0;)e=e.nextSibling,n--;return e||null}function Ot(e,n){if(!e||n<0)return null;let t=e.firstChild;for(;t&&n>0;)t=t.nextSibling,n--;return t||null}function re(e,n,t,o){if(!(o!=null&&o.delegate))return e.addEventListener(n,t,o),()=>e.removeEventListener(n,t,o);let r=o.delegate,s=d=>{let c=d.target;(c.matches(r)||c.closest(r))&&t.call(e,d);},a=o,{delegate:i}=a,l=an(a,["delegate"]);return e.addEventListener(n,s,l),()=>{e.removeEventListener(n,s,l);}}function Je(e,n,t){let o=e[n];o||(o=[],e[n]=o),o.push(t);}function Tn(e,n,t){let o=e.length;if(o===0)return;let r;for(let s=0;s<o;s++)try{let i=e[s]();if(shared.isPromise(i)){let l=i.catch(a=>{});(r||(r=[])).push(l);}}catch(i){}if(r)return Promise.all(r).then(()=>{})}function J(e){let n=D();if(n){if(n.isMounted){try{let t=e();shared.isPromise(t)&&t.catch(o=>{});}catch(t){}return}Je(n,"onMount",e);}}function Ht(e){let n=D();n&&Je(n,"onUpdate",e);}function Qe(e){let n=D();n&&Je(n,"onDestroy",e);}function wn(e){if(e.isDestroyed)return;if(!e.onMount||e.onMount.length===0){e.isMounted=true;return}let n=e.onMount,t=H(e,()=>Tn(n,e.id));return n.length=0,e.isMounted=true,t}function An(e){if(!(e.isDestroyed||!e.onUpdate||e.onUpdate.length===0))return H(e,()=>Tn(e.onUpdate,e.id))}function xn(e,n,t=false){for(let o of Object.getOwnPropertyNames(n))Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(n,o));if(t){let o=new Set(Object.getOwnPropertyNames(n));for(let r of Object.getOwnPropertyNames(e))o.has(r)||delete e[r];}}function kn(e,n){let t=Object.getOwnPropertyDescriptor(e,n);return t.get?t.get.call(e):t.value}var Pn;Pn="normal";var ie=class{constructor(n,t={}){this.component=n;this.props=t;this[Pn]=true;this.scope=null;this.state=0;this.beforeNode=void 0;this.renderedNodes=[];this.firstChild=void 0;this.parentNode=void 0;this.rootEventCleanups=[];this.parentScope=D();let o={};xn(o,t),this.reactiveProps=signals.shallowReactive(o);}mount(n,t){var s;if(this.parentNode=n,this.beforeNode=t,this.state=1,this.renderedNodes.length>0){for(let i of this.renderedNodes)G(n,i,t);return this.state=2,this.renderedNodes}let o=U((s=this.parentScope)!=null?s:D());this.scope=o;let r=H(o,()=>{var l;let i=this.component(this.reactiveProps);return shared.isFunction(i)&&(i=i(this.reactiveProps)),(signals.isSignal(i)||signals.isComputed(i))&&(i=i.value),(l=W(n,i,t))!=null?l:[]});return this.renderedNodes=r,this.firstChild=r[0],this.syncSpecialProps(this.props),this.state=2,wn(o),this.renderedNodes}update(n){this.props=n;let t=this.scope;!t||t.isDestroyed||(xn(this.reactiveProps,n!=null?n:{},true),this.syncSpecialProps(n),An(t));}forceUpdate(){if(!this.parentNode)return;let n=this.parentNode,t=this.beforeNode;this.destroy(),this.mount(n,t);}destroy(){let n=this.scope;if(!(!n||n.isDestroyed)){this.scope=null,this.releaseSpecialProps(),L(n);for(let t of this.renderedNodes)Y(t);this.renderedNodes=[],this.firstChild=void 0,this.parentNode=void 0;for(let t of Object.getOwnPropertyNames(this.reactiveProps))delete this.reactiveProps[t];this.state=0;}}syncSpecialProps(n){if(!n)return;let t=this.firstChild;if(!(!t||!(t instanceof Element))){this.releaseSpecialProps();for(let o of Object.getOwnPropertyNames(n)){if(o===un){let r=kn(n,o);this.rootRefCleanup=this.bindRootRef(r,t);continue}if(shared.isOn(o)){let r=kn(n,o);if(!shared.isFunction(r))continue;let s=o.slice(2).toLowerCase(),i=t,l=`_$${s}`,a=i[l];if(shared.isFunction(a)){i[l]=r,this.rootEventCleanups.push(()=>{i[l]===r&&(i[l]=a);});continue}let d=r,c=p=>{i.disabled||d.call(i,p);};this.rootEventCleanups.push(re(i,s,c));}}}}releaseSpecialProps(){for(let n of this.rootEventCleanups)n();this.rootEventCleanups.length=0,this.rootRefCleanup&&(this.rootRefCleanup(),this.rootRefCleanup=void 0);}bindRootRef(n,t){if(shared.isFunction(n))return n(t),()=>n(null);if(signals.isSignal(n)){let o=n,r=o.value;return o.value=t,()=>{o.value===t&&(o.value=r);}}}};function K(e){return !!e&&!!e.normal}function xe(e,n){return K(e)?e:new ie(e,n)}function Te(e){let n,t=()=>{let o=document.createElement("template");o.innerHTML=e;let r=o.content.firstChild;if(!r)throw new Error("Invalid template: empty content");return r};return ()=>(n||(n=t())).cloneNode(true)}function Kt(e,n){let t=shared.isString(n)?document.querySelector(n):n;if(!t)return;t.innerHTML&&(t.innerHTML="");let r=U(),s;try{H(r,()=>{let i=xe(e);K(i)&&(s=i,G(t,i));});}catch(i){throw L(r),i}return {root:s,unmount:()=>{s==null||s.destroy(),L(r);}}}function Ut(e,n){let t=shared.isString(n)?document.querySelector(n):n;if(!t)return;ze(t);let o=U(),r;try{H(o,()=>{let s=xe(e);K(s)&&(r=s,W(t,s));});}catch(s){throw L(o),s}finally{qe();}return {root:r,unmount:()=>{r==null||r.destroy(),L(o);}}}function Ze(e,n){let t=D();t&&(t.provides||(t.provides=new Map),t.provides.set(e,n));}function de(e,n){let t=D();if(!t)return n;let o=t;for(;o;){if(o.provides&&o.provides.has(e))return o.provides.get(e);o=o.parent;}return n}function en(e,n){Object.defineProperty(e,"target",{configurable:true,value:n});}function Ln(e){let n=e.target,t=e.type,o=e.target,r=e.currentTarget,s=()=>{let l=n[`_$${t}`];if(l&&shared.isFunction(l)&&!n.disabled){let a=n[`${t}Data`];if(a?l.call(n,a,e):l.call(n,e),e.cancelBubble)return false}return n.host&&!shared.isString(n.host)&&!n.host._$host&&shared.isFunction(n.contains)&&n.contains(e.target)&&en(e,n.host),true},i=()=>{for(;s()&&(n=n._$host||n.parentNode||n.host););};if(Object.defineProperty(e,"currentTarget",{configurable:true,get(){return n||document}}),e.composedPath){let l=e.composedPath();en(e,l[0]);for(let a=0;a<l.length-2&&(n=l[a],!!s());a++){if(n._$host){n=n._$host,i();break}if(n.parentNode===r)break}}else i();en(e,o);}var ke=Symbol("_$EVENTS");function Gt(e,n=globalThis.document){let t=n,o=t[ke]||(t[ke]=new Set);for(let r of e)o.has(r)||(o.add(r),n.addEventListener(r,Ln));}function Wt(e=globalThis.document){let n=e,t=n[ke];if(t){for(let o of t.keys())e.removeEventListener(o,Ln);delete n[ke];}}function se(e,n,t,o){let r=re(e,n,t,o);D()&&j(r);}var Yt=e=>e,Jt=typeof DataTransfer!="undefined"?new DataTransfer().files:[];function In(e,n){let t=e,o=n==null?"":String(n);t.value!==o&&(t.value=o);}var Qt={event:"change",forceChange:true,checkboxArray:true,read:e=>e.checked,write(e,n){let t=e,o=shared.isArray(n)?n.map(String).includes(t.value):!!n;t.checked!==o&&(t.checked=o);}},Zt={event:"change",forceChange:true,read(e){let n=e;return n.checked?n.value:""},write(e,n){let t=e,o=String(n)===t.value;t.checked!==o&&(t.checked=o);}},eo={event:"change",forceChange:true,read:e=>e.files,write(e,n){if(n==null)try{e.files=Jt;}catch(t){}}},Fn={event:"input",ime:true,read:e=>e.value,write:In},no={event:"change",forceChange:true,read(e){let n=e;return n.multiple?Array.from(n.selectedOptions,t=>t.value):n.value},write(e,n){let t=e;if(!t.multiple)return In(e,n);let o=new Set((shared.isArray(n)?n:[]).map(String));for(let r of Array.from(t.options))r.selected=o.has(r.value);}};function Mn(e){return {event:"input",read:n=>n[e],write(n,t){n[e]=t;}}}function to(e,n){switch(e.nodeName){case "INPUT":return n==="checked"?e.type==="radio"?Zt:Qt:n==="files"?eo:n==="value"?Fn:Mn(n);case "SELECT":return no;case "TEXTAREA":return Fn;default:return Mn(n)}}function oo(e,n,t){if(!shared.isString(e))return e;let o=n?e.trim():e;if(t){let r=n?o:o.trim();if(r!==""){let s=Number(r);if(!Number.isNaN(s))return s}}return o}function ro(e){let n=e.getRootNode();return (n instanceof Document||n instanceof ShadowRoot)&&n.activeElement===e}function io(e,n){if(n!=="value"||e.nodeName!=="INPUT")return false;let t=e.type;return t==="number"||t==="range"}function so(e,n,t,o,r={}){if(!e)return;let{event:s,read:i,write:l,forceChange:a,ime:d,checkboxArray:c}=to(e,n),p=r.trim===true,b=r.number===true||io(e,n),S=r.lazy===true,w=(p||b)&&n!=="files",_=shared.isFunction(t)?t:()=>t,T=w?E=>oo(E,p,b):Yt,F=c?E=>{let v=_();if(!shared.isArray(v))return T(E);let R=e.value,O=v.filter(u=>String(u)!==R);return E&&O.push(R),O}:T,y=false,f=S||a?"change":s,C=()=>{if(y)return;let E=i(e);if(E===void 0)return;let v=F(E);Object.is(_(),v)||o(v);};se(e,f,C),!S&&w&&f!=="change"&&se(e,"change",()=>l(e,T(i(e)))),d&&(se(e,"compositionstart",()=>{y=true;}),se(e,"compositionend",()=>{y=false,S||C();}));let N=signals.effect(()=>{let E=_();d&&y||d&&!S&&ro(e)&&Object.is(T(i(e)),E)||l(e,E);});D()&&j(()=>N.stop());}function On(e){let n=e;return Array.isArray(n)&&n.length===1&&(n=n[0]),shared.isFunction(n)?n():n}function Hn(e){let n=Object.getOwnPropertyDescriptor(e,"children");return n!=null&&n.get?()=>On(n.get.call(e)):()=>On(e.children)}function ao(e,n){let t=new Set(n);return new Proxy(e,{get(o,r){if(!t.has(r))return Reflect.get(o,r)},ownKeys(o){return Reflect.ownKeys(o).filter(r=>!t.has(r))},getOwnPropertyDescriptor(o,r){if(!t.has(r))return Reflect.getOwnPropertyDescriptor(o,r)},has(o,r){return t.has(r)?false:Reflect.has(o,r)}})}function Vn(e){var t;if(e&&((t=Object.getOwnPropertyDescriptor(e,"children"))!=null&&t.get||signals.isReactive(e)))return [()=>e.children];let n=e==null?void 0:e.children;return n==null?null:n}Vn[Ve]=true;function uo(e){return !!e&&!!e[Ve]}function Pe(e){let n=shared.isFunction(e.target)?e.target():e.target;return n==null?null:shared.isString(n)?document.querySelector(n):n}function Re(e){return shared.isFunction(e.disabled)?!!e.disabled():!!e.disabled}function $n(e){if(oe()){let c=po(e);if(c)return c}let n=document.createComment("portal");n[ue]=true;let{children:t}=e;if(t==null)return n;let o=D(),r=null,s=(c,p)=>{r=U(o),H(r,()=>{W(c,()=>t,p);});},i=()=>{r&&(L(r),r=null);},l=(c,p)=>{if(i(),c){let b=n.parentNode;if(!b)return;s(b,n);return}p&&s(p);},a=false,d=signals.effect(()=>{let c=Re(e),p=c?null:Pe(e);a&&l(c,p);});return J(()=>{a=!0;let c=Re(e),p=c?null:Pe(e);if(c||p){l(c,p);return}queueMicrotask(()=>{n.parentNode&&l(Re(e),Pe(e));});}),j(()=>{d.stop(),i();}),n}$n[ue]=true;function po(e){if(Re(e))return null;let n=Ge();if(!n)return null;let t=Pe(e);return !t||!We(t)?null:(n[ue]=true,n)}function yo(e){return !!e&&!!e[ue]}function De(e){let n=e;for(;shared.isFunction(n);)n=n();return signals.isSignal(n)||signals.isComputed(n)?De(n.value):Array.isArray(n)?n.map(t=>De(t)):n}var me=Symbol("SuspenseContext");function Un(e){var E;if(!shared.isBrowser())return (E=e.fallback)!=null?E:"";let n=D(),t=document.createComment("suspense"),o=document.createComment("/suspense"),r=document.createDocumentFragment();r.append(t,o);let s=true,i=0,l=false,a=null,d=null,c=null,p=null,b=()=>{let v=document.createDocumentFragment();for(;o.previousSibling&&o.previousSibling!==t;)v.prepend(o.previousSibling);d=v;},S=()=>{var R;if(!d)return;let v=(R=o.parentNode)!=null?R:r;for(;d.firstChild;)v.insertBefore(d.firstChild,o);d=null;},w=()=>{e.fallback==null||c||(c=U(n),H(c,()=>{var v;W((v=o.parentNode)!=null?v:r,()=>De(e.fallback),o);}));},_=()=>{c&&(L(c),c=null);},T=v=>{l=true,a=U(n),H(a,()=>{var R;W((R=o.parentNode)!=null?R:r,()=>De(v),o);}),l=false,i&&!d&&(b(),w());},F=()=>{d||l||(b(),w());},y=()=>{if(!d)return;let v=e.children!=null&&!shared.isPromise(e.children);a==null&&p==null&&!v||(_(),S(),a||(p?T(p):v&&T(e.children)));},f=()=>{s&&--i===0&&y();},C={register:v=>{i++,F(),v.then(f).catch(R=>{f();});},increment:()=>{i++,F();},decrement:()=>{i=Math.max(0,i-1),i===0&&y();}};Ze(me,C);let N=e.children;return shared.isPromise(N)?(N.then(v=>{p=v;}).catch(()=>{}),C.register(N)):N!=null?T(N):e.fallback!=null&&F(),j(()=>{s=false,i=0,p=null,a&&L(a),c&&L(c),a=c=null,d=null,t.remove(),o.remove();}),r}Un[je]=true;function So(e){return !!e&&!!e[je]}function Co(e,n){let t=signals.signal(n==null?void 0:n.initialValue),o=signals.signal(true),r=signals.signal(null),s=signals.signal("pending"),i=0,l=null,a=de(me,null),d=()=>cn(null,null,function*(){let b=++i;l==null||l.abort(),l=new AbortController,o.value=true,s.value="pending",r.value=null;let S;try{S=Promise.resolve(e(l.signal));}catch(w){r.value=w instanceof Error?w:new Error(String(w)),s.value="errored",o.value=false;return}a==null||a.register(S);try{let w=yield S;b===i&&(t.value=w,s.value="ready",o.value=!1);}catch(w){if(b!==i)return;if(w instanceof DOMException&&w.name==="AbortError"){o.value=false;return}r.value=w instanceof Error?w:new Error(String(w)),s.value="errored",o.value=false;}});d(),j(()=>{i++,l==null||l.abort(),l=null;});let c=(()=>t.value);return c.loading=o,c.error=r,c.state=s,[c,{mutate:b=>{t.value=b,s.value="ready",o.value=false,r.value=null;},refetch:()=>d()}]}function Bn(e){return shared.isFunction(e)?e:e.default}function bo(e,n){if(n==="client-only"){let i=()=>"";return i.__asyncLoader=e,i.__asyncResolved=()=>null,i}let t=null,o=null,r=()=>o!=null?o:o=e().then(i=>{t=Bn(i);}).catch(()=>{});r();let s=i=>t?t(i):"";return s.__asyncLoader=r,s.__asyncResolved=()=>t,s}function To(e,n){let{loading:t,error:o,delay:r=200,timeout:s,onError:i}=n,l=null,a=null,d="pending",c=null,p=()=>c!=null?c:c=e().then(S=>{l=Bn(S),d="resolved";}).catch(S=>{a=S instanceof Error?S:new Error(String(S)),d="errored",c=null;});p();function b(S){var u;let w=D(),_=document.createComment("async"),T=document.createDocumentFragment();T.appendChild(_);let F=true,y=null,f=null,C=null,N=()=>{f!=null&&clearTimeout(f),C!=null&&clearTimeout(C),f=C=null;},E=(h,m)=>{F&&(w&&w.isDestroyed||(y&&(L(y),y=null),h&&(y=U(w),H(y,()=>{var k;W((k=_.parentNode)!=null?k:T,()=>new ie(h,m),_);}))));};Qe(()=>{F=false,N(),y&&(L(y),y=null),_.remove();});let v=h=>()=>{c=null,d="pending",a=null,t&&E(t),p().then(()=>R(h));},R=h=>{F&&(N(),d==="resolved"&&l?E(l,h):d==="errored"&&a&&(o&&E(o,{error:a,retry:v(h)}),i&&i(a,v(h))));};if(d==="resolved"&&l)return E(l,S),T;if(d==="errored"&&a)return o&&E(o,{error:a,retry:v(S)}),T;let O=p().then(()=>R(S));return (u=de(me))==null||u.register(O),r>0?f=setTimeout(()=>{F&&d==="pending"&&t&&E(t);},r):t&&E(t),s!=null&&(C=setTimeout(()=>{!F||d!=="pending"||(a=new Error(`[defineAsyncComponent] Timeout after ${s}ms`),d="errored",o&&E(o,{error:a,retry:v(S)}),i&&i(a,v(S)));},s)),T}return b.__asyncLoader=p,b.__asyncResolved=()=>l,b}function wo(e,n={}){var t;return typeof window=="undefined"?bo(e,(t=n.ssr)!=null?t:"blocking"):To(e,n)}function Gn(e){let n=document.createDocumentFragment(),t=document.createComment("");n.appendChild(t);let o=[],r=[],s=e.key,i=e.children,l=Array.isArray(i)&&i.length===1&&shared.isFunction(i[0])?i[0]:e.children;if(!shared.isFunction(l))throw new TypeError("<For> requires `children` to be a function (item, index) => Node");let a=()=>{var f,C;let y=e.each;return signals.isSignal(y)?(f=y.value)!=null?f:[]:shared.isFunction(y)?(C=y())!=null?C:[]:y!=null?y:[]},d=(y,f)=>s?s(y,f):y,c=(y,f,C)=>{if(y==null||y===false)return [];if(Array.isArray(y)){let E=[];for(let v of y)E.push(...c(v,f,C));return E}if(K(y))return G(f,y,C!=null?C:void 0),y.renderedNodes;let N=Ae(y);return G(f,N,C!=null?C:void 0),[N]},p=(y,f)=>{if(!e.fallback)return;r=c(e.fallback(),y,f);},b=()=>{for(let y of r)Y(y);r=[];},S=D(),w=(y,f,C,N,E=d(y,f))=>{var u;let v=(u=D())!=null?u:S,R=U(v),O=[];try{H(R,()=>{O=c(l(y,f),C,N);});}catch(h){throw L(R),h}return {key:E,item:y,nodes:O,scope:R}},_=y=>{L(y.scope);for(let f of y.nodes)f.parentNode&&f.parentNode.removeChild(f);},T=signals.effect(()=>{let y=a(),f=t.parentNode;if(!f){if(y.length===0)p(n,t);else {o=new Array(y.length);let C=0;for(let N of y)o[C]=w(N,C,n,t),C++;}return}F(f,y);});function F(y,f){let C=o.length,N=f.length;if(N===0){for(let g=0;g<C;g++)_(o[g]);o=[],e.fallback&&r.length===0&&p(y,t);return}if(C===0||r.length>0){r.length>0&&b(),o=new Array(N);let g=document.createDocumentFragment();for(let P=0;P<N;P++)o[P]=w(f[P],P,g,null);y.insertBefore(g,t);return}let E=new Map;for(let g=0;g<C;g++){let P=o[g],V=E.get(P.key),q=[P,g];V?V.push(q):E.set(P.key,[q]);}let v=new Array(N),R=[],O=null,u=new Int32Array(N),h=false,m=0,k=new Array(N);for(let g=0;g<N;g++)k[g]=d(f[g],g);for(let g=0;g<N;g++){let P=f[g],V=k[g],q=E.get(V);if(q&&q.length>0){let[ce,z]=q.shift();Object.is(ce.item,P)?(ce.item=P,v[g]=ce,u[g]=z+1,z<m?h=true:m=z):(O||(O=document.createDocumentFragment()),_(ce),v[g]=w(P,g,O,null,V));}else O||(O=document.createDocumentFragment()),v[g]=w(P,g,O,null,V);}for(let g of E.values())for(let[P]of g)R.push(P);for(let g of R)_(g);let A=h?Ye(u):[],x=A.length-1,M=t;for(let g=N-1;g>=0;g--){let V=v[g].nodes;if(!(u[g]===0)&&h&&x>=0&&g===A[x]){x--;for(let z=V.length-1;z>=0;z--)M=V[z];continue}for(let z=V.length-1;z>=0;z--){let Ie=V[z];Ie.nextSibling!==M&&y.insertBefore(Ie,M),M=Ie;}}o=v;}return j(()=>{T.stop();for(let y of o)_(y);o=[],b(),t.parentNode&&t.parentNode.removeChild(t);}),n}Gn[mn]=true;function on(e){var s,i,l,a,d,c,p,b,S,w;let n=(s=e.name)!=null?s:"v",t=(i=e.enterFromClass)!=null?i:`${n}-enter-from`,o=(l=e.enterActiveClass)!=null?l:`${n}-enter-active`,r=(a=e.enterToClass)!=null?a:`${n}-enter-to`;return {enterFrom:t,enterActive:o,enterTo:r,leaveFrom:(d=e.leaveFromClass)!=null?d:`${n}-leave-from`,leaveActive:(c=e.leaveActiveClass)!=null?c:`${n}-leave-active`,leaveTo:(p=e.leaveToClass)!=null?p:`${n}-leave-to`,appearFrom:(b=e.appearFromClass)!=null?b:t,appearActive:(S=e.appearActiveClass)!=null?S:o,appearTo:(w=e.appearToClass)!=null?w:r}}var Wn=e=>e?e.endsWith("ms")?Number(e.slice(0,-2).replace(",",".")):Number(e.slice(0,-1).replace(",","."))*1e3:0;function zn(e,n){let t=e.split(", "),o=n.split(", "),r=0;for(let[s,i]of o.entries()){let l=Wn(i)+Wn(t[s%t.length]||"0s");l>r&&(r=l);}return r}function Xn(e,n){let t=getComputedStyle(e),o=n!=="animation"?zn(t.transitionDelay,t.transitionDuration):0,r=n!=="transition"?zn(t.animationDelay,t.animationDuration):0;return o===0&&r===0?null:o>=r?{event:"transitionend",timeout:o}:{event:"animationend",timeout:r}}function B(e,n){for(let t of n.split(/\s+/))t&&e.classList.add(t);}function $(e,n){for(let t of n.split(/\s+/))t&&e.classList.remove(t);}function ye(e){requestAnimationFrame(()=>requestAnimationFrame(e));}function Me(e){e.offsetHeight;}function le(e,n,t,o){if(t!=null){setTimeout(o,t);return}let r=Xn(e,n);if(!r){o();return}let s=false,i=()=>{s||(s=true,clearTimeout(a),e.removeEventListener(r.event,l),o());},l=()=>i();e.addEventListener(r.event,l);let a=setTimeout(i,r.timeout+1);}function ae(e,n){return e==null?null:shared.isNumber(e)?e:e[n]}function qn(e){if(e==null||e===false)return null;if(Array.isArray(e))return e[0]instanceof Element?e[0]:null;if(e instanceof Element)return e;if(K(e)){let n=e;if(n.scope==null){let o=document.createDocumentFragment();n.mount(o);}let t=n.firstChild;return t instanceof Element?t:null}return null}var Fe=Symbol("enter_cb"),pe=Symbol("leave_cb");function Yn(e){let n=document.createComment(""),t=on(e),o=e.css!==false,r=Hn(e),s="idle",i=null,l=null,a=false,d,c=false,p=false,b=false,S=(f,C)=>{var h;let N=f[pe];N&&N(true),s="entering";let E=C==="appear"?t.appearFrom:t.enterFrom,v=C==="appear"?t.appearActive:t.enterActive,R=C==="appear"?t.appearTo:t.enterTo;(h=e.onBeforeEnter)==null||h.call(e,f),o&&(B(f,E),B(f,v));let O=false,u=m=>{var k,A;O||(O=true,f[Fe]=void 0,o&&($(f,E),$(f,v),$(f,R)),m?(k=e.onEnterCancelled)==null||k.call(e,f):(s="entered",(A=e.onAfterEnter)==null||A.call(e,f)));};f[Fe]=u,ye(()=>{if(!O)if(o&&($(f,E),B(f,R)),e.onEnter)e.onEnter(f,()=>u(false));else if(o){let m=ae(e.duration,"enter");le(f,e.type,m,()=>u(false));}else u(false);});},w=(f,C)=>{var u;let N=f[Fe];N&&(N(true),Me(f)),s="leaving",(u=e.onBeforeLeave)==null||u.call(e,f),o&&(B(f,t.leaveFrom),B(f,t.leaveActive));let E=false,v=h=>{var m,k;E||(E=true,f[pe]=void 0,o&&($(f,t.leaveFrom),$(f,t.leaveActive),$(f,t.leaveTo)),h?(m=e.onLeaveCancelled)==null||m.call(e,f):(s="idle",C(),(k=e.onAfterLeave)==null||k.call(e,f)));};f[pe]=v;let R=ae(e.duration,"leave"),O=o&&!e.onLeave&&R==null?!!Xn(f,e.type):false;if(!e.onLeave&&R==null&&!O){v(false);return}ye(()=>{E||(o&&($(f,t.leaveFrom),B(f,t.leaveTo)),e.onLeave?e.onLeave(f,()=>v(false)):o?le(f,e.type,R,()=>v(false)):v(false));});},_=(f,C)=>{if(f&&s==="leaving"&&l){let E=l,v=E[pe];v&&v(true),l=null,i=E,S(E,"enter");return}if(f===i)return;let N=i;if(i=f,N){l=N;let E=N;w(E,()=>{E.parentNode&&E.parentNode.removeChild(E),l===E&&(l=null);});}f&&n.parentNode?(n.parentNode.insertBefore(f,n),C&&!e.appear?s="entered":S(f,C&&e.appear?"appear":"enter")):!N&&!f&&(s="idle");},T=()=>{if(p=false,b||!c)return;let f=d;c=false,d=void 0;try{_(qn(f),!1);}catch(C){}},F=f=>{d=f,c=true,!p&&(p=true,queueMicrotask(T));},y=signals.effect(()=>{let f=r();a?F(f):(d=f,c=true);});return J(()=>{a=!0;let f=c?qn(d):null;c=!1,d=void 0,_(f,!0);}),j(()=>{b=true,y.stop();for(let f of [i,l]){if(!f)continue;let C=f[Fe],N=f[pe];C==null||C(true),N==null||N(true),f.parentNode&&f.parentNode.removeChild(f);}i=null,l=null,s="idle";}),n}Yn[$e]=true;function Po(e){return !!e&&!!e[$e]}function sn(e,n){if(e==null||e===false)return {el:null,comp:null};if(Array.isArray(e)&&e.length===1)return sn(e[0],n);if(shared.isFunction(e))return sn(e(),n);if(e instanceof HTMLElement)return {el:e,comp:null};if(K(e)){let t=e;t.scope==null&&t.mount(n);let o=t.firstChild;return o instanceof HTMLElement?{el:o,comp:t}:{el:null,comp:t}}return {el:null,comp:null}}function Lo(e){return {position:e.style.position,top:e.style.top,left:e.style.left,width:e.style.width,height:e.style.height}}function rn(e,n){e.style.position=n.position,e.style.top=n.top,e.style.left=n.left,e.style.width=n.width,e.style.height=n.height;}function Jn(e){var v,R,O;let n=(v=e.tag)!=null?v:"div",t=document.createElement(n),o=on(e),r=e.css!==false,s=(O=e.moveClass)!=null?O:`${(R=e.name)!=null?R:"v"}-move`,i=e.key,l=e.children,a=Array.isArray(l)&&l.length===1&&shared.isFunction(l[0])?l[0]:e.children;if(!shared.isFunction(a)||!shared.isFunction(i))throw new TypeError("<TransitionGroup> requires `children: (item, index) => Node` and `key: (item, index) => unknown`");let d=()=>{var h,m;let u=e.each;return signals.isSignal(u)?(h=u.value)!=null?h:[]:shared.isFunction(u)?(m=u())!=null?m:[]:u!=null?u:[]},c=[],p=false,b=(u,h)=>{let m=D(),k=U(m),A;try{H(k,()=>{A=a(u,h);});}catch(g){throw L(k),g}let{el:x,comp:M}=sn(A,t);return x?{key:i(u,h),item:u,el:x,comp:M,scope:k,state:"entering"}:(L(k),null)},S=u=>{if(u.comp){for(let h of u.comp.renderedNodes)h.parentNode===t&&t.removeChild(h);return}u.el.parentNode===t&&t.removeChild(u.el);},w=u=>{var h,m;(h=u.cancelEnter)==null||h.call(u,true),(m=u.cancelLeave)==null||m.call(u,true),u.comp&&u.comp.destroy(),S(u),L(u.scope);},_=u=>{var A,x,M;let h=u.el;if((A=u.cancelLeave)==null||A.call(u,true),!r){u.state="present",(x=e.onAfterEnter)==null||x.call(e,h);return}(M=e.onBeforeEnter)==null||M.call(e,h),B(h,o.enterFrom),B(h,o.enterActive);let m=false,k=g=>{var P,V;m||(m=true,u.cancelEnter=void 0,$(h,o.enterFrom),$(h,o.enterActive),$(h,o.enterTo),g?(P=e.onEnterCancelled)==null||P.call(e,h):(u.state="present",(V=e.onAfterEnter)==null||V.call(e,h)));};u.cancelEnter=k,u.state="entering",ye(()=>{if(!m)if($(h,o.enterFrom),B(h,o.enterTo),e.onEnter)e.onEnter(h,()=>k(false));else {let g=ae(e.duration,"enter");le(h,e.type,g,()=>k(false));}});},T=(u,h)=>{var M,g;let m=u.el;u.cancelEnter&&(u.cancelEnter(true),Me(m)),u.state="leaving",u.savedStyles=Lo(m);let k=t.getBoundingClientRect();if(m.style.position="absolute",m.style.top=`${h.top-k.top}px`,m.style.left=`${h.left-k.left}px`,m.style.width=`${h.width}px`,m.style.height=`${h.height}px`,!r){u.savedStyles&&rn(m,u.savedStyles),S(u),L(u.scope),u.comp&&u.comp.destroy(),(M=e.onAfterLeave)==null||M.call(e,m);return}(g=e.onBeforeLeave)==null||g.call(e,m),B(m,o.leaveFrom),B(m,o.leaveActive);let A=false,x=P=>{var V,q;if(!A){if(A=true,u.cancelLeave=void 0,$(m,o.leaveFrom),$(m,o.leaveActive),$(m,o.leaveTo),P){u.savedStyles&&rn(m,u.savedStyles),u.savedStyles=void 0,(V=e.onLeaveCancelled)==null||V.call(e,m);return}u.savedStyles&&rn(m,u.savedStyles),u.savedStyles=void 0,S(u),L(u.scope),u.comp&&u.comp.destroy(),(q=e.onAfterLeave)==null||q.call(e,m);}};u.cancelLeave=x,ye(()=>{if(!A)if($(m,o.leaveFrom),B(m,o.leaveTo),e.onLeave)e.onLeave(m,()=>x(false));else {let P=ae(e.duration,"leave");le(m,e.type,P,()=>x(false));}});},F=(u,h)=>{if(!r||u.state!=="present")return;let m=u.el,k=m.getBoundingClientRect(),A=h.left-k.left,x=h.top-k.top;if(!A&&!x)return;let M=m.style.transform,g=m.style.transitionDuration;m.style.transform=`translate(${A}px, ${x}px)`,m.style.transitionDuration="0s",B(m,s),Me(m),m.style.transform=M,m.style.transitionDuration=g;let P=ae(e.duration,"enter");le(m,e.type,P,()=>{$(m,s);});},y=()=>{for(let u of c)u.state!=="leaving"&&(u.prevRect=u.el.getBoundingClientRect());},f=u=>{let h=new Map;for(let x of c)h.set(x.key,x);let m=[];for(let[x,M]of u.entries()){let g=i(M,x),P=h.get(g);if(P)h.delete(g),P.item=M,m.push(P);else {let V=b(M,x);V&&m.push(V);}}let k=[];for(let x of h.values())x.state!=="leaving"&&k.push(x);let A=null;for(let x=m.length-1;x>=0;x--){let M=m[x].el;(M.parentNode!==t||M.nextSibling!==A)&&t.insertBefore(M,A),A=M;}return {next:m,leaving:k}},C=(u,h)=>{if(h){let A=[];for(let[x,M]of u.entries()){let g=b(M,x);g&&(g.el.parentNode!==t&&t.appendChild(g.el),g.state="present",A.push(g));}c=A;return}y();let{next:m,leaving:k}=f(u);for(let A of m)A.state!=="present"&&_(A);for(let A of k){let x=A.prevRect;x&&T(A,x);}for(let A of m)A.state!=="present"||!A.prevRect||(F(A,A.prevRect),A.prevRect=void 0);c=m.concat(k);},N=null,E=signals.effect(()=>{let u=d();if(!p){N=u;return}C(u,false);});return J(()=>{p=!0,N&&(C(N,!0),N=null);}),j(()=>{E.stop();for(let u of c)w(u);c=[],t.parentNode&&t.parentNode.removeChild(t);}),t}Jn[Ke]=true;function Fo(e){return !!e&&!!e[Ke]}
2
- exports.Component=ie;exports.For=Gn;exports.Fragment=Vn;exports.Portal=$n;exports.Suspense=Un;exports.Transition=Yn;exports.TransitionGroup=Jn;exports.addEvent=re;exports.addEventListener=se;exports.beginHydration=ze;exports.bindElement=so;exports.child=Mt;exports.clearDelegatedEvents=Wt;exports.consumeTeleportAnchor=Ge;exports.consumeTeleportBlock=We;exports.createApp=Kt;exports.createComponent=xe;exports.createResource=Co;exports.defineAsyncComponent=wo;exports.delegateEvents=Gt;exports.endHydration=qe;exports.getHydrationKey=vn;exports.getRenderedElement=xt;exports.hydrate=Ut;exports.hydrationAnchor=_t;exports.hydrationMarker=At;exports.inject=de;exports.insert=W;exports.isComponent=K;exports.isFragment=uo;exports.isHydrating=oe;exports.isPortal=yo;exports.isSuspense=So;exports.isTransition=Po;exports.isTransitionGroup=Fo;exports.next=It;exports.normalizeClass=Se;exports.nthChild=Ot;exports.omitProps=ao;exports.onDestroy=Qe;exports.onMount=J;exports.onUpdate=Ht;exports.patchAttr=Z;exports.patchAttrHydrate=Pt;exports.patchClass=Ce;exports.patchClassHydrate=kt;exports.patchStyle=be;exports.patchStyleHydrate=Rt;exports.provide=Ze;exports.resetHydrationKey=Nt;exports.setStyle=ne;exports.template=Te;
1
+ 'use strict';var shared=require('@estjs/shared'),signals=require('@estjs/signals');var an=Object.getOwnPropertySymbols;var Qn=Object.prototype.hasOwnProperty,Zn=Object.prototype.propertyIsEnumerable;var cn=(e,n)=>{var t={};for(var o in e)Qn.call(e,o)&&n.indexOf(o)<0&&(t[o]=e[o]);if(e!=null&&an)for(var o of an(e))n.indexOf(o)<0&&Zn.call(e,o)&&(t[o]=e[o]);return t};var un=(e,n,t)=>new Promise((o,r)=>{var i=a=>{try{l(t.next(a));}catch(d){r(d);}},s=a=>{try{l(t.throw(a));}catch(d){r(d);}},l=a=>a.done?o(a.value):Promise.resolve(a.value).then(i,s);l((t=t.apply(e,n)).next());});var fn="ref",dn="key",mn="http://www.w3.org/2000/svg",He="http://www.w3.org/2000/xlink",Ve="http://www.w3.org/2000/xmlns/";var Ke=Symbol(""),ue=Symbol(""),je=Symbol(""),pn=Symbol(""),$e=Symbol(""),Ue=Symbol("");var Q=null,nt=0;function D(){return Q}function ge(e){Q=e,signals.setCurrentScope(e==null?void 0:e.effectScope);}function U(e=Q){let n=e?e.effectScope.run(()=>signals.effectScope()):signals.effectScope(true),t={id:++nt,effectScope:n,parent:e,children:null,provides:null,cleanup:null,onMount:null,onUpdate:null,onDestroy:null,isMounted:false,isDestroyed:false};return e&&(e.children||(e.children=new Set),e.children.add(t)),t}function H(e,n){let t=Q;ge(e);try{return e.effectScope.run(n)}finally{ge(t);}}function L(e){var t;if(!e||e.isDestroyed)return;if(e.isDestroyed=true,(t=e.parent)!=null&&t.children&&e.parent.children.delete(e),e.parent=null,e.children&&e.children.size>0){for(let o of e.children)o&&(o.parent=null,L(o));e.children.clear();}let n=Q;if(ge(e),e.onDestroy){for(let o=0;o<e.onDestroy.length;o++)try{e.onDestroy[o]();}catch(r){}e.onDestroy=null;}if(e.cleanup){for(let o=0;o<e.cleanup.length;o++)try{e.cleanup[o]();}catch(r){}e.cleanup=null;}ge(n),e.effectScope.stop(),e.provides&&(e.provides.clear(),e.provides=null),e.onMount=null,e.onUpdate=null,e.children=null;}function K(e){let n=Q;n&&(n.cleanup||(n.cleanup=[]),n.cleanup.push(e));}var lt=/^data:\s*(?:text\/html|text\/xml|application\/xhtml\+xml|image\/svg\+xml|application\/xml)/;function at(e){let n=e.replaceAll(/[\u0000-\u0020]+/g,"").toLowerCase();return shared.startsWith(n,"javascript:")||shared.startsWith(n,"vbscript:")?true:lt.test(n)}function Z(e,n,t,o){if(n===dn){o==null?e.removeAttribute(n):e.setAttribute(n,String(o));return}if(n===shared.SPREAD_NAME){let y=shared.isObject(t)?t:null,T=shared.isObject(o)?o:null;if(y)for(let S in y)S!==shared.SPREAD_NAME&&(!T||!(S in T))&&Z(e,S,y[S],null);if(T)for(let S in T)S!==shared.SPREAD_NAME&&Z(e,S,y==null?void 0:y[S],T[S]);return}let r=(e==null?void 0:e.namespaceURI)===mn,i=r&&shared.startsWith(n,"xlink:"),s=r&&shared.startsWith(n,"xmlns:"),l=shared.isSpecialBooleanAttr(n)||shared.isBooleanAttr(n);if(t===o||n.length>2&&n.charCodeAt(0)===111&&n.charCodeAt(1)===110)return;let a=n.toLowerCase();if(a==="innerhtml"||a==="srcdoc")return;if(o==null){if(i)e.removeAttributeNS(He,n.slice(6));else if(s){let y=n.slice(6);e.removeAttributeNS(Ve,y);}else e.removeAttribute(n);return}if(l){shared.includeBooleanAttr(o)?e.setAttribute(n,""):e.removeAttribute(n);return}let d=shared.isSymbol(o)?String(o):o;if(!((a==="href"||a==="src"||a==="xlink:href"||a==="action"||a==="formaction"||a==="poster")&&shared.isString(d)&&at(d))){if(i){e.setAttributeNS(He,n,String(d));return}if(s){e.setAttributeNS(Ve,n,String(d));return}if(r)e.setAttribute(n,String(d));else if(n in e)try{e[n]=d;}catch(y){e.setAttribute(n,String(d));}else e.setAttribute(n,String(d));}}function Ce(e,n,t,o=false){if(n===t)return;let r=Se(t);if(!r){e.removeAttribute("class");return}(shared.isString(n)?n:Se(n))!==r&&(o?e.setAttribute("class",r):e.className=r);}var Se=shared.normalizeClassName;var vn=/\s*!important$/,gn=/(?:^|;)\s*([a-z][a-z\d-]*)\s*:/gi,ht=["Webkit","Moz","ms"],Be={};function Te(e,n,t){let o=e.style;if(t&&shared.isString(t)){n!==t&&(o.cssText=t);return}if(!t){n&&e.removeAttribute("style");return}if(n&&!shared.isString(n)){let r=n;for(let i in r)(!t||t[i]==null)&&ne(o,i,"");}else if(n&&shared.isString(n)){gn.lastIndex=0;let r;for(;(r=gn.exec(n))!==null;){let i=r[1].trim();i&&t&&shared.isObject(t)&&t[i]==null&&ne(o,i,"");}}if(t&&!shared.isString(t)){let r=t;for(let i in r){let s=r[i];(!n||shared.isString(n)||n[i]!==s)&&s!=null&&ne(o,i,s);}}}function ne(e,n,t){if(shared.isArray(t)){for(let i of t)ne(e,n,i);return}(t==null||t==="")&&(t="");let o=shared.isString(t)&&vn.test(t)?"important":"";if(o&&(t=t.replace(vn,"")),shared.startsWith(n,"--")){o?e.setProperty(n,t,o):e.setProperty(n,t);return}let r=gt(e,n);o?e.setProperty(vt(r),t,o):e[r]=t;}function vt(e){let n=shared.kebabCase(e);return shared.startsWith(e,"Webkit")||shared.startsWith(e,"Moz")||shared.startsWith(e,"ms")?`-${n}`:n}function gt(e,n){let t=Be[n];if(t)return t;let o=shared.camelCase(n);if(o!=="filter"&&o in e)return Be[n]=o;o=shared.capitalize(o);for(let r of ht){let i=r+o;if(i in e)return Be[n]=i}return n}var Ge=0;function En(){return String(Ge++)}function Nt(){Ge=0;}var X=false;function oe(){return X}var te=new Map;function Tt(e){let n=e.querySelectorAll("[data-hk]");for(let t of n){let o=t.dataset.hk;o!=null&&!te.has(o)&&te.set(o,t);}}var we=[],fe=new Map;function bt(){if(typeof document=="undefined")return;let e=document.createNodeIterator(document.body,NodeFilter.SHOW_COMMENT),n;for(;n=e.nextNode();){let t=n.data;if(t==="teleport-anchor")we.push(n);else if(t==="teleport-start"){let o=n.parentElement;if(!o)continue;let r=fe.get(o);r||(r=[],fe.set(o,r)),r.push(n);}}}function We(){var e;return (e=we.shift())!=null?e:null}function ze(e){let n=fe.get(e),t=n==null?void 0:n.shift();if(!t)return null;let o=[],r=t.nextSibling;for(;r;){if(r.nodeType===Node.COMMENT_NODE&&r.data==="teleport-end")return {start:t,end:r,nodes:o};o.push(r),r=r.nextSibling;}return null}function qe(e){X=true,Ge=0,te.clear(),we.length=0,fe.clear(),Tt(e),bt();}function Xe(){X=false,te.clear(),we.length=0,fe.clear();}function Sn(e,n,t){var i,s;if(!X||t&&t.parentNode!==e)return null;if(n.length===0)return [];let o=new Array(n.length),r=t?t.previousSibling:e.lastChild;for(let l=n.length-1;l>=0;l--){if(!r)return null;let a=n[l],d=a.nodeType;if(d===Node.TEXT_NODE){let u=(i=a.textContent)!=null?i:"";if(!u||r.nodeType!==Node.TEXT_NODE)return null;let y=(s=r.textContent)!=null?s:"";if(y===u){o[l]=r,r=r.previousSibling;continue}if(!y.endsWith(u))return null;let T=y.slice(0,y.length-u.length);if(!T)return null;let S=document.createTextNode(T);e.insertBefore(S,r),r.textContent=u,o[l]=r,r=S;continue}if(r.nodeType!==d)return null;if(d===Node.ELEMENT_NODE){if(r.tagName!==a.tagName)return null}else if(d===Node.COMMENT_NODE&&r.data!==a.data)return null;o[l]=r,r=r.previousSibling;}return o}function wt(e){var t,o,r;return (r=(o=e.dataset.hk)!=null?o:(t=e.closest("[data-hk]"))==null?void 0:t.dataset.hk)!=null?r:null}function Cn(e,n){if(X&&e){let t=wt(e);if(t)return `${t}-${n}`}return String(n)}function At(e,n){if(!e||n<0)return null;let t=Cn(e instanceof Element?e:null,n),o=0,r=e.firstChild;for(;r;){if(r.nodeType===Node.COMMENT_NODE){let i=r;if(i.data===t||!X&&i.data===""&&o++===n)return i}r=r.nextSibling;}return null}function _t(e,n){if(!(e instanceof Element)||n<0)return null;let t=Cn(e,n),o=e.firstChild;for(;o;){if(o instanceof Element&&o.getAttribute(shared.HYDRATION_ANCHOR_ATTR)===t)return o;o=o.nextSibling;}return null}function xt(e){if(!shared.isBrowser())return ()=>{throw new Error("[essor] getRenderedElement called in non-browser environment")};let n=null;return ()=>{if(!X)return n||(n=be(e)),n();let t=En(),o=te.get(t);return o?(te.delete(t),o):(shared.warn(`[essor] hydration mismatch: no SSR element for key "${t}"`),n||(n=be(e)),n())}}function kt(e,n,t,o){X||Ce(e,n,t,o);}function Pt(e,n,t,o){X||Z(e,n,t,o);}function Rt(e,n,t){X||Te(e,n,t);}function Ye(e,n){return n&&n.parentNode===e?n:null}function Nn(e,n,t,o){let r=Ye(e,o),i=n.length,s=t.length;if(i===0&&s===0)return t;if(i===0){for(let u=0;u<s;u++)G(e,t[u],r);return t}if(s===0){for(let u=0;u<i;u++)Y(n[u]);return []}let l=0,a=i-1,d=s-1;for(;l<=a&&l<=d&&n[l]===t[l];)l++;for(;a>=l&&d>=l&&n[a]===t[d];)a--,d--;if(l>a){if(l<=d){let u=d+1,y=Ye(e,u<s?t[u]:r);for(let T=l;T<=d;T++)G(e,t[T],y);}}else if(l>d)for(let u=l;u<=a;u++)Y(n[u]);else Dt(e,n,t,l,a,d,r);return t}function Dt(e,n,t,o,r,i,s){let l=i-o+1,a=l<=4?_=>{for(let b=o;b<=i;b++)if(t[b]===_)return b}:(()=>{let _=new Map;for(let b=o;b<=i;b++)_.set(t[b],b);return b=>_.get(b)})(),d=new Int32Array(l),u=0,y=false,T=0;for(let _=o;_<=r;_++){let b=n[_];if(u>=l){Y(b);continue}let F=a(b);F===void 0?Y(b):(d[F-o]=_+1,F>=T?T=F:y=true,u++);}let S=y?Je(d):[],w=S.length-1;for(let _=l-1;_>=0;_--){let b=o+_,F=t[b],p=Ye(e,b+1<t.length?t[b+1]:s);d[_]===0?G(e,F,p):y&&(w<0||_!==S[w]?G(e,F,p):w--);}}function Je(e){let n=new Int32Array(e.length),t=[0],o=e.length,r,i,s,l,a;for(r=0;r<o;r++){let d=e[r];if(d!==0){if(i=t[t.length-1],e[i]<d){n[r]=i,t.push(r);continue}for(s=0,l=t.length-1;s<l;)a=s+l>>1,e[t[a]]<d?s=a+1:l=a;d<e[t[s]]&&(s>0&&(n[r]=t[s-1]),t[s]=r);}}for(s=t.length,l=t[s-1];s-- >0;)t[s]=l,l=n[l];return t}function Y(e){if(e)if($(e))e.destroy();else {let n=e;n.parentNode&&n.remove();}}function G(e,n,t){if(!e||!n)return;let o=$(t)?t.firstChild:t;if($(n)){n.mount(e,o);return}o?e.insertBefore(n,o):e.appendChild(n);}function Ae(e){if(e instanceof Node||$(e))return e;let n=typeof e;return e==null||n==="string"||n==="number"||n==="boolean"||n==="symbol"?document.createTextNode(e===false||e==null?"":String(e)):document.createTextNode(String(e))}function W(e,n,t){if(!e)return;let o=D(),r=[],i=true,s=a=>{if(a instanceof Node)return [a];if($(a))return [a];let d=typeof a;return a==null||d==="string"||d==="number"||d==="boolean"?[Ae(a)]:shared.coerceArray(a).map(u=>shared.isFunction(u)?u():u).flatMap(u=>u).map(Ae)},l=signals.effect(()=>{let a=()=>{let d=shared.isFunction(n)?n():n,u=s(d);if(i&&oe()&&u.every(y=>y instanceof Node&&y.parentNode===e)){r=u,i=false;return}if(i&&oe()){let y=Sn(e,u,t);if(y){r=y,i=false;return}}r=Nn(e,r,u,t),i=false;};o&&!o.isDestroyed?H(o,a):a();});return K(()=>{l.stop();for(let a of r)Y(a);r=[],o=null;}),r}function Mt(e){return (e==null?void 0:e.firstChild)||null}function It(e,n=1){for(;e&&n>0;)e=e.nextSibling,n--;return e||null}function Ot(e,n){if(!e||n<0)return null;let t=e.firstChild;for(;t&&n>0;)t=t.nextSibling,n--;return t||null}function re(e,n,t,o){if(!(o!=null&&o.delegate))return e.addEventListener(n,t,o),()=>e.removeEventListener(n,t,o);let r=o.delegate,i=d=>{let u=d.target;(u.matches(r)||u.closest(r))&&t.call(e,d);},a=o,{delegate:s}=a,l=cn(a,["delegate"]);return e.addEventListener(n,i,l),()=>{e.removeEventListener(n,i,l);}}function Qe(e,n,t){let o=e[n];o||(o=[],e[n]=o),o.push(t);}function wn(e,n,t){let o=e.length;if(o===0)return;let r;for(let i=0;i<o;i++)try{let s=e[i]();if(shared.isPromise(s)){let l=s.catch(a=>{});(r||(r=[])).push(l);}}catch(s){}if(r)return Promise.all(r).then(()=>{})}function J(e){let n=D();if(n){if(n.isMounted){try{let t=e();shared.isPromise(t)&&t.catch(o=>{});}catch(t){}return}Qe(n,"onMount",e);}}function Ht(e){let n=D();n&&Qe(n,"onUpdate",e);}function Ze(e){let n=D();n&&Qe(n,"onDestroy",e);}function An(e){if(e.isDestroyed)return;if(!e.onMount||e.onMount.length===0){e.isMounted=true;return}let n=e.onMount,t=H(e,()=>wn(n,e.id));return n.length=0,e.isMounted=true,t}function _n(e){if(!(e.isDestroyed||!e.onUpdate||e.onUpdate.length===0))return H(e,()=>wn(e.onUpdate,e.id))}function xe(e,n,t=false){let o=Reflect.ownKeys(n);for(let r of o)Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r));if(t){let r=new Set(o);for(let i of Reflect.ownKeys(e))r.has(i)||delete e[i];}}function kn(e,n){let t=Object.getOwnPropertyDescriptor(e,n);return t.get?t.get.call(e):t.value}var Pn;Pn="normal";var ie=class{constructor(n,t={}){this.component=n;this.props=t;this[Pn]=true;this.scope=null;this.state=0;this.beforeNode=void 0;this.renderedNodes=[];this.firstChild=void 0;this.parentNode=void 0;this.rootEventCleanups=[];this.parentScope=D();let o=Object.create(null);xe(o,t),this.reactiveProps=signals.shallowReactive(o);}mount(n,t){var i;if(this.parentNode=n,this.beforeNode=t,this.state=1,this.renderedNodes.length>0){for(let s of this.renderedNodes)G(n,s,t);return this.state=2,this.renderedNodes}let o=U((i=this.parentScope)!=null?i:D());this.scope=o;let r=H(o,()=>{var l;let s=this.component(this.reactiveProps);return shared.isFunction(s)&&(s=s(this.reactiveProps)),(signals.isSignal(s)||signals.isComputed(s))&&(s=s.value),(l=W(n,s,t))!=null?l:[]});return this.renderedNodes=r,this.firstChild=r[0],this.syncSpecialProps(this.props),this.state=2,An(o),this.renderedNodes}update(n){this.props=n,xe(this.reactiveProps,n!=null?n:{},true);let t=this.scope;!t||t.isDestroyed||(this.syncSpecialProps(n),_n(t));}forceUpdate(){if(!this.parentNode)return;let n=this.parentNode,t=this.beforeNode,o=Object.create(null);xe(o,this.reactiveProps),this.destroy(),xe(this.reactiveProps,o),this.mount(n,t);}destroy(){let n=this.scope;if(!(!n||n.isDestroyed)){this.scope=null,this.releaseSpecialProps(),L(n);for(let t of this.renderedNodes)Y(t);this.renderedNodes=[],this.firstChild=void 0,this.parentNode=void 0;for(let t of Reflect.ownKeys(this.reactiveProps))delete this.reactiveProps[t];this.state=0;}}syncSpecialProps(n){if(!n)return;let t=this.firstChild;if(!(!t||!(t instanceof Element))){this.releaseSpecialProps();for(let o of Reflect.ownKeys(n))if(shared.isString(o)){if(o===fn){let r=kn(n,o);this.rootRefCleanup=this.bindRootRef(r,t);continue}if(shared.isOn(o)){let r=kn(n,o);if(!shared.isFunction(r))continue;let i=o.slice(2).toLowerCase();this.bindRootEvent(t,i,r);}}}}bindRootEvent(n,t,o){let r=`_$${t}`,i=n[r];if(shared.isFunction(i)){n[r]=o,this.rootEventCleanups.push(()=>{n[r]===o&&(n[r]=i);});return}this.rootEventCleanups.push(re(n,t,s=>{n.disabled||o.call(n,s);}));}releaseSpecialProps(){for(let n of this.rootEventCleanups)n();this.rootEventCleanups.length=0,this.rootRefCleanup&&(this.rootRefCleanup(),this.rootRefCleanup=void 0);}bindRootRef(n,t){if(shared.isFunction(n))return n(t),()=>n(null);if(signals.isSignal(n)){let o=n,r=o.value;return o.value=t,()=>{o.value===t&&(o.value=r);}}}};function $(e){return !!e&&!!e.normal}function ke(e,n){return $(e)?e:new ie(e,n)}function be(e){let n,t=()=>{let o=document.createElement("template");o.innerHTML=e;let r=o.content.firstChild;if(!r)throw new Error("Invalid template: empty content");return r};return ()=>(n||(n=t())).cloneNode(true)}function Ut(e,n){let t=shared.isString(n)?document.querySelector(n):n;if(!t)return;t.innerHTML&&(t.innerHTML="");let r=U(),i;try{H(r,()=>{let s=ke(e);$(s)&&(i=s,G(t,s));});}catch(s){throw L(r),s}return {root:i,unmount:()=>{i==null||i.destroy(),L(r);}}}function Bt(e,n){let t=shared.isString(n)?document.querySelector(n):n;if(!t)return;qe(t);let o=U(),r;try{H(o,()=>{let i=ke(e);$(i)&&(r=i,W(t,i));});}catch(i){throw L(o),i}finally{Xe();}return {root:r,unmount:()=>{r==null||r.destroy(),L(o);}}}function en(e,n){let t=D();t&&(t.provides||(t.provides=new Map),t.provides.set(e,n));}function de(e,n){let t=D();if(!t)return n;let o=t;for(;o;){if(o.provides&&o.provides.has(e))return o.provides.get(e);o=o.parent;}return n}function nn(e,n){Object.defineProperty(e,"target",{configurable:true,value:n});}function Ln(e){let n=e.target,t=e.type,o=e.target,r=e.currentTarget,i=()=>{let l=n[`_$${t}`];if(l&&shared.isFunction(l)&&!n.disabled){let a=n[`${t}Data`];if(a?l.call(n,a,e):l.call(n,e),e.cancelBubble)return false}return n.host&&!shared.isString(n.host)&&!n.host._$host&&shared.isFunction(n.contains)&&n.contains(e.target)&&nn(e,n.host),true},s=()=>{for(;i()&&(n=n._$host||n.parentNode||n.host););};if(Object.defineProperty(e,"currentTarget",{configurable:true,get(){return n||document}}),e.composedPath){let l=e.composedPath();nn(e,l[0]);for(let a=0;a<l.length-2&&(n=l[a],!!i());a++){if(n._$host){n=n._$host,s();break}if(n.parentNode===r)break}}else s();nn(e,o);}var Pe=Symbol("_$EVENTS");function Wt(e,n=globalThis.document){if(!n)return;let t=n,o=t[Pe]||(t[Pe]=new Set);for(let r of e)o.has(r)||(o.add(r),n.addEventListener(r,Ln));}function zt(e=globalThis.document){if(!e)return;let n=e,t=n[Pe];if(t){for(let o of t.keys())e.removeEventListener(o,Ln);delete n[Pe];}}function se(e,n,t,o){let r=re(e,n,t,o);D()&&K(r);}var Jt=e=>e,Qt=typeof DataTransfer!="undefined"?new DataTransfer().files:[];function In(e,n){let t=e,o=n==null?"":String(n);t.value!==o&&(t.value=o);}var Zt={event:"change",forceChange:true,checkboxArray:true,read:e=>e.checked,write(e,n){let t=e,o=shared.isArray(n)?n.map(String).includes(t.value):!!n;t.checked!==o&&(t.checked=o);}},eo={event:"change",forceChange:true,read(e){let n=e;return n.checked?n.value:""},write(e,n){let t=e,o=String(n)===t.value;t.checked!==o&&(t.checked=o);}},no={event:"change",forceChange:true,read:e=>e.files,write(e,n){if(n==null)try{e.files=Qt;}catch(t){}}},Fn={event:"input",ime:true,read:e=>e.value,write:In},to={event:"change",forceChange:true,read(e){let n=e;return n.multiple?Array.from(n.selectedOptions,t=>t.value):n.value},write(e,n){let t=e;if(!t.multiple)return In(e,n);let o=new Set((shared.isArray(n)?n:[]).map(String));for(let r of Array.from(t.options))r.selected=o.has(r.value);}};function Mn(e){return {event:"input",read:n=>n[e],write(n,t){n[e]=t;}}}function oo(e,n){switch(e.nodeName){case "INPUT":return n==="checked"?e.type==="radio"?eo:Zt:n==="files"?no:n==="value"?Fn:Mn(n);case "SELECT":return to;case "TEXTAREA":return Fn;default:return Mn(n)}}function ro(e,n,t){if(!shared.isString(e))return e;let o=n?e.trim():e;if(t){let r=n?o:o.trim();if(r!==""){let i=Number(r);if(!Number.isNaN(i))return i}}return o}function io(e){let n=e.getRootNode();return (n instanceof Document||n instanceof ShadowRoot)&&n.activeElement===e}function so(e,n){if(n!=="value"||e.nodeName!=="INPUT")return false;let t=e.type;return t==="number"||t==="range"}function lo(e,n,t,o,r={}){if(!e)return;let{event:i,read:s,write:l,forceChange:a,ime:d,checkboxArray:u}=oo(e,n),y=r.trim===true,T=r.number===true||so(e,n),S=r.lazy===true,w=(y||T)&&n!=="files",_=shared.isFunction(t)?t:()=>t,b=w?E=>ro(E,y,T):Jt,F=u?E=>{let g=_();if(!shared.isArray(g))return b(E);let R=e.value,O=g.filter(c=>String(c)!==R);return E&&O.push(R),O}:b,p=false,f=S||a?"change":i,C=()=>{if(p)return;let E=s(e);if(E===void 0)return;let g=F(E);Object.is(_(),g)||o(g);};se(e,f,C),!S&&w&&f!=="change"&&se(e,"change",()=>l(e,b(s(e)))),d&&(se(e,"compositionstart",()=>{p=true;}),se(e,"compositionend",()=>{p=false,S||C();}));let N=signals.effect(()=>{let E=_();d&&p||d&&!S&&io(e)&&Object.is(b(s(e)),E)||l(e,E);});D()&&K(()=>N.stop());}function On(e){let n=e;return Array.isArray(n)&&n.length===1&&(n=n[0]),shared.isFunction(n)?n():n}function Hn(e){let n=Object.getOwnPropertyDescriptor(e,"children");return n!=null&&n.get?()=>On(n.get.call(e)):()=>On(e.children)}function co(e,n){let t=new Set(n);return new Proxy(e,{get(o,r){if(!t.has(r))return Reflect.get(o,r)},ownKeys(o){return Reflect.ownKeys(o).filter(r=>!t.has(r))},getOwnPropertyDescriptor(o,r){if(!t.has(r))return Reflect.getOwnPropertyDescriptor(o,r)},has(o,r){return t.has(r)?false:Reflect.has(o,r)}})}function Vn(e){var t;if(e&&((t=Object.getOwnPropertyDescriptor(e,"children"))!=null&&t.get||signals.isReactive(e)))return [()=>e.children];let n=e==null?void 0:e.children;return n==null?null:n}Vn[Ke]=true;function fo(e){return !!e&&!!e[Ke]}function Re(e){let n=shared.isFunction(e.target)?e.target():e.target;return n==null?null:shared.isString(n)?document.querySelector(n):n}function De(e){return shared.isFunction(e.disabled)?!!e.disabled():!!e.disabled}function jn(e){if(oe()){let u=yo(e);if(u)return u}let n=document.createComment("portal");n[ue]=true;let{children:t}=e;if(t==null)return n;let o=D(),r=null,i=(u,y)=>{r=U(o),H(r,()=>{W(u,()=>t,y);});},s=()=>{r&&(L(r),r=null);},l=(u,y)=>{if(s(),u){let T=n.parentNode;if(!T)return;i(T,n);return}y&&i(y);},a=false,d=signals.effect(()=>{let u=De(e),y=u?null:Re(e);a&&l(u,y);});return J(()=>{a=!0;let u=De(e),y=u?null:Re(e);if(u||y){l(u,y);return}queueMicrotask(()=>{n.parentNode&&l(De(e),Re(e));});}),K(()=>{d.stop(),s();}),n}jn[ue]=true;function yo(e){if(De(e))return null;let n=We();if(!n)return null;let t=Re(e);return !t||!ze(t)?null:(n[ue]=true,n)}function ho(e){return !!e&&!!e[ue]}function Le(e){let n=e;for(;shared.isFunction(n);)n=n();return signals.isSignal(n)||signals.isComputed(n)?Le(n.value):Array.isArray(n)?n.map(t=>Le(t)):n}var me=Symbol("SuspenseContext");function Un(e){var E;if(!shared.isBrowser())return (E=e.fallback)!=null?E:"";let n=D(),t=document.createComment("suspense"),o=document.createComment("/suspense"),r=document.createDocumentFragment();r.append(t,o);let i=true,s=0,l=false,a=null,d=null,u=null,y=null,T=()=>{let g=document.createDocumentFragment();for(;o.previousSibling&&o.previousSibling!==t;)g.prepend(o.previousSibling);d=g;},S=()=>{var R;if(!d)return;let g=(R=o.parentNode)!=null?R:r;for(;d.firstChild;)g.insertBefore(d.firstChild,o);d=null;},w=()=>{e.fallback==null||u||(u=U(n),H(u,()=>{var g;W((g=o.parentNode)!=null?g:r,()=>Le(e.fallback),o);}));},_=()=>{u&&(L(u),u=null);},b=g=>{l=true,a=U(n),H(a,()=>{var R;W((R=o.parentNode)!=null?R:r,()=>Le(g),o);}),l=false,s&&!d&&(T(),w());},F=()=>{d||l||(T(),w());},p=()=>{if(!d)return;let g=e.children!=null&&!shared.isPromise(e.children);a==null&&y==null&&!g||(_(),S(),a||(y?b(y):g&&b(e.children)));},f=()=>{i&&--s===0&&p();},C={register:g=>{s++,F(),g.then(f).catch(R=>{f();});},increment:()=>{s++,F();},decrement:()=>{s=Math.max(0,s-1),s===0&&p();}};en(me,C);let N=e.children;return shared.isPromise(N)?(N.then(g=>{y=g;}).catch(()=>{}),C.register(N)):N!=null?b(N):e.fallback!=null&&F(),K(()=>{i=false,s=0,y=null,a&&L(a),u&&L(u),a=u=null,d=null,t.remove(),o.remove();}),r}Un[je]=true;function Co(e){return !!e&&!!e[je]}function No(e,n){let t=signals.signal(n==null?void 0:n.initialValue),o=signals.signal(true),r=signals.signal(null),i=signals.signal("pending"),s=0,l=null,a=de(me,null),d=()=>un(null,null,function*(){let T=++s;l==null||l.abort(),l=new AbortController,o.value=true,i.value="pending",r.value=null;let S;try{S=Promise.resolve(e(l.signal));}catch(w){r.value=w instanceof Error?w:new Error(String(w)),i.value="errored",o.value=false;return}a==null||a.register(S);try{let w=yield S;T===s&&(t.value=w,i.value="ready",o.value=!1);}catch(w){if(T!==s)return;if(w instanceof DOMException&&w.name==="AbortError"){o.value=false;return}r.value=w instanceof Error?w:new Error(String(w)),i.value="errored",o.value=false;}});d(),K(()=>{s++,l==null||l.abort(),l=null;});let u=(()=>t.value);return u.loading=o,u.error=r,u.state=i,[u,{mutate:T=>{t.value=T,i.value="ready",o.value=false,r.value=null;},refetch:()=>d()}]}function Bn(e){return shared.isFunction(e)?e:e.default}function bo(e,n){if(n==="client-only"){let s=()=>"";return s.__asyncLoader=e,s.__asyncResolved=()=>null,s}let t=null,o=null,r=()=>o!=null?o:o=e().then(s=>{t=Bn(s);}).catch(()=>{});r();let i=s=>t?t(s):"";return i.__asyncLoader=r,i.__asyncResolved=()=>t,i}function wo(e,n){let{loading:t,error:o,delay:r=200,timeout:i,onError:s}=n,l=null,a=null,d="pending",u=null,y=()=>u!=null?u:u=e().then(S=>{l=Bn(S),d="resolved";}).catch(S=>{a=S instanceof Error?S:new Error(String(S)),d="errored",u=null;});y();function T(S){var c;let w=D(),_=document.createComment("async"),b=document.createDocumentFragment();b.appendChild(_);let F=true,p=null,f=null,C=null,N=()=>{f!=null&&clearTimeout(f),C!=null&&clearTimeout(C),f=C=null;},E=(h,m)=>{F&&(w&&w.isDestroyed||(p&&(L(p),p=null),h&&(p=U(w),H(p,()=>{var k;W((k=_.parentNode)!=null?k:b,()=>new ie(h,m),_);}))));};Ze(()=>{F=false,N(),p&&(L(p),p=null),_.remove();});let g=h=>()=>{u=null,d="pending",a=null,t&&E(t),y().then(()=>R(h));},R=h=>{F&&(N(),d==="resolved"&&l?E(l,h):d==="errored"&&a&&(o&&E(o,{error:a,retry:g(h)}),s&&s(a,g(h))));};if(d==="resolved"&&l)return E(l,S),b;if(d==="errored"&&a)return o&&E(o,{error:a,retry:g(S)}),b;let O=y().then(()=>R(S));return (c=de(me))==null||c.register(O),r>0?f=setTimeout(()=>{F&&d==="pending"&&t&&E(t);},r):t&&E(t),i!=null&&(C=setTimeout(()=>{!F||d!=="pending"||(a=new Error(`[defineAsyncComponent] Timeout after ${i}ms`),d="errored",o&&E(o,{error:a,retry:g(S)}),s&&s(a,g(S)));},i)),b}return T.__asyncLoader=y,T.__asyncResolved=()=>l,T}function Ao(e,n={}){var t;return typeof window=="undefined"?bo(e,(t=n.ssr)!=null?t:"blocking"):wo(e,n)}function Gn(e){let n=document.createDocumentFragment(),t=document.createComment("");n.appendChild(t);let o=[],r=[],i=e.key,s=e.children,l=Array.isArray(s)&&s.length===1&&shared.isFunction(s[0])?s[0]:e.children;if(!shared.isFunction(l))throw new TypeError("<For> requires `children` to be a function (item, index) => Node");let a=()=>{var f,C;let p=e.each;return signals.isSignal(p)?(f=p.value)!=null?f:[]:shared.isFunction(p)?(C=p())!=null?C:[]:p!=null?p:[]},d=(p,f)=>i?i(p,f):p,u=(p,f,C)=>{if(p==null||p===false)return [];if(Array.isArray(p)){let E=[];for(let g of p)E.push(...u(g,f,C));return E}if($(p))return G(f,p,C!=null?C:void 0),p.renderedNodes;let N=Ae(p);return G(f,N,C!=null?C:void 0),[N]},y=(p,f)=>{if(!e.fallback)return;r=u(e.fallback(),p,f);},T=()=>{for(let p of r)Y(p);r=[];},S=D(),w=(p,f,C,N,E=d(p,f))=>{var c;let g=(c=D())!=null?c:S,R=U(g),O=[];try{H(R,()=>{O=u(l(p,f),C,N);});}catch(h){throw L(R),h}return {key:E,item:p,nodes:O,scope:R}},_=p=>{L(p.scope);for(let f of p.nodes)f.parentNode&&f.parentNode.removeChild(f);},b=signals.effect(()=>{let p=a(),f=t.parentNode;if(!f){if(p.length===0)y(n,t);else {o=new Array(p.length);let C=0;for(let N of p)o[C]=w(N,C,n,t),C++;}return}F(f,p);});function F(p,f){let C=o.length,N=f.length;if(N===0){for(let v=0;v<C;v++)_(o[v]);o=[],e.fallback&&r.length===0&&y(p,t);return}if(C===0||r.length>0){r.length>0&&T(),o=new Array(N);let v=document.createDocumentFragment();for(let P=0;P<N;P++)o[P]=w(f[P],P,v,null);p.insertBefore(v,t);return}let E=new Map;for(let v=0;v<C;v++){let P=o[v],V=E.get(P.key),q=[P,v];V?V.push(q):E.set(P.key,[q]);}let g=new Array(N),R=[],O=null,c=new Int32Array(N),h=false,m=0,k=new Array(N);for(let v=0;v<N;v++)k[v]=d(f[v],v);for(let v=0;v<N;v++){let P=f[v],V=k[v],q=E.get(V);if(q&&q.length>0){let[ce,z]=q.shift();Object.is(ce.item,P)?(ce.item=P,g[v]=ce,c[v]=z+1,z<m?h=true:m=z):(O||(O=document.createDocumentFragment()),_(ce),g[v]=w(P,v,O,null,V));}else O||(O=document.createDocumentFragment()),g[v]=w(P,v,O,null,V);}for(let v of E.values())for(let[P]of v)R.push(P);for(let v of R)_(v);let A=h?Je(c):[],x=A.length-1,M=t;for(let v=N-1;v>=0;v--){let V=g[v].nodes;if(!(c[v]===0)&&h&&x>=0&&v===A[x]){x--;for(let z=V.length-1;z>=0;z--)M=V[z];continue}for(let z=V.length-1;z>=0;z--){let Oe=V[z];Oe.nextSibling!==M&&p.insertBefore(Oe,M),M=Oe;}}o=g;}return K(()=>{b.stop();for(let p of o)_(p);o=[],T(),t.parentNode&&t.parentNode.removeChild(t);}),n}Gn[pn]=true;function rn(e){var i,s,l,a,d,u,y,T,S,w;let n=(i=e.name)!=null?i:"v",t=(s=e.enterFromClass)!=null?s:`${n}-enter-from`,o=(l=e.enterActiveClass)!=null?l:`${n}-enter-active`,r=(a=e.enterToClass)!=null?a:`${n}-enter-to`;return {enterFrom:t,enterActive:o,enterTo:r,leaveFrom:(d=e.leaveFromClass)!=null?d:`${n}-leave-from`,leaveActive:(u=e.leaveActiveClass)!=null?u:`${n}-leave-active`,leaveTo:(y=e.leaveToClass)!=null?y:`${n}-leave-to`,appearFrom:(T=e.appearFromClass)!=null?T:t,appearActive:(S=e.appearActiveClass)!=null?S:o,appearTo:(w=e.appearToClass)!=null?w:r}}var Wn=e=>e?e.endsWith("ms")?Number(e.slice(0,-2).replace(",",".")):Number(e.slice(0,-1).replace(",","."))*1e3:0;function zn(e,n){let t=e.split(", "),o=n.split(", "),r=0;for(let[i,s]of o.entries()){let l=Wn(s)+Wn(t[i%t.length]||"0s");l>r&&(r=l);}return r}function Xn(e,n){let t=getComputedStyle(e),o=n!=="animation"?zn(t.transitionDelay,t.transitionDuration):0,r=n!=="transition"?zn(t.animationDelay,t.animationDuration):0;return o===0&&r===0?null:o>=r?{event:"transitionend",timeout:o}:{event:"animationend",timeout:r}}function B(e,n){for(let t of n.split(/\s+/))t&&e.classList.add(t);}function j(e,n){for(let t of n.split(/\s+/))t&&e.classList.remove(t);}function ye(e){requestAnimationFrame(()=>requestAnimationFrame(e));}function Ie(e){e.offsetHeight;}function le(e,n,t,o){if(t!=null){setTimeout(o,t);return}let r=Xn(e,n);if(!r){o();return}let i=false,s=()=>{i||(i=true,clearTimeout(a),e.removeEventListener(r.event,l),o());},l=()=>s();e.addEventListener(r.event,l);let a=setTimeout(s,r.timeout+1);}function ae(e,n){return e==null?null:shared.isNumber(e)?e:e[n]}function qn(e){if(e==null||e===false)return null;if(Array.isArray(e))return e[0]instanceof Element?e[0]:null;if(e instanceof Element)return e;if($(e)){let n=e;if(n.scope==null){let o=document.createDocumentFragment();n.mount(o);}let t=n.firstChild;return t instanceof Element?t:null}return null}var Me=Symbol("enter_cb"),pe=Symbol("leave_cb");function Yn(e){let n=document.createComment(""),t=rn(e),o=e.css!==false,r=Hn(e),i="idle",s=null,l=null,a=false,d,u=false,y=false,T=false,S=(f,C)=>{var h;let N=f[pe];N&&N(true),i="entering";let E=C==="appear"?t.appearFrom:t.enterFrom,g=C==="appear"?t.appearActive:t.enterActive,R=C==="appear"?t.appearTo:t.enterTo;(h=e.onBeforeEnter)==null||h.call(e,f),o&&(B(f,E),B(f,g));let O=false,c=m=>{var k,A;O||(O=true,f[Me]=void 0,o&&(j(f,E),j(f,g),j(f,R)),m?(k=e.onEnterCancelled)==null||k.call(e,f):(i="entered",(A=e.onAfterEnter)==null||A.call(e,f)));};f[Me]=c,ye(()=>{if(!O)if(o&&(j(f,E),B(f,R)),e.onEnter)e.onEnter(f,()=>c(false));else if(o){let m=ae(e.duration,"enter");le(f,e.type,m,()=>c(false));}else c(false);});},w=(f,C)=>{var c;let N=f[Me];N&&(N(true),Ie(f)),i="leaving",(c=e.onBeforeLeave)==null||c.call(e,f),o&&(B(f,t.leaveFrom),B(f,t.leaveActive));let E=false,g=h=>{var m,k;E||(E=true,f[pe]=void 0,o&&(j(f,t.leaveFrom),j(f,t.leaveActive),j(f,t.leaveTo)),h?(m=e.onLeaveCancelled)==null||m.call(e,f):(i="idle",C(),(k=e.onAfterLeave)==null||k.call(e,f)));};f[pe]=g;let R=ae(e.duration,"leave"),O=o&&!e.onLeave&&R==null?!!Xn(f,e.type):false;if(!e.onLeave&&R==null&&!O){g(false);return}ye(()=>{E||(o&&(j(f,t.leaveFrom),B(f,t.leaveTo)),e.onLeave?e.onLeave(f,()=>g(false)):o?le(f,e.type,R,()=>g(false)):g(false));});},_=(f,C)=>{if(f&&i==="leaving"&&l){let E=l,g=E[pe];g&&g(true),l=null,s=E,S(E,"enter");return}if(f===s)return;let N=s;if(s=f,N){l=N;let E=N;w(E,()=>{E.parentNode&&E.parentNode.removeChild(E),l===E&&(l=null);});}f&&n.parentNode?(n.parentNode.insertBefore(f,n),C&&!e.appear?i="entered":S(f,C&&e.appear?"appear":"enter")):!N&&!f&&(i="idle");},b=()=>{if(y=false,T||!u)return;let f=d;u=false,d=void 0;try{_(qn(f),!1);}catch(C){}},F=f=>{d=f,u=true,!y&&(y=true,queueMicrotask(b));},p=signals.effect(()=>{let f=r();a?F(f):(d=f,u=true);});return J(()=>{a=!0;let f=u?qn(d):null;u=!1,d=void 0,_(f,!0);}),K(()=>{T=true,p.stop();for(let f of [s,l]){if(!f)continue;let C=f[Me],N=f[pe];C==null||C(true),N==null||N(true),f.parentNode&&f.parentNode.removeChild(f);}s=null,l=null,i="idle";}),n}Yn[$e]=true;function Ro(e){return !!e&&!!e[$e]}function ln(e,n){if(e==null||e===false)return {el:null,comp:null};if(Array.isArray(e)&&e.length===1)return ln(e[0],n);if(shared.isFunction(e))return ln(e(),n);if(e instanceof HTMLElement)return {el:e,comp:null};if($(e)){let t=e;t.scope==null&&t.mount(n);let o=t.firstChild;return o instanceof HTMLElement?{el:o,comp:t}:{el:null,comp:t}}return {el:null,comp:null}}function Fo(e){return {position:e.style.position,top:e.style.top,left:e.style.left,width:e.style.width,height:e.style.height}}function sn(e,n){e.style.position=n.position,e.style.top=n.top,e.style.left=n.left,e.style.width=n.width,e.style.height=n.height;}function Jn(e){var g,R,O;let n=(g=e.tag)!=null?g:"div",t=document.createElement(n),o=rn(e),r=e.css!==false,i=(O=e.moveClass)!=null?O:`${(R=e.name)!=null?R:"v"}-move`,s=e.key,l=e.children,a=Array.isArray(l)&&l.length===1&&shared.isFunction(l[0])?l[0]:e.children;if(!shared.isFunction(a)||!shared.isFunction(s))throw new TypeError("<TransitionGroup> requires `children: (item, index) => Node` and `key: (item, index) => unknown`");let d=()=>{var h,m;let c=e.each;return signals.isSignal(c)?(h=c.value)!=null?h:[]:shared.isFunction(c)?(m=c())!=null?m:[]:c!=null?c:[]},u=[],y=false,T=(c,h)=>{let m=D(),k=U(m),A;try{H(k,()=>{A=a(c,h);});}catch(v){throw L(k),v}let{el:x,comp:M}=ln(A,t);return x?{key:s(c,h),item:c,el:x,comp:M,scope:k,state:"entering"}:(L(k),null)},S=c=>{if(c.comp){for(let h of c.comp.renderedNodes)h.parentNode===t&&t.removeChild(h);return}c.el.parentNode===t&&t.removeChild(c.el);},w=c=>{var h,m;(h=c.cancelEnter)==null||h.call(c,true),(m=c.cancelLeave)==null||m.call(c,true),c.comp&&c.comp.destroy(),S(c),L(c.scope);},_=c=>{var A,x,M;let h=c.el;if((A=c.cancelLeave)==null||A.call(c,true),!r){c.state="present",(x=e.onAfterEnter)==null||x.call(e,h);return}(M=e.onBeforeEnter)==null||M.call(e,h),B(h,o.enterFrom),B(h,o.enterActive);let m=false,k=v=>{var P,V;m||(m=true,c.cancelEnter=void 0,j(h,o.enterFrom),j(h,o.enterActive),j(h,o.enterTo),v?(P=e.onEnterCancelled)==null||P.call(e,h):(c.state="present",(V=e.onAfterEnter)==null||V.call(e,h)));};c.cancelEnter=k,c.state="entering",ye(()=>{if(!m)if(j(h,o.enterFrom),B(h,o.enterTo),e.onEnter)e.onEnter(h,()=>k(false));else {let v=ae(e.duration,"enter");le(h,e.type,v,()=>k(false));}});},b=(c,h)=>{var M,v;let m=c.el;c.cancelEnter&&(c.cancelEnter(true),Ie(m)),c.state="leaving",c.savedStyles=Fo(m);let k=t.getBoundingClientRect();if(m.style.position="absolute",m.style.top=`${h.top-k.top}px`,m.style.left=`${h.left-k.left}px`,m.style.width=`${h.width}px`,m.style.height=`${h.height}px`,!r){c.savedStyles&&sn(m,c.savedStyles),S(c),L(c.scope),c.comp&&c.comp.destroy(),(M=e.onAfterLeave)==null||M.call(e,m);return}(v=e.onBeforeLeave)==null||v.call(e,m),B(m,o.leaveFrom),B(m,o.leaveActive);let A=false,x=P=>{var V,q;if(!A){if(A=true,c.cancelLeave=void 0,j(m,o.leaveFrom),j(m,o.leaveActive),j(m,o.leaveTo),P){c.savedStyles&&sn(m,c.savedStyles),c.savedStyles=void 0,(V=e.onLeaveCancelled)==null||V.call(e,m);return}c.savedStyles&&sn(m,c.savedStyles),c.savedStyles=void 0,S(c),L(c.scope),c.comp&&c.comp.destroy(),(q=e.onAfterLeave)==null||q.call(e,m);}};c.cancelLeave=x,ye(()=>{if(!A)if(j(m,o.leaveFrom),B(m,o.leaveTo),e.onLeave)e.onLeave(m,()=>x(false));else {let P=ae(e.duration,"leave");le(m,e.type,P,()=>x(false));}});},F=(c,h)=>{if(!r||c.state!=="present")return;let m=c.el,k=m.getBoundingClientRect(),A=h.left-k.left,x=h.top-k.top;if(!A&&!x)return;let M=m.style.transform,v=m.style.transitionDuration;m.style.transform=`translate(${A}px, ${x}px)`,m.style.transitionDuration="0s",B(m,i),Ie(m),m.style.transform=M,m.style.transitionDuration=v;let P=ae(e.duration,"enter");le(m,e.type,P,()=>{j(m,i);});},p=()=>{for(let c of u)c.state!=="leaving"&&(c.prevRect=c.el.getBoundingClientRect());},f=c=>{let h=new Map;for(let x of u)h.set(x.key,x);let m=[];for(let[x,M]of c.entries()){let v=s(M,x),P=h.get(v);if(P)h.delete(v),P.item=M,m.push(P);else {let V=T(M,x);V&&m.push(V);}}let k=[];for(let x of h.values())x.state!=="leaving"&&k.push(x);let A=null;for(let x=m.length-1;x>=0;x--){let M=m[x].el;(M.parentNode!==t||M.nextSibling!==A)&&t.insertBefore(M,A),A=M;}return {next:m,leaving:k}},C=(c,h)=>{if(h){let A=[];for(let[x,M]of c.entries()){let v=T(M,x);v&&(v.el.parentNode!==t&&t.appendChild(v.el),v.state="present",A.push(v));}u=A;return}p();let{next:m,leaving:k}=f(c);for(let A of m)A.state!=="present"&&_(A);for(let A of k){let x=A.prevRect;x&&b(A,x);}for(let A of m)A.state!=="present"||!A.prevRect||(F(A,A.prevRect),A.prevRect=void 0);u=m.concat(k);},N=null,E=signals.effect(()=>{let c=d();if(!y){N=c;return}C(c,false);});return J(()=>{y=!0,N&&(C(N,!0),N=null);}),K(()=>{E.stop();for(let c of u)w(c);u=[],t.parentNode&&t.parentNode.removeChild(t);}),t}Jn[Ue]=true;function Mo(e){return !!e&&!!e[Ue]}
2
+ exports.Component=ie;exports.For=Gn;exports.Fragment=Vn;exports.Portal=jn;exports.Suspense=Un;exports.Transition=Yn;exports.TransitionGroup=Jn;exports.addEvent=re;exports.addEventListener=se;exports.beginHydration=qe;exports.bindElement=lo;exports.child=Mt;exports.clearDelegatedEvents=zt;exports.consumeTeleportAnchor=We;exports.consumeTeleportBlock=ze;exports.createApp=Ut;exports.createComponent=ke;exports.createResource=No;exports.defineAsyncComponent=Ao;exports.delegateEvents=Wt;exports.endHydration=Xe;exports.getHydrationKey=En;exports.getRenderedElement=xt;exports.hydrate=Bt;exports.hydrationAnchor=_t;exports.hydrationMarker=At;exports.inject=de;exports.insert=W;exports.isComponent=$;exports.isFragment=fo;exports.isHydrating=oe;exports.isPortal=ho;exports.isSuspense=Co;exports.isTransition=Ro;exports.isTransitionGroup=Mo;exports.next=It;exports.normalizeClass=Se;exports.nthChild=Ot;exports.omitProps=co;exports.onDestroy=Ze;exports.onMount=J;exports.onUpdate=Ht;exports.patchAttr=Z;exports.patchAttrHydrate=Pt;exports.patchClass=Ce;exports.patchClassHydrate=kt;exports.patchStyle=Te;exports.patchStyleHydrate=Rt;exports.provide=en;exports.resetHydrationKey=Nt;exports.setStyle=ne;exports.template=be;
@@ -82,6 +82,7 @@ declare class Component<P extends ComponentProps = {}> {
82
82
  * wire them to the actual DOM node.
83
83
  */
84
84
  private syncSpecialProps;
85
+ private bindRootEvent;
85
86
  /**
86
87
  * Remove all listeners/ref bindings currently attached to the root element.
87
88
  */
@@ -82,6 +82,7 @@ declare class Component<P extends ComponentProps = {}> {
82
82
  * wire them to the actual DOM node.
83
83
  */
84
84
  private syncSpecialProps;
85
+ private bindRootEvent;
85
86
  /**
86
87
  * Remove all listeners/ref bindings currently attached to the root element.
87
88
  */
@@ -969,17 +969,18 @@ function triggerUpdateHooks(scope) {
969
969
 
970
970
  // src/component.ts
971
971
  function syncDescriptors(target, source, pruneMissing = false) {
972
- for (const key of Object.getOwnPropertyNames(source)) {
972
+ const sourceKeys = Reflect.ownKeys(source);
973
+ for (const key of sourceKeys) {
973
974
  Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
974
975
  }
975
976
  if (pruneMissing) {
976
- const sourceKeySet = new Set(Object.getOwnPropertyNames(source));
977
- for (const key of Object.getOwnPropertyNames(target)) {
977
+ const sourceKeySet = new Set(sourceKeys);
978
+ for (const key of Reflect.ownKeys(target)) {
978
979
  if (!sourceKeySet.has(key)) delete target[key];
979
980
  }
980
981
  }
981
982
  }
982
- function readProp(source, key) {
983
+ function readDescriptorValue(source, key) {
983
984
  const descriptor = Object.getOwnPropertyDescriptor(source, key);
984
985
  return descriptor.get ? descriptor.get.call(source) : descriptor.value;
985
986
  }
@@ -998,9 +999,9 @@ var Component = class {
998
999
  this.parentNode = void 0;
999
1000
  this.rootEventCleanups = [];
1000
1001
  this.parentScope = getActiveScope();
1001
- const container = {};
1002
- syncDescriptors(container, props);
1003
- this.reactiveProps = signals.shallowReactive(container);
1002
+ const reactiveProps = /* @__PURE__ */ Object.create(null);
1003
+ syncDescriptors(reactiveProps, props);
1004
+ this.reactiveProps = signals.shallowReactive(reactiveProps);
1004
1005
  }
1005
1006
  /**
1006
1007
  * Mount the component into `parentNode` (optionally before `beforeNode`).
@@ -1048,14 +1049,14 @@ var Component = class {
1048
1049
  */
1049
1050
  update(props) {
1050
1051
  this.props = props;
1051
- const scope = this.scope;
1052
- if (!scope || scope.isDestroyed) return;
1053
1052
  syncDescriptors(
1054
1053
  this.reactiveProps,
1055
1054
  props != null ? props : {},
1056
1055
  /* pruneMissing */
1057
1056
  true
1058
1057
  );
1058
+ const scope = this.scope;
1059
+ if (!scope || scope.isDestroyed) return;
1059
1060
  this.syncSpecialProps(props);
1060
1061
  triggerUpdateHooks(scope);
1061
1062
  }
@@ -1067,7 +1068,10 @@ var Component = class {
1067
1068
  if (!this.parentNode) return;
1068
1069
  const parent = this.parentNode;
1069
1070
  const before = this.beforeNode;
1071
+ const savedProps = /* @__PURE__ */ Object.create(null);
1072
+ syncDescriptors(savedProps, this.reactiveProps);
1070
1073
  this.destroy();
1074
+ syncDescriptors(this.reactiveProps, savedProps);
1071
1075
  this.mount(parent, before);
1072
1076
  }
1073
1077
  /**
@@ -1084,7 +1088,7 @@ var Component = class {
1084
1088
  this.renderedNodes = [];
1085
1089
  this.firstChild = void 0;
1086
1090
  this.parentNode = void 0;
1087
- for (const key of Object.getOwnPropertyNames(this.reactiveProps)) {
1091
+ for (const key of Reflect.ownKeys(this.reactiveProps)) {
1088
1092
  delete this.reactiveProps[key];
1089
1093
  }
1090
1094
  this.state = 0 /* INITIAL */;
@@ -1100,35 +1104,42 @@ var Component = class {
1100
1104
  const root = this.firstChild;
1101
1105
  if (!root || !(root instanceof Element)) return;
1102
1106
  this.releaseSpecialProps();
1103
- for (const key of Object.getOwnPropertyNames(props)) {
1107
+ for (const key of Reflect.ownKeys(props)) {
1108
+ if (!shared.isString(key)) continue;
1104
1109
  if (key === REF_KEY) {
1105
- const value = readProp(props, key);
1110
+ const value = readDescriptorValue(props, key);
1106
1111
  this.rootRefCleanup = this.bindRootRef(value, root);
1107
1112
  continue;
1108
1113
  }
1109
1114
  if (shared.isOn(key)) {
1110
- const value = readProp(props, key);
1115
+ const value = readDescriptorValue(props, key);
1111
1116
  if (!shared.isFunction(value)) continue;
1112
1117
  const eventName = key.slice(2).toLowerCase();
1113
- const target = root;
1114
- const slot = `_$${eventName}`;
1115
- const prev = target[slot];
1116
- if (shared.isFunction(prev)) {
1117
- target[slot] = value;
1118
- this.rootEventCleanups.push(() => {
1119
- if (target[slot] === value) target[slot] = prev;
1120
- });
1121
- continue;
1122
- }
1123
- const fn = value;
1124
- const handler = (event) => {
1125
- if (target.disabled) return;
1126
- fn.call(target, event);
1127
- };
1128
- this.rootEventCleanups.push(addEvent(target, eventName, handler));
1118
+ this.bindRootEvent(
1119
+ root,
1120
+ eventName,
1121
+ value
1122
+ );
1129
1123
  }
1130
1124
  }
1131
1125
  }
1126
+ bindRootEvent(target, eventName, handler) {
1127
+ const slot = `_$${eventName}`;
1128
+ const prev = target[slot];
1129
+ if (shared.isFunction(prev)) {
1130
+ target[slot] = handler;
1131
+ this.rootEventCleanups.push(() => {
1132
+ if (target[slot] === handler) target[slot] = prev;
1133
+ });
1134
+ return;
1135
+ }
1136
+ this.rootEventCleanups.push(
1137
+ addEvent(target, eventName, (event) => {
1138
+ if (target.disabled) return;
1139
+ handler.call(target, event);
1140
+ })
1141
+ );
1142
+ }
1132
1143
  /**
1133
1144
  * Remove all listeners/ref bindings currently attached to the root element.
1134
1145
  */
@@ -1350,6 +1361,7 @@ function eventHandler(e) {
1350
1361
  }
1351
1362
  var $EVENTS = /* @__PURE__ */ Symbol("_$EVENTS");
1352
1363
  function delegateEvents(eventNames, document2 = globalThis.document) {
1364
+ if (!document2) return;
1353
1365
  const docWithEvents = document2;
1354
1366
  const eventSet = docWithEvents[$EVENTS] || (docWithEvents[$EVENTS] = /* @__PURE__ */ new Set());
1355
1367
  for (const name of eventNames) {
@@ -1360,6 +1372,7 @@ function delegateEvents(eventNames, document2 = globalThis.document) {
1360
1372
  }
1361
1373
  }
1362
1374
  function clearDelegatedEvents(document2 = globalThis.document) {
1375
+ if (!document2) return;
1363
1376
  const docWithEvents = document2;
1364
1377
  const eventSet = docWithEvents[$EVENTS];
1365
1378
  if (eventSet) {