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

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 (183) hide show
  1. package/dist/cdn/dom-client.cjs +1427 -1
  2. package/dist/cdn/dom-client.d.ts +2 -2
  3. package/dist/cdn/dom-client.global.js +2 -1
  4. package/dist/cdn/dom-client.js +3 -3
  5. package/dist/cdn/dom-client.mjs +1430 -1
  6. package/dist/cdn/dom.cjs +3127 -1
  7. package/dist/cdn/dom.d.ts +2 -2
  8. package/dist/cdn/dom.global.js +2 -1
  9. package/dist/cdn/dom.js +4 -4
  10. package/dist/cdn/dom.mjs +3133 -1
  11. package/dist/index.cjs +3155 -1
  12. package/dist/index.js +2 -2
  13. package/dist/index.mjs +3149 -1
  14. package/dist/lib/component/index.cjs +128 -1
  15. package/dist/lib/component/index.mjs +105 -1
  16. package/dist/lib/component/modifiers.cjs +126 -1
  17. package/dist/lib/component/modifiers.d.ts +12 -0
  18. package/dist/lib/component/modifiers.d.ts.map +1 -1
  19. package/dist/lib/component/modifiers.js +12 -84
  20. package/dist/lib/component/modifiers.mjs +105 -1
  21. package/dist/lib/dom/delegate.cjs +60 -1
  22. package/dist/lib/dom/delegate.js +1 -1
  23. package/dist/lib/dom/delegate.mjs +39 -1
  24. package/dist/lib/dom/dynamic-element.cjs +949 -1
  25. package/dist/lib/dom/dynamic-element.d.ts +3 -3
  26. package/dist/lib/dom/dynamic-element.js +3 -3
  27. package/dist/lib/dom/dynamic-element.mjs +928 -1
  28. package/dist/lib/dom/hydration-state.cjs +93 -1
  29. package/dist/lib/dom/hydration-state.d.ts +1 -1
  30. package/dist/lib/dom/hydration-state.js +1 -1
  31. package/dist/lib/dom/hydration-state.mjs +72 -1
  32. package/dist/lib/dom/hydration.cjs +685 -1
  33. package/dist/lib/dom/hydration.js +8 -8
  34. package/dist/lib/dom/hydration.mjs +664 -1
  35. package/dist/lib/dom/index.cjs +2040 -1
  36. package/dist/lib/dom/index.js +1 -1
  37. package/dist/lib/dom/index.mjs +2020 -1
  38. package/dist/lib/dom/integration.cjs +71 -1
  39. package/dist/lib/dom/integration.d.ts.map +1 -1
  40. package/dist/lib/dom/integration.js +15 -6
  41. package/dist/lib/dom/integration.mjs +51 -1
  42. package/dist/lib/dom/island.cjs +790 -1
  43. package/dist/lib/dom/island.d.ts +1 -1
  44. package/dist/lib/dom/island.js +12 -12
  45. package/dist/lib/dom/island.mjs +769 -1
  46. package/dist/lib/dom/runtime.cjs +1432 -1
  47. package/dist/lib/dom/runtime.d.ts +71 -19
  48. package/dist/lib/dom/runtime.d.ts.map +1 -1
  49. package/dist/lib/dom/runtime.js +261 -100
  50. package/dist/lib/dom/runtime.mjs +1414 -1
  51. package/dist/lib/dom/server/fx-data.cjs +53 -1
  52. package/dist/lib/dom/server/fx-data.d.ts +5 -5
  53. package/dist/lib/dom/server/fx-data.js +6 -6
  54. package/dist/lib/dom/server/fx-data.mjs +32 -1
  55. package/dist/lib/dom/server/host.cjs +66 -1
  56. package/dist/lib/dom/server/host.d.ts +14 -2
  57. package/dist/lib/dom/server/host.d.ts.map +1 -1
  58. package/dist/lib/dom/server/host.js +38 -10
  59. package/dist/lib/dom/server/host.mjs +45 -1
  60. package/dist/lib/dom/server/index.cjs +759 -1
  61. package/dist/lib/dom/server/index.d.ts +1 -1
  62. package/dist/lib/dom/server/index.js +1 -1
  63. package/dist/lib/dom/server/index.mjs +743 -1
  64. package/dist/lib/dom/server/nodes.cjs +302 -1
  65. package/dist/lib/dom/server/nodes.d.ts +2 -2
  66. package/dist/lib/dom/server/nodes.d.ts.map +1 -1
  67. package/dist/lib/dom/server/nodes.js +4 -4
  68. package/dist/lib/dom/server/nodes.mjs +279 -1
  69. package/dist/lib/dom/server/parse-template.cjs +395 -1
  70. package/dist/lib/dom/server/parse-template.d.ts +1 -1
  71. package/dist/lib/dom/server/parse-template.js +4 -4
  72. package/dist/lib/dom/server/parse-template.mjs +372 -1
  73. package/dist/lib/dom/server/render.cjs +691 -1
  74. package/dist/lib/dom/server/render.d.ts +9 -1
  75. package/dist/lib/dom/server/render.d.ts.map +1 -1
  76. package/dist/lib/dom/server/render.js +25 -17
  77. package/dist/lib/dom/server/render.mjs +677 -1
  78. package/dist/lib/dom/server/request-context.cjs +110 -1
  79. package/dist/lib/dom/server/request-context.d.ts +29 -9
  80. package/dist/lib/dom/server/request-context.d.ts.map +1 -1
  81. package/dist/lib/dom/server/request-context.js +28 -8
  82. package/dist/lib/dom/server/request-context.mjs +89 -1
  83. package/dist/lib/dom/server/serialize.cjs +187 -1
  84. package/dist/lib/dom/server/serialize.js +3 -3
  85. package/dist/lib/dom/server/serialize.mjs +164 -1
  86. package/dist/lib/dom/server-renderer.cjs +760 -1
  87. package/dist/lib/dom/server-renderer.js +1 -1
  88. package/dist/lib/dom/server-renderer.mjs +745 -1
  89. package/dist/lib/dom/types.cjs +18 -1
  90. package/dist/lib/dom/utils.cjs +381 -1
  91. package/dist/lib/dom/utils.d.ts +1 -88
  92. package/dist/lib/dom/utils.d.ts.map +1 -1
  93. package/dist/lib/dom/utils.js +2 -99
  94. package/dist/lib/dom/utils.mjs +361 -1
  95. package/dist/lib/dom/versions.cjs +60 -1
  96. package/dist/lib/dom/versions.d.ts +3 -3
  97. package/dist/lib/dom/versions.d.ts.map +1 -1
  98. package/dist/lib/dom/versions.js +17 -5
  99. package/dist/lib/dom/versions.mjs +37 -1
  100. package/dist/lib/element/attributes.cjs +19 -1
  101. package/dist/lib/element/attributes.d.ts +7 -7
  102. package/dist/lib/element/attributes.js +1 -1
  103. package/dist/lib/element/attributes.mjs +1 -0
  104. package/dist/lib/element/index.cjs +19 -1
  105. package/dist/lib/element/index.mjs +1 -0
  106. package/dist/lib/element/types.cjs +18 -1
  107. package/dist/lib/element/types.d.ts +4 -5
  108. package/dist/lib/element/types.d.ts.map +1 -1
  109. package/dist/lib/element/types.js +0 -1
  110. package/dist/lib/flow/class-map.cjs +38 -1
  111. package/dist/lib/flow/class-map.d.ts +3 -3
  112. package/dist/lib/flow/class-map.js +3 -3
  113. package/dist/lib/flow/class-map.mjs +17 -1
  114. package/dist/lib/flow/client-only.cjs +57 -1
  115. package/dist/lib/flow/client-only.d.ts +4 -4
  116. package/dist/lib/flow/client-only.js +4 -4
  117. package/dist/lib/flow/client-only.mjs +36 -1
  118. package/dist/lib/flow/dynamic.cjs +53 -1
  119. package/dist/lib/flow/dynamic.d.ts +2 -2
  120. package/dist/lib/flow/dynamic.js +4 -4
  121. package/dist/lib/flow/dynamic.mjs +32 -1
  122. package/dist/lib/flow/error-boundary.cjs +43 -1
  123. package/dist/lib/flow/error-boundary.d.ts +2 -2
  124. package/dist/lib/flow/error-boundary.js +4 -4
  125. package/dist/lib/flow/error-boundary.mjs +22 -1
  126. package/dist/lib/flow/for.cjs +66 -1
  127. package/dist/lib/flow/for.d.ts +9 -9
  128. package/dist/lib/flow/for.d.ts.map +1 -1
  129. package/dist/lib/flow/for.js +2 -2
  130. package/dist/lib/flow/for.mjs +45 -1
  131. package/dist/lib/flow/index-flow.cjs +67 -1
  132. package/dist/lib/flow/index-flow.d.ts +5 -5
  133. package/dist/lib/flow/index-flow.js +4 -4
  134. package/dist/lib/flow/index-flow.mjs +46 -1
  135. package/dist/lib/flow/index.cjs +805 -1
  136. package/dist/lib/flow/index.mjs +792 -1
  137. package/dist/lib/flow/portal.cjs +538 -1
  138. package/dist/lib/flow/portal.mjs +519 -1
  139. package/dist/lib/flow/show.cjs +81 -1
  140. package/dist/lib/flow/show.d.ts +1 -1
  141. package/dist/lib/flow/show.d.ts.map +1 -1
  142. package/dist/lib/flow/show.js +12 -118
  143. package/dist/lib/flow/show.mjs +67 -1
  144. package/dist/lib/flow/style-map.cjs +43 -1
  145. package/dist/lib/flow/style-map.d.ts +3 -3
  146. package/dist/lib/flow/style-map.js +4 -4
  147. package/dist/lib/flow/style-map.mjs +22 -1
  148. package/dist/lib/flow/switch.cjs +91 -1
  149. package/dist/lib/flow/switch.d.ts +3 -3
  150. package/dist/lib/flow/switch.d.ts.map +1 -1
  151. package/dist/lib/flow/switch.js +7 -7
  152. package/dist/lib/flow/switch.mjs +70 -1
  153. package/dist/lib/flow/utils.cjs +44 -1
  154. package/dist/lib/flow/utils.d.ts +1 -1
  155. package/dist/lib/flow/utils.js +1 -1
  156. package/dist/lib/flow/utils.mjs +23 -1
  157. package/dist/lib/html.cjs +32 -1
  158. package/dist/lib/html.d.ts +6 -6
  159. package/dist/lib/html.js +5 -5
  160. package/dist/lib/html.mjs +11 -1
  161. package/dist/lib/index.cjs +3104 -1
  162. package/dist/lib/index.d.ts +0 -1
  163. package/dist/lib/index.d.ts.map +1 -1
  164. package/dist/lib/index.js +2 -3
  165. package/dist/lib/index.mjs +3097 -1
  166. package/dist/lib/shared/types.cjs +18 -1
  167. package/dist/lib/shared/types.d.ts +8 -8
  168. package/dist/tsconfig.lib.tsbuildinfo +1 -1
  169. package/dist/version.generated.cjs +26 -1
  170. package/dist/version.generated.d.ts +1 -1
  171. package/dist/version.generated.js +2 -2
  172. package/dist/version.generated.mjs +5 -1
  173. package/package.json +7 -6
  174. package/dist/lib/jsx/control-flow/flow.cjs +0 -1
  175. package/dist/lib/jsx/control-flow/flow.d.ts +0 -2
  176. package/dist/lib/jsx/control-flow/flow.d.ts.map +0 -1
  177. package/dist/lib/jsx/control-flow/flow.js +0 -627
  178. package/dist/lib/jsx/control-flow/flow.mjs +0 -0
  179. package/dist/lib/jsx/control-flow/for-flow.cjs +0 -1
  180. package/dist/lib/jsx/control-flow/for-flow.d.ts +0 -2
  181. package/dist/lib/jsx/control-flow/for-flow.d.ts.map +0 -1
  182. package/dist/lib/jsx/control-flow/for-flow.js +0 -1
  183. package/dist/lib/jsx/control-flow/for-flow.mjs +0 -0
@@ -7,9 +7,9 @@
7
7
  *
8
8
  * Same shape as `dom.global.js` and the same global name, minus the string renderer,
9
9
  * node serialisation, template parsing and the request context. A `<script>` tag
10
- * cannot tree-shake, so anything reachable from the entry ships which makes the
10
+ * cannot tree-shake, so anything reachable from the entry ships, which makes the
11
11
  * server half pure weight for a page that renders in a browser. Measured against the
12
- * full build: 21.0 kB gzipped 12.2 kB.
12
+ * full build: 21.0 kB gzipped -> 12.2 kB.
13
13
  *
14
14
  * `hydrate` stays: a page hydrating server-rendered HTML runs in the browser, and it
15
15
  * is the one thing here that touches SSR output. Use `dom.global.js` if you actually
@@ -1 +1,2 @@
1
- "use strict";var FluixiDOM=(()=>{var Pe=Object.defineProperty;var Dn=Object.getOwnPropertyDescriptor;var jn=Object.getOwnPropertyNames;var In=Object.prototype.hasOwnProperty;var qn=(e,t)=>{for(var n in t)Pe(e,n,{get:t[n],enumerable:!0})},Ln=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of jn(t))!In.call(e,i)&&i!==n&&Pe(e,i,{get:()=>t[i],enumerable:!(r=Dn(t,i))||r.enumerable});return e};var $n=e=>Ln(Pe({},"__esModule",{value:!0}),e);var ro={};qn(ro,{Dynamic:()=>st,ErrorBoundary:()=>lt,For:()=>tt,Index:()=>nt,Match:()=>ot,Portal:()=>ut,Show:()=>et,Switch:()=>it,batch:()=>R,classMap:()=>at,createComponent:()=>Nn,createComputed:()=>pn,createContext:()=>Ee,createEffect:()=>Te,createElement:()=>ht,createMemo:()=>Je,createRenderEffect:()=>hn,createResource:()=>mn,createRoot:()=>fn,createSignal:()=>M,delegateEvents:()=>Le,effect:()=>wn,hydrate:()=>Qe,indexArray:()=>re,insert:()=>K,keyArray:()=>ne,mapArray:()=>te,memo:()=>bn,onCleanup:()=>Ke,render:()=>be,setAttribute:()=>A,setClassName:()=>oe,setProperty:()=>B,setStyle:()=>ge,signal:()=>gn,spread:()=>Ut,store:()=>An,styleMap:()=>ct,untrack:()=>X,useContext:()=>ln});var pt="http://www.w3.org/2000/svg";var Ce=new Set(["className","value","checked","selected","innerHTML","innerText","textContent","indeterminate","htmlFor"]);function A(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 Fn(e,t){Object.assign(e.style,t)}function ht(e,t={},...n){let r=document.createElement(e);return Object.entries(t).forEach(([i,s])=>{if(i==="class"||i==="className")r.className=s;else if(i==="style"&&typeof s=="object")Fn(r,s);else if(i.startsWith("on")&&typeof s=="function"){let u=i.slice(2).toLowerCase();r.addEventListener(u,s)}else A(r,i,s)}),n.forEach(i=>{typeof i=="string"?r.appendChild(document.createTextNode(i)):r.appendChild(i)}),r}var io=typeof Symbol=="function"&&Symbol.for?Symbol.for("react.element"):60103;var Vn="__fluixi_signal_next_state__",Un=e=>{typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e)},d=globalThis[Vn]??={consumer:null,untracked:!1,owner:null,queue:[],scheduled:!1,flushing:!1,batchDepth:0,hostSchedule:Un,onSuspend:null,onError:null},yt=0,mt=1,Z=2,gt=class{constructor(){this.observers=null,this.watchers=null,this.version=0}updateIfNecessary(){}track(){if(d.untracked)return;let e=d.consumer;e&&((this.observers??=new Set).add(e),(e.sources??=new Set).add(this))}},Hn=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++,this.observers)for(let t of[...this.observers])t.markDirty(Z);ke(this)}}peek(){return this._value}},bt=class extends gt{constructor(e,t){super(),this._threw=!1,this._initialized=!1,this.state=Z,this.sources=null,this._fn=e,this._equals=t?.equals===!1?()=>!1:t?.equals??Object.is}get(){if(d.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===mt&&this.sources){for(let e of this.sources)if(e.updateIfNecessary(),this.state===Z)break}(this.state===Z||!this._initialized)&&this.recompute(),this.state=yt}recompute(){if(this.sources){for(let u of this.sources)u.observers?.delete(this);this.sources.clear()}let e=d.consumer,t=d.untracked;d.consumer=this,d.untracked=!1;let n,r=!1,i;try{n=this._fn()}catch(u){r=!0,i=u,n=this._value}finally{d.consumer=e,d.untracked=t}let s=!this._initialized||this._threw!==r||(r?i!==this._error:!this._equals(this._value,n));if(this._initialized=!0,this._threw=r,this._error=i,this._value=n,s){if(this.version++,this.observers)for(let u of[...this.observers])u.markDirty(Z);ke(this)}}markDirty(e){if(this.state>=e)return;let t=this.state===yt;if(this.state=e,t){if(this.observers)for(let n of[...this.observers])n.markDirty(mt);ke(this)}}peek(){if(this.updateIfNecessary(),this._threw)throw this._error;return this._value}};function ke(e){if(e.watchers)for(let t of[...e.watchers])t._notify(e)}var Wn=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 zn(e){if(d.untracked)return e();d.untracked=!0;try{return e()}finally{d.untracked=!1}}function W(e){let t=fe(e);return e&&(e.owned??=[]).push(t),t}function z(e,t=!0){Q(e,t)}function fe(e){return{cleanups:null,owned:null,parent:e,contexts:null}}function wt(e){let t=Symbol("context");return{id:t,defaultValue:e,Provider:n=>{let r=d.owner,i=fe(r);(i.contexts=new Map).set(t,n.value),r&&(r.owned??=[]).push(i),d.owner=i;try{return n.children}finally{d.owner=r}}}}function xt(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 Bn(e){d.onSuspend=e}function Kn(e){return d.onSuspend?(d.onSuspend(e,d.owner),!0):!1}function Gn(e){d.onError=e}function q(){return d.owner}function _(e,t){let n=d.owner;d.owner=e;try{return t()}finally{d.owner=n}}function L(e){if(d.owner){if(d.owner.disposed){e();return}(d.owner.cleanups??=[]).push(e)}}function Q(e,t=!0){if(!e.disposed){if(e.owned){for(let n=e.owned.length-1;n>=0;n--)Q(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 $(e){let t=fe(d.owner);d.owner&&(d.owner.owned??=[]).push(t);let n=d.owner;d.owner=t;try{return e(()=>Q(t))}finally{d.owner=n}}function Xn(e){d.hostSchedule=e??(t=>{Promise.resolve().then(t)})}function Jn(e){e.queued||(e.queued=!0,d.queue.push(e),!d.scheduled&&d.batchDepth===0&&(d.scheduled=!0,d.hostSchedule(Oe)))}function Oe(){if(d.scheduled=!1,d.flushing)return;d.flushing=!0;let e=0;try{for(;d.queue.length;){if(++e>1e5)throw new Error("[fluixi] effect flush did not settle (cycle?)");let t=d.queue;d.queue=[];for(let n of t)n.queued=!1,n.disposed||n.run()}}finally{d.flushing=!1}}function Yn(){d.batchDepth===0&&Oe()}function Zn(e){d.batchDepth++;try{return e()}finally{--d.batchDepth===0&&Oe()}}var Qn=class{constructor(e){this.queued=!1,this.disposed=!1,this.owner=fe(d.owner),d.owner&&(d.owner.cleanups??=[]).push(()=>this.dispose()),this.computed=new bt(()=>{Q(this.owner,!1),_(this.owner,()=>{let t=e();typeof t=="function"&&(this.owner.cleanups??=[]).push(t)})}),this.watcher=new Wn(()=>Jn(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"&&d.onSuspend){d.onSuspend(e,this.owner);return}if(d.onError&&d.onError(e,this.owner))return;throw e}}}dispose(){this.disposed||(this.disposed=!0,this.watcher.unwatch(this.computed),Q(this.owner))}};function vt(e){let t=new Qn(e);return()=>t.dispose()}function er(e){return!!e&&typeof e.then=="function"}Xn(()=>{});var St=Symbol.for("signal"),tr=Symbol.for("memo"),nr=Symbol.for("signal-node");function C(e,t){let n=new Hn(e,{equals:t?.equals}),r=(()=>n.get()),i=(s=>{let u=typeof s=="function"?s(n.peek()):s;return n.set(u),Yn(),u});return Object.defineProperty(r,St,{value:!0,enumerable:!0}),Object.defineProperty(r,nr,{value:{get value(){return n.peek()},get version(){return n.version}},enumerable:!1}),[r,i]}function m(e,t,n){let r=t,i=q(),s=new bt(()=>_(i,()=>{try{return r=e(r)}catch(l){if(er(l))return Kn(l),r;throw l}}),{equals:n?.equals}),u=(()=>s.get());return Object.defineProperty(u,St,{value:!0,enumerable:!0}),Object.defineProperty(u,tr,{value:!0,enumerable:!0}),u}function de(e,t){let n=t;return vt(()=>{n=e(n)})}function S(e,t){let n=t;return vt(()=>{n=e(n)})}function ee(e){return Zn(e)}function k(e){return zn(e)}function te(e,t,n){let r=[];return L(()=>{for(let i of r)i.dispose();r=[]}),m(()=>{let i=e()||[];return k(()=>{if(i.length===0){for(let o of r)o.dispose();return r=[],n?.fallback?n.fallback():[]}let s=new Map;for(let o of r)s.has(o.item)||s.set(o.item,o);let u=[],l=new Set;for(let o=0;o<i.length;o++){let a=i[o],p=s.get(a);if(p&&!l.has(p))p.setIndex(o),u.push(p),l.add(p);else{let c,y,g;$(b=>{g=b;let[U,J]=C(o);y=J,c=t(a,U)});let v={item:a,rendered:c,dispose:g,setIndex:y};u.push(v),l.add(v)}}for(let o of r)l.has(o)||o.dispose();return r=u,u.map(o=>o.rendered)})})}function ne(e,t,n,r){let i=[],s=[];return L(()=>{for(let u of s)u.dispose();i=[],s=[]}),m(()=>{let u=e()||[];return k(()=>{if(u.length===0){for(let c of s)c.dispose();return i=[],s=[],r?.fallback?r.fallback():[]}let l=new Map;for(let c=0;c<i.length;c++)l.set(i[c],s[c]);let o=[],a=[],p=new Set;for(let c=0;c<u.length;c++){let y=t(u[c]),g=l.get(y);if(g&&!p.has(y))g.setIndex(c),o.push(g);else{let v,b,U;$(J=>{U=J;let[j,Y]=C(c);b=Y;let ue=m(H=>(e()||[])[j()]??H,u[c]);v=n(ue,j)}),o.push({rendered:v,dispose:U,setIndex:b})}a.push(y),p.add(y)}for(let[c,y]of l)p.has(c)||y.dispose();return i=a,s=o,o.map(c=>c.rendered)})})}function re(e,t,n){let r=[];return L(()=>{for(let i of r)i.dispose();r=[]}),m(()=>{let i=e()||[];return k(()=>{if(i.length===0){for(let o of r)o.dispose();return r=[],n?.fallback?n.fallback():[]}let s=r.length,u=i.length;for(let o=s;o<u;o++){let a,p,c,y=i[o];$(g=>{c=g;let[v,b]=C(y);p=b,a=t(v,o)}),r.push({rendered:a,setItem:p,dispose:c})}for(let o=u;o<s;o++)r[o].dispose();u<s&&(r=r.slice(0,u));let l=Math.min(s,u);for(let o=0;o<l;o++)r[o].setItem(i[o]);return r.map(o=>o.rendered)})})}var uo=typeof window>"u"?!1:window.__FLUIXI_PROD__===!0;var rr=Symbol.for("signal");function E(e){return typeof e=="function"&&e[rr]===!0}var or=null;function Et(e){or=e}var ir=null;function Tt(e){ir=e}var sr=wt();Bn((e,t)=>{let n=xt(t,sr);n&&(n.increment(),e.finally(()=>n.decrement()))});var ur=wt();Gn((e,t)=>{let n=xt(t,ur);return n?(n.setError(e),!0):!1});var Re=Symbol.for("fluixi-proxy");var At="1.0.0-alpha.82";var _t="1.0.0-alpha.82";var T={dom:At,reactive:_t};function Nt(e){T.core&&e.setAttribute("fluixi",T.core),e.setAttribute("fx-dom",T.dom),e.setAttribute("fx-reactive",T.reactive),typeof globalThis<"u"&&(globalThis.Fluixi=T)}function Pt(){let e=[T.core,T.dom,T.reactive].filter(t=>t!==void 0);new Set(e).size<=1||console.warn(`[fluixi] package versions disagree — core ${T.core??"(absent)"}, dom ${T.dom}, reactive ${T.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 Ct(e){return typeof e!="function"||Object.defineProperty(e,Symbol.for("fluixi-component"),{value:!0,enumerable:!0}),e}function F(e){return typeof e=="function"&&e[Symbol.for("fluixi-component")]===!0}var Me=typeof document>"u";var De=Symbol.for("fluixi.server-node"),kt=null;function Ot(){if(!kt)throw new Error("[fluixi] server render ran before @fluixi/dom/server loaded");return kt}function pe(e){return e!=null&&e[De]===!0?!0:typeof Node<"u"&&e instanceof Node}function Rt(e){return e!=null&&e[De]===!0?e.nodeType===1:typeof Element<"u"&&e instanceof Element}function Mt(e){return e!=null&&e[De]===!0?e.nodeType===3:typeof Text<"u"&&e instanceof Text}var h={active:!1,cursor:null,parents:[]},Dt=null;function jt(e){Dt=e}function It(){return Dt}function je(e,t){return h.active&&t.parentNode===e}function Ie(e){let t=h.parents.lastIndexOf(e);t!==-1&&(h.parents.length=t),h.cursor=e.nextSibling}function he(e){if(!h.active||e==null)return;let t=Array.isArray(e)?e[e.length-1]:e;t&&typeof t.nodeType=="number"&&Ie(t)}var lr={};var qe=new Set,Vt=new Set(["scroll","focus","blur","load","error","resize","mouseenter","mouseleave","pointerenter","pointerleave","gotpointercapture","lostpointercapture"]);function Le(e){if(!Me)for(let t of e)qe.has(t)||Vt.has(t)||(qe.add(t),document.addEventListener(t,ar))}function ar(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 cr(e,t,n){if(e[`$$${t}`]=n,Vt.has(t)){let r=`__fx_${t}`;if(!e[r]){let i=s=>{e[`$$${t}`]?.(s)};e.addEventListener(t,i),e[r]=i}return}qe.has(t)||Le([t])}function qt(e,t){delete e[`$$${t}`];let n=`__fx_${t}`,r=e[n];r&&(e.removeEventListener(t,r),delete e[n])}function O(e,t=!1){if(Me)return Ot().createText(e);if(h.active&&!t){let n=It()?.hydrateText(e);if(n)return n}return document.createTextNode(e)}var P=0,fr=200;function dr(e,t,n,r,i){let s=r,u=new Map;return S(()=>{let l;if(F(e)&&!E(e)){if(!u.has(e)){P++;try{let o=e();u.set(e,o)}finally{P--}}for(l=u.get(e);typeof l=="function"&&E(l);)l=l()}else for(l=e();typeof l=="function"&&E(l);)l=l();{let o=0;for(;typeof l=="function"&&o++<50;)if(F(l)){if(!u.has(l)){let a=l;P++;try{let p=a();u.set(a,p)}finally{P--}}l=u.get(l)}else if(E(l))l=l();else if(l=l(),typeof l!="function"||!E(l)&&!F(l))break}P++;try{s=me(t,l,n,s,u),i(s)}finally{P--}})}function K(e,t,n,r){if(P>fr)return console.error("[insert] Exceeded max call depth — possible infinite loop."),()=>null;n!==void 0&&!n&&(n=O("",!0),e.appendChild(n));let i=r??null,s=o=>Array.isArray(o)&&o.some(a=>typeof a=="function"),u=o=>typeof o=="function"?o:()=>o;if(typeof t!="function"&&!s(t)){P++;try{i=me(e,t,n,i)}finally{P--}return()=>i}let l=dr(u(t),e,n,i,o=>{i=o});return()=>(l?.(),i)}function me(e,t,n,r,i){if(t==null||typeof t=="boolean")return V(e,r,n);if(typeof t=="function")for(;typeof t=="function";)t=t();if(t==null||typeof t=="boolean")return V(e,r,n);if(ye(t)){let u=O("",!0);return Array.isArray(r)?r.length>0?(e.replaceChild(u,r[0]),V(e,r.slice(1),n)):x(e,u,n):r?e.replaceChild(u,r):x(e,u,n),t.then(l=>{u.parentNode===e&&me(e,l,u.nextSibling,u)}).catch(l=>{console.error("Error resolving promise in insertExpression:",l)}),u}let s=typeof t;if(s==="string"||s==="number"){if(s==="number"&&(t=String(t)),Array.isArray(r)){if(r.length===0){let l=O(t);return x(e,l,n),l}if(r.length===1&&r[0].nodeType===3)return r[0].data=t,r;r=V(e,r,n)}if(r&&Mt(r))return r.data=t,r;let u=O(t);return r&&r.parentNode===e?e.replaceChild(u,r):je(e,u)||x(e,u,n),u}if(pe(t))return je(e,t)?(Ie(t),t):Array.isArray(r)?(r.length===0?x(e,t,n):r[0].parentNode===e?(e.replaceChild(t,r[0]),V(e,r.slice(1),n)):x(e,t,n),t):(r?r!==t&&(r.parentNode===e?e.replaceChild(t,r):x(e,t,n)):x(e,t,n),t);if(Array.isArray(t)){let u=[],l=Array.isArray(r)?r:r?[r]:[],o=[];N(t,u,e,n,!0,i,o);let a=pr(e,l,u,n);for(let p of o){let c=K(e,p.sig,p.marker);L(()=>{V(e,c()),p.marker.parentNode===e&&e.removeChild(p.marker)})}return a}if(s==="object"&&t!==null&&typeof t=="object"){let u=t;if("type"in u&&"props"in u){let l=u;if(typeof l.type=="function"){let o=l.type(l.props||{});return me(e,o,n,r)}}}return V(e,r,n)}function N(e,t,n,r,i=!0,s,u){for(let l=0;l<e.length;l++){let o=e[l];if(!(o==null||typeof o=="boolean")){for(;typeof o=="function"&&!ye(o)&&!E(o)&&!F(o)&&(o=o(),!(o==null||typeof o=="boolean")););if(!(o==null||typeof o=="boolean")){if(typeof o=="function"){let a;for(F(o)&&!E(o)?(s||(s=new Map),s.has(o)||s.set(o,o()),a=s.get(o)):a=o();typeof a=="function"&&!ye(a)&&!E(a)&&!F(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(E(a)){if(u){let c=O("",!0);t.push(c),u.push({marker:c,sig:a});continue}let p=a();for(;typeof p=="function"&&E(p);)p=p();if(p==null||typeof p=="boolean")continue;Array.isArray(p)?N(p,t,n,r,i,s):N([p],t,n,r,i,s);continue}continue}Array.isArray(a)?N(a,t,n,r,i,s,u):N([a],t,n,r,i,s,u);continue}if(ye(o)){let a=O("",!0);t.push(a),o.then(p=>{if(a.parentNode){let c=[];if(N([p],c,a.parentNode,void 0,!1,s),c.length>0){a.parentNode.replaceChild(c[0],a);for(let y=1;y<c.length;y++)a.parentNode?.insertBefore(c[y],c[y-1].nextSibling)}}}).catch(p=>console.error("Error resolving promise in array:",p));continue}if(Array.isArray(o)){N(o,t,n,r,i,s,u);continue}if(pe(o)){t.push(o);continue}if(typeof o=="object"&&o!==null&&"type"in o&&"props"in o){let a=o;if(typeof a.type=="function"){let p=a.type(a.props||{});Array.isArray(p)?N(p,t,n,r,!1,s):N([p],t,n,r,!1,s);continue}}if(typeof o=="string"||typeof o=="number"){let a=String(o);if(a.trim()===""&&a!==" ")continue;t.push(O(a));continue}t.push(O(String(o)))}}}}function pr(e,t,n,r){for(let c=0;c<n.length;c++){let y=n[c].parentNode;y!==null&&y!==e&&y.nodeType!==11&&(n=n.slice(),n[c]=n[c].cloneNode(!0))}let i=n.length,s=t.length,u=i,l=0,o=0,a=s>0?t[s-1].nextSibling??void 0:r,p=null;for(;l<s||o<u;){if(t[l]===n[o]){l++,o++;continue}for(;s>l&&u>o&&t[s-1]===n[u-1];)s--,u--;if(s===l){let c=u<i?o?n[o-1].nextSibling??void 0:n[u-o]:a;for(;o<u;)x(e,n[o++],c)}else if(u===o)for(;l<s;)(!p||!p.has(t[l]))&&t[l].parentNode===e&&e.removeChild(t[l]),l++;else if(t[l]===n[u-1]&&n[o]===t[s-1]){let c=t[--s].nextSibling;x(e,n[o++],t[l++].nextSibling),x(e,n[--u],c),t[s]=t[l-1]}else{if(!p){p=new Map;let y=o;for(;y<u;)p.set(n[y],y++)}let c=p.get(t[l]);if(c!=null)if(o<c&&c<u){let y=l,g=1;for(;++y<s&&y<u&&!(!p.has(t[y])||p.get(t[y])!==c+g);)g++;if(g>c-o){let v=t[l];for(;o<c;)x(e,n[o++],v)}else t[l].parentNode===e?e.replaceChild(n[o++],t[l++]):(x(e,n[o++],a),l++)}else l++;else t[l].parentNode===e&&e.removeChild(t[l]),l++}}return n}function V(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 x(e,t,n){h.active&&t.parentNode===e||(n&&n.parentNode===e?e.insertBefore(t,n):e.appendChild(t))}function B(e,t,n){n==null?delete e[t]:e[t]=n}function hr(e,t,n){let r=n,i;return Array.isArray(n)&&(r=n[0],i=n[1]),typeof r!="function"?()=>{}:(e.addEventListener(t,r,i),()=>e.removeEventListener(t,r,i))}function yr(e,t){let n=(r,i)=>{typeof r=="function"&&r(e,i??(()=>{}))};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 Lt(e,t,n,r=!1){return typeof n!="function"?(A(e,t,n,r),()=>{}):S(()=>{let i=typeof n=="function"?n():n;A(e,t,i,r)})}function $t(e,t,n){return typeof n!="function"?(B(e,t,n),()=>{}):S(()=>{let r=typeof n=="function"?n():n;B(e,t,r)})}function mr(e,t,n){return typeof n!="function"?(A(e,t,!!n),()=>{}):S(()=>{let r=n();A(e,t,!!r)})}function oe(e,t){if(t==null){e.removeAttribute("class");return}if(typeof t=="function"){S(()=>oe(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 i=t[r];return typeof i=="function"?i():!!i}).join(" ");e.setAttribute("class",n);return}e.setAttribute("class",String(t))}function Ft(e,t,n){if(!(!t||typeof t!="object"))for(let r in t){let i=t[r],s=r.split(/\s+/).filter(Boolean);if(typeof i=="function"&&n)n.push(S(()=>{let u=!!i();for(let l of s)e.classList.toggle(l,u)}));else{let u=!!(typeof i=="function"?i():i);for(let l of s)e.classList.toggle(l,u)}}}function ge(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 i=n[r];i==null?e.style[r]="":e.style[r]=i}}function Ut(e){let{element:t,props:n,prevProps:r=lr,isSVG:i=!1,skipChildren:s=!1}=e;if(!t||!Rt(t))return console.error("[spread] Error: element is not a DOM Element!"),()=>{};if(!n)return console.warn("[spread] Warning: props is undefined!"),()=>{};let u=i||t.namespaceURI===pt,l=[];for(let o in n){if(s&&o==="children")continue;let a=n[o],p=r[o];if(a===p)continue;if(o==="ref"){$e(a,t);continue}if(o==="use"){yr(t,a);continue}if(o.startsWith("on:")){l.push(hr(t,o.slice(3),a));continue}if(o.startsWith("prop:")){l.push($t(t,o.slice(5),a));continue}if(o.startsWith("attr:")){l.push(Lt(t,o.slice(5),a,u));continue}if(o.startsWith("bool:")){l.push(mr(t,o.slice(5),a));continue}if(o==="class"||o==="className"){typeof a=="function"?l.push(S(()=>oe(t,a()))):oe(t,a);continue}if(o==="classList"){typeof a=="function"?l.push(S(()=>Ft(t,a()))):Ft(t,a,l);continue}if(o==="style"){typeof a=="function"?l.push(S(()=>ge(t,a()))):ge(t,a);continue}if(o.startsWith("on")){let y=o.slice(2).toLowerCase();p&&qt(t,y),a&&cr(t,y,a);continue}let c=Ce.has(o)||!u&&o in t;typeof a=="function"?l.push(c?$t(t,o,a):Lt(t,o,a,u)):l.push(S(()=>c?B(t,o,n[o]):A(t,o,n[o],u)))}for(let o in r)if(!(o in n))if(o.startsWith("on")){let a=o.slice(2).toLowerCase();qt(t,a)}else Ce.has(o)?B(t,o,null):t.removeAttribute(o);return()=>{l.forEach(o=>o())}}function $e(e,t){if(e){if(pe(e)){let n=t,r=e;if(!n)return;typeof n=="function"?n(r):typeof n=="object"&&"current"in n&&(n.current=r);return}typeof e=="function"?e(t):typeof e=="object"&&"current"in e&&(e.current=t)}}function ye(e){return e!=null&&(typeof e=="object"||typeof e=="function")&&typeof e.then=="function"||e instanceof Promise}function be(e,t,n){if(!t)throw new Error("Container element is required");let r,i,s=[];return $(u=>{ee(()=>{h.active||(t.textContent=""),Nt(t),Pt(),K(t,e)}),i=u}),()=>{i?.(),r?.(),s.forEach(u=>u()),t.textContent=""}}var gr="__fluixi_signal_next_state__",br=e=>{typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e)},f=globalThis[gr]??={consumer:null,untracked:!1,owner:null,queue:[],scheduled:!1,flushing:!1,batchDepth:0,hostSchedule:br,onSuspend:null,onError:null},Ht=0,Wt=1,ie=2,sn=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))}},wr=class extends sn{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++,this.observers)for(let t of[...this.observers])t.markDirty(ie);Ue(this)}}peek(){return this._value}},un=class extends sn{constructor(e,t){super(),this._threw=!1,this._initialized=!1,this.state=ie,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===Wt&&this.sources){for(let e of this.sources)if(e.updateIfNecessary(),this.state===ie)break}(this.state===ie||!this._initialized)&&this.recompute(),this.state=Ht}recompute(){if(this.sources){for(let u of this.sources)u.observers?.delete(this);this.sources.clear()}let e=f.consumer,t=f.untracked;f.consumer=this,f.untracked=!1;let n,r=!1,i;try{n=this._fn()}catch(u){r=!0,i=u,n=this._value}finally{f.consumer=e,f.untracked=t}let s=!this._initialized||this._threw!==r||(r?i!==this._error:!this._equals(this._value,n));if(this._initialized=!0,this._threw=r,this._error=i,this._value=n,s){if(this.version++,this.observers)for(let u of[...this.observers])u.markDirty(ie);Ue(this)}}markDirty(e){if(this.state>=e)return;let t=this.state===Ht;if(this.state=e,t){if(this.observers)for(let n of[...this.observers])n.markDirty(Wt);Ue(this)}}peek(){if(this.updateIfNecessary(),this._threw)throw this._error;return this._value}};function Ue(e){if(e.watchers)for(let t of[...e.watchers])t._notify(e)}var xr=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 vr(e){if(f.untracked)return e();f.untracked=!0;try{return e()}finally{f.untracked=!1}}function Be(e){return{cleanups:null,owned:null,parent:e,contexts:null}}function Ee(e){let t=Symbol("context");return{id:t,defaultValue:e,Provider:n=>{let r=f.owner,i=Be(r);(i.contexts=new Map).set(t,n.value),r&&(r.owned??=[]).push(i),f.owner=i;try{return n.children}finally{f.owner=r}}}}function ln(e){let t=f.owner;for(;t;){if(t.contexts&&t.contexts.has(e.id))return t.contexts.get(e.id);t=t.parent}return e.defaultValue}function an(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 Sr(e){f.onSuspend=e}function Er(e){return f.onSuspend?(f.onSuspend(e,f.owner),!0):!1}function Tr(e){f.onError=e}function Ar(){return f.owner}function cn(e,t){let n=f.owner;f.owner=e;try{return t()}finally{f.owner=n}}function Ke(e){if(f.owner){if(f.owner.disposed){e();return}(f.owner.cleanups??=[]).push(e)}}function xe(e,t=!0){if(!e.disposed){if(e.owned){for(let n=e.owned.length-1;n>=0;n--)xe(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 fn(e){let t=Be(f.owner);f.owner&&(f.owner.owned??=[]).push(t);let n=f.owner;f.owner=t;try{return e(()=>xe(t))}finally{f.owner=n}}function _r(e){f.hostSchedule=e??(t=>{Promise.resolve().then(t)})}function Nr(e){e.queued||(e.queued=!0,f.queue.push(e),!f.scheduled&&f.batchDepth===0&&(f.scheduled=!0,f.hostSchedule(Ge)))}function Ge(){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 Pr(){f.batchDepth===0&&Ge()}function Cr(e){f.batchDepth++;try{return e()}finally{--f.batchDepth===0&&Ge()}}var kr=class{constructor(e){this.queued=!1,this.disposed=!1,this.owner=Be(f.owner),f.owner&&(f.owner.cleanups??=[]).push(()=>this.dispose()),this.computed=new un(()=>{xe(this.owner,!1),cn(this.owner,()=>{let t=e();typeof t=="function"&&(this.owner.cleanups??=[]).push(t)})}),this.watcher=new xr(()=>Nr(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,this.watcher.unwatch(this.computed),xe(this.owner))}};function Xe(e){let t=new kr(e);return()=>t.dispose()}function Or(e){return!!e&&typeof e.then=="function"}_r(()=>{});var dn=Symbol.for("signal"),Rr=Symbol.for("memo"),Mr=Symbol.for("signal-node");function M(e,t){let n=new wr(e,{equals:t?.equals}),r=(()=>n.get()),i=(s=>{let u=typeof s=="function"?s(n.peek()):s;return n.set(u),Pr(),u});return Object.defineProperty(r,dn,{value:!0,enumerable:!0}),Object.defineProperty(r,Mr,{value:{get value(){return n.peek()},get version(){return n.version}},enumerable:!1}),[r,i]}function Je(e,t,n){let r=t,i=Ar(),s=new un(()=>cn(i,()=>{try{return r=e(r)}catch(l){if(Or(l))return Er(l),r;throw l}}),{equals:n?.equals}),u=(()=>s.get());return Object.defineProperty(u,dn,{value:!0,enumerable:!0}),Object.defineProperty(u,Rr,{value:!0,enumerable:!0}),u}function Te(e,t){let n=t;return Xe(()=>{n=e(n)})}function pn(e,t){let n=t;Xe(()=>{n=e(n)})}function hn(e,t){let n=t;return Xe(()=>{n=e(n)})}function R(e){return Cr(e)}function X(e){return vr(e)}var jo=typeof window>"u"?!1:window.__FLUIXI_PROD__===!0;var Dr=Symbol.for("signal");function yn(e){return typeof e=="function"&&e[Dr]===!0}var zt=null;function jr(e){zt&&zt(e)}var Bt=null;function Ir(e){return Bt?Bt(e):void 0}var Kt=null;function qr(){return Kt?Kt():void 0}var Gt=null;function Lr(e,t){Gt&&Gt(e,t)}function $r(e){return!!e&&typeof e.then=="function"}var Fe=Symbol();function mn(e,t,n={}){let r,i;typeof t=="function"?(r=typeof e=="function"?e:()=>e,i=t):(r=()=>!0,i=e,t&&typeof t=="object"&&(n=t));let s=n.transport===!1?void 0:qr(),u=s!==void 0?Ir(s):void 0,l=u!==void 0,[o,a]=M(u!==void 0?u.value:n.initialValue,{equals:!1}),[p,c]=M(void 0,{equals:!1}),[y,g]=M(u!==void 0||n.initialValue!==void 0?"ready":"unresolved",{equals:!1}),[v,b]=M(void 0,{equals:!1}),[U,J]=M(void 0,{equals:!1}),j=Fe,Y=!1;Te(()=>{let w=r();if(U(),w===!1||w===null||w===void 0){j=Fe,R(()=>{g("unresolved"),b(void 0),c(void 0)});return}let le=Y;if(Y=!1,j!==Fe&&w===j&&!le)return;if(j=w,l){l=!1;return}let ae=!1;Ke(()=>ae=!0);let ft=X(y),Mn=X(o),dt=ft==="ready"||ft==="refreshing";R(()=>{g(dt?"refreshing":"pending"),c(void 0)});try{let I=i(w,{value:Mn,refetching:dt});$r(I)?(b(I),jr(I),I.then(ce=>{ae||(s!==void 0&&Lr(s,ce),R(()=>{a(()=>ce),g("ready"),b(void 0)}))},ce=>{ae||R(()=>{c(ce),g("errored"),b(void 0)})})):R(()=>{a(()=>I),g("ready"),b(void 0)})}catch(I){if(ae)return;R(()=>{c(I),g("errored"),b(void 0)})}});let ue=()=>{let w=y();return w==="pending"||w==="refreshing"},H=(()=>{let w=p();if(w)throw w;if(ue()){let le=v();if(le)throw le}return o()});return Object.defineProperties(H,{state:{get:y},loading:{get:ue},error:{get:p},latest:{get:o}}),Object.defineProperty(H,Symbol.for("resource"),{value:!0,enumerable:!0}),Object.defineProperty(H,Symbol.for("signal"),{value:!0,enumerable:!0}),[H,{mutate:a,refetch:()=>{Y=!0,J(void 0)}}]}var Fr=Ee();Sr((e,t)=>{let n=an(t,Fr);n&&(n.increment(),e.finally(()=>n.decrement()))});var Vr=Ee();Tr((e,t)=>{let n=an(t,Vr);return n?(n.setError(e),!0):!1});function gn(e,t){let[n,r]=M(e,t);return Object.assign(n,{set:r})}function bn(e,t,n){return Je(e,t,n)}function wn(e,t){return Te(e,t)}var He=Symbol("store-raw"),Xt=Symbol("store-node"),Jt=Symbol("store-has"),Yt=Symbol("store-self"),Zt=Symbol("store-track");var Qt=new WeakMap,en=new WeakMap;function xn(e){let[t,n]=C(e),r=t;return r.$=n,r}function ve(e){let t=Qt.get(e);return t||Qt.set(e,t={keys:new Map}),t}function tn(e,t,n){let r=e.keys.get(t);return r||e.keys.set(t,r=xn(n)),r}function nn(e){let t=ve(e);(t.all||(t.all=xn()))()}function rn(e,t){e.$(typeof t=="function"?()=>t:t)}function vn(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 we(e){if(!vn(e))return e;let t=en.get(e);if(t)return t;let n=new Proxy(e,Ur);return en.set(e,n),n}var Ur={get(e,t,n){if(t===He||t===Xt)return e;if(t===Re)return n;if(t===Jt)return u=>u in e;if(t==="__proxy")return!0;if(t===Zt||t===Yt)return nn(e),n;let r=e[t];if(typeof r=="function"&&!Object.prototype.hasOwnProperty.call(e,t))return r;let i=Object.getOwnPropertyDescriptor(e,t);if(i&&i.get)return i.get.call(n);let s=tn(ve(e),t,r)();return vn(s)?we(s):s},set(){return!0},deleteProperty(e,t){return t in e&&se(e,t,void 0),!0},has(e,t){return t===He||t===Re||t===Xt||t===Jt||t===Yt||t===Zt?!0:(tn(ve(e),t,e[t])(),t in e)},ownKeys(e){return nn(e),Reflect.ownKeys(e)},getOwnPropertyDescriptor(e,t){return Reflect.getOwnPropertyDescriptor(e,t)}};function se(e,t,n){if(e[t]===n&&(n!==void 0||t in e))return;let r=Array.isArray(e),i=r?e.length:0;n===void 0?delete e[t]:e[t]=n;let s=ve(e),u=s.keys.get(t);if(u&&rn(u,n),r&&e.length!==i){let l=s.keys.get("length");l&&rn(l,e.length)}s.all&&s.all.$(void 0)}function on(e,t){return typeof e=="function"?e(t):e}function We(e,t){for(let n of Object.keys(t)){let r=t[n],i=e[n];r&&typeof r=="object"&&!Array.isArray(r)&&i&&typeof i=="object"&&!Array.isArray(i)?We(i,r):se(e,n,r)}}function Ye(e){let t=[],n=e.replace(/\[([^\]]*)\]/g,".$1");for(let r of n.split("."))r.length&&t.push(r);return t}function Sn(e,t,n){let r=t.length-1;for(let s=0;s<r;s++){let u=t[s];if(u==="*"){let o=t.slice(s+1);if(Array.isArray(e))for(let a=0;a<e.length;a++)Sn(e[a],o,n);return}let l=e[u];(l==null||typeof l!="object")&&(l=/^\d+$/.test(t[s+1])?[]:{},se(e,u,l)),e=l}let i=t[r];if(i==="*"){if(Array.isArray(e))for(let s=0;s<e.length;s++)se(e,s,on(n,e[s]));return}se(e,i,on(n,e[i]))}function Ve(e,t,n){Sn(e,Ye(t),n)}function Hr(e,t){let n=t[0];if(typeof n=="function"&&t.length===1){let r=n(e);r&&r!==e&&We(e,r);return}if(Array.isArray(n)&&t.length===1){for(let r of n)Array.isArray(r)&&Ve(e,r[0],r[1]);return}if(n&&typeof n=="object"&&!Array.isArray(n)&&t.length===1){We(e,n);return}if(Array.isArray(t[1])&&t.length>=3){Ve(e,`${n}.${t[1].join(".")}`,t[2]);return}Ve(e,String(n),t[1])}function ze(e){if(e==null||typeof e!="object")return e;if(Array.isArray(e))return e.map(ze);let t={};for(let n of Object.keys(e))t[n]=ze(e[n]);return t}function G(e,t){let n=e;for(let r of Ye(t)){if(n==null)return;n=n[r]}return n}var En=class{constructor(e,t={immutable:!0}){this.options=t,this.root=e,this.set=((...n)=>ee(()=>Hr(this.root,n)))}get state(){return we(this.root)}get proxy(){return we(this.root)}get accessor(){return(()=>we(this.root))}unwrap(){return this.root}getNode(e){return this.root&&this.root[e]}get(e){if(e==null||e==="")return Se(this.state);let t=this.state;for(let n of Ye(e)){if(t==null)return;t=t[n]}return Se(t)}select(e){return m(()=>e(this.state))}subscribe(e){return de(()=>e(this.state))}watch(e,t){let n;return de(()=>{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=ze(t);return e(n),n}))}reconcile(e,t={}){this.set(e)}push(e,...t){let n=G(this.root,e);this.set(e,n.concat(t))}pop(e){let t=G(this.root,e).slice(),n=t.pop();return this.set(e,t),n}shift(e){let t=G(this.root,e).slice(),n=t.shift();return this.set(e,t),n}splice(e,t,n,...r){let i=G(this.root,e).slice(),s=i.splice(t,n,...r);return this.set(e,i),s}insert(e,t,n){let r=G(this.root,e).slice();r.splice(t,0,n),this.set(e,r)}removeAt(e,t){let n=G(this.root,e).slice(),r=n.splice(t,1);return this.set(e,n),r}toObservable(){let[e]=C(this.state);return e.toObservable()}dispose(){}},Wr=["get","select","watch","subscribe","produce","reconcile","push","pop","shift","splice","insert","removeAt","unwrap","toObservable"];function zr(e,t){for(let n of Wr)e[n]=t[n].bind(t);e.$=t.reactive.bind(t)}function Tn(e,t={immutable:!0}){let n=new En(e,t);return zr(n.set,n),[n.proxy,n.set]}function Br(e,t={}){return new En(e,{...t,immutable:!1})}function Se(e){if(e==null||typeof e!="object")return e;let t=e[He];return t!==void 0?t:e}function Kr(e){return k(()=>Se(e))}var qo=Object.freeze({createStore:Tn,createMutableStore:Br,batch:ee,unwrap:Se,untrackStore:Kr});function An(e,t){let[n,r]=Tn(e,t);return new Proxy(n,{get:(i,s)=>s==="set"?r:i[s],has:(i,s)=>s==="set"||Reflect.has(i,s)})}var Gr="__fx_dom_create_component__",_n=globalThis[Gr]??={fn:null};function Nn(e,t){if(_n.fn)return _n.fn(e,t);let n=typeof e=="function"?X(()=>e(t)):e;if(n!=null&&(typeof n=="function"||typeof n=="object")&&!yn(n)){try{n.$name=e?.name}catch{}return Ct(n)}return n}var Xr="__FX_DATA__";var Ze;function Pn(){let e=globalThis.__FX_DATA__;if(e)return e;if(Ze!==void 0)return Ze;let t=null;if(typeof document<"u"){let n=document.getElementById(Xr)?.textContent;if(n)try{t=JSON.parse(n)}catch{t=null}}return Ze=t}function Ae(){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 Jr=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),_e=typeof process<"u"&&process.env&&!1;function Ne(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 Yr(e){Ae();let t=h.cursor;return t&&t.nodeType===1&&t.tagName.toLowerCase()===e.toLowerCase()?(Jr.has(e.toLowerCase())?h.cursor=t.nextSibling:(h.parents.push(t),h.cursor=t.firstChild),t):(_e&&t&&Ne(`<${e}>`,t),null)}function Zr(e){Ae();let t=h.cursor;return t&&t.nodeType===1&&t.tagName.toLowerCase()===e.toLowerCase()?(h.cursor=t.nextSibling,t):(_e&&t&&Ne(`<${e}> (static)`,t),null)}function Qr(e){if(e===""){let n=h.cursor;return n&&n.nodeType===3&&n.data!==""?(h.cursor=n.nextSibling,n.data="",n):null}Ae();let t=h.cursor;return t&&t.nodeType===3?(h.cursor=t.nextSibling,t.nodeValue!==e&&(t.nodeValue=e),t):(_e&&t&&Ne(`text ${JSON.stringify(e.slice(0,24))}`,t),null)}function eo(e){Ae();let t=h.cursor;return t&&t.nodeType===8&&t.data===e?(h.cursor=t.nextSibling,t):(_e&&t&&Ne(`marker <!--${e.slice(0,24)}-->`,t),null)}var Cn=!1;function to(){Cn||(Cn=!0,jt({hydrateElement:Yr,hydrateText:Qr,hydrateMarker:eo,hydrateStatic:Zr}))}function Qe(e,t,n){to(),h.active=!0,h.cursor=t.firstChild,h.parents=[];let r=Pn(),i=n?.resourceNamespace,s=0;Tt(()=>i?`${i}:r${s++}`:`r${s++}`),Et(r?u=>u in r?{value:r[u]}:void 0:null);try{return be(e,t)}finally{h.active=!1,h.cursor=null,h.parents=[]}}function kn(e){return typeof e=="function"?e:(()=>e)}function D(e){return()=>{let t=e();return typeof t=="function"?t():t}}function On(e){return e!=null&&e!==!1}function Rn(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=D(()=>e.when),n=m(t,void 0),r=m(n,void 0),i=q(),s=null,u=null,l=o=>{o!==u&&(s&&z(s),s=W(i),u=o)};return m(()=>{let o=r();return l(o?"when":"fallback"),_(s,()=>{if(o){let a=e.children;return typeof a=="function"&&!Rn(a)?typeof n=="function"?k(()=>k(n)?a(n()):e.fallback):a(n):a}return e.fallback});return e.fallback??null},void 0,{name:"show"})}function tt(e){let t=D(()=>e.each),n=()=>e.fallback??null,r=(i,s)=>{let u=e.children,l=Array.isArray(u)?u.map(o=>typeof o=="function"?o(i,s):o):typeof u=="function"?u(i,s):u;return he(l),l};return e.by?ne(t,e.by,(i,s)=>r(i,s),{fallback:n}):te(t,(i,s)=>r(i,s),{fallback:n})}function nt(e){let t=D(()=>e.each);return re(t,(n,r)=>{let i=e.children(n,r);return he(i),i},{fallback:()=>e.fallback??null})}var rt=Symbol("match");function ot(e){return{[rt]:!0,when:D(()=>e.when),get children(){return e.children}}}function it(e){let t=Array.isArray(e.children)?e.children:[e.children],n=q(),r=null,i=-1,s=u=>{u!==i&&(r&&z(r),r=W(n),i=u)};return m(()=>{for(let u=0;u<t.length;u+=1){let o=t[u],a=0;for(;typeof o=="function"&&!o[rt]&&a++<10;)o=o();if(!o||typeof o!="object"||o[rt]!==!0)continue;let p=o.when();if(On(p))return s(u),_(r,()=>typeof o.children=="function"?o.children(p):o.children)}return s(-2),_(r,()=>e.fallback??null)})}function st(e){let t=kn(e.component),{component:n,...r}=e,i=q(),s=null,u;return m(()=>{let l=t();return l!==u&&(s&&z(s),s=W(i),u=l),l==null?null:typeof l=="string"?{tag:l,props:r}:_(s,()=>l(r))})}function ut(e){let t=()=>e.mount?typeof e.mount=="function"?e.mount():e.mount:document.body,n,r;return $(i=>{n=i,r=document.createElement("div"),r.style.display="contents",t().appendChild(r),K(r,e.children)&&$e(e.ref,r)}),L(()=>{n(),r.remove()}),null}function lt(e){let[t,n]=C(null),r=()=>n(null);return m(()=>{let i=t();if(i!==null)return typeof e.fallback=="function"?e.fallback(i,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}})}function at(e){return m(()=>{let t=typeof e=="function"?e():e,n=[];for(let[r,i]of Object.entries(t)){if(!r)continue;(typeof i=="function"?i():i)&&n.push(r)}return n.join(" ")})}function no(e){return e.startsWith("--")?e:e.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`)}function ct(e){return m(()=>{let t=typeof e=="function"?e():e,n=[];for(let[r,i]of Object.entries(t)){if(!r)continue;let s=typeof i=="function"?i():i;s!=null&&n.push(`${no(r)}: ${s}`)}return n.join("; ")})}return $n(ro);})();
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);})();
@@ -7,9 +7,9 @@
7
7
  *
8
8
  * Same shape as `dom.global.js` and the same global name, minus the string renderer,
9
9
  * node serialisation, template parsing and the request context. A `<script>` tag
10
- * cannot tree-shake, so anything reachable from the entry ships which makes the
10
+ * cannot tree-shake, so anything reachable from the entry ships, which makes the
11
11
  * server half pure weight for a page that renders in a browser. Measured against the
12
- * full build: 21.0 kB gzipped 12.2 kB.
12
+ * full build: 21.0 kB gzipped -> 12.2 kB.
13
13
  *
14
14
  * `hydrate` stays: a page hydrating server-rendered HTML runs in the browser, and it
15
15
  * is the one thing here that touches SSR output. Use `dom.global.js` if you actually
@@ -27,5 +27,5 @@ Show, For, Index, Switch, Match, Portal, Dynamic, ErrorBoundary,
27
27
  // lists
28
28
  mapArray, indexArray, keyArray, } from '../lib/index.js';
29
29
  export {
30
- // reactive primitives the short API and the tuple form, as the full entry does
30
+ // reactive primitives, the short API and the tuple form, as the full entry does
31
31
  signal, memo, effect, store, createSignal, createMemo, createEffect, createComputed, createRenderEffect, createRoot, createResource, createContext, useContext, onCleanup, batch, untrack, } from '@fluixi/reactive';