@fluixi/dom 1.0.0-alpha.84 → 1.0.0-alpha.85

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.
Files changed (38) hide show
  1. package/dist/cdn/dom-client.cjs +1 -1
  2. package/dist/cdn/dom-client.global.js +2 -2
  3. package/dist/cdn/dom-client.mjs +1 -1
  4. package/dist/cdn/dom.cjs +1 -1
  5. package/dist/cdn/dom.global.js +2 -2
  6. package/dist/cdn/dom.mjs +1 -1
  7. package/dist/index.cjs +2 -2
  8. package/dist/index.mjs +2 -2
  9. package/dist/lib/dom/hydration.cjs +1 -1
  10. package/dist/lib/dom/hydration.mjs +1 -1
  11. package/dist/lib/dom/index.cjs +2 -2
  12. package/dist/lib/dom/index.mjs +2 -2
  13. package/dist/lib/dom/integration.cjs +1 -1
  14. package/dist/lib/dom/integration.mjs +1 -1
  15. package/dist/lib/dom/island.cjs +1 -1
  16. package/dist/lib/dom/island.mjs +1 -1
  17. package/dist/lib/dom/runtime.cjs +2 -2
  18. package/dist/lib/dom/runtime.mjs +2 -2
  19. package/dist/lib/dom/server-renderer.cjs +1 -1
  20. package/dist/lib/dom/server-renderer.mjs +1 -1
  21. package/dist/lib/dom/utils.cjs +1 -1
  22. package/dist/lib/dom/utils.mjs +1 -1
  23. package/dist/lib/dom/versions.cjs +1 -1
  24. package/dist/lib/dom/versions.mjs +1 -1
  25. package/dist/lib/element/attributes.cjs +1 -1
  26. package/dist/lib/element/attributes.mjs +1 -1
  27. package/dist/lib/element/index.cjs +1 -1
  28. package/dist/lib/element/index.mjs +1 -1
  29. package/dist/lib/flow/index.cjs +1 -1
  30. package/dist/lib/flow/index.mjs +1 -1
  31. package/dist/lib/index.cjs +1 -1
  32. package/dist/lib/index.mjs +1 -1
  33. package/dist/tsconfig.lib.tsbuildinfo +1 -1
  34. package/dist/version.generated.cjs +1 -1
  35. package/dist/version.generated.d.ts +1 -1
  36. package/dist/version.generated.js +1 -1
  37. package/dist/version.generated.mjs +1 -1
  38. package/package.json +3 -3
@@ -123,7 +123,7 @@ var REACT_ELEMENT_TYPE = typeof Symbol === "function" && Symbol.for ? /* @__PURE
123
123
  var import_signal2 = require("@fluixi/reactive/signal");
124
124
 
125
125
  // src/version.generated.ts
126
- var VERSION = "1.0.0-alpha.84";
126
+ var VERSION = "1.0.0-alpha.85";
127
127
 
128
128
  // src/lib/dom/versions.ts
129
129
  var import_version = require("@fluixi/reactive/version");
@@ -1,2 +1,2 @@
1
- /*! @fluixi/dom v1.0.0-alpha.84 | (c) 2026 Ibrahima Touré and Fluixi contributors | MIT */
2
- "use strict";var FluixiDOM=(()=>{var Ke=Object.defineProperty;var mr=Object.getOwnPropertyDescriptor;var br=Object.getOwnPropertyNames;var gr=Object.prototype.hasOwnProperty;var vr=(e,t)=>{for(var n in t)Ke(e,n,{get:t[n],enumerable:!0})},wr=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of br(t))!gr.call(e,o)&&o!==n&&Ke(e,o,{get:()=>t[o],enumerable:!(r=mr(t,o))||r.enumerable});return e};var xr=e=>wr(Ke({},"__esModule",{value:!0}),e);var li={};vr(li,{Dynamic:()=>Pt,ErrorBoundary:()=>Ct,For:()=>Tt,Index:()=>At,Match:()=>Nt,Portal:()=>kt,Show:()=>Et,Switch:()=>Rt,batch:()=>V,classMap:()=>Ot,createComponent:()=>ar,createComputed:()=>Xn,createContext:()=>Ve,createEffect:()=>Fe,createElement:()=>$t,createMemo:()=>vt,createRenderEffect:()=>Yn,createResource:()=>Zn,createRoot:()=>zn,createSignal:()=>F,delegateEvents:()=>it,effect:()=>tr,hydrate:()=>St,indexArray:()=>le,insert:()=>ee,keyArray:()=>fe,mapArray:()=>ae,memo:()=>er,onCleanup:()=>me,render:()=>Re,setAttribute:()=>N,setClassName:()=>de,setProperty:()=>Q,setStyle:()=>Ne,signal:()=>Qn,spread:()=>xn,store:()=>cr,styleMap:()=>Mt,untrack:()=>ne,useContext:()=>Wn});var jt="http://www.w3.org/2000/svg";var Be=new Set(["className","value","checked","selected","innerHTML","innerText","textContent","indeterminate","htmlFor"]);function N(e,t,n,r=!1){if(n==null||n===!1){e.removeAttribute(t);return}if(n===!0){e.setAttribute(t,"");return}if(typeof n=="object"){e.setAttribute(t,JSON.stringify(n));return}e.setAttribute(t,String(n))}function Sr(e,t){Object.assign(e.style,t)}function $t(e,t={},...n){let r=document.createElement(e);return Object.entries(t).forEach(([o,s])=>{if(o==="class"||o==="className")r.className=s;else if(o==="style"&&typeof s=="object")Sr(r,s);else if(o.startsWith("on")&&typeof s=="function"){let c=o.slice(2).toLowerCase();r.addEventListener(c,s)}else N(r,o,s)}),n.forEach(o=>{typeof o=="string"?r.appendChild(document.createTextNode(o)):r.appendChild(o)}),r}var pi=typeof Symbol=="function"&&Symbol.for?Symbol.for("react.element"):60103;var Ge="1.0.0-alpha.84",Ht=Ge.split(".")[0],Lt=`__fluixi_signal_state_v${Ht}__`,Ut=`__fluixi_signal_builds_v${Ht}__`,Er=e=>{typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e)};function Wt(){return{consumer:null,untracked:!1,owner:null,queue:[],scheduled:!1,flushing:!1,batchDepth:0,hostSchedule:Er,onSuspend:null,onError:null,observer:null}}var we=globalThis;function Tr(e){let t=Wt(),n=e;for(let r of Object.keys(t))r in e||(n[r]=t[r]);return e}function Ar(){let e=we[Lt];return e?Tr(e):we[Lt]=Wt()}var l=Ar();(we[Ut]??=[]).push(Ge);function Kt(){return[...new Set(we[Ut]??[])]}function _r(e){return l.observer=e,()=>{l.observer===e&&(l.observer=null)}}var x=[],Nr;function Xe(e){let t=l.observer;t&&t.created(e.parents===void 0?{...e,parents:x,origin:e.origin??Nr}:e)}function Rr(e){return l.observer?(x.push(e),!0):!1}function Pr(){x.pop()}function kr(e){l.observer?.ran?.(e)}function Cr(e,t){l.observer?.wrote?.(e,t)}function R(e,t,n,r){let o=l.observer;!o?.bound||!x.length||o.bound(x[x.length-1],e,t,n,r)}function j(e,t,n,r){let o=l.observer;!o?.directive||!x.length||o.directive(x[x.length-1],e,t,n,r)}function Or(e){l.observer?.contextCreated?.(e)}function Mr(e,t,n){let r=l.observer;!r?.context||!x.length||r.context(x[x.length-1],e,t,n)}function Ye(e){l.observer?.disposed?.(e)}var Ir="__FLUIXI_DEVTOOLS_HOOK__",qt=globalThis[Ir];if(typeof qt?.inject=="function")try{qt.inject({observeReactiveNodes:_r,version:Ge})}catch{}function Bt(){return l.observer!=null}var Vt=0,Ft=1,se=2,zt=class{constructor(){this.observers=null,this.watchers=null,this.version=0}updateIfNecessary(){}track(){if(l.untracked)return;let e=l.consumer;e&&((this.observers??=new Set).add(e),(e.sources??=new Set).add(this))}},Dr=class extends zt{constructor(e,t){super(),this._value=e,this._equals=t?.equals===!1?()=>!1:t?.equals??Object.is}get(){return this.track(),this._value}set(e){if(!this._equals(this._value,e)){if(this._value=e,this.version++,Cr(this,l.consumer),this.observers)for(let t of[...this.observers])t.markDirty(se);ze(this)}}peek(){return this._value}},Gt=class extends zt{constructor(e,t){super(),this._threw=!1,this._initialized=!1,this.state=se,this.sources=null,this._fn=e,this._equals=t?.equals===!1?()=>!1:t?.equals??Object.is}get(){if(l.consumer===this)throw new Error("Signal.Computed cannot read itself");if(this.track(),this.updateIfNecessary(),this._threw)throw this._error;return this._value}updateIfNecessary(){if(this.state===Ft&&this.sources){for(let e of this.sources)if(e.updateIfNecessary(),this.state===se)break}(this.state===se||!this._initialized)&&this.recompute(),this.state=Vt}recompute(){if(this.sources){for(let u of this.sources)u.observers?.delete(this);this.sources.clear()}let e=l.consumer,t=l.untracked,n=Rr(this);l.consumer=this,l.untracked=!1;let r,o=!1,s;try{r=this._fn()}catch(u){o=!0,s=u,r=this._value}finally{l.consumer=e,l.untracked=t,n&&Pr()}let c=!this._initialized||this._threw!==o||(o?s!==this._error:!this._equals(this._value,r));if(this._initialized=!0,this._threw=o,this._error=s,this._value=r,kr(this),c){if(this.version++,this.observers)for(let u of[...this.observers])u.markDirty(se);ze(this)}}markDirty(e){if(this.state>=e)return;let t=this.state===Vt;if(this.state=e,t){if(this.observers)for(let n of[...this.observers])n.markDirty(Ft);ze(this)}}peek(){if(this.updateIfNecessary(),this._threw)throw this._error;return this._value}};function ze(e){if(e.watchers)for(let t of[...e.watchers])t._notify(e)}var jr=class{constructor(e){this._watched=new Set,this._pending=new Set,this._notifyFn=e}watch(...e){for(let t of e)this._watched.add(t),(t.watchers??=new Set).add(this)}unwatch(...e){for(let t of e)this._watched.delete(t),t.watchers?.delete(this),this._pending.delete(t)}getPending(){let e=[...this._pending];return this._pending.clear(),e}_notify(e){if(!this._watched.has(e)||this._pending.has(e))return;let t=this._pending.size===0;this._pending.add(e),t&&this._notifyFn()}};function $r(e){if(l.untracked)return e();l.untracked=!0;try{return e()}finally{l.untracked=!1}}function J(e){let t=xe(e);return e&&(e.owned??=[]).push(t),t}function Z(e,t=!0){ce(e,t)}function xe(e){return{cleanups:null,owned:null,parent:e,contexts:null}}function Xt(e,t){let n=Symbol(t??"context");return Or(n),{id:n,defaultValue:e,Provider:o=>{Mr(n,"provide",o.value);let s=l.owner,c=xe(s);(c.contexts=new Map).set(n,o.value),s&&(s.owned??=[]).push(c),l.owner=c;try{return o.children}finally{l.owner=s}}}}function Yt(e,t){let n=e;for(;n;){if(n.contexts&&n.contexts.has(t.id))return n.contexts.get(t.id);n=n.parent}return t.defaultValue}function Lr(e){l.onSuspend=e}function qr(e){return l.onSuspend?(l.onSuspend(e,l.owner),!0):!1}function Vr(e){l.onError=e}function K(){return l.owner}function P(e,t){let n=l.owner;l.owner=e;try{return t()}finally{l.owner=n}}function k(e){if(l.owner){if(l.owner.disposed){e();return}(l.owner.cleanups??=[]).push(e)}}function ce(e,t=!0){if(!e.disposed){if(e.owned){for(let n=e.owned.length-1;n>=0;n--)ce(e.owned[n]);e.owned=null}if(e.cleanups){for(let n=e.cleanups.length-1;n>=0;n--)e.cleanups[n]();e.cleanups=null}t&&(e.disposed=!0)}}function B(e){let t=xe(l.owner);l.owner&&(l.owner.owned??=[]).push(t);let n=l.owner;l.owner=t;try{return e(()=>ce(t))}finally{l.owner=n}}function Fr(e){l.hostSchedule=e??(t=>{Promise.resolve().then(t)})}function Hr(e){e.queued||(e.queued=!0,l.queue.push(e),!l.scheduled&&l.batchDepth===0&&(l.scheduled=!0,l.hostSchedule(Je)))}function Je(){if(l.scheduled=!1,l.flushing)return;l.flushing=!0;let e=0;try{for(;l.queue.length;){if(++e>1e5)throw new Error("[fluixi] effect flush did not settle (cycle?)");let t=l.queue;l.queue=[];for(let n of t)n.queued=!1,n.disposed||n.run()}}finally{l.flushing=!1}}function Ur(){l.batchDepth===0&&Je()}function Wr(e){l.batchDepth++;try{return e()}finally{--l.batchDepth===0&&Je()}}var Kr=class{constructor(e,t=!1){this.queued=!1,this.disposed=!1,this.owner=xe(l.owner),l.owner&&(l.owner.cleanups??=[]).push(()=>this.dispose()),this.computed=new Gt(()=>{ce(this.owner,!1),P(this.owner,()=>{let n=e();typeof n=="function"&&(this.owner.cleanups??=[]).push(n)})}),Xe({kind:"effect",node:this.computed,handle:this,internal:!t}),this.watcher=new jr(()=>Hr(this)),this.run(),this.watcher.watch(this.computed)}run(){if(!this.disposed){this.watcher.getPending();try{this.computed.get()}catch(e){if(e&&typeof e.then=="function"&&l.onSuspend){l.onSuspend(e,this.owner);return}if(l.onError&&l.onError(e,this.owner))return;throw e}}}dispose(){this.disposed||(this.disposed=!0,Ye(this.computed),this.watcher.unwatch(this.computed),ce(this.owner))}};function Jt(e,t=!1){let n=new Kr(e,t);return()=>n.dispose()}function Br(e){return!!e&&typeof e.then=="function"}Fr(()=>{});var Zt=Symbol.for("signal"),zr=Symbol.for("memo"),Gr=Symbol.for("signal-node");function $(e,t){let n=new Dr(e,{equals:t?.equals}),r=(()=>n.get()),o=(s=>{let c=typeof s=="function"?s(n.peek()):s;return n.set(c),Ur(),c});return Object.defineProperty(r,Zt,{value:!0,enumerable:!0}),Object.defineProperty(r,Gr,{value:{get value(){return n.peek()},get version(){return n.version}},enumerable:!1}),Xe({kind:"signal",node:n,handle:r,name:t?.name,set:o}),Bt()&&k(()=>Ye(n)),[r,o]}function m(e,t,n){let r=t,o=K(),s=new Gt(()=>P(o,()=>{try{return r=e(r)}catch(u){if(Br(u))return qr(u),r;throw u}}),{equals:n?.equals}),c=(()=>s.get());return Object.defineProperty(c,Zt,{value:!0,enumerable:!0}),Object.defineProperty(c,zr,{value:!0,enumerable:!0}),Xe({kind:"memo",node:s,handle:c,name:n?.name}),Bt()&&k(()=>Ye(s)),c}function Se(e,t){let n=t;return Jt(()=>{n=e(n)},!0)}function E(e,t){let n=t;return Jt(()=>{n=e(n)})}function ue(e){return Wr(e)}function _(e){return $r(e)}function ae(e,t,n){let r=[];return k(()=>{for(let o of r)o.dispose();r=[]}),m(()=>{let o=e()||[];return _(()=>{if(o.length===0){for(let i of r)i.dispose();return r=[],n?.fallback?n.fallback():[]}let s=new Map;for(let i of r)s.has(i.item)||s.set(i.item,i);let c=[],u=new Set;for(let i=0;i<o.length;i++){let a=o[i],p=s.get(a);if(p&&!u.has(p))p.setIndex(i),c.push(p),u.add(p);else{let d,y,b;B(g=>{b=g;let[X,oe]=$(i,{name:"row index"});y=oe,d=t(a,X)});let S={item:a,rendered:d,dispose:b,setIndex:y};c.push(S),u.add(S)}}for(let i of r)u.has(i)||i.dispose();return r=c,c.map(i=>i.rendered)})},void 0,{name:"mapArray"})}function fe(e,t,n,r){let o=[],s=[];return k(()=>{for(let c of s)c.dispose();o=[],s=[]}),m(()=>{let c=e()||[];return _(()=>{if(c.length===0){for(let d of s)d.dispose();return o=[],s=[],r?.fallback?r.fallback():[]}let u=new Map;for(let d=0;d<o.length;d++)u.set(o[d],s[d]);let i=[],a=[],p=new Set;for(let d=0;d<c.length;d++){let y=t(c[d]),b=u.get(y);if(b&&!p.has(y))b.setIndex(d),i.push(b);else{let S,g,X;B(oe=>{X=oe;let[U,ie]=$(d,{name:"row index"});g=ie;let be=m(Y=>{let D=(e()||[])[U()];return D??Y},c[d]);S=n(be,U)}),i.push({rendered:S,dispose:X,setIndex:g})}a.push(y),p.add(y)}for(let[d,y]of u)p.has(d)||y.dispose();return o=a,s=i,i.map(d=>d.rendered)})},void 0,{name:"keyArray"})}function le(e,t,n){let r=[];return k(()=>{for(let o of r)o.dispose();r=[]}),m(()=>{let o=e()||[];return _(()=>{if(o.length===0){for(let i of r)i.dispose();return r=[],n?.fallback?n.fallback():[]}let s=r.length,c=o.length;for(let i=s;i<c;i++){let a,p,d,y=o[i];B(b=>{d=b;let[S,g]=$(y);p=g,a=t(S,i)}),r.push({rendered:a,setItem:p,dispose:d})}for(let i=c;i<s;i++)r[i].dispose();c<s&&(r=r.slice(0,c));let u=Math.min(s,c);for(let i=0;i<u;i++)r[i].setItem(o[i]);return r.map(i=>i.rendered)})},void 0,{name:"indexArray"})}var yi=typeof window>"u"?!1:window.__FLUIXI_PROD__===!0;var Xr=Symbol.for("signal");function T(e){return typeof e=="function"&&e[Xr]===!0}var Yr=null;function Qt(e){Yr=e}var Jr=null;function en(e){Jr=e}var Zr=Xt();Lr((e,t)=>{let n=Yt(t,Zr);n&&(n.increment(),e.finally(()=>n.decrement()))});var Qr=Xt();Vr((e,t)=>{let n=Yt(t,Qr);return n?(n.setError(e),!0):!1});var Ze=Symbol.for("fluixi-proxy");var tn="1.0.0-alpha.84";var nn="1.0.0-alpha.84";var A={dom:tn,reactive:nn};function rn(e){A.core&&e.setAttribute("fluixi",A.core),e.setAttribute("fx-dom",A.dom),e.setAttribute("fx-reactive",A.reactive),typeof globalThis<"u"&&(globalThis.Fluixi=A)}function on(){let e=Kt();e.length>1&&console.warn(`[fluixi] ${e.length} builds of @fluixi/reactive are driving one reactive graph: ${e.join(", ")}. They share it on purpose, so signals still cross between them, but the oldest one decided what the graph looks like. Build the components on one release, or load them as shared-runtime bundles.`);let t=[A.core,A.dom,A.reactive].filter(n=>n!==void 0);new Set(t).size<=1||console.warn(`[fluixi] package versions disagree: core ${A.core??"(absent)"}, dom ${A.dom}, reactive ${A.reactive}. These ship as one release, so a mismatch usually means a stale lockfile or two copies resolved side by side. Reinstall, or check for duplicates with \`pnpm why @fluixi/dom\`.`)}function sn(e){return typeof e!="function"||Object.defineProperty(e,Symbol.for("fluixi-component"),{value:!0,enumerable:!0}),e}function z(e){return typeof e=="function"&&e[Symbol.for("fluixi-component")]===!0}var et=Symbol.for("fluixi.server-node"),eo=Symbol.for("fluixi.dom.server-host"),to=globalThis,Qe=to[eo]??={server:typeof document>"u",nodes:null};function tt(){return Qe.server}function cn(){if(!Qe.nodes)throw new Error("[fluixi] server render ran before @fluixi/dom/server loaded");return Qe.nodes}function Ee(e){return e!=null&&e[et]===!0?!0:typeof Node<"u"&&e instanceof Node}function un(e){return e!=null&&e[et]===!0?e.nodeType===1:typeof Element<"u"&&e instanceof Element}function an(e){return e!=null&&e[et]===!0?e.nodeType===3:typeof Text<"u"&&e instanceof Text}var h={active:!1,cursor:null,parents:[]},fn=null;function ln(e){fn=e}function dn(){return fn}function nt(e,t){return h.active&&t.parentNode===e}function rt(e){let t=h.parents.lastIndexOf(e);t!==-1&&(h.parents.length=t),h.cursor=e.nextSibling}function Te(e){if(!h.active||e==null)return;let t=Array.isArray(e)?e[e.length-1]:e;t&&typeof t.nodeType=="number"&&rt(t)}var no={};var gn="__fx_at";var ot=new Set,vn=new Set(["scroll","focus","blur","load","error","resize","mouseenter","mouseleave","pointerenter","pointerleave","gotpointercapture","lostpointercapture"]);function it(e){if(!tt())for(let t of e)ot.has(t)||vn.has(t)||(ot.add(t),document.addEventListener(t,ro))}function ro(e){let t=`$$${e.type}`,n=e.composedPath&&e.composedPath()[0]||e.target;for(;n;){let r=n[t];if(r&&!n.disabled&&(r(e),e.cancelBubble))return;n=n.host&&n.host!==n&&n.host instanceof Element?n.host:n.parentNode}}function oo(e,t,n){if(e[`$$${t}`]=n,vn.has(t)){let r=`__fx_${t}`;if(!e[r]){let o=s=>{e[`$$${t}`]?.(s)};e.addEventListener(t,o),e[r]=o}return}ot.has(t)||it([t])}function pn(e,t){delete e[`$$${t}`];let n=`__fx_${t}`,r=e[n];r&&(e.removeEventListener(t,r),delete e[n])}function L(e,t=!1){if(tt())return cn().createText(e);if(h.active&&!t){let n=dn()?.hydrateText(e);if(n)return n}return document.createTextNode(e)}var O=0,io=200;function so(e,t,n,r,o){let s=r,c=new Map;return E(()=>{R(n??t,"content",void 0,e);let u;if(z(e)&&!T(e)){if(!c.has(e)){O++;try{let i=e();c.set(e,i)}finally{O--}}for(u=c.get(e);typeof u=="function"&&T(u);)u=u()}else for(u=e();typeof u=="function"&&T(u);)u=u();{let i=0;for(;typeof u=="function"&&i++<50;)if(z(u)){if(!c.has(u)){let a=u;O++;try{let p=a();c.set(a,p)}finally{O--}}u=c.get(u)}else if(T(u))u=u();else if(u=u(),typeof u!="function"||!T(u)&&!z(u))break}O++;try{s=_e(t,u,n,s,c),o(s)}finally{O--}})}function ee(e,t,n,r){if(O>io)return console.error("[insert] Exceeded max call depth, possible infinite loop."),()=>null;n!==void 0&&!n&&(n=L("",!0),e.appendChild(n));let o=r??null,s=i=>Array.isArray(i)&&i.some(a=>typeof a=="function"),c=i=>typeof i=="function"?i:()=>i;if(typeof t!="function"&&!s(t)){O++;try{o=_e(e,t,n,o)}finally{O--}return()=>o}let u=so(c(t),e,n,o,i=>{o=i});return()=>(u?.(),o)}function _e(e,t,n,r,o){if(t==null||typeof t=="boolean")return G(e,r,n);if(typeof t=="function")for(;typeof t=="function";)t=t();if(t==null||typeof t=="boolean")return G(e,r,n);if(Ae(t)){let c=L("",!0);return Array.isArray(r)?r.length>0?(e.replaceChild(c,r[0]),G(e,r.slice(1),n)):w(e,c,n):r?e.replaceChild(c,r):w(e,c,n),t.then(u=>{c.parentNode===e&&_e(e,u,c.nextSibling,c)}).catch(u=>{console.error("Error resolving promise in insertExpression:",u)}),c}let s=typeof t;if(s==="string"||s==="number"){if(s==="number"&&(t=String(t)),Array.isArray(r)){if(r.length===0){let u=L(t);return w(e,u,n),u}if(r.length===1&&r[0].nodeType===3)return r[0].data=t,r;r=G(e,r,n)}if(r&&an(r))return r.data=t,r;let c=L(t);return r&&r.parentNode===e?e.replaceChild(c,r):nt(e,c)||w(e,c,n),c}if(Ee(t))return nt(e,t)?(rt(t),t):Array.isArray(r)?(r.length===0?w(e,t,n):r[0].parentNode===e?(e.replaceChild(t,r[0]),G(e,r.slice(1),n)):w(e,t,n),t):(r?r!==t&&(r.parentNode===e?e.replaceChild(t,r):w(e,t,n)):w(e,t,n),t);if(Array.isArray(t)){let c=[],u=Array.isArray(r)?r:r?[r]:[],i=[];C(t,c,e,n,!0,o,i);let a=co(e,u,c,n);for(let p of i){let d=ee(e,p.sig,p.marker);k(()=>{G(e,d()),p.marker.parentNode===e&&e.removeChild(p.marker)})}return a}if(s==="object"&&t!==null&&typeof t=="object"){let c=t;if("type"in c&&"props"in c){let u=c;if(typeof u.type=="function"){let i=u.type(u.props||{});return _e(e,i,n,r)}}}return G(e,r,n)}function C(e,t,n,r,o=!0,s,c){for(let u=0;u<e.length;u++){let i=e[u];if(!(i==null||typeof i=="boolean")){for(;typeof i=="function"&&!Ae(i)&&!T(i)&&!z(i)&&(i=i(),!(i==null||typeof i=="boolean")););if(!(i==null||typeof i=="boolean")){if(typeof i=="function"){let a;for(z(i)&&!T(i)?(s||(s=new Map),s.has(i)||s.set(i,i()),a=s.get(i)):a=i();typeof a=="function"&&!Ae(a)&&!T(a)&&!z(a);)s||(s=new Map),s.has(a)||s.set(a,a()),a=s.get(a);if(a==null||typeof a=="boolean")continue;if(typeof a=="function"){if(T(a)){if(c){let d=L("",!0);t.push(d),c.push({marker:d,sig:a});continue}let p=a();for(;typeof p=="function"&&T(p);)p=p();if(p==null||typeof p=="boolean")continue;Array.isArray(p)?C(p,t,n,r,o,s):C([p],t,n,r,o,s);continue}continue}Array.isArray(a)?C(a,t,n,r,o,s,c):C([a],t,n,r,o,s,c);continue}if(Ae(i)){let a=L("",!0);t.push(a),i.then(p=>{if(a.parentNode){let d=[];if(C([p],d,a.parentNode,void 0,!1,s),d.length>0){a.parentNode.replaceChild(d[0],a);for(let y=1;y<d.length;y++)a.parentNode?.insertBefore(d[y],d[y-1].nextSibling)}}}).catch(p=>console.error("Error resolving promise in array:",p));continue}if(Array.isArray(i)){C(i,t,n,r,o,s,c);continue}if(Ee(i)){t.push(i);continue}if(typeof i=="object"&&i!==null&&"type"in i&&"props"in i){let a=i;if(typeof a.type=="function"){let p=a.type(a.props||{});Array.isArray(p)?C(p,t,n,r,!1,s):C([p],t,n,r,!1,s);continue}}if(typeof i=="string"||typeof i=="number"){let a=String(i);if(a.trim()===""&&a!==" ")continue;t.push(L(a));continue}t.push(L(String(i)))}}}}function co(e,t,n,r){for(let d=0;d<n.length;d++){let y=n[d].parentNode;y!==null&&y!==e&&y.nodeType!==11&&(n=n.slice(),n[d]=n[d].cloneNode(!0))}let o=n.length,s=t.length,c=o,u=0,i=0,a=s>0?t[s-1].nextSibling??void 0:r,p=null;for(;u<s||i<c;){if(t[u]===n[i]){u++,i++;continue}for(;s>u&&c>i&&t[s-1]===n[c-1];)s--,c--;if(s===u){let d=c<o?i?n[i-1].nextSibling??void 0:n[c-i]:a;for(;i<c;)w(e,n[i++],d)}else if(c===i)for(;u<s;)(!p||!p.has(t[u]))&&t[u].parentNode===e&&e.removeChild(t[u]),u++;else if(t[u]===n[c-1]&&n[i]===t[s-1]){let d=t[--s].nextSibling;w(e,n[i++],t[u++].nextSibling),w(e,n[--c],d),t[s]=t[u-1]}else{if(!p){p=new Map;let y=i;for(;y<c;)p.set(n[y],y++)}let d=p.get(t[u]);if(d!=null)if(i<d&&d<c){let y=u,b=1;for(;++y<s&&y<c&&!(!p.has(t[y])||p.get(t[y])!==d+b);)b++;if(b>d-i){let S=t[u];for(;i<d;)w(e,n[i++],S)}else t[u].parentNode===e?e.replaceChild(n[i++],t[u++]):(w(e,n[i++],a),u++)}else u++;else t[u].parentNode===e&&e.removeChild(t[u]),u++}}return n}function G(e,t,n){if(t)if(Array.isArray(t))for(let r=0;r<t.length;r++)t[r].parentNode===e&&e.removeChild(t[r]);else t.parentNode===e&&e.removeChild(t);return null}function w(e,t,n){h.active&&t.parentNode===e||(n&&n.parentNode===e?e.insertBefore(t,n):e.appendChild(t))}function Q(e,t,n){n==null?delete e[t]:e[t]=n}function uo(e,t,n){let r=n,o;return Array.isArray(n)&&(r=n[0],o=n[1]),typeof r!="function"?()=>{}:(e.addEventListener(t,r,o),()=>e.removeEventListener(t,r,o))}function wn(e,t){if(!t||typeof t!="function")return;let n=t[gn]?.name;if(!n)return;let r=n.indexOf(":");r!==-1&&j(e,n.slice(0,r),n.slice(r+1),t)}function hn(e,t,n){let r=typeof n=="function"?_(()=>n()):n;if(!(!r||typeof r!="object"))for(let o of Object.keys(r))j(e,t,o)}function ao(e,t){let n=(r,o)=>{typeof r=="function"&&(j(e,"use",r.name||"use",o),r(e,o??(()=>{})))};if(typeof t=="function"){n(t);return}if(Array.isArray(t)){if(typeof t[0]=="function"){n(t[0],t[1]);return}for(let r of t)Array.isArray(r)?n(r[0],r[1]):n(r)}}function yn(e,t,n,r=!1){return wn(e,n),typeof n!="function"?(N(e,t,n,r),()=>{}):E(()=>{R(e,"attribute",t,n);let o=typeof n=="function"?n():n;N(e,t,o,r)})}function mn(e,t,n){return typeof n!="function"?(Q(e,t,n),()=>{}):(wn(e,n),E(()=>{R(e,"property",t,n);let r=typeof n=="function"?n():n;Q(e,t,r)}))}function fo(e,t,n){return typeof n!="function"?(N(e,t,!!n),()=>{}):E(()=>{R(e,"attribute",t,n);let r=n();N(e,t,!!r)})}function de(e,t){if(t==null){e.removeAttribute("class");return}if(typeof t=="function"){E(()=>{R(e,"attribute","class",t),de(e,t())});return}if(typeof t=="string"){e.setAttribute("class",t);return}if(Array.isArray(t)){e.setAttribute("class",t.filter(Boolean).join(" "));return}if(typeof t=="object"){let n=Object.keys(t).filter(r=>{let o=t[r];return typeof o=="function"?o():!!o}).join(" ");e.setAttribute("class",n);return}e.setAttribute("class",String(t))}function bn(e,t,n){if(!(!t||typeof t!="object"))for(let r in t){let o=t[r],s=r.split(/\s+/).filter(Boolean);if(typeof o=="function"&&n)n.push(E(()=>{let c=!!o();for(let u of s)e.classList.toggle(u,c)}));else{let c=!!(typeof o=="function"?o():o);for(let u of s)e.classList.toggle(u,c)}}}function Ne(e,t){let n=t;for(;typeof n=="function";)n=n();if(n==null){e.removeAttribute("style");return}if(typeof n=="string"){e.style.cssText=n;return}if(typeof n=="object")for(let r in n){let o=n[r];o==null?e.style[r]="":e.style[r]=o}}function xn(e){let{element:t,props:n,prevProps:r=no,isSVG:o=!1,skipChildren:s=!1}=e;if(!t||!un(t))return console.error("[spread] Error: element is not a DOM Element!"),()=>{};if(!n)return console.warn("[spread] Warning: props is undefined!"),()=>{};let c=o||t.namespaceURI===jt,u=[];for(let i in n){if(s&&i==="children")continue;let a=n[i],p=r[i];if(a===p)continue;if(i==="ref"){st(a,t);continue}if(i==="use"){ao(t,a);continue}if(i.startsWith("on:")){u.push(uo(t,i.slice(3),a));continue}if(i.startsWith("prop:")){j(t,"prop",i.slice(5),a),u.push(mn(t,i.slice(5),a));continue}if(i.startsWith("attr:")){j(t,"attr",i.slice(5),a),u.push(yn(t,i.slice(5),a,c));continue}if(i.startsWith("bool:")){j(t,"bool",i.slice(5),a),u.push(fo(t,i.slice(5),a));continue}if(i==="class"||i==="className"){typeof a=="function"?u.push(E(()=>{R(t,"attribute","class",a),de(t,a())})):de(t,a);continue}if(i==="classList"){hn(t,"class",a),typeof a=="function"?u.push(E(()=>{R(t,"attribute","class",a),bn(t,a())})):bn(t,a,u);continue}if(i==="style"){hn(t,"style",a),typeof a=="function"?u.push(E(()=>{R(t,"attribute","style",a),Ne(t,a())})):Ne(t,a);continue}if(i.startsWith("on")){let y=i.slice(2).toLowerCase();p&&pn(t,y),a&&oo(t,y,a);continue}let d=Be.has(i)||!c&&i in t;typeof a=="function"?u.push(d?mn(t,i,a):yn(t,i,a,c)):u.push(E(()=>d?Q(t,i,n[i]):N(t,i,n[i],c)))}for(let i in r)if(!(i in n))if(i.startsWith("on")){let a=i.slice(2).toLowerCase();pn(t,a)}else Be.has(i)?Q(t,i,null):t.removeAttribute(i);return()=>{u.forEach(i=>i())}}function st(e,t){if(!e)return;let n=e[gn]?.name;if(j(t,"ref",n||typeof e=="function"&&e.name||"ref",e),Ee(e)){let r=t,o=e;if(!r)return;typeof r=="function"?r(o):typeof r=="object"&&"current"in r&&(r.current=o);return}typeof e=="function"?e(t):typeof e=="object"&&"current"in e&&(e.current=t)}function Ae(e){return e!=null&&(typeof e=="object"||typeof e=="function")&&typeof e.then=="function"||e instanceof Promise}function Re(e,t,n){if(!t)throw new Error("Container element is required");let r,o,s=[];return B(c=>{ue(()=>{h.active||(t.textContent=""),rn(t),on(),ee(t,e)}),o=c}),()=>{o?.(),r?.(),s.forEach(c=>c()),t.textContent=""}}var yt="1.0.0-alpha.84";var qn=yt.split(".")[0],Sn=`__fluixi_signal_state_v${qn}__`,lo=`__fluixi_signal_builds_v${qn}__`,po=e=>{typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e)};function Vn(){return{consumer:null,untracked:!1,owner:null,queue:[],scheduled:!1,flushing:!1,batchDepth:0,hostSchedule:po,onSuspend:null,onError:null,observer:null}}var at=globalThis;function ho(e){let t=Vn(),n=e;for(let r of Object.keys(t))r in e||(n[r]=t[r]);return e}function yo(){let e=at[Sn];return e?ho(e):at[Sn]=Vn()}var f=yo();(at[lo]??=[]).push(yt);function mo(e){return f.observer=e,()=>{f.observer===e&&(f.observer=null)}}var M=[],Pe;function bo(e,t){if(!f.observer)return t();let n=Pe;Pe=e;try{return t()}finally{Pe=n}}function Le(e){let t=f.observer;t&&t.created(e.parents===void 0?{...e,parents:M,origin:e.origin??Pe}:e)}function go(e){return f.observer?(M.push(e),!0):!1}function vo(){M.pop()}function wo(e){f.observer?.ran?.(e)}function xo(e,t){f.observer?.wrote?.(e,t)}function Fn(e){let t=f.observer;!t?.props||!M.length||!e||t.props(M[M.length-1],e)}function So(e){f.observer?.contextCreated?.(e)}function ft(e,t,n){let r=f.observer;!r?.context||!M.length||r.context(M[M.length-1],e,t,n)}function En(e,t,n){f.observer?.moved?.(e,t,n)}function he(e){f.observer?.disposed?.(e)}var Eo="__FLUIXI_DEVTOOLS_HOOK__",Tn=globalThis[Eo];if(typeof Tn?.inject=="function")try{Tn.inject({observeReactiveNodes:mo,version:yt})}catch{}function qe(){return f.observer!=null}var An=0,_n=1,pe=2,Hn=class{constructor(){this.observers=null,this.watchers=null,this.version=0}updateIfNecessary(){}track(){if(f.untracked)return;let e=f.consumer;e&&((this.observers??=new Set).add(e),(e.sources??=new Set).add(this))}},To=class extends Hn{constructor(e,t){super(),this._value=e,this._equals=t?.equals===!1?()=>!1:t?.equals??Object.is}get(){return this.track(),this._value}set(e){if(!this._equals(this._value,e)){if(this._value=e,this.version++,xo(this,f.consumer),this.observers)for(let t of[...this.observers])t.markDirty(pe);lt(this)}}peek(){return this._value}},Un=class extends Hn{constructor(e,t){super(),this._threw=!1,this._initialized=!1,this.state=pe,this.sources=null,this._fn=e,this._equals=t?.equals===!1?()=>!1:t?.equals??Object.is}get(){if(f.consumer===this)throw new Error("Signal.Computed cannot read itself");if(this.track(),this.updateIfNecessary(),this._threw)throw this._error;return this._value}updateIfNecessary(){if(this.state===_n&&this.sources){for(let e of this.sources)if(e.updateIfNecessary(),this.state===pe)break}(this.state===pe||!this._initialized)&&this.recompute(),this.state=An}recompute(){if(this.sources){for(let u of this.sources)u.observers?.delete(this);this.sources.clear()}let e=f.consumer,t=f.untracked,n=go(this);f.consumer=this,f.untracked=!1;let r,o=!1,s;try{r=this._fn()}catch(u){o=!0,s=u,r=this._value}finally{f.consumer=e,f.untracked=t,n&&vo()}let c=!this._initialized||this._threw!==o||(o?s!==this._error:!this._equals(this._value,r));if(this._initialized=!0,this._threw=o,this._error=s,this._value=r,wo(this),c){if(this.version++,this.observers)for(let u of[...this.observers])u.markDirty(pe);lt(this)}}markDirty(e){if(this.state>=e)return;let t=this.state===An;if(this.state=e,t){if(this.observers)for(let n of[...this.observers])n.markDirty(_n);lt(this)}}peek(){if(this.updateIfNecessary(),this._threw)throw this._error;return this._value}};function lt(e){if(e.watchers)for(let t of[...e.watchers])t._notify(e)}var Ao=class{constructor(e){this._watched=new Set,this._pending=new Set,this._notifyFn=e}watch(...e){for(let t of e)this._watched.add(t),(t.watchers??=new Set).add(this)}unwatch(...e){for(let t of e)this._watched.delete(t),t.watchers?.delete(this),this._pending.delete(t)}getPending(){let e=[...this._pending];return this._pending.clear(),e}_notify(e){if(!this._watched.has(e)||this._pending.has(e))return;let t=this._pending.size===0;this._pending.add(e),t&&this._notifyFn()}};function _o(e){if(f.untracked)return e();f.untracked=!0;try{return e()}finally{f.untracked=!1}}function mt(e){return{cleanups:null,owned:null,parent:e,contexts:null}}function Ve(e,t){let n=Symbol(t??"context");return So(n),{id:n,defaultValue:e,Provider:o=>{ft(n,"provide",o.value);let s=f.owner,c=mt(s);(c.contexts=new Map).set(n,o.value),s&&(s.owned??=[]).push(c),f.owner=c;try{return o.children}finally{f.owner=s}}}}function Wn(e){let t=f.owner;for(;t;){if(t.contexts&&t.contexts.has(e.id)){let n=t.contexts.get(e.id);return ft(e.id,"read",n),n}t=t.parent}return ft(e.id,"read",e.defaultValue),e.defaultValue}function Kn(e,t){let n=e;for(;n;){if(n.contexts&&n.contexts.has(t.id))return n.contexts.get(t.id);n=n.parent}return t.defaultValue}function No(e){f.onSuspend=e}function Ro(e){return f.onSuspend?(f.onSuspend(e,f.owner),!0):!1}function Po(e){f.onError=e}function ko(){return f.owner}function Bn(e,t){let n=f.owner;f.owner=e;try{return t()}finally{f.owner=n}}function me(e){if(f.owner){if(f.owner.disposed){e();return}(f.owner.cleanups??=[]).push(e)}}function Oe(e,t=!0){if(!e.disposed){if(e.owned){for(let n=e.owned.length-1;n>=0;n--)Oe(e.owned[n]);e.owned=null}if(e.cleanups){for(let n=e.cleanups.length-1;n>=0;n--)e.cleanups[n]();e.cleanups=null}t&&(e.disposed=!0)}}function zn(e){let t=mt(f.owner);f.owner&&(f.owner.owned??=[]).push(t);let n=f.owner;f.owner=t;try{return e(()=>Oe(t))}finally{f.owner=n}}function Co(e){f.hostSchedule=e??(t=>{Promise.resolve().then(t)})}function Oo(e){e.queued||(e.queued=!0,f.queue.push(e),!f.scheduled&&f.batchDepth===0&&(f.scheduled=!0,f.hostSchedule(bt)))}function bt(){if(f.scheduled=!1,f.flushing)return;f.flushing=!0;let e=0;try{for(;f.queue.length;){if(++e>1e5)throw new Error("[fluixi] effect flush did not settle (cycle?)");let t=f.queue;f.queue=[];for(let n of t)n.queued=!1,n.disposed||n.run()}}finally{f.flushing=!1}}function Mo(){f.batchDepth===0&&bt()}function Io(e){f.batchDepth++;try{return e()}finally{--f.batchDepth===0&&bt()}}var Do=class{constructor(e,t=!1){this.queued=!1,this.disposed=!1,this.owner=mt(f.owner),f.owner&&(f.owner.cleanups??=[]).push(()=>this.dispose()),this.computed=new Un(()=>{Oe(this.owner,!1),Bn(this.owner,()=>{let n=e();typeof n=="function"&&(this.owner.cleanups??=[]).push(n)})}),Le({kind:"effect",node:this.computed,handle:this,internal:!t}),this.watcher=new Ao(()=>Oo(this)),this.run(),this.watcher.watch(this.computed)}run(){if(!this.disposed){this.watcher.getPending();try{this.computed.get()}catch(e){if(e&&typeof e.then=="function"&&f.onSuspend){f.onSuspend(e,this.owner);return}if(f.onError&&f.onError(e,this.owner))return;throw e}}}dispose(){this.disposed||(this.disposed=!0,he(this.computed),this.watcher.unwatch(this.computed),Oe(this.owner))}};function gt(e,t=!1){let n=new Do(e,t);return()=>n.dispose()}function jo(e){return!!e&&typeof e.then=="function"}Co(()=>{});var Gn=Symbol.for("signal"),$o=Symbol.for("memo"),Lo=Symbol.for("signal-node");function F(e,t){let n=new To(e,{equals:t?.equals}),r=(()=>n.get()),o=(s=>{let c=typeof s=="function"?s(n.peek()):s;return n.set(c),Mo(),c});return Object.defineProperty(r,Gn,{value:!0,enumerable:!0}),Object.defineProperty(r,Lo,{value:{get value(){return n.peek()},get version(){return n.version}},enumerable:!1}),Le({kind:"signal",node:n,handle:r,name:t?.name,set:o}),qe()&&me(()=>he(n)),[r,o]}function vt(e,t,n){let r=t,o=ko(),s=new Un(()=>Bn(o,()=>{try{return r=e(r)}catch(u){if(jo(u))return Ro(u),r;throw u}}),{equals:n?.equals}),c=(()=>s.get());return Object.defineProperty(c,Gn,{value:!0,enumerable:!0}),Object.defineProperty(c,$o,{value:!0,enumerable:!0}),Le({kind:"memo",node:s,handle:c,name:n?.name}),qe()&&me(()=>he(s)),c}function Fe(e,t){let n=t;return gt(()=>{n=e(n)},!0)}function Xn(e,t){let n=t;gt(()=>{n=e(n)})}function Yn(e,t){let n=t;return gt(()=>{n=e(n)})}function V(e){return Io(e)}function ne(e){return _o(e)}var Hi=typeof window>"u"?!1:window.__FLUIXI_PROD__===!0;var qo=Symbol.for("signal");function Jn(e){return typeof e=="function"&&e[qo]===!0}var Nn=null;function Vo(e){Nn&&Nn(e)}var Rn=null;function Fo(e){return Rn?Rn(e):void 0}var Pn=null;function Ho(){return Pn?Pn():void 0}var kn=null;function Uo(e,t){kn&&kn(e,t)}function Wo(e){return!!e&&typeof e.then=="function"}var ct=Symbol();function Zn(e,t,n={}){let r,o;typeof t=="function"?(r=typeof e=="function"?e:()=>e,o=t):(r=()=>!0,o=e,t&&typeof t=="object"&&(n=t));let s=n.transport===!1?void 0:Ho(),c=s!==void 0?Fo(s):void 0,u=c!==void 0,[i,a]=F(c!==void 0?c.value:n.initialValue,{equals:!1}),[p,d]=F(void 0,{equals:!1}),[y,b]=F(c!==void 0||n.initialValue!==void 0?"ready":"unresolved",{equals:!1}),[S,g]=F(void 0,{equals:!1}),[X,oe]=F(void 0,{equals:!1}),U=ct,ie=!1;Fe(()=>{let v=r();if(X(),v===!1||v===null||v===void 0){U=ct,V(()=>{b("unresolved"),g(void 0),d(void 0)});return}let D=ie;if(ie=!1,U!==ct&&v===U&&!D)return;if(U=v,u){u=!1;return}let ge=!1;me(()=>ge=!0);let It=ne(y),yr=ne(i),Dt=It==="ready"||It==="refreshing";V(()=>{b(Dt?"refreshing":"pending"),d(void 0)});try{let W=o(v,{value:yr,refetching:Dt});Wo(W)?(g(W),Vo(W),W.then(ve=>{ge||(s!==void 0&&Uo(s,ve),V(()=>{a(()=>ve),b("ready"),g(void 0)}))},ve=>{ge||V(()=>{d(ve),b("errored"),g(void 0)})})):V(()=>{a(()=>W),b("ready"),g(void 0)})}catch(W){if(ge)return;V(()=>{d(W),b("errored"),g(void 0)})}});let be=()=>{let v=y();return v==="pending"||v==="refreshing"},Y=(()=>{let v=p();if(v)throw v;if(be()){let D=S();if(D)throw D}return i()});return Object.defineProperties(Y,{state:{get:y},loading:{get:be},error:{get:p},latest:{get:i}}),Object.defineProperty(Y,Symbol.for("resource"),{value:!0,enumerable:!0}),Object.defineProperty(Y,Symbol.for("signal"),{value:!0,enumerable:!0}),[Y,{mutate:a,refetch:()=>{ie=!0,oe(void 0)}}]}var Ko=Ve();No((e,t)=>{let n=Kn(t,Ko);n&&(n.increment(),e.finally(()=>n.decrement()))});var Bo=Ve();Po((e,t)=>{let n=Kn(t,Bo);return n?(n.setError(e),!0):!1});function Qn(e,t){let[n,r]=F(e,t);return Object.assign(n,{set:r})}function er(e,t,n){return vt(e,t,n)}function tr(e,t){return Fe(e,t)}var Me=Symbol("store-raw"),Cn=Symbol("store-node"),On=Symbol("store-has"),Mn=Symbol("store-self"),In=Symbol("store-track");var ye=new WeakMap,dt=new WeakMap,re=new WeakMap,Ie=new WeakMap;function zo(e,t){if(!te(e)||!qe())return;let n=new Set,r=c=>{if(!(!te(c)||n.has(c))){n.add(c);for(let u of Object.values(c))r(u)}};r(Ie.get(t)??t);let o=new Set,s=c=>{if(!te(c))return;let u=c;if(n.has(u)||o.has(u))return;o.add(u);let i=ye.get(u);if(i){for(let a of i.keys.values())he(a);i.all&&he(i.all),ye.delete(u),re.delete(u),dt.delete(u)}for(let a of Object.values(u))s(a)};s(e)}var De=(e,t,n)=>n?`${e}[${String(t)}]`:`${e}.${String(t)}`;function nr(e,t,n){let r=t?.owner,o=r&&n!==void 0?De(r.name,n,t?.array):void 0,[s,c]=bo(r?.store,()=>$(e,o?{name:o}:void 0)),u=s;return u.$=c,u}function je(e){let t=ye.get(e);return t?t.owner||(t.owner=re.get(e)):ye.set(e,t={keys:new Map,owner:re.get(e),array:Array.isArray(e)}),t}function Dn(e,t,n){let r=e.keys.get(t);return r||e.keys.set(t,r=nr(n,e,t)),r}function Go(e,t,n,r){let o=re.get(e);if(o&&o.store===t&&o.name===n)return;let s={store:t,name:n};re.set(e,s),Ie.set(e,Ie.get(r)??r);let c=ye.get(e);if(c&&(c.owner=s,!!qe())){for(let[u,i]of c.keys)En(i,t,De(n,u,c.array));c.all&&En(c.all,t,De(n,"*",c.array))}}function jn(e){let t=je(e);(t.all||(t.all=nr(void 0,t,"*")))()}function $n(e,t){e.$(typeof t=="function"?()=>t:t)}function te(e){if(e==null||typeof e!="object")return!1;if(Array.isArray(e))return!0;let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}function ke(e){if(!te(e))return e;let t=dt.get(e);if(t)return t;let n=new Proxy(e,Xo);return dt.set(e,n),n}var Xo={get(e,t,n){if(t===Me||t===Cn)return e;if(t===Ze)return n;if(t===On)return i=>i in e;if(t==="__proxy")return!0;if(t===In||t===Mn)return jn(e),n;let r=e[t];if(typeof r=="function"&&!Object.prototype.hasOwnProperty.call(e,t))return r;let o=Object.getOwnPropertyDescriptor(e,t);if(o&&o.get)return o.get.call(n);let s=je(e),c=Dn(s,t,r),u=c();return te(u)?(s.owner&&Go(u,c,De(s.owner.name,t,s.array),e),ke(u)):u},set(){return!0},deleteProperty(e,t){return t in e&&I(e,t,void 0),!0},has(e,t){return t===Me||t===Ze||t===Cn||t===On||t===Mn||t===In?!0:(Dn(je(e),t,e[t])(),t in e)},ownKeys(e){return jn(e),Reflect.ownKeys(e)},getOwnPropertyDescriptor(e,t){return Reflect.getOwnPropertyDescriptor(e,t)}};function rr(e,t=new Set){if(e==null||typeof e!="object")return e;let n=e[Me]??e;if(t.has(n)||!te(n))return n;t.add(n);let r=!1,o=c=>{let u=rr(c,t);return u!==c&&(r=!0),u};if(Array.isArray(n)){let c=n.map(o);return r?c:n}let s={};for(let c of Object.keys(n))s[c]=o(n[c]);return r?s:n}function I(e,t,n){let r=rr(n),o=e[t];if(o===r&&(r!==void 0||t in e))return;let s=Array.isArray(e),c=s?e.length:0;r===void 0?delete e[t]:e[t]=r;let u=je(e),i=u.keys.get(t);if(i&&$n(i,r),zo(o,e),s&&e.length!==c){let a=u.keys.get("length");a&&$n(a,e.length)}u.all&&u.all.$(void 0)}function Ln(e,t){return typeof e=="function"?e(t):e}function pt(e,t){for(let n of Object.keys(t)){let r=t[n],o=e[n];r&&typeof r=="object"&&!Array.isArray(r)&&o&&typeof o=="object"&&!Array.isArray(o)?pt(o,r):I(e,n,r)}}function wt(e){let t=[],n=e.replace(/\[([^\]]*)\]/g,".$1");for(let r of n.split("."))r.length&&t.push(r);return t}function or(e,t,n){let r=t.length-1;for(let s=0;s<r;s++){let c=t[s];if(c==="*"){let i=t.slice(s+1);if(Array.isArray(e))for(let a=0;a<e.length;a++)or(e[a],i,n);return}let u=e[c];(u==null||typeof u!="object")&&(u=/^\d+$/.test(t[s+1])?[]:{},I(e,c,u)),e=u}let o=t[r];if(o==="*"){if(Array.isArray(e))for(let s=0;s<e.length;s++)I(e,s,Ln(n,e[s]));return}I(e,o,Ln(n,e[o]))}function ut(e,t,n){or(e,wt(t),n)}function Yo(e){return Array.isArray(e)&&e.length>0&&e.every(t=>Array.isArray(t)&&t.length>=2&&typeof t[0]=="string")}function Ce(e,t){for(let n=e.length-1;n>=t.length;n--)I(e,String(n),void 0);e.length!==t.length&&I(e,"length",t.length);for(let n=0;n<t.length;n++)I(e,String(n),t[n])}function Jo(e,t){let n=t[0];if(typeof n=="function"&&t.length===1){let r=n(e);r&&r!==e&&pt(e,r);return}if(Array.isArray(n)&&t.length===1){if(Yo(n)){for(let r of n)ut(e,r[0],r[1]);return}if(Array.isArray(e)){Ce(e,n);return}if(n.length===0)return;throw new TypeError("[fluixi] set() was given an array that is neither a batch of [path, value] pairs nor a replacement for an array root. Name the path you meant, as in set('items', [...]).")}if(n&&typeof n=="object"&&!Array.isArray(n)&&t.length===1){pt(e,n);return}if(Array.isArray(t[1])&&t.length>=3){ut(e,`${n}.${t[1].join(".")}`,t[2]);return}ut(e,String(n),t[1])}function ht(e){if(e==null||typeof e!="object")return e;if(Array.isArray(e))return e.map(ht);let t={};for(let n of Object.keys(e))t[n]=ht(e[n]);return t}function q(e,t){let n=e;for(let r of wt(t)){if(n==null)return;n=n[r]}return n}var ir=class{constructor(e,t={immutable:!0}){this.options=t,this.root=e,this.set=((...n)=>ue(()=>Jo(this.root,n))),e&&typeof e=="object"&&(re.set(e,{store:this,name:t.name??"store"}),Ie.set(e,e)),Le({kind:"store",node:this,handle:()=>this.root,name:t.name})}get state(){return ke(this.root)}get proxy(){return ke(this.root)}get accessor(){return(()=>ke(this.root))}unwrap(){return this.root}getNode(e){return this.root&&this.root[e]}get(e){if(e==null||e==="")return $e(this.state);let t=this.state;for(let n of wt(e)){if(t==null)return;t=t[n]}return $e(t)}select(e){return m(()=>e(this.state))}subscribe(e){return Se(()=>e(this.state))}watch(e,t){let n;return Se(()=>{let r=e(this.state);Object.is(r,n)||(t(r,n),n=r)})}reactive(e){return m(()=>this.state[e])}produce(e){this.set((t=>{let n=ht(t);return e(n),n}))}reconcile(e,t={}){this.set(e)}push(e,...t){let n=q(this.root,e);this.set(e,n.concat(t))}pop(e){let t=q(this.root,e).slice(),n=t.pop();return this.set(e,t),n}shift(e){let t=q(this.root,e).slice(),n=t.shift();return this.set(e,t),n}splice(e,t,n,...r){let o=q(this.root,e).slice(),s=o.splice(t,n,...r);return this.set(e,o),s}insert(e,t,n){let r=q(this.root,e).slice();r.splice(t,0,n),this.set(e,r)}removeAt(e,t){let n=q(this.root,e).slice(),r=n.splice(t,1);return this.set(e,n),r}replace(e,t){if(arguments.length>=2){let r=q(this.root,String(e)),o=t;if(Array.isArray(r)&&Array.isArray(o)){Ce(r,o);return}this.set(e,o);return}let n=this.root;if(Array.isArray(n)&&Array.isArray(e)){Ce(n,e);return}this.set(e)}clear(e){let t=e===void 0?this.root:q(this.root,e);if(Array.isArray(t)){Ce(t,[]);return}if(t&&typeof t=="object")for(let n of Object.keys(t))I(t,n,void 0)}toObservable(){let[e]=$(this.state);return e.toObservable()}dispose(){}},Zo=["get","select","watch","subscribe","produce","reconcile","push","pop","shift","splice","insert","removeAt","replace","clear","unwrap","toObservable"];function Qo(e,t){for(let n of Zo)e[n]=t[n].bind(t);e.$=t.reactive.bind(t)}function sr(e,t={immutable:!0}){let n=new ir(e,t);return Qo(n.set,n),[n.proxy,n.set]}function ei(e,t={}){return new ir(e,{...t,immutable:!1})}function $e(e){if(e==null||typeof e!="object")return e;let t=e[Me];return t!==void 0?t:e}function ti(e){return _(()=>$e(e))}var Wi=Object.freeze({createStore:sr,createMutableStore:ei,batch:ue,unwrap:$e,untrackStore:ti});function cr(e,t){let[n,r]=sr(e,t);return new Proxy(n,{get:(o,s)=>s==="set"?r:o[s],has:(o,s)=>s==="set"||Reflect.has(o,s)})}var ni="__fx_dom_create_component__",ur=globalThis[ni]??={fn:null};function ar(e,t){if(ur.fn)return ur.fn(e,t);t&&Fn(t);let n=typeof e=="function"?ne(()=>e(t)):e,r=n!=null&&(typeof n=="function"||typeof n=="object");if(r)try{n.$name=e?.name}catch{}return r&&!Jn(n)?sn(n):n}var ri="__FX_DATA__";var xt;function fr(){let e=globalThis.__FX_DATA__;if(e)return e;if(xt!==void 0)return xt;let t=null;if(typeof document<"u"){let n=document.getElementById(ri)?.textContent;if(n)try{t=JSON.parse(n)}catch{t=null}}return xt=t}function He(){for(;;){for(;h.cursor&&h.cursor.nodeType===3&&h.cursor.data==="";)h.cursor=h.cursor.nextSibling;if(h.cursor!=null||!h.parents.length)return;h.cursor=h.parents.pop().nextSibling}}var oi=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),Ue=typeof process<"u"&&process.env&&!1;function We(e,t){let n=t.nodeType===1?`<${t.tagName.toLowerCase()}>`:t.nodeType===3?`text ${JSON.stringify((t.nodeValue??"").slice(0,24))}`:t.nodeType===8?"comment":"node";console.warn(`[fluixi] hydration mismatch: expected ${e} but the server DOM has ${n}. Server and client rendered different markup; recreating this node on the client. Check for non-deterministic render (Date.now(), Math.random(), browser-only branches, untransported data).`)}function ii(e){He();let t=h.cursor;return t&&t.nodeType===1&&t.tagName.toLowerCase()===e.toLowerCase()?(oi.has(e.toLowerCase())?h.cursor=t.nextSibling:(h.parents.push(t),h.cursor=t.firstChild),t):(Ue&&t&&We(`<${e}>`,t),null)}function si(e){He();let t=h.cursor;return t&&t.nodeType===1&&t.tagName.toLowerCase()===e.toLowerCase()?(h.cursor=t.nextSibling,t):(Ue&&t&&We(`<${e}> (static)`,t),null)}function ci(e){if(e===""){let n=h.cursor;return n&&n.nodeType===3&&n.data!==""?(h.cursor=n.nextSibling,n.data="",n):null}He();let t=h.cursor;return t&&t.nodeType===3?(h.cursor=t.nextSibling,t.nodeValue!==e&&(t.nodeValue=e),t):(Ue&&t&&We(`text ${JSON.stringify(e.slice(0,24))}`,t),null)}function ui(e){He();let t=h.cursor;return t&&t.nodeType===8&&t.data===e?(h.cursor=t.nextSibling,t):(Ue&&t&&We(`marker <!--${e.slice(0,24)}-->`,t),null)}var lr=!1;function ai(){lr||(lr=!0,ln({hydrateElement:ii,hydrateText:ci,hydrateMarker:ui,hydrateStatic:si}))}function St(e,t,n){ai(),h.active=!0,h.cursor=t.firstChild,h.parents=[];let r=fr(),o=n?.resourceNamespace,s=0;en(()=>o?`${o}:r${s++}`:`r${s++}`),Qt(r?c=>c in r?{value:r[c]}:void 0:null);try{return Re(e,t)}finally{h.active=!1,h.cursor=null,h.parents=[]}}function dr(e){return typeof e=="function"?e:(()=>e)}function H(e){return()=>{let t=e();return typeof t=="function"?t():t}}function pr(e){return e!=null&&e!==!1}function hr(e){return!e||typeof e!="object"?!1:!!(typeof e._$litType$<"u"||typeof e._$litDirective$<"u"||Array.isArray(e.strings)&&Array.isArray(e.values))}function Et(e){let t=H(()=>e.when),n=m(t,void 0,{name:"Show.when"}),r=m(n,void 0,{name:"Show.cond"}),o=K(),s=null,c=null,u=i=>{i!==c&&(s&&Z(s),s=J(o),c=i)};return m(()=>{let i=r();return u(i?"when":"fallback"),P(s,()=>{if(i){let a=e.children;return typeof a=="function"&&!hr(a)?typeof n=="function"?_(()=>_(n)?a(n()):e.fallback):a(n):a}return e.fallback});return e.fallback??null},void 0,{name:"Show.result"})}function Tt(e){let t=H(()=>e.each),n=()=>e.fallback??null,r=(o,s)=>{let c=e.children,u=Array.isArray(c)?c.map(i=>typeof i=="function"?i(o,s):i):typeof c=="function"?c(o,s):c;return Te(u),u};return e.by?fe(t,e.by,(o,s)=>r(o,s),{fallback:n}):ae(t,(o,s)=>r(o,s),{fallback:n})}function At(e){let t=H(()=>e.each);return le(t,(n,r)=>{let o=e.children(n,r);return Te(o),o},{fallback:()=>e.fallback??null})}var _t=Symbol("match");function Nt(e){return{[_t]:!0,when:H(()=>e.when),get children(){return e.children}}}function Rt(e){let t=Array.isArray(e.children)?e.children:[e.children],n=K(),r=null,o=-1,s=c=>{c!==o&&(r&&Z(r),r=J(n),o=c)};return m(()=>{for(let c=0;c<t.length;c+=1){let i=t[c],a=0;for(;typeof i=="function"&&!i[_t]&&a++<10;)i=i();if(!i||typeof i!="object"||i[_t]!==!0)continue;let p=i.when();if(pr(p))return s(c),P(r,()=>typeof i.children=="function"?i.children(p):i.children)}return s(-2),P(r,()=>e.fallback??null)},void 0,{name:"Switch"})}function Pt(e){let t=dr(e.component),{component:n,...r}=e,o=K(),s=null,c;return m(()=>{let u=t();return u!==c&&(s&&Z(s),s=J(o),c=u),u==null?null:typeof u=="string"?{tag:u,props:r}:P(s,()=>u(r))},void 0,{name:"Dynamic"})}function kt(e){let t=()=>e.mount?typeof e.mount=="function"?e.mount():e.mount:document.body,n,r;return B(o=>{n=o,r=document.createElement("div"),r.style.display="contents",t().appendChild(r),ee(r,e.children)&&st(e.ref,r)}),k(()=>{n(),r.remove()}),null}function Ct(e){let[t,n]=$(null),r=()=>n(null);return m(()=>{let o=t();if(o!==null)return typeof e.fallback=="function"?e.fallback(o,r):e.fallback;try{return typeof e.children=="function"?e.children():e.children}catch(s){return n(s),typeof e.fallback=="function"?e.fallback(s,r):e.fallback}},void 0,{name:"ErrorBoundary"})}function Ot(e){return m(()=>{let t=typeof e=="function"?e():e,n=[];for(let[r,o]of Object.entries(t)){if(!r)continue;(typeof o=="function"?o():o)&&n.push(r)}return n.join(" ")},void 0,{name:"ClassMap"})}function fi(e){return e.startsWith("--")?e:e.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`)}function Mt(e){return m(()=>{let t=typeof e=="function"?e():e,n=[];for(let[r,o]of Object.entries(t)){if(!r)continue;let s=typeof o=="function"?o():o;s!=null&&n.push(`${fi(r)}: ${s}`)}return n.join("; ")},void 0,{name:"StyleMap"})}return xr(li);})();
1
+ /*! @fluixi/dom v1.0.0-alpha.85 | (c) 2026 Ibrahima Touré and Fluixi contributors | MIT */
2
+ "use strict";var FluixiDOM=(()=>{var Be=Object.defineProperty;var br=Object.getOwnPropertyDescriptor;var gr=Object.getOwnPropertyNames;var vr=Object.prototype.hasOwnProperty;var wr=(e,t)=>{for(var n in t)Be(e,n,{get:t[n],enumerable:!0})},xr=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of gr(t))!vr.call(e,o)&&o!==n&&Be(e,o,{get:()=>t[o],enumerable:!(r=br(t,o))||r.enumerable});return e};var Sr=e=>xr(Be({},"__esModule",{value:!0}),e);var pi={};wr(pi,{Dynamic:()=>Pt,ErrorBoundary:()=>Ot,For:()=>At,Index:()=>_t,Match:()=>kt,Portal:()=>Ct,Show:()=>Tt,Switch:()=>Rt,batch:()=>V,classMap:()=>Mt,createComponent:()=>fr,createComputed:()=>Yn,createContext:()=>Ve,createEffect:()=>Fe,createElement:()=>Lt,createMemo:()=>xt,createRenderEffect:()=>Jn,createResource:()=>Qn,createRoot:()=>Gn,createSignal:()=>F,delegateEvents:()=>st,effect:()=>nr,hydrate:()=>Et,indexArray:()=>le,insert:()=>ee,keyArray:()=>fe,mapArray:()=>ae,memo:()=>tr,onCleanup:()=>me,render:()=>ke,setAttribute:()=>k,setClassName:()=>de,setProperty:()=>Q,setStyle:()=>Ne,signal:()=>er,spread:()=>Sn,store:()=>ur,styleMap:()=>Dt,untrack:()=>ne,useContext:()=>Kn});var $t="http://www.w3.org/2000/svg";var ze=new Set(["className","value","checked","selected","innerHTML","innerText","textContent","indeterminate","htmlFor"]);function k(e,t,n,r=!1){if(n==null||n===!1){e.removeAttribute(t);return}if(n===!0){e.setAttribute(t,"");return}if(typeof n=="object"){e.setAttribute(t,JSON.stringify(n));return}e.setAttribute(t,String(n))}function Er(e,t){Object.assign(e.style,t)}function Lt(e,t={},...n){let r=document.createElement(e);return Object.entries(t).forEach(([o,c])=>{if(o==="class"||o==="className")r.className=c;else if(o==="style"&&typeof c=="object")Er(r,c);else if(o.startsWith("on")&&typeof c=="function"){let s=o.slice(2).toLowerCase();r.addEventListener(s,c)}else k(r,o,c)}),n.forEach(o=>{typeof o=="string"?r.appendChild(document.createTextNode(o)):r.appendChild(o)}),r}var yi=typeof Symbol=="function"&&Symbol.for?Symbol.for("react.element"):60103;var Xe="1.0.0-alpha.85",Ut=Xe.split(".")[0],qt=`__fluixi_signal_state_v${Ut}__`,Wt=`__fluixi_signal_builds_v${Ut}__`,Tr=e=>{typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e)};function Kt(){return{consumer:null,untracked:!1,owner:null,queue:[],scheduled:!1,flushing:!1,batchDepth:0,hostSchedule:Tr,onSuspend:null,onError:null,observer:null}}var we=globalThis;function Ar(e){let t=Kt(),n=e;for(let r of Object.keys(t))r in e||(n[r]=t[r]);return e}function _r(){let e=we[qt];return e?Ar(e):we[qt]=Kt()}var l=_r();(we[Wt]??=[]).push(Xe);function Bt(){return[...new Set(we[Wt]??[])]}function Nr(e){return l.observer=e,()=>{l.observer===e&&(l.observer=null)}}var x=[],kr;function Ye(e){let t=l.observer;t&&t.created(e.parents===void 0?{...e,parents:x,origin:e.origin??kr}:e)}function Rr(e){return l.observer?(x.push(e),!0):!1}function Pr(){x.pop()}function Cr(e){l.observer?.ran?.(e)}function Or(e,t){l.observer?.wrote?.(e,t)}function R(e,t,n,r){let o=l.observer;!o?.bound||!x.length||o.bound(x[x.length-1],e,t,n,r)}function j(e,t,n,r){let o=l.observer;!o?.directive||!x.length||o.directive(x[x.length-1],e,t,n,r)}function Mr(e){l.observer?.contextCreated?.(e)}function Dr(e,t,n){let r=l.observer;!r?.context||!x.length||r.context(x[x.length-1],e,t,n)}function Je(e){l.observer?.disposed?.(e)}var Ir="__FLUIXI_DEVTOOLS_HOOK__",Vt=globalThis[Ir];if(typeof Vt?.inject=="function")try{Vt.inject({observeReactiveNodes:Nr,version:Xe})}catch{}function zt(){return l.observer!=null}var Ft=0,Ht=1,se=2,Gt=class{constructor(){this.observers=null,this.watchers=null,this.version=0}updateIfNecessary(){}track(){if(l.untracked)return;let e=l.consumer;e&&((this.observers??=new Set).add(e),(e.sources??=new Set).add(this))}},jr=class extends Gt{constructor(e,t){super(),this._value=e,this._equals=t?.equals===!1?()=>!1:t?.equals??Object.is}get(){return this.track(),this._value}set(e){if(!this._equals(this._value,e)){if(this._value=e,this.version++,Or(this,l.consumer),this.observers)for(let t of[...this.observers])t.markDirty(se);Ge(this)}}peek(){return this._value}},Xt=class extends Gt{constructor(e,t){super(),this._threw=!1,this._initialized=!1,this.state=se,this.sources=null,this._fn=e,this._equals=t?.equals===!1?()=>!1:t?.equals??Object.is}get(){if(l.consumer===this)throw new Error("Signal.Computed cannot read itself");if(this.track(),this.updateIfNecessary(),this._threw)throw this._error;return this._value}updateIfNecessary(){if(this.state===Ht&&this.sources){for(let e of this.sources)if(e.updateIfNecessary(),this.state===se)break}(this.state===se||!this._initialized)&&this.recompute(),this.state=Ft}recompute(){if(this.sources){for(let u of this.sources)u.observers?.delete(this);this.sources.clear()}let e=l.consumer,t=l.untracked,n=Rr(this);l.consumer=this,l.untracked=!1;let r,o=!1,c;try{r=this._fn()}catch(u){o=!0,c=u,r=this._value}finally{l.consumer=e,l.untracked=t,n&&Pr()}let s=!this._initialized||this._threw!==o||(o?c!==this._error:!this._equals(this._value,r));if(this._initialized=!0,this._threw=o,this._error=c,this._value=r,Cr(this),s){if(this.version++,this.observers)for(let u of[...this.observers])u.markDirty(se);Ge(this)}}markDirty(e){if(this.state>=e)return;let t=this.state===Ft;if(this.state=e,t){if(this.observers)for(let n of[...this.observers])n.markDirty(Ht);Ge(this)}}peek(){if(this.updateIfNecessary(),this._threw)throw this._error;return this._value}};function Ge(e){if(e.watchers)for(let t of[...e.watchers])t._notify(e)}var $r=class{constructor(e){this._watched=new Set,this._pending=new Set,this._notifyFn=e}watch(...e){for(let t of e)this._watched.add(t),(t.watchers??=new Set).add(this)}unwatch(...e){for(let t of e)this._watched.delete(t),t.watchers?.delete(this),this._pending.delete(t)}getPending(){let e=[...this._pending];return this._pending.clear(),e}_notify(e){if(!this._watched.has(e)||this._pending.has(e))return;let t=this._pending.size===0;this._pending.add(e),t&&this._notifyFn()}};function Lr(e){if(l.untracked)return e();l.untracked=!0;try{return e()}finally{l.untracked=!1}}function J(e){let t=xe(e);return e&&(e.owned??=[]).push(t),t}function Z(e,t=!0){ce(e,t)}function xe(e){return{cleanups:null,owned:null,parent:e,contexts:null}}function Yt(e,t){let n=Symbol(t??"context");return Mr(n),{id:n,defaultValue:e,Provider:o=>{Dr(n,"provide",o.value);let c=l.owner,s=xe(c);(s.contexts=new Map).set(n,o.value),c&&(c.owned??=[]).push(s),l.owner=s;try{return o.children}finally{l.owner=c}}}}function Jt(e,t){let n=e;for(;n;){if(n.contexts&&n.contexts.has(t.id))return n.contexts.get(t.id);n=n.parent}return t.defaultValue}function qr(e){l.onSuspend=e}function Vr(e){return l.onSuspend?(l.onSuspend(e,l.owner),!0):!1}function Fr(e){l.onError=e}function K(){return l.owner}function P(e,t){let n=l.owner;l.owner=e;try{return t()}finally{l.owner=n}}function C(e){if(l.owner){if(l.owner.disposed){e();return}(l.owner.cleanups??=[]).push(e)}}function ce(e,t=!0){if(!e.disposed){if(e.owned){for(let n=e.owned.length-1;n>=0;n--)ce(e.owned[n]);e.owned=null}if(e.cleanups){for(let n=e.cleanups.length-1;n>=0;n--)e.cleanups[n]();e.cleanups=null}t&&(e.disposed=!0)}}function B(e){let t=xe(l.owner);l.owner&&(l.owner.owned??=[]).push(t);let n=l.owner;l.owner=t;try{return e(()=>ce(t))}finally{l.owner=n}}function Hr(e){l.hostSchedule=e??(t=>{Promise.resolve().then(t)})}function Ur(e){e.queued||(e.queued=!0,l.queue.push(e),!l.scheduled&&l.batchDepth===0&&(l.scheduled=!0,l.hostSchedule(Ze)))}function Ze(){if(l.scheduled=!1,l.flushing)return;l.flushing=!0;let e=0;try{for(;l.queue.length;){if(++e>1e5)throw new Error("[fluixi] effect flush did not settle (cycle?)");let t=l.queue;l.queue=[];for(let n of t)n.queued=!1,n.disposed||n.run()}}finally{l.flushing=!1}}function Wr(){l.batchDepth===0&&Ze()}function Kr(e){l.batchDepth++;try{return e()}finally{--l.batchDepth===0&&Ze()}}var Br=class{constructor(e,t=!1){this.queued=!1,this.disposed=!1,this.owner=xe(l.owner),l.owner&&(l.owner.cleanups??=[]).push(()=>this.dispose()),this.computed=new Xt(()=>{ce(this.owner,!1),P(this.owner,()=>{let n=e();typeof n=="function"&&(this.owner.cleanups??=[]).push(n)})}),Ye({kind:"effect",node:this.computed,handle:this,internal:!t}),this.watcher=new $r(()=>Ur(this)),this.run(),this.watcher.watch(this.computed)}run(){if(!this.disposed){this.watcher.getPending();try{this.computed.get()}catch(e){if(e&&typeof e.then=="function"&&l.onSuspend){l.onSuspend(e,this.owner);return}if(l.onError&&l.onError(e,this.owner))return;throw e}}}dispose(){this.disposed||(this.disposed=!0,Je(this.computed),this.watcher.unwatch(this.computed),ce(this.owner))}};function Zt(e,t=!1){let n=new Br(e,t);return()=>n.dispose()}function zr(e){return!!e&&typeof e.then=="function"}Hr(()=>{});var Qt=Symbol.for("signal"),Gr=Symbol.for("memo"),Xr=Symbol.for("signal-node");function $(e,t){let n=new jr(e,{equals:t?.equals}),r=(()=>n.get()),o=(c=>{let s=typeof c=="function"?c(n.peek()):c;return n.set(s),Wr(),s});return Object.defineProperty(r,Qt,{value:!0,enumerable:!0}),Object.defineProperty(r,Xr,{value:{get value(){return n.peek()},get version(){return n.version}},enumerable:!1}),Ye({kind:"signal",node:n,handle:r,name:t?.name,set:o}),zt()&&C(()=>Je(n)),[r,o]}function m(e,t,n){let r=t,o=K(),c=new Xt(()=>P(o,()=>{try{return r=e(r)}catch(u){if(zr(u))return Vr(u),r;throw u}}),{equals:n?.equals}),s=(()=>c.get());return Object.defineProperty(s,Qt,{value:!0,enumerable:!0}),Object.defineProperty(s,Gr,{value:!0,enumerable:!0}),Ye({kind:"memo",node:c,handle:s,name:n?.name}),zt()&&C(()=>Je(c)),s}function Se(e,t){let n=t;return Zt(()=>{n=e(n)},!0)}function E(e,t){let n=t;return Zt(()=>{n=e(n)})}function ue(e){return Kr(e)}function N(e){return Lr(e)}function ae(e,t,n){let r=[];return C(()=>{for(let o of r)o.dispose();r=[]}),m(()=>{let o=e()||[];return N(()=>{if(o.length===0){for(let i of r)i.dispose();return r=[],n?.fallback?n.fallback():[]}let c=new Map;for(let i of r)c.has(i.item)||c.set(i.item,i);let s=[],u=new Set;for(let i=0;i<o.length;i++){let a=o[i],p=c.get(a);if(p&&!u.has(p))p.setIndex(i),s.push(p),u.add(p);else{let d,y,b;B(g=>{b=g;let[X,oe]=$(i,{name:"row index"});y=oe,d=t(a,X)});let S={item:a,rendered:d,dispose:b,setIndex:y};s.push(S),u.add(S)}}for(let i of r)u.has(i)||i.dispose();return r=s,s.map(i=>i.rendered)})},void 0,{name:"mapArray"})}function fe(e,t,n,r){let o=[],c=[];return C(()=>{for(let s of c)s.dispose();o=[],c=[]}),m(()=>{let s=e()||[];return N(()=>{if(s.length===0){for(let d of c)d.dispose();return o=[],c=[],r?.fallback?r.fallback():[]}let u=new Map;for(let d=0;d<o.length;d++)u.set(o[d],c[d]);let i=[],a=[],p=new Set;for(let d=0;d<s.length;d++){let y=t(s[d]),b=u.get(y);if(b&&!p.has(y))b.setIndex(d),i.push(b);else{let S,g,X;B(oe=>{X=oe;let[U,ie]=$(d,{name:"row index"});g=ie;let be=m(Y=>{let I=(e()||[])[U()];return I??Y},s[d]);S=n(be,U)}),i.push({rendered:S,dispose:X,setIndex:g})}a.push(y),p.add(y)}for(let[d,y]of u)p.has(d)||y.dispose();return o=a,c=i,i.map(d=>d.rendered)})},void 0,{name:"keyArray"})}function le(e,t,n){let r=[];return C(()=>{for(let o of r)o.dispose();r=[]}),m(()=>{let o=e()||[];return N(()=>{if(o.length===0){for(let i of r)i.dispose();return r=[],n?.fallback?n.fallback():[]}let c=r.length,s=o.length;for(let i=c;i<s;i++){let a,p,d,y=o[i];B(b=>{d=b;let[S,g]=$(y);p=g,a=t(S,i)}),r.push({rendered:a,setItem:p,dispose:d})}for(let i=s;i<c;i++)r[i].dispose();s<c&&(r=r.slice(0,s));let u=Math.min(c,s);for(let i=0;i<u;i++)r[i].setItem(o[i]);return r.map(i=>i.rendered)})},void 0,{name:"indexArray"})}var bi=typeof window>"u"?!1:window.__FLUIXI_PROD__===!0;var Yr=Symbol.for("signal");function T(e){return typeof e=="function"&&e[Yr]===!0}var Jr=null;function en(e){Jr=e}var Zr=null;function tn(e){Zr=e}var Qr=Yt();qr((e,t)=>{let n=Jt(t,Qr);n&&(n.increment(),e.finally(()=>n.decrement()))});var eo=Yt();Fr((e,t)=>{let n=Jt(t,eo);return n?(n.setError(e),!0):!1});var Qe=Symbol.for("fluixi-proxy");var nn="1.0.0-alpha.85";var rn="1.0.0-alpha.85";var A={dom:nn,reactive:rn};function on(e){A.core&&e.setAttribute("fluixi",A.core),e.setAttribute("fx-dom",A.dom),e.setAttribute("fx-reactive",A.reactive),typeof globalThis<"u"&&(globalThis.Fluixi=A)}function sn(){let e=Bt();e.length>1&&console.warn(`[fluixi] ${e.length} builds of @fluixi/reactive are driving one reactive graph: ${e.join(", ")}. They share it on purpose, so signals still cross between them, but the oldest one decided what the graph looks like. Build the components on one release, or load them as shared-runtime bundles.`);let t=[A.core,A.dom,A.reactive].filter(n=>n!==void 0);new Set(t).size<=1||console.warn(`[fluixi] package versions disagree: core ${A.core??"(absent)"}, dom ${A.dom}, reactive ${A.reactive}. These ship as one release, so a mismatch usually means a stale lockfile or two copies resolved side by side. Reinstall, or check for duplicates with \`pnpm why @fluixi/dom\`.`)}function cn(e){return typeof e!="function"||Object.defineProperty(e,Symbol.for("fluixi-component"),{value:!0,enumerable:!0}),e}function z(e){return typeof e=="function"&&e[Symbol.for("fluixi-component")]===!0}var tt=Symbol.for("fluixi.server-node"),to=Symbol.for("fluixi.dom.server-host"),no=globalThis,et=no[to]??={server:typeof document>"u",nodes:null};function nt(){return et.server}function un(){if(!et.nodes)throw new Error("[fluixi] server render ran before @fluixi/dom/server loaded");return et.nodes}function Ee(e){return e!=null&&e[tt]===!0?!0:typeof Node<"u"&&e instanceof Node}function an(e){return e!=null&&e[tt]===!0?e.nodeType===1:typeof Element<"u"&&e instanceof Element}function fn(e){return e!=null&&e[tt]===!0?e.nodeType===3:typeof Text<"u"&&e instanceof Text}var h={active:!1,cursor:null,parents:[]},ln=null;function dn(e){ln=e}function pn(){return ln}function rt(e,t){return h.active&&t.parentNode===e}function ot(e){let t=h.parents.lastIndexOf(e);t!==-1&&(h.parents.length=t),h.cursor=e.nextSibling}function Te(e){if(!h.active||e==null)return;let t=Array.isArray(e)?e[e.length-1]:e;t&&typeof t.nodeType=="number"&&ot(t)}var ro={};var vn="__fx_at";var it=new Set,wn=new Set(["scroll","focus","blur","load","error","resize","mouseenter","mouseleave","pointerenter","pointerleave","gotpointercapture","lostpointercapture"]);function st(e){if(!nt())for(let t of e)it.has(t)||wn.has(t)||(it.add(t),document.addEventListener(t,oo))}function oo(e){let t=`$$${e.type}`,n=e.composedPath&&e.composedPath()[0]||e.target;for(;n;){let r=n[t];if(r&&!n.disabled&&(r(e),e.cancelBubble))return;n=n.host&&n.host!==n&&n.host instanceof Element?n.host:n.parentNode}}function io(e,t,n){if(e[`$$${t}`]=n,wn.has(t)){let r=`__fx_${t}`;if(!e[r]){let o=c=>{e[`$$${t}`]?.(c)};e.addEventListener(t,o),e[r]=o}return}it.has(t)||st([t])}function hn(e,t){delete e[`$$${t}`];let n=`__fx_${t}`,r=e[n];r&&(e.removeEventListener(t,r),delete e[n])}function L(e,t=!1){if(nt())return un().createText(e);if(h.active&&!t){let n=pn()?.hydrateText(e);if(n)return n}return document.createTextNode(e)}var M=0,so=200;function co(e,t,n,r,o){let c=r,s=new Map;return E(()=>{R(n??t,"content",void 0,e);let u;if(z(e)&&!T(e)){if(!s.has(e)){M++;try{let i=e();s.set(e,i)}finally{M--}}for(u=s.get(e);typeof u=="function"&&T(u);)u=u()}else for(u=e();typeof u=="function"&&T(u);)u=u();{let i=0;for(;typeof u=="function"&&i++<50;)if(z(u)){if(!s.has(u)){let a=u;M++;try{let p=a();s.set(a,p)}finally{M--}}u=s.get(u)}else if(T(u))u=u();else if(u=u(),typeof u!="function"||!T(u)&&!z(u))break}M++;try{c=_e(t,u,n,c,s),o(c)}finally{M--}})}function ee(e,t,n,r){if(M>so)return console.error("[insert] Exceeded max call depth, possible infinite loop."),()=>null;n!==void 0&&!n&&(n=L("",!0),e.appendChild(n));let o=r??null,c=i=>Array.isArray(i)&&i.some(a=>typeof a=="function"),s=i=>typeof i=="function"?i:()=>i;if(typeof t!="function"&&!c(t)){M++;try{o=_e(e,t,n,o)}finally{M--}return()=>o}let u=co(s(t),e,n,o,i=>{o=i});return()=>(u?.(),o)}function _e(e,t,n,r,o){if(t==null||typeof t=="boolean")return G(e,r,n);if(typeof t=="function")for(;typeof t=="function";)t=t();if(t==null||typeof t=="boolean")return G(e,r,n);if(Ae(t)){let s=L("",!0);return Array.isArray(r)?r.length>0?(e.replaceChild(s,r[0]),G(e,r.slice(1),n)):w(e,s,n):r?e.replaceChild(s,r):w(e,s,n),t.then(u=>{s.parentNode===e&&_e(e,u,s.nextSibling,s)}).catch(u=>{console.error("Error resolving promise in insertExpression:",u)}),s}let c=typeof t;if(c==="string"||c==="number"){if(c==="number"&&(t=String(t)),Array.isArray(r)){if(r.length===0){let u=L(t);return w(e,u,n),u}if(r.length===1&&r[0].nodeType===3)return r[0].data=t,r;r=G(e,r,n)}if(r&&fn(r))return r.data=t,r;let s=L(t);return r&&r.parentNode===e?e.replaceChild(s,r):rt(e,s)||w(e,s,n),s}if(Ee(t))return rt(e,t)?(ot(t),t):Array.isArray(r)?(r.length===0?w(e,t,n):r[0].parentNode===e?(e.replaceChild(t,r[0]),G(e,r.slice(1),n)):w(e,t,n),t):(r?r!==t&&(r.parentNode===e?e.replaceChild(t,r):w(e,t,n)):w(e,t,n),t);if(Array.isArray(t)){let s=[],u=Array.isArray(r)?r:r?[r]:[],i=[];O(t,s,e,n,!0,o,i);let a=uo(e,u,s,n);for(let p of i){let d=ee(e,p.sig,p.marker);C(()=>{G(e,d()),p.marker.parentNode===e&&e.removeChild(p.marker)})}return a}if(c==="object"&&t!==null&&typeof t=="object"){let s=t;if("type"in s&&"props"in s){let u=s;if(typeof u.type=="function"){let i=u.type(u.props||{});return _e(e,i,n,r)}}}return G(e,r,n)}function O(e,t,n,r,o=!0,c,s){for(let u=0;u<e.length;u++){let i=e[u];if(!(i==null||typeof i=="boolean")){for(;typeof i=="function"&&!Ae(i)&&!T(i)&&!z(i)&&(i=i(),!(i==null||typeof i=="boolean")););if(!(i==null||typeof i=="boolean")){if(typeof i=="function"){let a;for(z(i)&&!T(i)?(c||(c=new Map),c.has(i)||c.set(i,i()),a=c.get(i)):a=i();typeof a=="function"&&!Ae(a)&&!T(a)&&!z(a);)c||(c=new Map),c.has(a)||c.set(a,a()),a=c.get(a);if(a==null||typeof a=="boolean")continue;if(typeof a=="function"){if(T(a)){if(s){let d=L("",!0);t.push(d),s.push({marker:d,sig:a});continue}let p=a();for(;typeof p=="function"&&T(p);)p=p();if(p==null||typeof p=="boolean")continue;Array.isArray(p)?O(p,t,n,r,o,c):O([p],t,n,r,o,c);continue}continue}Array.isArray(a)?O(a,t,n,r,o,c,s):O([a],t,n,r,o,c,s);continue}if(Ae(i)){let a=L("",!0);t.push(a),i.then(p=>{if(a.parentNode){let d=[];if(O([p],d,a.parentNode,void 0,!1,c),d.length>0){a.parentNode.replaceChild(d[0],a);for(let y=1;y<d.length;y++)a.parentNode?.insertBefore(d[y],d[y-1].nextSibling)}}}).catch(p=>console.error("Error resolving promise in array:",p));continue}if(Array.isArray(i)){O(i,t,n,r,o,c,s);continue}if(Ee(i)){t.push(i);continue}if(typeof i=="object"&&i!==null&&"type"in i&&"props"in i){let a=i;if(typeof a.type=="function"){let p=a.type(a.props||{});Array.isArray(p)?O(p,t,n,r,!1,c):O([p],t,n,r,!1,c);continue}}if(typeof i=="string"||typeof i=="number"){let a=String(i);if(a.trim()===""&&a!==" ")continue;t.push(L(a));continue}t.push(L(String(i)))}}}}function uo(e,t,n,r){for(let d=0;d<n.length;d++){let y=n[d].parentNode;y!==null&&y!==e&&y.nodeType!==11&&(n=n.slice(),n[d]=n[d].cloneNode(!0))}let o=n.length,c=t.length,s=o,u=0,i=0,a=c>0?t[c-1].nextSibling??void 0:r,p=null;for(;u<c||i<s;){if(t[u]===n[i]){u++,i++;continue}for(;c>u&&s>i&&t[c-1]===n[s-1];)c--,s--;if(c===u){let d=s<o?i?n[i-1].nextSibling??void 0:n[s-i]:a;for(;i<s;)w(e,n[i++],d)}else if(s===i)for(;u<c;)(!p||!p.has(t[u]))&&t[u].parentNode===e&&e.removeChild(t[u]),u++;else if(t[u]===n[s-1]&&n[i]===t[c-1]){let d=t[--c].nextSibling;w(e,n[i++],t[u++].nextSibling),w(e,n[--s],d),t[c]=t[u-1]}else{if(!p){p=new Map;let y=i;for(;y<s;)p.set(n[y],y++)}let d=p.get(t[u]);if(d!=null)if(i<d&&d<s){let y=u,b=1;for(;++y<c&&y<s&&!(!p.has(t[y])||p.get(t[y])!==d+b);)b++;if(b>d-i){let S=t[u];for(;i<d;)w(e,n[i++],S)}else t[u].parentNode===e?e.replaceChild(n[i++],t[u++]):(w(e,n[i++],a),u++)}else u++;else t[u].parentNode===e&&e.removeChild(t[u]),u++}}return n}function G(e,t,n){if(t)if(Array.isArray(t))for(let r=0;r<t.length;r++)t[r].parentNode===e&&e.removeChild(t[r]);else t.parentNode===e&&e.removeChild(t);return null}function w(e,t,n){h.active&&t.parentNode===e||(n&&n.parentNode===e?e.insertBefore(t,n):e.appendChild(t))}function Q(e,t,n){n==null?delete e[t]:e[t]=n}function ao(e,t,n){let r=n,o;return Array.isArray(n)&&(r=n[0],o=n[1]),typeof r!="function"?()=>{}:(e.addEventListener(t,r,o),()=>e.removeEventListener(t,r,o))}function xn(e,t){if(!t||typeof t!="function")return;let n=t[vn]?.name;if(!n)return;let r=n.indexOf(":");r!==-1&&j(e,n.slice(0,r),n.slice(r+1),t)}function yn(e,t,n){let r=typeof n=="function"?N(()=>n()):n;if(!(!r||typeof r!="object"))for(let o of Object.keys(r))j(e,t,o)}function fo(e,t){let n=(r,o)=>{typeof r=="function"&&(j(e,"use",r.name||"use",o),r(e,o??(()=>{})))};if(typeof t=="function"){n(t);return}if(Array.isArray(t)){if(typeof t[0]=="function"){n(t[0],t[1]);return}for(let r of t)Array.isArray(r)?n(r[0],r[1]):n(r)}}function mn(e,t,n,r=!1){return xn(e,n),typeof n!="function"?(k(e,t,n,r),()=>{}):E(()=>{R(e,"attribute",t,n);let o=typeof n=="function"?n():n;k(e,t,o,r)})}function bn(e,t,n){return typeof n!="function"?(Q(e,t,n),()=>{}):(xn(e,n),E(()=>{R(e,"property",t,n);let r=typeof n=="function"?n():n;Q(e,t,r)}))}function lo(e,t,n){return typeof n!="function"?(k(e,t,!!n),()=>{}):E(()=>{R(e,"attribute",t,n);let r=n();k(e,t,!!r)})}function de(e,t){if(t==null){e.removeAttribute("class");return}if(typeof t=="function"){E(()=>{R(e,"attribute","class",t),de(e,t())});return}if(typeof t=="string"){e.setAttribute("class",t);return}if(Array.isArray(t)){e.setAttribute("class",t.filter(Boolean).join(" "));return}if(typeof t=="object"){let n=Object.keys(t).filter(r=>{let o=t[r];return typeof o=="function"?o():!!o}).join(" ");e.setAttribute("class",n);return}e.setAttribute("class",String(t))}function gn(e,t,n){if(!(!t||typeof t!="object"))for(let r in t){let o=t[r],c=r.split(/\s+/).filter(Boolean);if(typeof o=="function"&&n)n.push(E(()=>{let s=!!o();for(let u of c)e.classList.toggle(u,s)}));else{let s=!!(typeof o=="function"?o():o);for(let u of c)e.classList.toggle(u,s)}}}function Ne(e,t){let n=t;for(;typeof n=="function";)n=n();if(n==null){e.removeAttribute("style");return}if(typeof n=="string"){e.style.cssText=n;return}if(typeof n=="object")for(let r in n){let o=n[r];o==null?e.style[r]="":e.style[r]=o}}function Sn(e){let{element:t,props:n,prevProps:r=ro,isSVG:o=!1,skipChildren:c=!1}=e;if(!t||!an(t))return console.error("[spread] Error: element is not a DOM Element!"),()=>{};if(!n)return console.warn("[spread] Warning: props is undefined!"),()=>{};let s=o||t.namespaceURI===$t,u=[];for(let i in n){if(c&&i==="children")continue;let a=n[i],p=r[i];if(a===p)continue;if(i==="ref"){ct(a,t);continue}if(i==="use"){fo(t,a);continue}if(i.startsWith("on:")){u.push(ao(t,i.slice(3),a));continue}if(i.startsWith("prop:")){j(t,"prop",i.slice(5),a),u.push(bn(t,i.slice(5),a));continue}if(i.startsWith("attr:")){j(t,"attr",i.slice(5),a),u.push(mn(t,i.slice(5),a,s));continue}if(i.startsWith("bool:")){j(t,"bool",i.slice(5),a),u.push(lo(t,i.slice(5),a));continue}if(i==="class"||i==="className"){typeof a=="function"?u.push(E(()=>{R(t,"attribute","class",a),de(t,a())})):de(t,a);continue}if(i==="classList"){yn(t,"class",a),typeof a=="function"?u.push(E(()=>{R(t,"attribute","class",a),gn(t,a())})):gn(t,a,u);continue}if(i==="style"){yn(t,"style",a),typeof a=="function"?u.push(E(()=>{R(t,"attribute","style",a),Ne(t,a())})):Ne(t,a);continue}if(i.startsWith("on")){let y=i.slice(2).toLowerCase();p&&hn(t,y),a&&io(t,y,a);continue}let d=ze.has(i)||!s&&i in t;typeof a=="function"?u.push(d?bn(t,i,a):mn(t,i,a,s)):u.push(E(()=>d?Q(t,i,n[i]):k(t,i,n[i],s)))}for(let i in r)if(!(i in n))if(i.startsWith("on")){let a=i.slice(2).toLowerCase();hn(t,a)}else ze.has(i)?Q(t,i,null):t.removeAttribute(i);return()=>{u.forEach(i=>i())}}function ct(e,t){if(!e)return;let n=e[vn]?.name;if(j(t,"ref",n||typeof e=="function"&&e.name||"ref",e),Ee(e)){let r=t,o=e;if(!r)return;typeof r=="function"?r(o):typeof r=="object"&&"current"in r&&(r.current=o);return}typeof e=="function"?e(t):typeof e=="object"&&"current"in e&&(e.current=t)}function Ae(e){return e!=null&&(typeof e=="object"||typeof e=="function")&&typeof e.then=="function"||e instanceof Promise}function ke(e,t,n){if(!t)throw new Error("Container element is required");let r,o,c=[];return B(s=>{ue(()=>{h.active||(t.textContent=""),on(t),sn(),ee(t,e)}),o=s}),()=>{o?.(),r?.(),c.forEach(s=>s()),t.textContent=""}}var bt="1.0.0-alpha.85";var Vn=bt.split(".")[0],En=`__fluixi_signal_state_v${Vn}__`,po=`__fluixi_signal_builds_v${Vn}__`,ho=e=>{typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e)};function Fn(){return{consumer:null,untracked:!1,owner:null,queue:[],scheduled:!1,flushing:!1,batchDepth:0,hostSchedule:ho,onSuspend:null,onError:null,observer:null}}var at=globalThis;function yo(e){let t=Fn(),n=e;for(let r of Object.keys(t))r in e||(n[r]=t[r]);return e}function mo(){let e=at[En];return e?yo(e):at[En]=Fn()}var f=mo();(at[po]??=[]).push(bt);function bo(e){return f.observer=e,()=>{f.observer===e&&(f.observer=null)}}var D=[],Re;function go(e,t){if(!f.observer)return t();let n=Re;Re=e;try{return t()}finally{Re=n}}function Le(e){let t=f.observer;t&&t.created(e.parents===void 0?{...e,parents:D,origin:e.origin??Re}:e)}function vo(e){return f.observer?(D.push(e),!0):!1}function wo(){D.pop()}function xo(e){f.observer?.ran?.(e)}function So(e,t){f.observer?.wrote?.(e,t)}function Hn(e){let t=f.observer;!t?.props||!D.length||!e||t.props(D[D.length-1],e)}function Eo(e){f.observer?.contextCreated?.(e)}function ft(e,t,n){let r=f.observer;!r?.context||!D.length||r.context(D[D.length-1],e,t,n)}function Tn(e,t,n){f.observer?.moved?.(e,t,n)}function he(e){f.observer?.disposed?.(e)}var To="__FLUIXI_DEVTOOLS_HOOK__",An=globalThis[To];if(typeof An?.inject=="function")try{An.inject({observeReactiveNodes:bo,version:bt})}catch{}function qe(){return f.observer!=null}var _n=0,Nn=1,pe=2,Un=class{constructor(){this.observers=null,this.watchers=null,this.version=0}updateIfNecessary(){}track(){if(f.untracked)return;let e=f.consumer;e&&((this.observers??=new Set).add(e),(e.sources??=new Set).add(this))}},Ao=class extends Un{constructor(e,t){super(),this._value=e,this._equals=t?.equals===!1?()=>!1:t?.equals??Object.is}get(){return this.track(),this._value}set(e){if(!this._equals(this._value,e)){if(this._value=e,this.version++,So(this,f.consumer),this.observers)for(let t of[...this.observers])t.markDirty(pe);lt(this)}}peek(){return this._value}},Wn=class extends Un{constructor(e,t){super(),this._threw=!1,this._initialized=!1,this.state=pe,this.sources=null,this._fn=e,this._equals=t?.equals===!1?()=>!1:t?.equals??Object.is}get(){if(f.consumer===this)throw new Error("Signal.Computed cannot read itself");if(this.track(),this.updateIfNecessary(),this._threw)throw this._error;return this._value}updateIfNecessary(){if(this.state===Nn&&this.sources){for(let e of this.sources)if(e.updateIfNecessary(),this.state===pe)break}(this.state===pe||!this._initialized)&&this.recompute(),this.state=_n}recompute(){if(this.sources){for(let u of this.sources)u.observers?.delete(this);this.sources.clear()}let e=f.consumer,t=f.untracked,n=vo(this);f.consumer=this,f.untracked=!1;let r,o=!1,c;try{r=this._fn()}catch(u){o=!0,c=u,r=this._value}finally{f.consumer=e,f.untracked=t,n&&wo()}let s=!this._initialized||this._threw!==o||(o?c!==this._error:!this._equals(this._value,r));if(this._initialized=!0,this._threw=o,this._error=c,this._value=r,xo(this),s){if(this.version++,this.observers)for(let u of[...this.observers])u.markDirty(pe);lt(this)}}markDirty(e){if(this.state>=e)return;let t=this.state===_n;if(this.state=e,t){if(this.observers)for(let n of[...this.observers])n.markDirty(Nn);lt(this)}}peek(){if(this.updateIfNecessary(),this._threw)throw this._error;return this._value}};function lt(e){if(e.watchers)for(let t of[...e.watchers])t._notify(e)}var _o=class{constructor(e){this._watched=new Set,this._pending=new Set,this._notifyFn=e}watch(...e){for(let t of e)this._watched.add(t),(t.watchers??=new Set).add(this)}unwatch(...e){for(let t of e)this._watched.delete(t),t.watchers?.delete(this),this._pending.delete(t)}getPending(){let e=[...this._pending];return this._pending.clear(),e}_notify(e){if(!this._watched.has(e)||this._pending.has(e))return;let t=this._pending.size===0;this._pending.add(e),t&&this._notifyFn()}};function No(e){if(f.untracked)return e();f.untracked=!0;try{return e()}finally{f.untracked=!1}}function gt(e){return{cleanups:null,owned:null,parent:e,contexts:null}}function Ve(e,t){let n=Symbol(t??"context");return Eo(n),{id:n,defaultValue:e,Provider:o=>{ft(n,"provide",o.value);let c=f.owner,s=gt(c);(s.contexts=new Map).set(n,o.value),c&&(c.owned??=[]).push(s),f.owner=s;try{return o.children}finally{f.owner=c}}}}function Kn(e){let t=f.owner;for(;t;){if(t.contexts&&t.contexts.has(e.id)){let n=t.contexts.get(e.id);return ft(e.id,"read",n),n}t=t.parent}return ft(e.id,"read",e.defaultValue),e.defaultValue}function Bn(e,t){let n=e;for(;n;){if(n.contexts&&n.contexts.has(t.id))return n.contexts.get(t.id);n=n.parent}return t.defaultValue}function ko(e){f.onSuspend=e}function Ro(e){return f.onSuspend?(f.onSuspend(e,f.owner),!0):!1}function Po(e){f.onError=e}function Co(){return f.owner}function zn(e,t){let n=f.owner;f.owner=e;try{return t()}finally{f.owner=n}}function me(e){if(f.owner){if(f.owner.disposed){e();return}(f.owner.cleanups??=[]).push(e)}}function Oe(e,t=!0){if(!e.disposed){if(e.owned){for(let n=e.owned.length-1;n>=0;n--)Oe(e.owned[n]);e.owned=null}if(e.cleanups){for(let n=e.cleanups.length-1;n>=0;n--)e.cleanups[n]();e.cleanups=null}t&&(e.disposed=!0)}}function Gn(e){let t=gt(f.owner);f.owner&&(f.owner.owned??=[]).push(t);let n=f.owner;f.owner=t;try{return e(()=>Oe(t))}finally{f.owner=n}}function Oo(e){f.hostSchedule=e??(t=>{Promise.resolve().then(t)})}function Mo(e){e.queued||(e.queued=!0,f.queue.push(e),!f.scheduled&&f.batchDepth===0&&(f.scheduled=!0,f.hostSchedule(vt)))}function vt(){if(f.scheduled=!1,f.flushing)return;f.flushing=!0;let e=0;try{for(;f.queue.length;){if(++e>1e5)throw new Error("[fluixi] effect flush did not settle (cycle?)");let t=f.queue;f.queue=[];for(let n of t)n.queued=!1,n.disposed||n.run()}}finally{f.flushing=!1}}function Do(){f.batchDepth===0&&vt()}function Io(e){f.batchDepth++;try{return e()}finally{--f.batchDepth===0&&vt()}}var jo=class{constructor(e,t=!1){this.queued=!1,this.disposed=!1,this.owner=gt(f.owner),f.owner&&(f.owner.cleanups??=[]).push(()=>this.dispose()),this.computed=new Wn(()=>{Oe(this.owner,!1),zn(this.owner,()=>{let n=e();typeof n=="function"&&(this.owner.cleanups??=[]).push(n)})}),Le({kind:"effect",node:this.computed,handle:this,internal:!t}),this.watcher=new _o(()=>Mo(this)),this.run(),this.watcher.watch(this.computed)}run(){if(!this.disposed){this.watcher.getPending();try{this.computed.get()}catch(e){if(e&&typeof e.then=="function"&&f.onSuspend){f.onSuspend(e,this.owner);return}if(f.onError&&f.onError(e,this.owner))return;throw e}}}dispose(){this.disposed||(this.disposed=!0,he(this.computed),this.watcher.unwatch(this.computed),Oe(this.owner))}};function wt(e,t=!1){let n=new jo(e,t);return()=>n.dispose()}function $o(e){return!!e&&typeof e.then=="function"}Oo(()=>{});var Xn=Symbol.for("signal"),Lo=Symbol.for("memo"),qo=Symbol.for("signal-node");function F(e,t){let n=new Ao(e,{equals:t?.equals}),r=(()=>n.get()),o=(c=>{let s=typeof c=="function"?c(n.peek()):c;return n.set(s),Do(),s});return Object.defineProperty(r,Xn,{value:!0,enumerable:!0}),Object.defineProperty(r,qo,{value:{get value(){return n.peek()},get version(){return n.version}},enumerable:!1}),Le({kind:"signal",node:n,handle:r,name:t?.name,set:o}),qe()&&me(()=>he(n)),[r,o]}function xt(e,t,n){let r=t,o=Co(),c=new Wn(()=>zn(o,()=>{try{return r=e(r)}catch(u){if($o(u))return Ro(u),r;throw u}}),{equals:n?.equals}),s=(()=>c.get());return Object.defineProperty(s,Xn,{value:!0,enumerable:!0}),Object.defineProperty(s,Lo,{value:!0,enumerable:!0}),Le({kind:"memo",node:c,handle:s,name:n?.name}),qe()&&me(()=>he(c)),s}function Fe(e,t){let n=t;return wt(()=>{n=e(n)},!0)}function Yn(e,t){let n=t;wt(()=>{n=e(n)})}function Jn(e,t){let n=t;return wt(()=>{n=e(n)})}function V(e){return Io(e)}function ne(e){return No(e)}var Wi=typeof window>"u"?!1:window.__FLUIXI_PROD__===!0;var Vo=Symbol.for("signal");function Zn(e){return typeof e=="function"&&e[Vo]===!0}var kn=null;function Fo(e){kn&&kn(e)}var Rn=null;function Ho(e){return Rn?Rn(e):void 0}var Pn=null;function Uo(){return Pn?Pn():void 0}var Cn=null;function Wo(e,t){Cn&&Cn(e,t)}function Ko(e){return!!e&&typeof e.then=="function"}var ut=Symbol();function Qn(e,t,n={}){let r,o;typeof t=="function"?(r=typeof e=="function"?e:()=>e,o=t):(r=()=>!0,o=e,t&&typeof t=="object"&&(n=t));let c=n.transport===!1?void 0:Uo(),s=c!==void 0?Ho(c):void 0,u=s!==void 0,[i,a]=F(s!==void 0?s.value:n.initialValue,{equals:!1}),[p,d]=F(void 0,{equals:!1}),[y,b]=F(s!==void 0||n.initialValue!==void 0?"ready":"unresolved",{equals:!1}),[S,g]=F(void 0,{equals:!1}),[X,oe]=F(void 0,{equals:!1}),U=ut,ie=!1;Fe(()=>{let v=r();if(X(),v===!1||v===null||v===void 0){U=ut,V(()=>{b("unresolved"),g(void 0),d(void 0)});return}let I=ie;if(ie=!1,U!==ut&&v===U&&!I)return;if(U=v,u){u=!1;return}let ge=!1;me(()=>ge=!0);let It=ne(y),mr=ne(i),jt=It==="ready"||It==="refreshing";V(()=>{b(jt?"refreshing":"pending"),d(void 0)});try{let W=o(v,{value:mr,refetching:jt});Ko(W)?(g(W),Fo(W),W.then(ve=>{ge||(c!==void 0&&Wo(c,ve),V(()=>{a(()=>ve),b("ready"),g(void 0)}))},ve=>{ge||V(()=>{d(ve),b("errored"),g(void 0)})})):V(()=>{a(()=>W),b("ready"),g(void 0)})}catch(W){if(ge)return;V(()=>{d(W),b("errored"),g(void 0)})}});let be=()=>{let v=y();return v==="pending"||v==="refreshing"},Y=(()=>{let v=p();if(v)throw v;if(be()){let I=S();if(I)throw I}return i()});return Object.defineProperties(Y,{state:{get:y},loading:{get:be},error:{get:p},latest:{get:i}}),Object.defineProperty(Y,Symbol.for("resource"),{value:!0,enumerable:!0}),Object.defineProperty(Y,Symbol.for("signal"),{value:!0,enumerable:!0}),[Y,{mutate:a,refetch:()=>{ie=!0,oe(void 0)}}]}var Bo=Ve();ko((e,t)=>{let n=Bn(t,Bo);n&&(n.increment(),e.finally(()=>n.decrement()))});var zo=Ve();Po((e,t)=>{let n=Bn(t,zo);return n?(n.setError(e),!0):!1});function er(e,t){let[n,r]=F(e,t);return Object.assign(n,{set:r})}function tr(e,t,n){return xt(e,t,n)}function nr(e,t){return Fe(e,t)}var Me=Symbol("store-raw"),On=Symbol("store-node"),Mn=Symbol("store-has"),Dn=Symbol("store-self"),In=Symbol("store-track");var ye=new WeakMap,dt=new WeakMap,re=new WeakMap,De=new WeakMap;function Go(e,t){if(!te(e)||!qe())return;let n=new Set,r=s=>{if(!(!te(s)||n.has(s))){n.add(s);for(let u of Object.values(s))r(u)}};r(De.get(t)??t);let o=new Set,c=s=>{if(!te(s))return;let u=s;if(n.has(u)||o.has(u))return;o.add(u);let i=ye.get(u);if(i){for(let a of i.keys.values())he(a);i.all&&he(i.all),ye.delete(u),re.delete(u),dt.delete(u)}for(let a of Object.values(u))c(a)};c(e)}var Ie=(e,t,n)=>n?`${e}[${String(t)}]`:`${e}.${String(t)}`;function rr(e,t,n){let r=t?.owner,o=r&&n!==void 0?Ie(r.name,n,t?.array):void 0,[c,s]=go(r?.store,()=>$(e,o?{name:o}:void 0)),u=c;return u.$=s,u}function je(e){let t=ye.get(e);return t?t.owner||(t.owner=re.get(e)):ye.set(e,t={keys:new Map,owner:re.get(e),array:Array.isArray(e)}),t}function jn(e,t,n){let r=e.keys.get(t);return r||e.keys.set(t,r=rr(n,e,t)),r}function Xo(e,t,n,r){let o=re.get(e);if(o&&o.store===t&&o.name===n)return;let c={store:t,name:n};re.set(e,c),De.set(e,De.get(r)??r);let s=ye.get(e);if(s&&(s.owner=c,!!qe())){for(let[u,i]of s.keys)Tn(i,t,Ie(n,u,s.array));s.all&&Tn(s.all,t,Ie(n,"*",s.array))}}function $n(e){let t=je(e);(t.all||(t.all=rr(void 0,t,"*")))()}function Ln(e,t){e.$(typeof t=="function"?()=>t:t)}function te(e){if(e==null||typeof e!="object")return!1;if(Array.isArray(e))return!0;let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}function Pe(e){if(!te(e))return e;let t=dt.get(e);if(t)return t;let n=new Proxy(e,Yo);return dt.set(e,n),n}var Yo={get(e,t,n){if(t===Me||t===On)return e;if(t===Qe)return n;if(t===Mn)return i=>i in e;if(t==="__proxy")return!0;if(t===In||t===Dn)return $n(e),n;let r=e[t];if(typeof r=="function"&&!Object.prototype.hasOwnProperty.call(e,t))return r;let o=Object.getOwnPropertyDescriptor(e,t);if(o&&o.get)return o.get.call(n);let c=je(e),s=jn(c,t,r),u=s();return te(u)?(c.owner&&Xo(u,s,Ie(c.owner.name,t,c.array),e),Pe(u)):u},set(){return!0},deleteProperty(e,t){return t in e&&_(e,t,void 0),!0},has(e,t){return t===Me||t===Qe||t===On||t===Mn||t===Dn||t===In?!0:(jn(je(e),t,e[t])(),t in e)},ownKeys(e){return $n(e),Reflect.ownKeys(e)},getOwnPropertyDescriptor(e,t){return Reflect.getOwnPropertyDescriptor(e,t)}};function or(e,t=new Set){if(e==null||typeof e!="object")return e;let n=e[Me]??e;if(t.has(n)||!te(n))return n;t.add(n);let r=!1,o=s=>{let u=or(s,t);return u!==s&&(r=!0),u};if(Array.isArray(n)){let s=n.map(o);return r?s:n}let c={};for(let s of Object.keys(n))c[s]=o(n[s]);return r?c:n}function _(e,t,n){let r=or(n),o=e[t];if(o===r&&(r!==void 0||t in e))return;let c=Array.isArray(e),s=c?e.length:0;r===void 0?delete e[t]:e[t]=r;let u=je(e),i=u.keys.get(t);if(i&&Ln(i,r),Go(o,e),c&&e.length!==s){let a=u.keys.get("length");a&&Ln(a,e.length)}u.all&&u.all.$(void 0)}function pt(e,t){return typeof e=="function"?e(t):e}function ht(e,t){for(let n of Object.keys(t)){let r=t[n],o=e[n];r&&typeof r=="object"&&!Array.isArray(r)&&o&&typeof o=="object"&&!Array.isArray(o)?ht(o,r):_(e,n,r)}}function He(e){let t=[],n=e.replace(/\[([^\]]*)\]/g,".$1");for(let r of n.split("."))r.length&&t.push(r);return t}function ir(e,t,n){let r=t.length-1;for(let c=0;c<r;c++){let s=t[c];if(s==="*"){let i=t.slice(c+1);if(Array.isArray(e))for(let a=0;a<e.length;a++)ir(e[a],i,n);return}let u=e[s];(u==null||typeof u!="object")&&(u=/^\d+$/.test(t[c+1])?[]:{},_(e,s,u)),e=u}let o=t[r];if(o==="*"){if(Array.isArray(e))for(let c=0;c<e.length;c++)_(e,c,pt(n,e[c]));return}_(e,o,pt(n,e[o]))}function qn(e,t,n){ir(e,He(t),n)}function Jo(e){return Array.isArray(e)&&e.length>0&&e.every(t=>Array.isArray(t)&&t.length>=2&&typeof t[0]=="string")}function Ce(e,t){for(let n=e.length-1;n>=t.length;n--)_(e,String(n),void 0);e.length!==t.length&&_(e,"length",t.length);for(let n=0;n<t.length;n++)_(e,String(n),t[n])}function Zo(e,t){let n=t[0];if(typeof n=="function"&&t.length===1){let r=n(e);r&&r!==e&&ht(e,r);return}if(Array.isArray(n)&&t.length===1){if(Jo(n)){for(let r of n)qn(e,r[0],r[1]);return}if(Array.isArray(e)){Ce(e,n);return}if(n.length===0)return;throw new TypeError("[fluixi] set() was given an array that is neither a batch of [path, value] pairs nor a replacement for an array root. Name the path you meant, as in set('items', [...]).")}if(n&&typeof n=="object"&&!Array.isArray(n)&&t.length===1){ht(e,n);return}if(t.length>=3){yt(e,t.slice(0,-1),t[t.length-1]);return}qn(e,String(n),t[1])}function Qo(e,t){if(typeof t=="function"){if(!Array.isArray(e))return[];let n=[];for(let r=0;r<e.length;r++)t(e[r],r)&&n.push(r);return n}if(Array.isArray(t))return Array.isArray(e)?t.map(Number):t.map(String);if(t&&typeof t=="object"&&("from"in t||"to"in t||"by"in t)){if(!Array.isArray(e))return[];let n=t.by??1,r=t.from??0,o=t.to??e.length-1,c=[];for(let s=r;s<=o;s+=n)s>=0&&s<e.length&&c.push(s);return c}return t==="*"?Array.isArray(e)?e.map((n,r)=>r):Object.keys(e??{}):[t]}function yt(e,t,n){if(e==null)return;let[r,...o]=t;if(typeof r=="string"){let s=He(r);if(s.length>1){yt(e,[...s,...o],n);return}}let c=Qo(e,r);if(o.length===0){for(let s of c)_(e,s,pt(n,e[s]));return}for(let s of c){let u=e[s];if(u==null||typeof u!="object"){let i=o[0];u=typeof i=="number"||/^\d+$/.test(String(i))?[]:{},_(e,s,u)}yt(u,o,n)}}function mt(e){if(e==null||typeof e!="object")return e;if(Array.isArray(e))return e.map(mt);let t={};for(let n of Object.keys(e))t[n]=mt(e[n]);return t}function q(e,t){let n=e;for(let r of He(t)){if(n==null)return;n=n[r]}return n}var sr=class{constructor(e,t={immutable:!0}){this.options=t,this.root=e,this.set=((...n)=>ue(()=>Zo(this.root,n))),e&&typeof e=="object"&&(re.set(e,{store:this,name:t.name??"store"}),De.set(e,e)),Le({kind:"store",node:this,handle:()=>this.root,name:t.name})}get state(){return Pe(this.root)}get proxy(){return Pe(this.root)}get accessor(){return(()=>Pe(this.root))}unwrap(){return this.root}getNode(e){return this.root&&this.root[e]}get(e){if(e==null||e==="")return $e(this.state);let t=this.state;for(let n of He(e)){if(t==null)return;t=t[n]}return $e(t)}select(e){return m(()=>e(this.state))}subscribe(e){return Se(()=>e(this.state))}watch(e,t){let n;return Se(()=>{let r=e(this.state);Object.is(r,n)||(t(r,n),n=r)})}reactive(e){return m(()=>this.state[e])}produce(e){this.set((t=>{let n=mt(t);return e(n),n}))}reconcile(e,t={}){this.set(e)}push(e,...t){let n=q(this.root,e);this.set(e,n.concat(t))}pop(e){let t=q(this.root,e).slice(),n=t.pop();return this.set(e,t),n}shift(e){let t=q(this.root,e).slice(),n=t.shift();return this.set(e,t),n}splice(e,t,n,...r){let o=q(this.root,e).slice(),c=o.splice(t,n,...r);return this.set(e,o),c}insert(e,t,n){let r=q(this.root,e).slice();r.splice(t,0,n),this.set(e,r)}removeAt(e,t){let n=q(this.root,e).slice(),r=n.splice(t,1);return this.set(e,n),r}replace(e,t){if(arguments.length>=2){let r=q(this.root,String(e)),o=t;if(Array.isArray(r)&&Array.isArray(o)){Ce(r,o);return}this.set(e,o);return}let n=this.root;if(Array.isArray(n)&&Array.isArray(e)){Ce(n,e);return}this.set(e)}clear(e){let t=e===void 0?this.root:q(this.root,e);if(Array.isArray(t)){Ce(t,[]);return}if(t&&typeof t=="object")for(let n of Object.keys(t))_(t,n,void 0)}toObservable(){let[e]=$(this.state);return e.toObservable()}dispose(){}},ei=["get","select","watch","subscribe","produce","reconcile","push","pop","shift","splice","insert","removeAt","replace","clear","unwrap","toObservable"];function ti(e,t){for(let n of ei)e[n]=t[n].bind(t);e.$=t.reactive.bind(t)}function cr(e,t={immutable:!0}){let n=new sr(e,t);return ti(n.set,n),[n.proxy,n.set]}function ni(e,t={}){return new sr(e,{...t,immutable:!1})}function $e(e){if(e==null||typeof e!="object")return e;let t=e[Me];return t!==void 0?t:e}function ri(e){return N(()=>$e(e))}var Bi=Object.freeze({createStore:cr,createMutableStore:ni,batch:ue,unwrap:$e,untrackStore:ri});function ur(e,t){let[n,r]=cr(e,t);return new Proxy(n,{get:(o,c)=>c==="set"?r:o[c],has:(o,c)=>c==="set"||Reflect.has(o,c)})}var oi="__fx_dom_create_component__",ar=globalThis[oi]??={fn:null};function fr(e,t){if(ar.fn)return ar.fn(e,t);t&&Hn(t);let n=typeof e=="function"?ne(()=>e(t)):e,r=n!=null&&(typeof n=="function"||typeof n=="object");if(r)try{n.$name=e?.name}catch{}return r&&!Zn(n)?cn(n):n}var ii="__FX_DATA__";var St;function lr(){let e=globalThis.__FX_DATA__;if(e)return e;if(St!==void 0)return St;let t=null;if(typeof document<"u"){let n=document.getElementById(ii)?.textContent;if(n)try{t=JSON.parse(n)}catch{t=null}}return St=t}function Ue(){for(;;){for(;h.cursor&&h.cursor.nodeType===3&&h.cursor.data==="";)h.cursor=h.cursor.nextSibling;if(h.cursor!=null||!h.parents.length)return;h.cursor=h.parents.pop().nextSibling}}var si=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),We=typeof process<"u"&&process.env&&!1;function Ke(e,t){let n=t.nodeType===1?`<${t.tagName.toLowerCase()}>`:t.nodeType===3?`text ${JSON.stringify((t.nodeValue??"").slice(0,24))}`:t.nodeType===8?"comment":"node";console.warn(`[fluixi] hydration mismatch: expected ${e} but the server DOM has ${n}. Server and client rendered different markup; recreating this node on the client. Check for non-deterministic render (Date.now(), Math.random(), browser-only branches, untransported data).`)}function ci(e){Ue();let t=h.cursor;return t&&t.nodeType===1&&t.tagName.toLowerCase()===e.toLowerCase()?(si.has(e.toLowerCase())?h.cursor=t.nextSibling:(h.parents.push(t),h.cursor=t.firstChild),t):(We&&t&&Ke(`<${e}>`,t),null)}function ui(e){Ue();let t=h.cursor;return t&&t.nodeType===1&&t.tagName.toLowerCase()===e.toLowerCase()?(h.cursor=t.nextSibling,t):(We&&t&&Ke(`<${e}> (static)`,t),null)}function ai(e){if(e===""){let n=h.cursor;return n&&n.nodeType===3&&n.data!==""?(h.cursor=n.nextSibling,n.data="",n):null}Ue();let t=h.cursor;return t&&t.nodeType===3?(h.cursor=t.nextSibling,t.nodeValue!==e&&(t.nodeValue=e),t):(We&&t&&Ke(`text ${JSON.stringify(e.slice(0,24))}`,t),null)}function fi(e){Ue();let t=h.cursor;return t&&t.nodeType===8&&t.data===e?(h.cursor=t.nextSibling,t):(We&&t&&Ke(`marker <!--${e.slice(0,24)}-->`,t),null)}var dr=!1;function li(){dr||(dr=!0,dn({hydrateElement:ci,hydrateText:ai,hydrateMarker:fi,hydrateStatic:ui}))}function Et(e,t,n){li(),h.active=!0,h.cursor=t.firstChild,h.parents=[];let r=lr(),o=n?.resourceNamespace,c=0;tn(()=>o?`${o}:r${c++}`:`r${c++}`),en(r?s=>s in r?{value:r[s]}:void 0:null);try{return ke(e,t)}finally{h.active=!1,h.cursor=null,h.parents=[]}}function pr(e){return typeof e=="function"?e:(()=>e)}function H(e){return()=>{let t=e();return typeof t=="function"?t():t}}function hr(e){return e!=null&&e!==!1}function yr(e){return!e||typeof e!="object"?!1:!!(typeof e._$litType$<"u"||typeof e._$litDirective$<"u"||Array.isArray(e.strings)&&Array.isArray(e.values))}function Tt(e){let t=H(()=>e.when),n=m(t,void 0,{name:"Show.when"}),r=m(n,void 0,{name:"Show.cond"}),o=K(),c=null,s=null,u=i=>{i!==s&&(c&&Z(c),c=J(o),s=i)};return m(()=>{let i=r();return u(i?"when":"fallback"),P(c,()=>{if(i){let a=e.children;return typeof a=="function"&&!yr(a)?typeof n=="function"?N(()=>N(n)?a(n()):e.fallback):a(n):a}return e.fallback});return e.fallback??null},void 0,{name:"Show.result"})}function At(e){let t=H(()=>e.each),n=()=>e.fallback??null,r=(o,c)=>{let s=e.children,u=Array.isArray(s)?s.map(i=>typeof i=="function"?i(o,c):i):typeof s=="function"?s(o,c):s;return Te(u),u};return e.by?fe(t,e.by,(o,c)=>r(o,c),{fallback:n}):ae(t,(o,c)=>r(o,c),{fallback:n})}function _t(e){let t=H(()=>e.each);return le(t,(n,r)=>{let o=e.children(n,r);return Te(o),o},{fallback:()=>e.fallback??null})}var Nt=Symbol("match");function kt(e){return{[Nt]:!0,when:H(()=>e.when),get children(){return e.children}}}function Rt(e){let t=Array.isArray(e.children)?e.children:[e.children],n=K(),r=null,o=-1,c=s=>{s!==o&&(r&&Z(r),r=J(n),o=s)};return m(()=>{for(let s=0;s<t.length;s+=1){let i=t[s],a=0;for(;typeof i=="function"&&!i[Nt]&&a++<10;)i=i();if(!i||typeof i!="object"||i[Nt]!==!0)continue;let p=i.when();if(hr(p))return c(s),P(r,()=>typeof i.children=="function"?i.children(p):i.children)}return c(-2),P(r,()=>e.fallback??null)},void 0,{name:"Switch"})}function Pt(e){let t=pr(e.component),{component:n,...r}=e,o=K(),c=null,s;return m(()=>{let u=t();return u!==s&&(c&&Z(c),c=J(o),s=u),u==null?null:typeof u=="string"?{tag:u,props:r}:P(c,()=>u(r))},void 0,{name:"Dynamic"})}function Ct(e){let t=()=>e.mount?typeof e.mount=="function"?e.mount():e.mount:document.body,n,r;return B(o=>{n=o,r=document.createElement("div"),r.style.display="contents",t().appendChild(r),ee(r,e.children)&&ct(e.ref,r)}),C(()=>{n(),r.remove()}),null}function Ot(e){let[t,n]=$(null),r=()=>n(null);return m(()=>{let o=t();if(o!==null)return typeof e.fallback=="function"?e.fallback(o,r):e.fallback;try{return typeof e.children=="function"?e.children():e.children}catch(c){return n(c),typeof e.fallback=="function"?e.fallback(c,r):e.fallback}},void 0,{name:"ErrorBoundary"})}function Mt(e){return m(()=>{let t=typeof e=="function"?e():e,n=[];for(let[r,o]of Object.entries(t)){if(!r)continue;(typeof o=="function"?o():o)&&n.push(r)}return n.join(" ")},void 0,{name:"ClassMap"})}function di(e){return e.startsWith("--")?e:e.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`)}function Dt(e){return m(()=>{let t=typeof e=="function"?e():e,n=[];for(let[r,o]of Object.entries(t)){if(!r)continue;let c=typeof o=="function"?o():o;c!=null&&n.push(`${di(r)}: ${c}`)}return n.join("; ")},void 0,{name:"StyleMap"})}return Sr(pi);})();
@@ -60,7 +60,7 @@ import {
60
60
  } from "@fluixi/reactive/signal";
61
61
 
62
62
  // src/version.generated.ts
63
- var VERSION = "1.0.0-alpha.84";
63
+ var VERSION = "1.0.0-alpha.85";
64
64
 
65
65
  // src/lib/dom/versions.ts
66
66
  import { VERSION as REACTIVE } from "@fluixi/reactive/version";
package/dist/cdn/dom.cjs CHANGED
@@ -512,7 +512,7 @@ function getGlobal(key, value, _Key = "Fluixi") {
512
512
  var import_signal2 = require("@fluixi/reactive/signal");
513
513
 
514
514
  // src/version.generated.ts
515
- var VERSION = "1.0.0-alpha.84";
515
+ var VERSION = "1.0.0-alpha.85";
516
516
 
517
517
  // src/lib/dom/versions.ts
518
518
  var import_version = require("@fluixi/reactive/version");