@fluixi/dom 1.0.0-alpha.83 → 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.
- package/dist/cdn/dom-client.cjs +1427 -1
- package/dist/cdn/dom-client.d.ts +2 -2
- package/dist/cdn/dom-client.global.js +2 -1
- package/dist/cdn/dom-client.js +3 -3
- package/dist/cdn/dom-client.mjs +1430 -1
- package/dist/cdn/dom.cjs +3127 -1
- package/dist/cdn/dom.d.ts +2 -2
- package/dist/cdn/dom.global.js +2 -1
- package/dist/cdn/dom.js +4 -4
- package/dist/cdn/dom.mjs +3133 -1
- package/dist/index.cjs +3155 -1
- package/dist/index.js +2 -2
- package/dist/index.mjs +3149 -1
- package/dist/lib/component/index.cjs +128 -1
- package/dist/lib/component/index.mjs +105 -1
- package/dist/lib/component/modifiers.cjs +126 -1
- package/dist/lib/component/modifiers.d.ts +12 -0
- package/dist/lib/component/modifiers.d.ts.map +1 -1
- package/dist/lib/component/modifiers.js +12 -84
- package/dist/lib/component/modifiers.mjs +105 -1
- package/dist/lib/dom/delegate.cjs +60 -1
- package/dist/lib/dom/delegate.js +1 -1
- package/dist/lib/dom/delegate.mjs +39 -1
- package/dist/lib/dom/dynamic-element.cjs +949 -1
- package/dist/lib/dom/dynamic-element.d.ts +3 -3
- package/dist/lib/dom/dynamic-element.js +2 -2
- package/dist/lib/dom/dynamic-element.mjs +928 -1
- package/dist/lib/dom/hydration-state.cjs +93 -1
- package/dist/lib/dom/hydration-state.d.ts +1 -1
- package/dist/lib/dom/hydration-state.js +1 -1
- package/dist/lib/dom/hydration-state.mjs +72 -1
- package/dist/lib/dom/hydration.cjs +685 -1
- package/dist/lib/dom/hydration.js +8 -8
- package/dist/lib/dom/hydration.mjs +664 -1
- package/dist/lib/dom/index.cjs +2040 -1
- package/dist/lib/dom/index.js +1 -1
- package/dist/lib/dom/index.mjs +2020 -1
- package/dist/lib/dom/integration.cjs +71 -1
- package/dist/lib/dom/integration.js +3 -3
- package/dist/lib/dom/integration.mjs +51 -1
- package/dist/lib/dom/island.cjs +790 -1
- package/dist/lib/dom/island.d.ts +1 -1
- package/dist/lib/dom/island.js +11 -11
- package/dist/lib/dom/island.mjs +769 -1
- package/dist/lib/dom/runtime.cjs +1432 -1
- package/dist/lib/dom/runtime.d.ts +60 -17
- package/dist/lib/dom/runtime.d.ts.map +1 -1
- package/dist/lib/dom/runtime.js +122 -79
- package/dist/lib/dom/runtime.mjs +1414 -1
- package/dist/lib/dom/server/fx-data.cjs +53 -1
- package/dist/lib/dom/server/fx-data.d.ts +5 -5
- package/dist/lib/dom/server/fx-data.js +6 -6
- package/dist/lib/dom/server/fx-data.mjs +32 -1
- package/dist/lib/dom/server/host.cjs +66 -1
- package/dist/lib/dom/server/host.d.ts +6 -0
- package/dist/lib/dom/server/host.d.ts.map +1 -1
- package/dist/lib/dom/server/host.js +7 -1
- package/dist/lib/dom/server/host.mjs +45 -1
- package/dist/lib/dom/server/index.cjs +759 -1
- package/dist/lib/dom/server/index.d.ts +1 -1
- package/dist/lib/dom/server/index.js +1 -1
- package/dist/lib/dom/server/index.mjs +743 -1
- package/dist/lib/dom/server/nodes.cjs +302 -1
- package/dist/lib/dom/server/nodes.d.ts +2 -2
- package/dist/lib/dom/server/nodes.d.ts.map +1 -1
- package/dist/lib/dom/server/nodes.js +4 -4
- package/dist/lib/dom/server/nodes.mjs +279 -1
- package/dist/lib/dom/server/parse-template.cjs +395 -1
- package/dist/lib/dom/server/parse-template.d.ts +1 -1
- package/dist/lib/dom/server/parse-template.js +4 -4
- package/dist/lib/dom/server/parse-template.mjs +372 -1
- package/dist/lib/dom/server/render.cjs +691 -1
- package/dist/lib/dom/server/render.d.ts +9 -1
- package/dist/lib/dom/server/render.d.ts.map +1 -1
- package/dist/lib/dom/server/render.js +23 -15
- package/dist/lib/dom/server/render.mjs +677 -1
- package/dist/lib/dom/server/request-context.cjs +110 -1
- package/dist/lib/dom/server/request-context.d.ts +29 -9
- package/dist/lib/dom/server/request-context.d.ts.map +1 -1
- package/dist/lib/dom/server/request-context.js +28 -8
- package/dist/lib/dom/server/request-context.mjs +89 -1
- package/dist/lib/dom/server/serialize.cjs +187 -1
- package/dist/lib/dom/server/serialize.js +3 -3
- package/dist/lib/dom/server/serialize.mjs +164 -1
- package/dist/lib/dom/server-renderer.cjs +760 -1
- package/dist/lib/dom/server-renderer.js +1 -1
- package/dist/lib/dom/server-renderer.mjs +745 -1
- package/dist/lib/dom/types.cjs +18 -1
- package/dist/lib/dom/utils.cjs +381 -1
- package/dist/lib/dom/utils.d.ts +1 -88
- package/dist/lib/dom/utils.d.ts.map +1 -1
- package/dist/lib/dom/utils.js +2 -99
- package/dist/lib/dom/utils.mjs +361 -1
- package/dist/lib/dom/versions.cjs +60 -1
- package/dist/lib/dom/versions.d.ts +3 -3
- package/dist/lib/dom/versions.d.ts.map +1 -1
- package/dist/lib/dom/versions.js +17 -5
- package/dist/lib/dom/versions.mjs +37 -1
- package/dist/lib/element/attributes.cjs +19 -1
- package/dist/lib/element/attributes.d.ts +7 -7
- package/dist/lib/element/attributes.js +1 -1
- package/dist/lib/element/attributes.mjs +1 -0
- package/dist/lib/element/index.cjs +19 -1
- package/dist/lib/element/index.mjs +1 -0
- package/dist/lib/element/types.cjs +18 -1
- package/dist/lib/element/types.d.ts +4 -5
- package/dist/lib/element/types.d.ts.map +1 -1
- package/dist/lib/element/types.js +0 -1
- package/dist/lib/flow/class-map.cjs +38 -1
- package/dist/lib/flow/class-map.d.ts +3 -3
- package/dist/lib/flow/class-map.js +2 -2
- package/dist/lib/flow/class-map.mjs +17 -1
- package/dist/lib/flow/client-only.cjs +57 -1
- package/dist/lib/flow/client-only.d.ts +4 -4
- package/dist/lib/flow/client-only.js +3 -3
- package/dist/lib/flow/client-only.mjs +36 -1
- package/dist/lib/flow/dynamic.cjs +53 -1
- package/dist/lib/flow/dynamic.d.ts +2 -2
- package/dist/lib/flow/dynamic.js +3 -3
- package/dist/lib/flow/dynamic.mjs +32 -1
- package/dist/lib/flow/error-boundary.cjs +43 -1
- package/dist/lib/flow/error-boundary.d.ts +2 -2
- package/dist/lib/flow/error-boundary.js +3 -3
- package/dist/lib/flow/error-boundary.mjs +22 -1
- package/dist/lib/flow/for.cjs +66 -1
- package/dist/lib/flow/for.d.ts +9 -9
- package/dist/lib/flow/for.d.ts.map +1 -1
- package/dist/lib/flow/for.js +2 -2
- package/dist/lib/flow/for.mjs +45 -1
- package/dist/lib/flow/index-flow.cjs +67 -1
- package/dist/lib/flow/index-flow.d.ts +5 -5
- package/dist/lib/flow/index-flow.js +4 -4
- package/dist/lib/flow/index-flow.mjs +46 -1
- package/dist/lib/flow/index.cjs +805 -1
- package/dist/lib/flow/index.mjs +792 -1
- package/dist/lib/flow/portal.cjs +538 -1
- package/dist/lib/flow/portal.mjs +519 -1
- package/dist/lib/flow/show.cjs +81 -1
- package/dist/lib/flow/show.d.ts +1 -1
- package/dist/lib/flow/show.d.ts.map +1 -1
- package/dist/lib/flow/show.js +4 -115
- package/dist/lib/flow/show.mjs +67 -1
- package/dist/lib/flow/style-map.cjs +43 -1
- package/dist/lib/flow/style-map.d.ts +3 -3
- package/dist/lib/flow/style-map.js +3 -3
- package/dist/lib/flow/style-map.mjs +22 -1
- package/dist/lib/flow/switch.cjs +91 -1
- package/dist/lib/flow/switch.d.ts +3 -3
- package/dist/lib/flow/switch.d.ts.map +1 -1
- package/dist/lib/flow/switch.js +6 -6
- package/dist/lib/flow/switch.mjs +70 -1
- package/dist/lib/flow/utils.cjs +44 -1
- package/dist/lib/flow/utils.d.ts +1 -1
- package/dist/lib/flow/utils.js +1 -1
- package/dist/lib/flow/utils.mjs +23 -1
- package/dist/lib/html.cjs +32 -1
- package/dist/lib/html.d.ts +6 -6
- package/dist/lib/html.js +5 -5
- package/dist/lib/html.mjs +11 -1
- package/dist/lib/index.cjs +3104 -1
- package/dist/lib/index.d.ts +0 -1
- package/dist/lib/index.d.ts.map +1 -1
- package/dist/lib/index.js +2 -3
- package/dist/lib/index.mjs +3097 -1
- package/dist/lib/shared/types.cjs +18 -1
- package/dist/lib/shared/types.d.ts +8 -8
- package/dist/tsconfig.lib.tsbuildinfo +1 -1
- package/dist/version.generated.cjs +26 -1
- package/dist/version.generated.d.ts +1 -1
- package/dist/version.generated.js +2 -2
- package/dist/version.generated.mjs +5 -1
- package/package.json +7 -6
- package/dist/lib/jsx/control-flow/flow.cjs +0 -1
- package/dist/lib/jsx/control-flow/flow.d.ts +0 -2
- package/dist/lib/jsx/control-flow/flow.d.ts.map +0 -1
- package/dist/lib/jsx/control-flow/flow.js +0 -627
- package/dist/lib/jsx/control-flow/flow.mjs +0 -0
- package/dist/lib/jsx/control-flow/for-flow.cjs +0 -1
- package/dist/lib/jsx/control-flow/for-flow.d.ts +0 -2
- package/dist/lib/jsx/control-flow/for-flow.d.ts.map +0 -1
- package/dist/lib/jsx/control-flow/for-flow.js +0 -1
- package/dist/lib/jsx/control-flow/for-flow.mjs +0 -0
package/dist/cdn/dom.d.ts
CHANGED
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
* FluixiDOM.render(() => App(), document.getElementById('root'));
|
|
7
7
|
*
|
|
8
8
|
* Self-contained: the dom runtime (render/insert/spread/createComponent/control
|
|
9
|
-
* flow) AND the reactive API (createSignal/createMemo/createEffect
|
|
10
|
-
* in, so a single <script> gives you everything to build a reactive UI
|
|
9
|
+
* flow) AND the reactive API (createSignal/createMemo/createEffect/...) are bundled
|
|
10
|
+
* in, so a single <script> gives you everything to build a reactive UI:
|
|
11
11
|
* everything hangs off window.FluixiDOM.
|
|
12
12
|
*/
|
|
13
13
|
export * from '../lib/index.js';
|
package/dist/cdn/dom.global.js
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
"use strict";var FluixiDOM=(()=>{var $t=Object.defineProperty;var Bo=Object.getOwnPropertyDescriptor;var Go=Object.getOwnPropertyNames;var Xo=Object.prototype.hasOwnProperty;var Jo=(e,t)=>{for(var n in t)$t(e,n,{get:t[n],enumerable:!0})},Yo=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Go(t))!Xo.call(e,o)&&o!==n&&$t(e,o,{get:()=>t[o],enumerable:!(r=Bo(t,o))||r.enumerable});return e};var Zo=e=>Yo($t({},"__esModule",{value:!0}),e);var au={};Jo(au,{ClientOnly:()=>wn,Dynamic:()=>po,ErrorBoundary:()=>mo,FX_DATA_ID:()=>me,For:()=>uo,Index:()=>lo,Island:()=>eo,JSX_PROPERTIES:()=>Be,Match:()=>co,NoSsr:()=>yo,Portal:()=>ho,SVG_ELEMENTS:()=>oi,SVG_NAMESPACE:()=>ie,Show:()=>ao,Switch:()=>fo,VOID_ELEMENTS:()=>ri,addClass:()=>ai,addDelegatedEventListener:()=>Er,addNativeEventListener:()=>tn,appendChildren:()=>mi,applyElementProp:()=>Ke,applyProps:()=>on,applyUse:()=>nn,asComponent:()=>Xt,asContext:()=>gs,asOutlet:()=>ys,asProvider:()=>ms,asRoute:()=>hs,asRouter:()=>ds,asRoutes:()=>ps,asSuspense:()=>bs,batch:()=>S,bindPair:()=>Bs,captureHydrationCursor:()=>br,checkRenderType:()=>vs,classMap:()=>go,cleanChildren:()=>K,cloneTemplate:()=>Nr,closest:()=>si,createComponent:()=>pn,createComputed:()=>Xn,createContext:()=>Je,createDynamicElement:()=>Ma,createEffect:()=>E,createElement:()=>hi,createMemo:()=>m,createNativeElement:()=>en,createPortal:()=>Us,createRenderEffect:()=>b,createRequestContext:()=>he,createResource:()=>er,createRoot:()=>M,createSignal:()=>g,createStore:()=>Dt,createTemplate:()=>Ar,delegate:()=>wi,delegateEvents:()=>Qt,effect:()=>rr,escapeFxJson:()=>Le,escapeHTML:()=>zs,fnName:()=>qs,generateID:()=>As,getAttribute:()=>fi,getGlobal:()=>Ci,getLitEventName:()=>ti,getLocals:()=>mn,getOffset:()=>vi,getRequestContext:()=>H,getRequestEvent:()=>wt,getRequestLocals:()=>xt,getServerData:()=>Ie,getStableElementId:()=>Es,getStyle:()=>pi,handleRef:()=>qe,hasClass:()=>ci,holeContent:()=>js,holeEnd:()=>Ms,holeScope:()=>Os,html:()=>no,hydrate:()=>At,hydrateAdvancePast:()=>ce,hydrateIslands:()=>to,indexArray:()=>et,initializeIntegration:()=>Sa,insert:()=>V,insertExpression:()=>Ce,intergartionInitialized:()=>Ta,isAccessor:()=>Ks,isComponent:()=>$,isContext:()=>pr,isCustomElement:()=>$n,isDOMNode:()=>_i,isDelegatedEvent:()=>_s,isDomElement:()=>rt,isDomNode:()=>Q,isDomText:()=>ot,isEventHandler:()=>ei,isFunction:()=>ks,isIntegrationInitialized:()=>Ea,isJSXTemplate:()=>Ri,isLitTemplateResult:()=>In,isNativeElement:()=>Ws,isOutlet:()=>fr,isPromise:()=>ke,isProvider:()=>dr,isReactElement:()=>Ai,isRoute:()=>cr,isRouter:()=>ur,isRoutes:()=>lr,isSVGElement:()=>sn,isServer:()=>A,isSuspense:()=>hr,isTemplateFactory:()=>Ni,isVisible:()=>gi,iterateFn:()=>Ds,keyArray:()=>Qe,makeArrayFlat:()=>Rr,mapArray:()=>Ze,memo:()=>nr,mergeProps:()=>Vs,observeIntersection:()=>Si,observeResize:()=>Ti,onCleanup:()=>x,query:()=>Lt,queryAll:()=>ii,registerCreateComponent:()=>xa,registerGlobal:()=>ki,removeAttribute:()=>di,removeChildren:()=>yi,removeClass:()=>ui,removeDelegatedEventListener:()=>Zt,render:()=>an,renderToString:()=>Rn,renderToStringAsync:()=>kn,resetIntegration:()=>Aa,runHydrationAt:()=>_e,runWithRequestContext:()=>ye,runWithoutHydration:()=>vr,scrollIntoView:()=>bi,serializeNode:()=>L,serializeResourceData:()=>_t,setAttribute:()=>C,setClassList:()=>Me,setClassName:()=>Pe,setDataRedactor:()=>_n,setDynamicAttribute:()=>lt,setDynamicBoolAttribute:()=>rn,setDynamicProperty:()=>ct,setProperty:()=>Oe,setRequestStore:()=>yn,setServerMode:()=>Z,setStyle:()=>je,setStyles:()=>Ln,shouldSetAsProperty:()=>ni,signal:()=>tr,splitProps:()=>Hs,spread:()=>Fs,store:()=>zo,styleMap:()=>bo,svg:()=>ro,templateNode:()=>Cs,toAttributeName:()=>Qo,toggleClass:()=>li,untrack:()=>T,useContext:()=>Kn,waitForElement:()=>xi});function Qo(e){return e.startsWith("aria-")||e.startsWith("data-")?e:/[A-Z]/.test(e)?e.replace(/([A-Z])/g,"-$1").toLowerCase():e}function ei(e){return e.startsWith("@")||e.startsWith("on")&&e.length>2}function ti(e){return e.startsWith("@")?e.slice(1):e.startsWith("on")?e.slice(2).toLowerCase():e}function ni(e,t){let n=new Set(["checked","value","selected","disabled","readonly","required","multiple","open","contenteditable","draggable","spellcheck"]),r={input:new Set(["value","checked","indeterminate"]),textarea:new Set(["value"]),select:new Set(["value"]),option:new Set(["selected","value"]),audio:new Set(["volume","currentTime","paused"]),video:new Set(["volume","currentTime","paused"]),img:new Set(["src","srcset"]),iframe:new Set(["src"]),a:new Set(["href"])};return n.has(t)||r[e]&&r[e].has(t)}var ri=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),oi=new Set(["svg","g","path","circle","rect","line","polyline","polygon","ellipse","text","tspan","use","defs","symbol","mask","clipPath","pattern","linearGradient","radialGradient","stop","filter","feGaussianBlur","feOffset","feMerge","feMergeNode","foreignObject"]),ie="http://www.w3.org/2000/svg";function $n(e){return e.localName.includes("-")}function Ke(e,t,n,r=!1){if(n==null){e.removeAttribute(t);return}if($n(e)){e[t]=n;return}C(e,t,n,r)}var Be=new Set(["className","value","checked","selected","innerHTML","innerText","textContent","indeterminate","htmlFor"]);function Lt(e,t=document){return t.querySelector(e)}function ii(e,t=document){return Array.from(t.querySelectorAll(e))}function si(e,t){return e.closest(t)}function ai(e,...t){e.classList.add(...t)}function ui(e,...t){e.classList.remove(...t)}function li(e,...t){t.forEach(n=>e.classList.toggle(n))}function ci(e,t){return e.classList.contains(t)}function C(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 fi(e,t){return e.getAttribute(t)}function di(e,t){e.removeAttribute(t)}function Ln(e,t){Object.assign(e.style,t)}function pi(e,t){return window.getComputedStyle(e).getPropertyValue(t)}function hi(e,t={},...n){let r=document.createElement(e);return Object.entries(t).forEach(([o,i])=>{if(o==="class"||o==="className")r.className=i;else if(o==="style"&&typeof i=="object")Ln(r,i);else if(o.startsWith("on")&&typeof i=="function"){let s=o.slice(2).toLowerCase();r.addEventListener(s,i)}else C(r,o,i)}),n.forEach(o=>{typeof o=="string"?r.appendChild(document.createTextNode(o)):r.appendChild(o)}),r}function yi(e){for(;e.firstChild;)e.removeChild(e.firstChild)}function mi(e,...t){t.forEach(n=>{typeof n=="string"?e.appendChild(document.createTextNode(n)):e.appendChild(n)})}function gi(e){let t=e.getBoundingClientRect();return t.top>=0&&t.left>=0&&t.bottom<=window.innerHeight&&t.right<=window.innerWidth}function bi(e,t={behavior:"smooth",block:"nearest"}){e.scrollIntoView(t)}function vi(e){let t=e.getBoundingClientRect();return{top:t.top+window.pageYOffset,left:t.left+window.pageXOffset}}function wi(e,t,n,r){let o=i=>{let s=i.target.closest(n);s&&e.contains(s)&&r(i,s)};return e.addEventListener(t,o),()=>{e.removeEventListener(t,o)}}function xi(e,t=5e3){return new Promise((n,r)=>{let o=Lt(e);if(o){n(o);return}let i=new MutationObserver(()=>{let a=Lt(e);a&&(i.disconnect(),clearTimeout(s),n(a))});i.observe(document.body,{childList:!0,subtree:!0});let s=setTimeout(()=>{i.disconnect(),r(new Error(`Element ${e} not found within ${t}ms`))},t)})}function Si(e,t,n={}){let r=new IntersectionObserver(o=>{o.forEach(i=>{t(i.isIntersecting)})},n);return r.observe(e),()=>{r.disconnect()}}function Ti(e,t){let n=new ResizeObserver(r=>{r.forEach(t)});return n.observe(e),()=>{n.disconnect()}}var Ei=typeof Symbol=="function"&&Symbol.for?Symbol.for("react.element"):60103;function Ai(e){return typeof e=="object"&&e!==null&&e.$$typeof===Ei}function In(e){return e&&typeof e=="object"&&e.strings&&Array.isArray(e.strings)&&e.values&&Array.isArray(e.values)}function Ni(e){if(typeof e!="function")return!1;try{let t=e();return In(t)}catch{return!1}}function Ri(e){return typeof e=="object"&&e!==null&&(e.$$typeof==="template"||typeof e.type=="function")}function _i(e){return e instanceof Node}function ki(e,t,n="Fluixi"){typeof globalThis<"u"&&(typeof globalThis[n]>"u"&&(globalThis[n]={}),typeof globalThis[n][e]>"u"&&(globalThis[n][e]=t))}function Ci(e,t,n="Fluixi"){return typeof globalThis<"u"&&typeof globalThis[n]<"u"&&typeof globalThis[n][e]<"u"?globalThis[n][e]:t}var Oi="__fluixi_signal_next_state__",Pi=e=>{typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e)},f=globalThis[Oi]??={consumer:null,untracked:!1,owner:null,queue:[],scheduled:!1,flushing:!1,batchDepth:0,hostSchedule:Pi,onSuspend:null,onError:null,observer:null},Mi="1.0.0-alpha.83";function ji(e){return f.observer=e,()=>{f.observer===e&&(f.observer=null)}}var O=[],qi;function Kt(e){let t=f.observer;t&&t.created(e.parents===void 0?{...e,parents:O,origin:e.origin??qi}:e)}function Di(e){return f.observer?(O.push(e),!0):!1}function $i(){O.pop()}function Li(e){f.observer?.ran?.(e)}function Ii(e,t){f.observer?.wrote?.(e,t)}function j(e,t,n,r){let o=f.observer;!o?.bound||!O.length||o.bound(O[O.length-1],e,t,n,r)}function q(e,t,n,r){let o=f.observer;!o?.directive||!O.length||o.directive(O[O.length-1],e,t,n,r)}function Fi(e){f.observer?.contextCreated?.(e)}function Ft(e,t,n){let r=f.observer;!r?.context||!O.length||r.context(O[O.length-1],e,t,n)}function Bt(e){f.observer?.disposed?.(e)}var Vi="__FLUIXI_DEVTOOLS_HOOK__",Fn=globalThis[Vi];if(typeof Fn?.inject=="function")try{Fn.inject({observeReactiveNodes:ji,version:Mi})}catch{}function Un(){return f.observer!=null}var Vn=0,Hn=1,Ee=2,Wn=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))}},Hi=class extends Wn{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++,Ii(this,f.consumer),this.observers)for(let t of[...this.observers])t.markDirty(Ee);Vt(this)}}peek(){return this._value}},zn=class extends Wn{constructor(e,t){super(),this._threw=!1,this._initialized=!1,this.state=Ee,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===Hn&&this.sources){for(let e of this.sources)if(e.updateIfNecessary(),this.state===Ee)break}(this.state===Ee||!this._initialized)&&this.recompute(),this.state=Vn}recompute(){if(this.sources){for(let a of this.sources)a.observers?.delete(this);this.sources.clear()}let e=f.consumer,t=f.untracked,n=Di(this);f.consumer=this,f.untracked=!1;let r,o=!1,i;try{r=this._fn()}catch(a){o=!0,i=a,r=this._value}finally{f.consumer=e,f.untracked=t,n&&$i()}let s=!this._initialized||this._threw!==o||(o?i!==this._error:!this._equals(this._value,r));if(this._initialized=!0,this._threw=o,this._error=i,this._value=r,Li(this),s){if(this.version++,this.observers)for(let a of[...this.observers])a.markDirty(Ee);Vt(this)}}markDirty(e){if(this.state>=e)return;let t=this.state===Vn;if(this.state=e,t){if(this.observers)for(let n of[...this.observers])n.markDirty(Hn);Vt(this)}}peek(){if(this.updateIfNecessary(),this._threw)throw this._error;return this._value}};function Vt(e){if(e.watchers)for(let t of[...e.watchers])t._notify(e)}var Ui=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 Wi(e){if(f.untracked)return e();f.untracked=!0;try{return e()}finally{f.untracked=!1}}function se(e){let t=Xe(e);return e&&(e.owned??=[]).push(t),t}function ae(e,t=!0){Ae(e,t)}function Xe(e){return{cleanups:null,owned:null,parent:e,contexts:null}}function Je(e,t){let n=Symbol(t??"context");return Fi(n),{id:n,defaultValue:e,Provider:r=>{Ft(n,"provide",r.value);let o=f.owner,i=Xe(o);(i.contexts=new Map).set(n,r.value),o&&(o.owned??=[]).push(i),f.owner=i;try{return r.children}finally{f.owner=o}}}}function Kn(e){let t=f.owner;for(;t;){if(t.contexts&&t.contexts.has(e.id)){let n=t.contexts.get(e.id);return Ft(e.id,"read",n),n}t=t.parent}return Ft(e.id,"read",e.defaultValue),e.defaultValue}function Bn(e,t){let n=e;for(;n;){if(n.contexts&&n.contexts.has(t.id))return n.contexts.get(t.id);n=n.parent}return t.defaultValue}function zi(e){f.onSuspend=e}function Ki(e){return f.onSuspend?(f.onSuspend(e,f.owner),!0):!1}function Bi(e){f.onError=e}function U(){return f.owner}function P(e,t){let n=f.owner;f.owner=e;try{return t()}finally{f.owner=n}}function x(e){if(f.owner){if(f.owner.disposed){e();return}(f.owner.cleanups??=[]).push(e)}}function Ae(e,t=!0){if(!e.disposed){if(e.owned){for(let n=e.owned.length-1;n>=0;n--)Ae(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 M(e){let t=Xe(f.owner);f.owner&&(f.owner.owned??=[]).push(t);let n=f.owner;f.owner=t;try{return e(()=>Ae(t))}finally{f.owner=n}}function Gi(e){f.hostSchedule=e??(t=>{Promise.resolve().then(t)})}function Xi(e){e.queued||(e.queued=!0,f.queue.push(e),!f.scheduled&&f.batchDepth===0&&(f.scheduled=!0,f.hostSchedule(Ye)))}function Ye(){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 Ji(){f.batchDepth===0&&Ye()}function Yi(e){f.batchDepth++;try{return e()}finally{--f.batchDepth===0&&Ye()}}var Zi=class{constructor(e,t=!1){this.queued=!1,this.disposed=!1,this.owner=Xe(f.owner),f.owner&&(f.owner.cleanups??=[]).push(()=>this.dispose()),this.computed=new zn(()=>{Ae(this.owner,!1),P(this.owner,()=>{let n=e();typeof n=="function"&&(this.owner.cleanups??=[]).push(n)})}),Kt({kind:"effect",node:this.computed,handle:this,internal:!t}),this.watcher=new Ui(()=>Xi(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,Bt(this.computed),this.watcher.unwatch(this.computed),Ae(this.owner))}};function Gt(e,t=!1){let n=new Zi(e,t);return()=>n.dispose()}function Qi(e){return!!e&&typeof e.then=="function"}Gi(()=>{});var Gn=Symbol.for("signal"),es=Symbol.for("memo"),ts=Symbol.for("signal-node");function g(e,t){let n=new Hi(e,{equals:t?.equals}),r=(()=>n.get()),o=(i=>{let s=typeof i=="function"?i(n.peek()):i;return n.set(s),Ji(),s});return Object.defineProperty(r,Gn,{value:!0,enumerable:!0}),Object.defineProperty(r,ts,{value:{get value(){return n.peek()},get version(){return n.version}},enumerable:!1}),Kt({kind:"signal",node:n,handle:r,name:t?.name,set:o}),Un()&&x(()=>Bt(n)),[r,o]}function m(e,t,n){let r=t,o=U(),i=new zn(()=>P(o,()=>{try{return r=e(r)}catch(a){if(Qi(a))return Ki(a),r;throw a}}),{equals:n?.equals}),s=(()=>i.get());return Object.defineProperty(s,Gn,{value:!0,enumerable:!0}),Object.defineProperty(s,es,{value:!0,enumerable:!0}),Kt({kind:"memo",node:i,handle:s,name:n?.name}),Un()&&x(()=>Bt(i)),s}function E(e,t){let n=t;return Gt(()=>{n=e(n)},!0)}function Xn(e,t){let n=t;Gt(()=>{n=e(n)})}function b(e,t){let n=t;return Gt(()=>{n=e(n)})}function S(e){return Yi(e)}function T(e){return Wi(e)}function Jn(){return Ye(),Promise.resolve()}function Ze(e,t,n){let r=[];return x(()=>{for(let o of r)o.dispose();r=[]}),m(()=>{let o=e()||[];return T(()=>{if(o.length===0){for(let u of r)u.dispose();return r=[],n?.fallback?n.fallback():[]}let i=new Map;for(let u of r)i.has(u.item)||i.set(u.item,u);let s=[],a=new Set;for(let u=0;u<o.length;u++){let l=o[u],c=i.get(l);if(c&&!a.has(c))c.setIndex(u),s.push(c),a.add(c);else{let d,h,y;M(w=>{y=w;let[F,Se]=g(u,{name:"row index"});h=Se,d=t(l,F)});let R={item:l,rendered:d,dispose:y,setIndex:h};s.push(R),a.add(R)}}for(let u of r)a.has(u)||u.dispose();return r=s,s.map(u=>u.rendered)})},void 0,{name:"mapArray"})}function Qe(e,t,n,r){let o=[],i=[];return x(()=>{for(let s of i)s.dispose();o=[],i=[]}),m(()=>{let s=e()||[];return T(()=>{if(s.length===0){for(let d of i)d.dispose();return o=[],i=[],r?.fallback?r.fallback():[]}let a=new Map;for(let d=0;d<o.length;d++)a.set(o[d],i[d]);let u=[],l=[],c=new Set;for(let d=0;d<s.length;d++){let h=t(s[d]),y=a.get(h);if(y&&!c.has(h))y.setIndex(d),u.push(y);else{let R,w,F;M(Se=>{F=Se;let[J,Te]=g(d,{name:"row index"});w=Te;let He=m(oe=>(e()||[])[J()]??oe,s[d]);R=n(He,J)}),u.push({rendered:R,dispose:F,setIndex:w})}l.push(h),c.add(h)}for(let[d,h]of a)c.has(d)||h.dispose();return o=l,i=u,u.map(d=>d.rendered)})},void 0,{name:"keyArray"})}function et(e,t,n){let r=[];return x(()=>{for(let o of r)o.dispose();r=[]}),m(()=>{let o=e()||[];return T(()=>{if(o.length===0){for(let u of r)u.dispose();return r=[],n?.fallback?n.fallback():[]}let i=r.length,s=o.length;for(let u=i;u<s;u++){let l,c,d,h=o[u];M(y=>{d=y;let[R,w]=g(h);c=w,l=t(R,u)}),r.push({rendered:l,setItem:c,dispose:d})}for(let u=s;u<i;u++)r[u].dispose();s<i&&(r=r.slice(0,s));let a=Math.min(i,s);for(let u=0;u<a;u++)r[u].setItem(o[u]);return r.map(u=>u.rendered)})},void 0,{name:"indexArray"})}var ns=typeof window>"u"?!1:window.__FLUIXI_PROD__===!0,rs=typeof process>"u"?ns:!1,os=Symbol.for("signal");function N(e){return typeof e=="function"&&e[os]===!0}var Ht=null;function Yn(e){Ht=e}function is(e){Ht&&Ht(e)}var Ut=null;function Zn(e){Ut=e}function ss(e){return Ut?Ut(e):void 0}var Wt=null;function tt(e){Wt=e}function as(){return Wt?Wt():void 0}var zt=null;function Qn(e){zt=e}function us(e,t){zt&&zt(e,t)}function ls(e){return!!e&&typeof e.then=="function"}var It=Symbol();function er(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 i=n.transport===!1?void 0:as(),s=i!==void 0?ss(i):void 0,a=s!==void 0,[u,l]=g(s!==void 0?s.value:n.initialValue,{equals:!1}),[c,d]=g(void 0,{equals:!1}),[h,y]=g(s!==void 0||n.initialValue!==void 0?"ready":"unresolved",{equals:!1}),[R,w]=g(void 0,{equals:!1}),[F,Se]=g(void 0,{equals:!1}),J=It,Te=!1;E(()=>{let _=r();if(F(),_===!1||_===null||_===void 0){J=It,S(()=>{y("unresolved"),w(void 0),d(void 0)});return}let Ue=Te;if(Te=!1,J!==It&&_===J&&!Ue)return;if(J=_,a){a=!1;return}let We=!1;x(()=>We=!0);let qn=T(h),Ko=T(u),Dn=qn==="ready"||qn==="refreshing";S(()=>{y(Dn?"refreshing":"pending"),d(void 0)});try{let Y=o(_,{value:Ko,refetching:Dn});ls(Y)?(w(Y),is(Y),Y.then(ze=>{We||(i!==void 0&&us(i,ze),S(()=>{l(()=>ze),y("ready"),w(void 0)}))},ze=>{We||S(()=>{d(ze),y("errored"),w(void 0)})})):S(()=>{l(()=>Y),y("ready"),w(void 0)})}catch(Y){if(We)return;S(()=>{d(Y),y("errored"),w(void 0)})}});let He=()=>{let _=h();return _==="pending"||_==="refreshing"},oe=(()=>{let _=c();if(_)throw _;if(He()){let Ue=R();if(Ue)throw Ue}return u()});return Object.defineProperties(oe,{state:{get:h},loading:{get:He},error:{get:c},latest:{get:u}}),Object.defineProperty(oe,Symbol.for("resource"),{value:!0,enumerable:!0}),Object.defineProperty(oe,Symbol.for("signal"),{value:!0,enumerable:!0}),[oe,{mutate:l,refetch:()=>{Te=!0,Se(void 0)}}]}function Ge(e){if(typeof e=="function"&&!e.length){let t=e();return N(t)?t:Ge(t)}if(Array.isArray(e)){let t=[];for(let n=0;n<e.length;n++){let r=Ge(e[n]);Array.isArray(r)?t.push.apply(t,r):t.push(r)}return t}return e}function nt(e){let t=m(e);return rs?m(()=>Ge(t()),void 0,{name:"children"}):m(()=>Ge(t()))}var cs=Je();zi((e,t)=>{let n=Bn(t,cs);n&&(n.increment(),e.finally(()=>n.decrement()))});var fs=Je();Bi((e,t)=>{let n=Bn(t,fs);return n?(n.setError(e),!0):!1});var ue=Symbol.for("fluixi-proxy");function tr(e,t){let[n,r]=g(e,t);return Object.assign(n,{set:r})}function nr(e,t,n){return m(e,t,n)}function rr(e,t){return E(e,t)}var or="1.0.0-alpha.83";var ir="1.0.0-alpha.83";var D={dom:or,reactive:ir};function sr(e){D.core&&e.setAttribute("fluixi",D.core),e.setAttribute("fx-dom",D.dom),e.setAttribute("fx-reactive",D.reactive),typeof globalThis<"u"&&(globalThis.Fluixi=D)}function ar(){let e=[D.core,D.dom,D.reactive].filter(t=>t!==void 0);new Set(e).size<=1||console.warn(`[fluixi] package versions disagree — core ${D.core??"(absent)"}, dom ${D.dom}, reactive ${D.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 ds(e){return Object.defineProperty(e,Symbol.for("fluixi-router"),{value:!0,enumerable:!0}),e}function ps(e){return Object.defineProperty(e,Symbol.for("fluixi-routes"),{value:!0,enumerable:!0}),e}function hs(e){return Object.defineProperty(e,Symbol.for("fluixi-route"),{value:!0,enumerable:!0}),e}function ys(e){return typeof e!="function"||Object.defineProperty(e,Symbol.for("fluixi-outlet"),{value:!0,enumerable:!0}),e}function ms(e){return Object.defineProperty(e,Symbol.for("fluixi-provider"),{value:!0,enumerable:!0}),e}function gs(e){return Object.defineProperty(e,Symbol.for("fluixi-context"),{value:!0,enumerable:!0}),e}function Xt(e){return typeof e!="function"||Object.defineProperty(e,Symbol.for("fluixi-component"),{value:!0,enumerable:!0}),e}function bs(e){return Object.defineProperty(e,Symbol.for("fluixi-suspense"),{value:!0,enumerable:!0}),e}function ur(e){return typeof e=="function"&&e[Symbol.for("fluixi-router")]===!0}function lr(e){return typeof e=="function"&&e[Symbol.for("fluixi-routes")]===!0}function cr(e){return typeof e=="function"&&e[Symbol.for("fluixi-route")]===!0}function fr(e){return typeof e=="function"&&e[Symbol.for("fluixi-outlet")]===!0}function dr(e){return typeof e=="function"&&e[Symbol.for("fluixi-provider")]===!0}function pr(e){return typeof e=="function"&&e[Symbol.for("fluixi-context")]===!0}function $(e){return typeof e=="function"&&e[Symbol.for("fluixi-component")]===!0}function hr(e){return typeof e=="function"&&e[Symbol.for("fluixi-suspense")]===!0}function vs(e){return ur(e)?{type:"router",value:e}:cr(e)?{type:"route",value:e}:lr(e)?{type:"routes",value:e}:fr(e)?{type:"outlet",value:e}:$(e)?{type:"component",value:e}:hr(e)?{type:"suspense",value:e}:dr(e)?{type:"provider",value:e}:pr(e)?{type:"context",value:e}:{type:"none",value:e}}var Re=Symbol.for("fluixi.server-node"),ws=Symbol.for("fluixi.dom.server-host"),xs=globalThis,Ne=xs[ws]??={server:typeof document>"u",nodes:null};function A(){return Ne.server}function Z(e){Ne.server=e}function yr(e){Ne.nodes=e}function le(){if(!Ne.nodes)throw new Error("[fluixi] server render ran before @fluixi/dom/server loaded");return Ne.nodes}function Q(e){return e!=null&&e[Re]===!0?!0:typeof Node<"u"&&e instanceof Node}function rt(e){return e!=null&&e[Re]===!0?e.nodeType===1:typeof Element<"u"&&e instanceof Element}function ot(e){return e!=null&&e[Re]===!0?e.nodeType===3:typeof Text<"u"&&e instanceof Text}var p={active:!1,cursor:null,parents:[]},mr=null;function gr(e){mr=e}function it(){return mr}function Jt(e,t){return p.active&&t.parentNode===e}function Yt(e){let t=p.parents.lastIndexOf(e);t!==-1&&(p.parents.length=t),p.cursor=e.nextSibling}function br(){return p.active?p.cursor:null}function _e(e,t){if(!e||e.parentNode==null)return t();let n=p.active,r=p.cursor,o=p.parents;p.active=!0,p.cursor=e,p.parents=[];try{return t()}finally{p.active=n,p.cursor=r,p.parents=o}}function vr(e){if(!p.active)return e();let t=p.cursor,n=p.parents;p.active=!1,p.parents=[];try{return e()}finally{p.active=!0,p.cursor=t,p.parents=n}}function ce(e){if(!p.active||e==null)return;let t=Array.isArray(e)?e[e.length-1]:e;t&&typeof t.nodeType=="number"&&Yt(t)}function Ss(e){let t=[];for(;e&&e.nodeType===1;){let n=e.tagName.toLowerCase();if(e.id){n+=`#${e.id}`,t.unshift(n);break}e.getAttribute("data-id")&&(n+=`[data-id="${e.getAttribute("data-id")}"]`);let r=0,o=e;for(;o=o.previousElementSibling;)o.tagName===e.tagName&&r++;n+=`:nth-of-type(${r+1})`,t.unshift(n),e=e.parentElement}return t.join(">")}function Ts(e){let t=0;for(let n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n),t|=0;return`el_${Math.abs(t)}`}function Es(e){return Ts(Ss(e))}var As=()=>"xxyxxxxxxy-4xx8".replace(/[xy]/g,function(e){let t=Math.random()*16|0;return(e==="x"?t:t&3|8).toString(16)}),Ns={};var st="__fx_at",Tr="__fx_loc";function wr(e,t){return t&&(e[Tr]=t),e}var xr=new Map,at=new Set,ft=new Set(["scroll","focus","blur","load","error","resize","mouseenter","mouseleave","pointerenter","pointerleave","gotpointercapture","lostpointercapture"]);function Qt(e){if(!A())for(let t of e)at.has(t)||ft.has(t)||(at.add(t),document.addEventListener(t,Rs))}function Rs(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 Er(e,t,n){if(e[`$$${t}`]=n,ft.has(t)){let r=`__fx_${t}`;if(!e[r]){let o=i=>{e[`$$${t}`]?.(i)};e.addEventListener(t,o),e[r]=o}return}at.has(t)||Qt([t])}function Zt(e,t){delete e[`$$${t}`];let n=`__fx_${t}`,r=e[n];r&&(e.removeEventListener(t,r),delete e[n])}function _s(e){return!ft.has(e)}function ks(e){return typeof e=="function"}function B(e,t=!1){if(A())return le().createText(e);if(p.active&&!t){let n=it()?.hydrateText(e);if(n)return n}return document.createTextNode(e)}function en(e,t=!1,n){if(A())return le().createElement(e,t);if(p.active){let r=it()?.hydrateElement(e);if(r)return n?wr(r,n):r}return wr(t?document.createElementNS(ie,e):document.createElement(e),n)}function Ar(e,t=!1){let n=xr.get(e);if(n)return n;let r=document.createElement("template");return t?r.innerHTML=`<svg>${e}</svg>`:r.innerHTML=e,xr.set(e,r),r}function Cs(e,t,n=!1,r=!1,o){if(A()){let i=le();return n?i.parseTemplate(e,r):i.createRaw(e)}if(p.active){let i=it()?.hydrateStatic(t);if(i)return Sr(i,o)}return Sr(Nr(Ar(e,r),r).firstChild,o)}function Sr(e,t){let n=e;if(!t||typeof n?.querySelectorAll!="function")return e;let r=[n,...n.querySelectorAll("*")];for(let o=0;o<r.length&&o*2+1<t.pos.length;o++){let i=t.pos[o*2];i&&(r[o][Tr]={file:t.file,line:i,column:t.pos[o*2+1]})}return e}function Os(e,t){if(!p.active)return t();let n=_e(e.nextSibling,t);if(typeof n=="function"){let r=n;return Ps(r,(...i)=>p.active?_e(e.nextSibling,()=>r(...i)):r(...i))}return n}function Ps(e,t){let n=e[st];return n!==void 0&&(t[st]=n),t}function Ms(e){for(let t=e.nextSibling;t;t=t.nextSibling)if(t.nodeType===8&&t.data==="fx/")return t;throw new Error("[fluixi] template hole is missing its closing marker")}function js(e,t){let n=[];for(let r=e.nextSibling;r&&r!==t;r=r.nextSibling)n.push(r);return n}function Nr(e,t=!1){let n=e.content.cloneNode(!0);return t?n.firstChild:n}function Rr(e){return Array.isArray(e)?e.length===2&&e[1]===" "?Array.isArray(e[0])?Rr(e[0]):(typeof e[0]=="function",e[0]):e.length===1&&typeof e[0]=="function"?e[0]:e:e}function qs(e){return typeof e!="function"?null:e._name||e.name||"anonymous"}function Ds(e){if(N(e)||$(e)||typeof e!="function")return e;let t=e();for(;typeof t=="function"&&!N(t)&&!$(t);)t=t();return t}var z=0,$s=200;function Ls(e,t,n,r,o){let i=r,s=new Map;return b(()=>{j(n??t,"content",void 0,e);let a;if($(e)&&!N(e)){if(!s.has(e)){z++;try{let u=e();s.set(e,u)}finally{z--}}for(a=s.get(e);typeof a=="function"&&N(a);)a=a()}else for(a=e();typeof a=="function"&&N(a);)a=a();{let u=0;for(;typeof a=="function"&&u++<50;)if($(a)){if(!s.has(a)){let l=a;z++;try{let c=l();s.set(l,c)}finally{z--}}a=s.get(a)}else if(N(a))a=a();else if(a=a(),typeof a!="function"||!N(a)&&!$(a))break}z++;try{i=Ce(t,a,n,i,s),o(i)}finally{z--}})}function V(e,t,n,r){if(z>$s)return console.error("[insert] Exceeded max call depth — possible infinite loop."),()=>null;n!==void 0&&!n&&(n=B("",!0),e.appendChild(n));let o=r??null,i=u=>Array.isArray(u)&&u.some(l=>typeof l=="function"),s=u=>typeof u=="function"?u:()=>u;if(typeof t!="function"&&!i(t)){z++;try{o=Ce(e,t,n,o)}finally{z--}return()=>o}let a=Ls(s(t),e,n,o,u=>{o=u});return()=>(a?.(),o)}function Ce(e,t,n,r,o){if(t==null||typeof t=="boolean")return K(e,r,n);if(typeof t=="function")for(;typeof t=="function";)t=t();if(t==null||typeof t=="boolean")return K(e,r,n);if(ke(t)){let s=B("",!0);return Array.isArray(r)?r.length>0?(e.replaceChild(s,r[0]),K(e,r.slice(1),n)):k(e,s,n):r?e.replaceChild(s,r):k(e,s,n),t.then(a=>{s.parentNode===e&&Ce(e,a,s.nextSibling,s)}).catch(a=>{console.error("Error resolving promise in insertExpression:",a)}),s}let i=typeof t;if(i==="string"||i==="number"){if(i==="number"&&(t=String(t)),Array.isArray(r)){if(r.length===0){let a=B(t);return k(e,a,n),a}if(r.length===1&&r[0].nodeType===3)return r[0].data=t,r;r=K(e,r,n)}if(r&&ot(r))return r.data=t,r;let s=B(t);return r&&r.parentNode===e?e.replaceChild(s,r):Jt(e,s)||k(e,s,n),s}if(Q(t))return Jt(e,t)?(Yt(t),t):Array.isArray(r)?(r.length===0?k(e,t,n):r[0].parentNode===e?(e.replaceChild(t,r[0]),K(e,r.slice(1),n)):k(e,t,n),t):(r?r!==t&&(r.parentNode===e?e.replaceChild(t,r):k(e,t,n)):k(e,t,n),t);if(Array.isArray(t)){let s=[],a=Array.isArray(r)?r:r?[r]:[],u=[];W(t,s,e,n,!0,o,u);let l=Is(e,a,s,n);for(let c of u){let d=V(e,c.sig,c.marker);x(()=>{K(e,d()),c.marker.parentNode===e&&e.removeChild(c.marker)})}return l}if(i==="object"&&t!==null&&typeof t=="object"){let s=t;if("type"in s&&"props"in s){let a=s;if(typeof a.type=="function"){let u=a.type(a.props||{});return Ce(e,u,n,r)}}}return K(e,r,n)}function W(e,t,n,r,o=!0,i,s){for(let a=0;a<e.length;a++){let u=e[a];if(!(u==null||typeof u=="boolean")){for(;typeof u=="function"&&!ke(u)&&!N(u)&&!$(u)&&(u=u(),!(u==null||typeof u=="boolean")););if(!(u==null||typeof u=="boolean")){if(typeof u=="function"){let l;for($(u)&&!N(u)?(i||(i=new Map),i.has(u)||i.set(u,u()),l=i.get(u)):l=u();typeof l=="function"&&!ke(l)&&!N(l)&&!$(l);)i||(i=new Map),i.has(l)||i.set(l,l()),l=i.get(l);if(l==null||typeof l=="boolean")continue;if(typeof l=="function"){if(N(l)){if(s){let d=B("",!0);t.push(d),s.push({marker:d,sig:l});continue}let c=l();for(;typeof c=="function"&&N(c);)c=c();if(c==null||typeof c=="boolean")continue;Array.isArray(c)?W(c,t,n,r,o,i):W([c],t,n,r,o,i);continue}continue}Array.isArray(l)?W(l,t,n,r,o,i,s):W([l],t,n,r,o,i,s);continue}if(ke(u)){let l=B("",!0);t.push(l),u.then(c=>{if(l.parentNode){let d=[];if(W([c],d,l.parentNode,void 0,!1,i),d.length>0){l.parentNode.replaceChild(d[0],l);for(let h=1;h<d.length;h++)l.parentNode?.insertBefore(d[h],d[h-1].nextSibling)}}}).catch(c=>console.error("Error resolving promise in array:",c));continue}if(Array.isArray(u)){W(u,t,n,r,o,i,s);continue}if(Q(u)){t.push(u);continue}if(typeof u=="object"&&u!==null&&"type"in u&&"props"in u){let l=u;if(typeof l.type=="function"){let c=l.type(l.props||{});Array.isArray(c)?W(c,t,n,r,!1,i):W([c],t,n,r,!1,i);continue}}if(typeof u=="string"||typeof u=="number"){let l=String(u);if(l.trim()===""&&l!==" ")continue;t.push(B(l));continue}t.push(B(String(u)))}}}}function Is(e,t,n,r){for(let d=0;d<n.length;d++){let h=n[d].parentNode;h!==null&&h!==e&&h.nodeType!==11&&(n=n.slice(),n[d]=n[d].cloneNode(!0))}let o=n.length,i=t.length,s=o,a=0,u=0,l=i>0?t[i-1].nextSibling??void 0:r,c=null;for(;a<i||u<s;){if(t[a]===n[u]){a++,u++;continue}for(;i>a&&s>u&&t[i-1]===n[s-1];)i--,s--;if(i===a){let d=s<o?u?n[u-1].nextSibling??void 0:n[s-u]:l;for(;u<s;)k(e,n[u++],d)}else if(s===u)for(;a<i;)(!c||!c.has(t[a]))&&t[a].parentNode===e&&e.removeChild(t[a]),a++;else if(t[a]===n[s-1]&&n[u]===t[i-1]){let d=t[--i].nextSibling;k(e,n[u++],t[a++].nextSibling),k(e,n[--s],d),t[i]=t[a-1]}else{if(!c){c=new Map;let h=u;for(;h<s;)c.set(n[h],h++)}let d=c.get(t[a]);if(d!=null)if(u<d&&d<s){let h=a,y=1;for(;++h<i&&h<s&&!(!c.has(t[h])||c.get(t[h])!==d+y);)y++;if(y>d-u){let R=t[a];for(;u<d;)k(e,n[u++],R)}else t[a].parentNode===e?e.replaceChild(n[u++],t[a++]):(k(e,n[u++],l),a++)}else a++;else t[a].parentNode===e&&e.removeChild(t[a]),a++}}return n}function K(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 k(e,t,n){p.active&&t.parentNode===e||(n&&n.parentNode===e?e.insertBefore(t,n):e.appendChild(t))}function Oe(e,t,n){n==null?delete e[t]:e[t]=n}function tn(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 _r(e,t){if(!t||typeof t!="function")return;let n=t[st]?.name;if(!n)return;let r=n.indexOf(":");r!==-1&&q(e,n.slice(0,r),n.slice(r+1),t)}function ut(e,t,n){let r=typeof n=="function"?T(()=>n()):n;if(!(!r||typeof r!="object"))for(let o of Object.keys(r))q(e,t,o)}function nn(e,t){let n=(r,o)=>{typeof r=="function"&&(q(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 lt(e,t,n,r=!1){return _r(e,n),typeof n!="function"?(C(e,t,n,r),()=>{}):b(()=>{j(e,"attribute",t,n);let o=typeof n=="function"?n():n;C(e,t,o,r)})}function ct(e,t,n){return typeof n!="function"?(Oe(e,t,n),()=>{}):(_r(e,n),b(()=>{j(e,"property",t,n);let r=typeof n=="function"?n():n;Oe(e,t,r)}))}function rn(e,t,n){return typeof n!="function"?(C(e,t,!!n),()=>{}):b(()=>{j(e,"attribute",t,n);let r=n();C(e,t,!!r)})}function Pe(e,t){if(t==null){e.removeAttribute("class");return}if(typeof t=="function"){b(()=>{j(e,"attribute","class",t),Pe(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 Me(e,t,n){if(!(!t||typeof t!="object"))for(let r in t){let o=t[r],i=r.split(/\s+/).filter(Boolean);if(typeof o=="function"&&n)n.push(b(()=>{let s=!!o();for(let a of i)e.classList.toggle(a,s)}));else{let s=!!(typeof o=="function"?o():o);for(let a of i)e.classList.toggle(a,s)}}}function je(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 Fs(e){let{element:t,props:n,prevProps:r=Ns,isSVG:o=!1,skipChildren:i=!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 s=o||t.namespaceURI===ie,a=[];for(let u in n){if(i&&u==="children")continue;let l=n[u],c=r[u];if(l===c)continue;if(u==="ref"){qe(l,t);continue}if(u==="use"){nn(t,l);continue}if(u.startsWith("on:")){a.push(tn(t,u.slice(3),l));continue}if(u.startsWith("prop:")){q(t,"prop",u.slice(5),l),a.push(ct(t,u.slice(5),l));continue}if(u.startsWith("attr:")){q(t,"attr",u.slice(5),l),a.push(lt(t,u.slice(5),l,s));continue}if(u.startsWith("bool:")){q(t,"bool",u.slice(5),l),a.push(rn(t,u.slice(5),l));continue}if(u==="class"||u==="className"){typeof l=="function"?a.push(b(()=>{j(t,"attribute","class",l),Pe(t,l())})):Pe(t,l);continue}if(u==="classList"){ut(t,"class",l),typeof l=="function"?a.push(b(()=>{j(t,"attribute","class",l),Me(t,l())})):Me(t,l,a);continue}if(u==="style"){ut(t,"style",l),typeof l=="function"?a.push(b(()=>{j(t,"attribute","style",l),je(t,l())})):je(t,l);continue}if(u.startsWith("on")){let h=u.slice(2).toLowerCase();c&&Zt(t,h),l&&Er(t,h,l);continue}let d=Be.has(u)||!s&&u in t;typeof l=="function"?a.push(d?ct(t,u,l):lt(t,u,l,s)):a.push(b(()=>d?Oe(t,u,n[u]):C(t,u,n[u],s)))}for(let u in r)if(!(u in n))if(u.startsWith("on")){let l=u.slice(2).toLowerCase();Zt(t,l)}else Be.has(u)?Oe(t,u,null):t.removeAttribute(u);return()=>{a.forEach(u=>u())}}function on(e,t,n=!1){for(let r in t){let o=t[r];if(r==="ref"){qe(o,e);continue}if(r!=="children"){if(r==="use"){nn(e,o);continue}if(r.startsWith("on:")){tn(e,r.slice(3),o);continue}if(r.startsWith("prop:")){q(e,"prop",r.slice(5),o),ct(e,r.slice(5),o);continue}if(r.startsWith("attr:")){q(e,"attr",r.slice(5),o),lt(e,r.slice(5),o,n);continue}if(r.startsWith("bool:")){q(e,"bool",r.slice(5),o),rn(e,r.slice(5),o);continue}if(r.startsWith("on")&&r.length>2){let i=r.slice(2).toLowerCase();if(typeof o=="function")if(ft.has(i)){e[`$$${i}`]=o;let s=`__fx_${i}`;if(!e[s]){let a=u=>{e[`$$${i}`]?.(u)};e.addEventListener(i,a),e[s]=a}}else e[`$$${i}`]=o,at.has(i)||Qt([i]);continue}if(r==="class"||r==="className"){Pe(e,o);continue}if(r==="classList"){ut(e,"class",o),typeof o=="function"?b(()=>{j(e,"attribute","class",o),Me(e,o())}):Me(e,o);continue}if(r==="style"){ut(e,"style",o),typeof o=="function"?b(()=>{j(e,"attribute","style",o),je(e,o())}):je(e,o);continue}if(r==="innerHTML"){if(typeof o=="function"){let i=E(()=>{let s=o();for(;typeof s=="function";)s=s();e.innerHTML=s});x(()=>i())}else e.innerHTML=o;continue}if(r==="value"&&(e.tagName==="INPUT"||e.tagName==="TEXTAREA")){if(typeof o=="function"){let i=E(()=>{let s=o();for(;typeof s=="function"&&s.length===0;)s=s();document.activeElement!==e&&(e.value=s??"")});x(()=>{i()})}else b(()=>{document.activeElement!==e&&(e.value=t[r]??"")});continue}if(r==="checked"&&e.tagName==="INPUT"){if(typeof o=="function"){let i=E(()=>{let s=o();for(;typeof s=="function"&&s.length===0;)s=s();document.activeElement!==e&&(e.checked=s??"")});x(()=>{i()})}else b(()=>{document.activeElement!==e&&(e.checked=t[r]??"")});continue}if(r==="value"&&e.tagName==="SELECT"){if(typeof o=="function"){let i=!0,s=E(()=>{let a=o();for(;typeof a=="function"&&a.length===0;)a=a();i?(i=!1,queueMicrotask(()=>{e.value=a??""})):e.value=a??""});x(()=>{s()})}else{let i=!0;b(()=>{let s=t[r];i?(i=!1,queueMicrotask(()=>{e.value=s??""})):e.value=s??""})}continue}if(typeof o=="function"){let i=E(()=>{let s=o();for(;typeof s=="function"&&s.length===0;)s=s();Ke(e,r,s,n)});x(()=>{i()})}else b(()=>Ke(e,r,t[r],n))}}}function Vs(...e){let t=r=>{for(let o=e.length-1;o>=0;o--){let i=e[o];if(i&&r in i&&i[r]!==void 0)return i[r]}},n=r=>{for(let o of e)if(o&&r in o)return!0;return!1};return new Proxy({},{get:(r,o)=>t(o),has:(r,o)=>n(o),ownKeys:()=>{let r=new Set;for(let o of e)if(o)for(let i of Reflect.ownKeys(o))r.add(i);return[...r]},getOwnPropertyDescriptor:(r,o)=>n(o)?{enumerable:!0,configurable:!0,get:()=>t(o)}:void 0})}function Hs(e,...t){let n=new Set;for(let s of t)for(let a of s)n.add(a);let r=s=>({enumerable:!0,configurable:!0,get:()=>e[s]}),o=t.map(s=>{let a=new Set(s);return new Proxy({},{get:(u,l)=>a.has(l)?e[l]:void 0,has:(u,l)=>a.has(l)&&l in e,ownKeys:()=>Array.from(a).filter(u=>u in e),getOwnPropertyDescriptor:(u,l)=>a.has(l)&&l in e?r(l):void 0})}),i=new Proxy({},{get:(s,a)=>n.has(a)?void 0:e[a],has:(s,a)=>!n.has(a)&&a in e,ownKeys:()=>Reflect.ownKeys(e).filter(s=>!n.has(s)),getOwnPropertyDescriptor:(s,a)=>!n.has(a)&&a in e?r(a):void 0});return[...o,i]}function qe(e,t){if(!e)return;let n=e[st]?.name;if(q(t,"ref",n||typeof e=="function"&&e.name||"ref",e),Q(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 Us(e,t,n){let r=t||document.body,o=nt(()=>e),i=[];return S(()=>{let s=b(()=>{let a=o();Array.isArray(a)?(a.forEach(u=>r.appendChild(u)),i.push(()=>{a.forEach(u=>{u.parentNode===r&&r.removeChild(u)})})):Q(a)&&(r.appendChild(a),i.push(()=>{a.parentNode===r&&r.removeChild(a)}))});i.push(s),x(()=>{i.forEach(a=>a())})}),null}function Ws(e){return typeof e=="string"&&e.toLowerCase()===e}function sn(e){return e==="svg"||e==="path"||e==="circle"||e==="rect"||e==="line"||e==="polygon"||e==="polyline"||e==="ellipse"||e==="g"||e==="defs"||e==="clipPath"||e==="text"}function zs(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function ke(e){return e!=null&&(typeof e=="object"||typeof e=="function")&&typeof e.then=="function"||e instanceof Promise}function Ks(e){return typeof e=="function"&&e.length===0&&N(e)}function an(e,t,n){if(!t)throw new Error("Container element is required");let r,o,i=[];return M(s=>{S(()=>{p.active||(t.textContent=""),sr(t),ar(),V(t,e)}),o=s}),()=>{o?.(),r?.(),i.forEach(s=>s()),t.textContent=""}}function Bs(e){if(Array.isArray(e))return e;if(typeof e=="function"&&typeof e.set=="function")return[e,e.set];throw new TypeError("[fluixi] bind: needs a signal — either `signal(…)` or the `[get, set]` pair from `createSignal(…)`.")}var Gs="1.0.0-alpha.83";var Xs="__fluixi_signal_next_state__",Js=e=>{typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e)},v=globalThis[Xs]??={consumer:null,untracked:!1,owner:null,queue:[],scheduled:!1,flushing:!1,batchDepth:0,hostSchedule:Js,onSuspend:null,onError:null,observer:null};function Ys(e){return v.observer=e,()=>{v.observer===e&&(v.observer=null)}}var ee=[],dt;function Zs(e,t){if(!v.observer)return t();let n=dt;dt=e;try{return t()}finally{dt=n}}function Qs(e){let t=v.observer;t&&t.created(e.parents===void 0?{...e,parents:ee,origin:e.origin??dt}:e)}function Fr(e){let t=v.observer;!t?.props||!ee.length||!e||t.props(ee[ee.length-1],e)}function ea(e){v.observer?.contextCreated?.(e)}function ta(e,t,n){let r=v.observer;!r?.context||!ee.length||r.context(ee[ee.length-1],e,t,n)}function kr(e,t,n){v.observer?.moved?.(e,t,n)}function Cr(e){v.observer?.disposed?.(e)}var na="__FLUIXI_DEVTOOLS_HOOK__",Or=globalThis[na];if(typeof Or?.inject=="function")try{Or.inject({observeReactiveNodes:Ys,version:Gs})}catch{}function Vr(){return v.observer!=null}function ra(e){if(v.untracked)return e();v.untracked=!0;try{return e()}finally{v.untracked=!1}}function oa(e){return{cleanups:null,owned:null,parent:e,contexts:null}}function Hr(e,t){let n=Symbol(t??"context");return ea(n),{id:n,defaultValue:e,Provider:r=>{ta(n,"provide",r.value);let o=v.owner,i=oa(o);(i.contexts=new Map).set(n,r.value),o&&(o.owned??=[]).push(i),v.owner=i;try{return r.children}finally{v.owner=o}}}}function Ur(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 ia(e){v.onSuspend=e}function sa(e){v.onError=e}function aa(e){v.hostSchedule=e??(t=>{Promise.resolve().then(t)})}aa(()=>{});function Wr(e){return ra(e)}var Pu=typeof window>"u"?!1:window.__FLUIXI_PROD__===!0;var ua=Symbol.for("signal");function zr(e){return typeof e=="function"&&e[ua]===!0}var la=Hr();ia((e,t)=>{let n=Ur(t,la);n&&(n.increment(),e.finally(()=>n.decrement()))});var ca=Hr();sa((e,t)=>{let n=Ur(t,ca);return n?(n.setError(e),!0):!1});var ht=Symbol("store-raw"),Pr=Symbol("store-node"),Mr=Symbol("store-has"),jr=Symbol("store-self"),qr=Symbol("store-track");var $e=new WeakMap,ln=new WeakMap,pe=new WeakMap,yt=new WeakMap;function fa(e,t){if(!de(e)||!Vr())return;let n=new Set,r=s=>{if(!(!de(s)||n.has(s))){n.add(s);for(let a of Object.values(s))r(a)}};r(yt.get(t)??t);let o=new Set,i=s=>{if(!de(s))return;let a=s;if(n.has(a)||o.has(a))return;o.add(a);let u=$e.get(a);if(u){for(let l of u.keys.values())Cr(l);u.all&&Cr(u.all),$e.delete(a),pe.delete(a),ln.delete(a)}for(let l of Object.values(a))i(l)};i(e)}var mt=(e,t,n)=>n?`${e}[${String(t)}]`:`${e}.${String(t)}`;function Kr(e,t,n){let r=t?.owner,o=r&&n!==void 0?mt(r.name,n,t?.array):void 0,[i,s]=Zs(r?.store,()=>g(e,o?{name:o}:void 0)),a=i;return a.$=s,a}function gt(e){let t=$e.get(e);return t?t.owner||(t.owner=pe.get(e)):$e.set(e,t={keys:new Map,owner:pe.get(e),array:Array.isArray(e)}),t}function Dr(e,t,n){let r=e.keys.get(t);return r||e.keys.set(t,r=Kr(n,e,t)),r}function da(e,t,n,r){let o=pe.get(e);if(o&&o.store===t&&o.name===n)return;let i={store:t,name:n};pe.set(e,i),yt.set(e,yt.get(r)??r);let s=$e.get(e);if(s&&(s.owner=i,!!Vr())){for(let[a,u]of s.keys)kr(u,t,mt(n,a,s.array));s.all&&kr(s.all,t,mt(n,"*",s.array))}}function $r(e){let t=gt(e);(t.all||(t.all=Kr(void 0,t,"*")))()}function Lr(e,t){e.$(typeof t=="function"?()=>t:t)}function de(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 pt(e){if(!de(e))return e;let t=ln.get(e);if(t)return t;let n=new Proxy(e,pa);return ln.set(e,n),n}var pa={get(e,t,n){if(t===ht||t===Pr)return e;if(t===ue)return n;if(t===Mr)return u=>u in e;if(t==="__proxy")return!0;if(t===qr||t===jr)return $r(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 i=gt(e),s=Dr(i,t,r),a=s();return de(a)?(i.owner&&da(a,s,mt(i.owner.name,t,i.array),e),pt(a)):a},set(){return!0},deleteProperty(e,t){return t in e&&De(e,t,void 0),!0},has(e,t){return t===ht||t===ue||t===Pr||t===Mr||t===jr||t===qr?!0:(Dr(gt(e),t,e[t])(),t in e)},ownKeys(e){return $r(e),Reflect.ownKeys(e)},getOwnPropertyDescriptor(e,t){return Reflect.getOwnPropertyDescriptor(e,t)}};function Br(e,t=new Set){if(e==null||typeof e!="object")return e;let n=e[ht]??e;if(t.has(n)||!de(n))return n;t.add(n);let r=!1,o=s=>{let a=Br(s,t);return a!==s&&(r=!0),a};if(Array.isArray(n)){let s=n.map(o);return r?s:n}let i={};for(let s of Object.keys(n))i[s]=o(n[s]);return r?i:n}function De(e,t,n){let r=Br(n),o=e[t];if(o===r&&(r!==void 0||t in e))return;let i=Array.isArray(e),s=i?e.length:0;r===void 0?delete e[t]:e[t]=r;let a=gt(e),u=a.keys.get(t);if(u&&Lr(u,r),fa(o,e),i&&e.length!==s){let l=a.keys.get("length");l&&Lr(l,e.length)}a.all&&a.all.$(void 0)}function Ir(e,t){return typeof e=="function"?e(t):e}function cn(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)?cn(o,r):De(e,n,r)}}function dn(e){let t=[],n=e.replace(/\[([^\]]*)\]/g,".$1");for(let r of n.split("."))r.length&&t.push(r);return t}function Gr(e,t,n){let r=t.length-1;for(let i=0;i<r;i++){let s=t[i];if(s==="*"){let u=t.slice(i+1);if(Array.isArray(e))for(let l=0;l<e.length;l++)Gr(e[l],u,n);return}let a=e[s];(a==null||typeof a!="object")&&(a=/^\d+$/.test(t[i+1])?[]:{},De(e,s,a)),e=a}let o=t[r];if(o==="*"){if(Array.isArray(e))for(let i=0;i<e.length;i++)De(e,i,Ir(n,e[i]));return}De(e,o,Ir(n,e[o]))}function un(e,t,n){Gr(e,dn(t),n)}function ha(e,t){let n=t[0];if(typeof n=="function"&&t.length===1){let r=n(e);r&&r!==e&&cn(e,r);return}if(Array.isArray(n)&&t.length===1){for(let r of n)Array.isArray(r)&&un(e,r[0],r[1]);return}if(n&&typeof n=="object"&&!Array.isArray(n)&&t.length===1){cn(e,n);return}if(Array.isArray(t[1])&&t.length>=3){un(e,`${n}.${t[1].join(".")}`,t[2]);return}un(e,String(n),t[1])}function fn(e){if(e==null||typeof e!="object")return e;if(Array.isArray(e))return e.map(fn);let t={};for(let n of Object.keys(e))t[n]=fn(e[n]);return t}function fe(e,t){let n=e;for(let r of dn(t)){if(n==null)return;n=n[r]}return n}var Xr=class{constructor(e,t={immutable:!0}){this.options=t,this.root=e,this.set=((...n)=>S(()=>ha(this.root,n))),e&&typeof e=="object"&&(pe.set(e,{store:this,name:t.name??"store"}),yt.set(e,e)),Qs({kind:"store",node:this,handle:()=>this.root,name:t.name})}get state(){return pt(this.root)}get proxy(){return pt(this.root)}get accessor(){return(()=>pt(this.root))}unwrap(){return this.root}getNode(e){return this.root&&this.root[e]}get(e){if(e==null||e==="")return bt(this.state);let t=this.state;for(let n of dn(e)){if(t==null)return;t=t[n]}return bt(t)}select(e){return m(()=>e(this.state))}subscribe(e){return E(()=>e(this.state))}watch(e,t){let n;return E(()=>{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=fn(t);return e(n),n}))}reconcile(e,t={}){this.set(e)}push(e,...t){let n=fe(this.root,e);this.set(e,n.concat(t))}pop(e){let t=fe(this.root,e).slice(),n=t.pop();return this.set(e,t),n}shift(e){let t=fe(this.root,e).slice(),n=t.shift();return this.set(e,t),n}splice(e,t,n,...r){let o=fe(this.root,e).slice(),i=o.splice(t,n,...r);return this.set(e,o),i}insert(e,t,n){let r=fe(this.root,e).slice();r.splice(t,0,n),this.set(e,r)}removeAt(e,t){let n=fe(this.root,e).slice(),r=n.splice(t,1);return this.set(e,n),r}toObservable(){let[e]=g(this.state);return e.toObservable()}dispose(){}},ya=["get","select","watch","subscribe","produce","reconcile","push","pop","shift","splice","insert","removeAt","unwrap","toObservable"];function ma(e,t){for(let n of ya)e[n]=t[n].bind(t);e.$=t.reactive.bind(t)}function ga(e,t={immutable:!0}){let n=new Xr(e,t);return ma(n.set,n),[n.proxy,n.set]}function ba(e,t={}){return new Xr(e,{...t,immutable:!1})}function bt(e){if(e==null||typeof e!="object")return e;let t=e[ht];return t!==void 0?t:e}function va(e){return T(()=>bt(e))}var ju=Object.freeze({createStore:ga,createMutableStore:ba,batch:S,unwrap:bt,untrackStore:va});var wa="__fx_dom_create_component__",te=globalThis[wa]??={fn:null};function xa(e){te.fn=e}function Sa(e={}){let t=e.signalSystem?.createComponent;t&&(te.fn=t)}function pn(e,t){if(te.fn)return te.fn(e,t);t&&Fr(t);let n=typeof e=="function"?Wr(()=>e(t)):e,r=n!=null&&(typeof n=="function"||typeof n=="object");if(r)try{n.$name=e?.name}catch{}return r&&!zr(n)?Xt(n):n}var Ta=()=>te.fn!==null,Ea=()=>te.fn!==null;function Aa(){te.fn=null}var vt,Yr={getStore:()=>vt,run(e,t){let n=vt;vt=e;try{return t()}finally{vt=n}}},hn=Yr;function yn(e){hn=e??Yr}function he(e={}){e.locals||(e.locals=e.request?xt(e.request):{});let t=0,n=0,r=null,o=new Map,i=new Map;return{event:e,routeData:new Map,matchedRoute:new Map,nextId:()=>`s${t++}`,nextResourceId:()=>{if(r===null)return`r${n++}`;let s=o.get(r)??0;return o.set(r,s+1),`${r}:r${s}`},nextIslandNamespace:s=>{let a=i.get(s)??0;return i.set(s,a+1),`${s}#${a}`},withResourceScope(s,a){let u=r;r=s;try{return a()}finally{r=u}},pending:new Set,data:new Map}}function ye(e,t){return hn.run(e,t)}function H(){return hn.getStore()}function wt(){return H()?.event}function mn(){let e=wt();return e?(e.locals||(e.locals={}),e.locals):{}}var Jr=new WeakMap;function xt(e){let t=Jr.get(e);return t||(t={},Jr.set(e,t)),t}var me="__FX_DATA__";function Le(e){return e.replace(/[<>&\u2028\u2029]/g,t=>"\\u"+t.charCodeAt(0).toString(16).padStart(4,"0"))}var gn;function Ie(){let e=globalThis.__FX_DATA__;if(e)return e;if(gn!==void 0)return gn;let t=null;if(typeof document<"u"){let n=document.getElementById(me)?.textContent;if(n)try{t=JSON.parse(n)}catch{t=null}}return gn=t}function St(){for(;;){for(;p.cursor&&p.cursor.nodeType===3&&p.cursor.data==="";)p.cursor=p.cursor.nextSibling;if(p.cursor!=null||!p.parents.length)return;p.cursor=p.parents.pop().nextSibling}}var Na=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),Tt=typeof process<"u"&&process.env&&!1;function Et(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 Ra(e){St();let t=p.cursor;return t&&t.nodeType===1&&t.tagName.toLowerCase()===e.toLowerCase()?(Na.has(e.toLowerCase())?p.cursor=t.nextSibling:(p.parents.push(t),p.cursor=t.firstChild),t):(Tt&&t&&Et(`<${e}>`,t),null)}function _a(e){St();let t=p.cursor;return t&&t.nodeType===1&&t.tagName.toLowerCase()===e.toLowerCase()?(p.cursor=t.nextSibling,t):(Tt&&t&&Et(`<${e}> (static)`,t),null)}function ka(e){if(e===""){let n=p.cursor;return n&&n.nodeType===3&&n.data!==""?(p.cursor=n.nextSibling,n.data="",n):null}St();let t=p.cursor;return t&&t.nodeType===3?(p.cursor=t.nextSibling,t.nodeValue!==e&&(t.nodeValue=e),t):(Tt&&t&&Et(`text ${JSON.stringify(e.slice(0,24))}`,t),null)}function Ca(e){St();let t=p.cursor;return t&&t.nodeType===8&&t.data===e?(p.cursor=t.nextSibling,t):(Tt&&t&&Et(`marker <!--${e.slice(0,24)}-->`,t),null)}var Zr=!1;function Oa(){Zr||(Zr=!0,gr({hydrateElement:Ra,hydrateText:ka,hydrateMarker:Ca,hydrateStatic:_a}))}function At(e,t,n){Oa(),p.active=!0,p.cursor=t.firstChild,p.parents=[];let r=Ie(),o=n?.resourceNamespace,i=0;tt(()=>o?`${o}:r${i++}`:`r${i++}`),Zn(r?s=>s in r?{value:r[s]}:void 0:null);try{return an(e,t)}finally{p.active=!1,p.cursor=null,p.parents=[]}}var bn="fluixi-island";function eo(e){let{component:t,props:n={},name:r}=e,o=en(bn),i=r??t.name??"Island";C(o,"name",i),C(o,"props",JSON.stringify(n??{}));let s=A()?H():void 0;if(s){let a=s.nextIslandNamespace(i);V(o,()=>s.withResourceScope(a,()=>t(n)))}else V(o,()=>t(n));return o}var Qr=!1;function Pa(){if(Qr||typeof document>"u")return;Qr=!0;let e=document.createElement("style");e.textContent=`${bn}{display:contents}`,document.head.appendChild(e)}function to(e){if(typeof document>"u")return;Pa();let t=document.querySelectorAll(bn),n=new Map;t.forEach(r=>{let o=r.getAttribute("name")??"",i=n.get(o)??0;n.set(o,i+1);let s=e[o];if(!s){typeof process>"u"&&console.warn(`[fluixi] island "${o}" has no component in the registry — left static.`);return}let a={};try{a=JSON.parse(r.getAttribute("props")||"{}")}catch{}At(()=>s(a),r,{resourceNamespace:`${o}#${i}`})})}function no(e,...t){throw new Error("html`` was not compiled — enable the lit format: fluixi({ format: 'lit' }).")}function ro(e,...t){throw new Error("svg`` was not compiled — enable the lit format: fluixi({ format: 'lit' }).")}function Ma(e,t={}){if(typeof e=="function")return pn(e,t);if(typeof e!="string"||e.length===0)return null;let n=sn(e);if(A())return le().createElement(e,n);let r=n?document.createElementNS(ie,e):document.createElement(e);return on(r,t,n),ja(r,t),r}function ja(e,t){if(!t||t.children===void 0)return;let n=nt(()=>t.children),r=o=>{V(e,o,typeof o=="function"?null:void 0)};Array.isArray(n)?n.forEach(r):r(n)}function oo(e){return typeof e=="function"?e:(()=>e)}function G(e){return()=>{let t=e();return typeof t=="function"?t():t}}function io(e){return e!=null&&e!==!1}function so(e){return!e||typeof e!="object"?!1:!!(typeof e._$litType$<"u"||typeof e._$litDirective$<"u"||Array.isArray(e.strings)&&Array.isArray(e.values))}function ao(e){let t=G(()=>e.when),n=m(t,void 0,{name:"Show.when"}),r=m(n,void 0,{name:"Show.cond"}),o=U(),i=null,s=null,a=u=>{u!==s&&(i&&ae(i),i=se(o),s=u)};return m(()=>{let u=r();return a(u?"when":"fallback"),P(i,()=>{if(u){let l=e.children;return typeof l=="function"&&!so(l)?typeof n=="function"?T(()=>T(n)?l(n()):e.fallback):l(n):l}return e.fallback});return e.fallback??null},void 0,{name:"Show.result"})}function uo(e){let t=G(()=>e.each),n=()=>e.fallback??null,r=(o,i)=>{let s=e.children,a=Array.isArray(s)?s.map(u=>typeof u=="function"?u(o,i):u):typeof s=="function"?s(o,i):s;return ce(a),a};return e.by?Qe(t,e.by,(o,i)=>r(o,i),{fallback:n}):Ze(t,(o,i)=>r(o,i),{fallback:n})}function lo(e){let t=G(()=>e.each);return et(t,(n,r)=>{let o=e.children(n,r);return ce(o),o},{fallback:()=>e.fallback??null})}var vn=Symbol("match");function co(e){return{[vn]:!0,when:G(()=>e.when),get children(){return e.children}}}function fo(e){let t=Array.isArray(e.children)?e.children:[e.children],n=U(),r=null,o=-1,i=s=>{s!==o&&(r&&ae(r),r=se(n),o=s)};return m(()=>{for(let s=0;s<t.length;s+=1){let u=t[s],l=0;for(;typeof u=="function"&&!u[vn]&&l++<10;)u=u();if(!u||typeof u!="object"||u[vn]!==!0)continue;let c=u.when();if(io(c))return i(s),P(r,()=>typeof u.children=="function"?u.children(c):u.children)}return i(-2),P(r,()=>e.fallback??null)},void 0,{name:"Switch"})}function po(e){let t=oo(e.component),{component:n,...r}=e,o=U(),i=null,s;return m(()=>{let a=t();return a!==s&&(i&&ae(i),i=se(o),s=a),a==null?null:typeof a=="string"?{tag:a,props:r}:P(i,()=>a(r))},void 0,{name:"Dynamic"})}function ho(e){let t=()=>e.mount?typeof e.mount=="function"?e.mount():e.mount:document.body,n,r;return M(o=>{n=o,r=document.createElement("div"),r.style.display="contents",t().appendChild(r),V(r,e.children)&&qe(e.ref,r)}),x(()=>{n(),r.remove()}),null}function wn(e){if(A())return e.fallback??null;let t=p.active,[n,r]=g(!t);return t&&queueMicrotask(()=>r(!0)),m(()=>n()?e.children:e.fallback??null,void 0,{name:"client-only"})}var yo=wn;function mo(e){let[t,n]=g(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(i){return n(i),typeof e.fallback=="function"?e.fallback(i,r):e.fallback}},void 0,{name:"ErrorBoundary"})}function go(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 qa(e){return e.startsWith("--")?e:e.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`)}function bo(e){return m(()=>{let t=typeof e=="function"?e():e,n=[];for(let[r,o]of Object.entries(t)){if(!r)continue;let i=typeof o=="function"?o():o;i!=null&&n.push(`${qa(r)}: ${i}`)}return n.join("; ")},void 0,{name:"StyleMap"})}var Rt=1,Tn=3,En=8,vo;vo=Re;var ge=class{constructor(){this[vo]=!0;this.parentNode=null;this.childNodes=[]}get firstChild(){return this.childNodes[0]??null}get lastChild(){return this.childNodes[this.childNodes.length-1]??null}get nextSibling(){let t=this.parentNode;if(!t)return null;let n=t.childNodes.indexOf(this);return n>=0?t.childNodes[n+1]??null:null}get previousSibling(){let t=this.parentNode;if(!t)return null;let n=t.childNodes.indexOf(this);return n>0?t.childNodes[n-1]??null:null}get parentElement(){return this.parentNode}appendChild(t){return t.parentNode&&t.parentNode.removeChild(t),t.parentNode=this,this.childNodes.push(t),t}insertBefore(t,n){if(n==null)return this.appendChild(t);t.parentNode&&t.parentNode.removeChild(t);let r=this.childNodes.indexOf(n);return t.parentNode=this,r<0?this.childNodes.push(t):this.childNodes.splice(r,0,t),t}removeChild(t){let n=this.childNodes.indexOf(t);return n>=0&&this.childNodes.splice(n,1),t.parentNode=null,t}replaceChild(t,n){let r=this.childNodes.indexOf(n);return r>=0&&(t.parentNode&&t.parentNode.removeChild(t),t.parentNode=this,this.childNodes[r]=t,n.parentNode=null),n}addEventListener(){}removeEventListener(){}},ne=class e extends ge{constructor(n){super();this.nodeType=Tn;this.data=n}get nodeValue(){return this.data}set nodeValue(n){this.data=n==null?"":String(n)}get textContent(){return this.data}set textContent(n){this.data=n==null?"":String(n)}cloneNode(){return new e(this.data)}},Nt=class e extends ge{constructor(n){super();this.nodeType=Rt;this.rawOuterHTML=n}get textContent(){return this.rawOuterHTML.replace(/<[^>]*>/g,"")}cloneNode(){return new e(this.rawOuterHTML)}},be=class e extends ge{constructor(n){super();this.nodeType=En;this.data=n}get nodeValue(){return this.data}set nodeValue(n){this.data=n==null?"":String(n)}cloneNode(){return new e(this.data)}},xn=class{constructor(){this.cssText=""}setProperty(t,n){this[t]=n}removeProperty(t){delete this[t]}},Sn=class{constructor(t){this.el=t}list(){let t=this.el.getAttribute("class");return t?t.split(/\s+/).filter(Boolean):[]}write(t){t.length?this.el.setAttribute("class",t.join(" ")):this.el.removeAttribute("class")}add(...t){let n=this.list();for(let r of t)n.includes(r)||n.push(r);this.write(n)}remove(...t){this.write(this.list().filter(n=>!t.includes(n)))}contains(t){return this.list().includes(t)}toggle(t,n){let r=this.contains(t),o=n===void 0?!r:n;return o?this.add(t):this.remove(t),o}},re=class e extends ge{constructor(n,r=!1){super();this.nodeType=Rt;this.attributes=new Map;this.style=new xn;this.classList=new Sn(this);this.rawHTML=null;this.localName=n.toLowerCase(),this.tagName=r?n:n.toUpperCase(),this.isSVG=r,this.namespaceURI=r?"http://www.w3.org/2000/svg":null}setAttribute(n,r){this.attributes.set(n,String(r))}removeAttribute(n){this.attributes.delete(n)}getAttribute(n){return this.attributes.has(n)?this.attributes.get(n):null}hasAttribute(n){return this.attributes.has(n)}get id(){return this.getAttribute("id")??""}set id(n){n==null?this.removeAttribute("id"):this.setAttribute("id",n)}get className(){return this.getAttribute("class")??""}set className(n){n==null?this.removeAttribute("class"):this.setAttribute("class",n)}get htmlFor(){return this.getAttribute("for")??""}set htmlFor(n){n==null?this.removeAttribute("for"):this.setAttribute("for",n)}set value(n){n==null?this.removeAttribute("value"):this.setAttribute("value",String(n))}set checked(n){n?this.setAttribute("checked",""):this.removeAttribute("checked")}set selected(n){n?this.setAttribute("selected",""):this.removeAttribute("selected")}set indeterminate(n){}get textContent(){return this.childNodes.map(n=>n.textContent??"").join("")}set textContent(n){for(let r of this.childNodes)r.parentNode=null;this.childNodes=[],this.rawHTML=null,n!=null&&n!==""&&this.appendChild(new ne(String(n)))}set innerText(n){this.textContent=n}set innerHTML(n){for(let r of this.childNodes)r.parentNode=null;this.childNodes=[],this.rawHTML=n==null?"":String(n)}cloneNode(n=!1){let r=new e(this.localName,this.isSVG);if(r.attributes=new Map(this.attributes),r.style.cssText=this.style.cssText,r.rawHTML=this.rawHTML,n)for(let o of this.childNodes)r.appendChild(o.cloneNode(!0));return r}};var Da=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),xo=/&/g,So=/</g,To=/>/g,$a=/"/g;function An(e){return e.replace(xo,"&").replace(So,"<").replace(To,">")}function wo(e){return e.replace(xo,"&").replace($a,""").replace(So,"<").replace(To,">")}function La(e){return e.startsWith("--")?e:e.replace(/[A-Z]/g,t=>"-"+t.toLowerCase())}function Ia(e){if(!e)return"";let t=[];e.cssText&&t.push(e.cssText.trim().replace(/;\s*$/,""));for(let n of Object.keys(e)){if(n==="cssText")continue;let r=e[n];r==null||r===""||t.push(`${La(n)}: ${r}`)}return t.join("; ")}function Fa(e){let t="",n=Ia(e.style);for(let[r,o]of e.attributes)r==="style"&&n||(t+=` ${r}="${wo(o)}"`);if(n){let r=e.attributes.get("style"),o=r?`${r.replace(/;\s*$/,"")}; ${n}`:n;t+=` style="${wo(o)}"`}return t}function L(e){if(e==null||e===!1||e===!0)return"";if(typeof e=="string")return An(e);if(typeof e=="number")return An(String(e));if(typeof e=="function")return L(e());if(Array.isArray(e))return e.map(L).join("");if(typeof e.rawOuterHTML=="string")return e.rawOuterHTML;switch(e.nodeType){case Tn:return An(e.data??"");case En:return`<!--${e.data??""}-->`;case Rt:{let t=e.localName,n=`<${t}${Fa(e)}>`;if(Da.has(t))return n;let r=e.rawHTML!=null?e.rawHTML:(e.childNodes??[]).map(L).join("");return`${n}${r}</${t}>`}}return Array.isArray(e.childNodes)?e.childNodes.map(L).join(""):""}var Va=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),Ha={amp:"&",lt:"<",gt:">",quot:'"',"#39":"'"};function Eo(e){return e.replace(/&(#?\w+);/g,(t,n)=>Ha[n]??t)}var I=class extends Error{};function Ao(e,t=!1){let n=0,r=[],o=[],i=l=>{let c=o[o.length-1];c?c.appendChild(l):r.push(l)};for(;n<e.length;){let l=e.indexOf("<",n);if(l===-1){a(e.slice(n));break}if(l>n&&a(e.slice(n,l)),e.startsWith("<!--",l)){let c=e.indexOf("-->",l);if(c===-1)throw new I(`unterminated comment at ${l}`);i(new be(e.slice(l+4,c))),n=c+3;continue}if(e[l+1]==="/"){let c=e.indexOf(">",l);if(c===-1)throw new I(`unterminated closing tag at ${l}`);let d=e.slice(l+2,c).trim().toLowerCase(),h=o.pop();if(!h||h.localName!==d)throw new I(`</${d}> does not close <${h?.localName??"nothing"}>`);n=c+1;continue}n=u(l)}if(o.length>0)throw new I(`unclosed <${o[o.length-1].localName}>`);let s=r[0];if(r.length!==1||!(s instanceof re))throw new I(`expected exactly one root element, got ${r.length}`);return s;function a(l){l!==""&&i(new ne(Eo(l)))}function u(l){let c=/[\s/>]/.exec(e.slice(l+1));if(!c)throw new I(`unterminated tag at ${l}`);let d=e.slice(l+1,l+1+c.index).toLowerCase(),h=new re(d,t),y=l+1+c.index;for(;y<e.length;){for(;y<e.length&&/\s/.test(e[y]);)y++;if(e[y]===">"){y++;break}if(e[y]==="/"&&e[y+1]===">"){y+=2;break}let R=y;for(;y<e.length&&!/[\s=/>]/.test(e[y]);)y++;let w=e.slice(R,y);if(w==="")throw new I(`malformed attribute at ${y}`);if(e[y]==="="){if(e[y+1]!=='"')throw new I(`attribute ${w} must have a double-quoted value`);let F=e.indexOf('"',y+2);if(F===-1)throw new I(`unterminated value for ${w}`);h.setAttribute(w,Eo(e.slice(y+2,F))),y=F+1}else h.setAttribute(w,"")}return i(h),Va.has(d)||o.push(h),y}}var No=!1;function _o(){No||(No=!0,yr({createElement:(e,t)=>new re(e,t),createText:e=>new ne(e),createRaw:e=>new Nt(e),parseTemplate:(e,t)=>Ao(e,t),createComment:e=>new be(e)}))}function Rn(e,t={}){let n=A();_o(),Z(!0);let r=he(t.event);try{return ye(r,()=>M(o=>{try{let i=typeof e=="function"?e():e;return L(i)}finally{o()}}))}finally{Z(n)}}var Ro=!1;function Ua(){Ro||(Ro=!0,Yn(e=>{H()?.pending.add(e)}),tt(()=>H()?.nextResourceId()??""),Qn((e,t)=>{e&&H()?.data.set(e,t)}))}var Nn=null;function _n(e){Nn=e}function _t(e){if(e.data.size===0)return"";let t={};for(let[r,o]of e.data){let i=o;if(Nn)try{i=Nn(o,r)}catch{continue}i!==void 0&&(typeof i=="function"||typeof i=="symbol"||(t[r]=i))}if(Object.keys(t).length===0)return"";let n=Le(JSON.stringify(t));return n==="{}"?"":`<script type="application/json" id="${me}">${n}<\/script>`}var Wa=50;async function kn(e,t={}){let n=A();_o(),Z(!0),Ua();let r=he(t.event);try{return await ye(r,async()=>{t.preload&&await t.preload(t.event);let o,i=null,s=()=>{};M(c=>{s=c,i=U(),o=typeof e=="function"?e():e});let a=()=>{try{P(i,()=>L(o))}catch{}};a();let u=0;for(;r.pending.size>0&&u++<Wa;){let c=Array.from(r.pending);r.pending.clear(),await Promise.allSettled(c),await Jn(),a()}let l=P(i,()=>L(o))+_t(r);return s(),l})}finally{Z(n)}}var za="__fluixi_signal_next_state__",Ka=e=>{typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e)},X=globalThis[za]??={consumer:null,untracked:!1,owner:null,queue:[],scheduled:!1,flushing:!1,batchDepth:0,hostSchedule:Ka,onSuspend:null,onError:null,observer:null},Ba="1.0.0-alpha.83";function Ga(e){return X.observer=e,()=>{X.observer===e&&(X.observer=null)}}var Xa=[],kt;function Ja(e,t){if(!X.observer)return t();let n=kt;kt=e;try{return t()}finally{kt=n}}function Ya(e){let t=X.observer;t&&t.created(e.parents===void 0?{...e,parents:Xa,origin:e.origin??kt}:e)}function ko(e,t,n){X.observer?.moved?.(e,t,n)}function Co(e){X.observer?.disposed?.(e)}var Za="__FLUIXI_DEVTOOLS_HOOK__",Oo=globalThis[Za];if(typeof Oo?.inject=="function")try{Oo.inject({observeReactiveNodes:Ga,version:Ba})}catch{}function Fo(){return X.observer!=null}var Ot=Symbol("store-raw"),Po=Symbol("store-node"),Mo=Symbol("store-has"),jo=Symbol("store-self"),qo=Symbol("store-track");var Ve=new WeakMap,On=new WeakMap,xe=new WeakMap,Pt=new WeakMap;function Qa(e,t){if(!we(e)||!Fo())return;let n=new Set,r=s=>{if(!(!we(s)||n.has(s))){n.add(s);for(let a of Object.values(s))r(a)}};r(Pt.get(t)??t);let o=new Set,i=s=>{if(!we(s))return;let a=s;if(n.has(a)||o.has(a))return;o.add(a);let u=Ve.get(a);if(u){for(let l of u.keys.values())Co(l);u.all&&Co(u.all),Ve.delete(a),xe.delete(a),On.delete(a)}for(let l of Object.values(a))i(l)};i(e)}var Mt=(e,t,n)=>n?`${e}[${String(t)}]`:`${e}.${String(t)}`;function Vo(e,t,n){let r=t?.owner,o=r&&n!==void 0?Mt(r.name,n,t?.array):void 0,[i,s]=Ja(r?.store,()=>g(e,o?{name:o}:void 0)),a=i;return a.$=s,a}function jt(e){let t=Ve.get(e);return t?t.owner||(t.owner=xe.get(e)):Ve.set(e,t={keys:new Map,owner:xe.get(e),array:Array.isArray(e)}),t}function Do(e,t,n){let r=e.keys.get(t);return r||e.keys.set(t,r=Vo(n,e,t)),r}function eu(e,t,n,r){let o=xe.get(e);if(o&&o.store===t&&o.name===n)return;let i={store:t,name:n};xe.set(e,i),Pt.set(e,Pt.get(r)??r);let s=Ve.get(e);if(s&&(s.owner=i,!!Fo())){for(let[a,u]of s.keys)ko(u,t,Mt(n,a,s.array));s.all&&ko(s.all,t,Mt(n,"*",s.array))}}function $o(e){let t=jt(e);(t.all||(t.all=Vo(void 0,t,"*")))()}function Lo(e,t){e.$(typeof t=="function"?()=>t:t)}function we(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 Ct(e){if(!we(e))return e;let t=On.get(e);if(t)return t;let n=new Proxy(e,tu);return On.set(e,n),n}var tu={get(e,t,n){if(t===Ot||t===Po)return e;if(t===ue)return n;if(t===Mo)return u=>u in e;if(t==="__proxy")return!0;if(t===qo||t===jo)return $o(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 i=jt(e),s=Do(i,t,r),a=s();return we(a)?(i.owner&&eu(a,s,Mt(i.owner.name,t,i.array),e),Ct(a)):a},set(){return!0},deleteProperty(e,t){return t in e&&Fe(e,t,void 0),!0},has(e,t){return t===Ot||t===ue||t===Po||t===Mo||t===jo||t===qo?!0:(Do(jt(e),t,e[t])(),t in e)},ownKeys(e){return $o(e),Reflect.ownKeys(e)},getOwnPropertyDescriptor(e,t){return Reflect.getOwnPropertyDescriptor(e,t)}};function Ho(e,t=new Set){if(e==null||typeof e!="object")return e;let n=e[Ot]??e;if(t.has(n)||!we(n))return n;t.add(n);let r=!1,o=s=>{let a=Ho(s,t);return a!==s&&(r=!0),a};if(Array.isArray(n)){let s=n.map(o);return r?s:n}let i={};for(let s of Object.keys(n))i[s]=o(n[s]);return r?i:n}function Fe(e,t,n){let r=Ho(n),o=e[t];if(o===r&&(r!==void 0||t in e))return;let i=Array.isArray(e),s=i?e.length:0;r===void 0?delete e[t]:e[t]=r;let a=jt(e),u=a.keys.get(t);if(u&&Lo(u,r),Qa(o,e),i&&e.length!==s){let l=a.keys.get("length");l&&Lo(l,e.length)}a.all&&a.all.$(void 0)}function Io(e,t){return typeof e=="function"?e(t):e}function Pn(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)?Pn(o,r):Fe(e,n,r)}}function jn(e){let t=[],n=e.replace(/\[([^\]]*)\]/g,".$1");for(let r of n.split("."))r.length&&t.push(r);return t}function Uo(e,t,n){let r=t.length-1;for(let i=0;i<r;i++){let s=t[i];if(s==="*"){let u=t.slice(i+1);if(Array.isArray(e))for(let l=0;l<e.length;l++)Uo(e[l],u,n);return}let a=e[s];(a==null||typeof a!="object")&&(a=/^\d+$/.test(t[i+1])?[]:{},Fe(e,s,a)),e=a}let o=t[r];if(o==="*"){if(Array.isArray(e))for(let i=0;i<e.length;i++)Fe(e,i,Io(n,e[i]));return}Fe(e,o,Io(n,e[o]))}function Cn(e,t,n){Uo(e,jn(t),n)}function nu(e,t){let n=t[0];if(typeof n=="function"&&t.length===1){let r=n(e);r&&r!==e&&Pn(e,r);return}if(Array.isArray(n)&&t.length===1){for(let r of n)Array.isArray(r)&&Cn(e,r[0],r[1]);return}if(n&&typeof n=="object"&&!Array.isArray(n)&&t.length===1){Pn(e,n);return}if(Array.isArray(t[1])&&t.length>=3){Cn(e,`${n}.${t[1].join(".")}`,t[2]);return}Cn(e,String(n),t[1])}function Mn(e){if(e==null||typeof e!="object")return e;if(Array.isArray(e))return e.map(Mn);let t={};for(let n of Object.keys(e))t[n]=Mn(e[n]);return t}function ve(e,t){let n=e;for(let r of jn(t)){if(n==null)return;n=n[r]}return n}var Wo=class{constructor(e,t={immutable:!0}){this.options=t,this.root=e,this.set=((...n)=>S(()=>nu(this.root,n))),e&&typeof e=="object"&&(xe.set(e,{store:this,name:t.name??"store"}),Pt.set(e,e)),Ya({kind:"store",node:this,handle:()=>this.root,name:t.name})}get state(){return Ct(this.root)}get proxy(){return Ct(this.root)}get accessor(){return(()=>Ct(this.root))}unwrap(){return this.root}getNode(e){return this.root&&this.root[e]}get(e){if(e==null||e==="")return qt(this.state);let t=this.state;for(let n of jn(e)){if(t==null)return;t=t[n]}return qt(t)}select(e){return m(()=>e(this.state))}subscribe(e){return E(()=>e(this.state))}watch(e,t){let n;return E(()=>{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=Mn(t);return e(n),n}))}reconcile(e,t={}){this.set(e)}push(e,...t){let n=ve(this.root,e);this.set(e,n.concat(t))}pop(e){let t=ve(this.root,e).slice(),n=t.pop();return this.set(e,t),n}shift(e){let t=ve(this.root,e).slice(),n=t.shift();return this.set(e,t),n}splice(e,t,n,...r){let o=ve(this.root,e).slice(),i=o.splice(t,n,...r);return this.set(e,o),i}insert(e,t,n){let r=ve(this.root,e).slice();r.splice(t,0,n),this.set(e,r)}removeAt(e,t){let n=ve(this.root,e).slice(),r=n.splice(t,1);return this.set(e,n),r}toObservable(){let[e]=g(this.state);return e.toObservable()}dispose(){}},ru=["get","select","watch","subscribe","produce","reconcile","push","pop","shift","splice","insert","removeAt","unwrap","toObservable"];function ou(e,t){for(let n of ru)e[n]=t[n].bind(t);e.$=t.reactive.bind(t)}function Dt(e,t={immutable:!0}){let n=new Wo(e,t);return ou(n.set,n),[n.proxy,n.set]}function iu(e,t={}){return new Wo(e,{...t,immutable:!1})}function qt(e){if(e==null||typeof e!="object")return e;let t=e[Ot];return t!==void 0?t:e}function su(e){return T(()=>qt(e))}var Kc=Object.freeze({createStore:Dt,createMutableStore:iu,batch:S,unwrap:qt,untrackStore:su});function zo(e,t){let[n,r]=Dt(e,t);return new Proxy(n,{get:(o,i)=>i==="set"?r:o[i],has:(o,i)=>i==="set"||Reflect.has(o,i)})}return Zo(au);})();
|
|
1
|
+
/*! @fluixi/dom v1.0.0-alpha.84 | (c) 2026 Ibrahima Touré and Fluixi contributors | MIT */
|
|
2
|
+
"use strict";var FluixiDOM=(()=>{var Vt=Object.defineProperty;var ds=Object.getOwnPropertyDescriptor;var ps=Object.getOwnPropertyNames;var hs=Object.prototype.hasOwnProperty;var ys=(e,t)=>{for(var n in t)Vt(e,n,{get:t[n],enumerable:!0})},ms=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of ps(t))!hs.call(e,o)&&o!==n&&Vt(e,o,{get:()=>t[o],enumerable:!(r=ds(t,o))||r.enumerable});return e};var gs=e=>ms(Vt({},"__esModule",{value:!0}),e);var Cu={};ys(Cu,{ClientOnly:()=>Nn,Dynamic:()=>Oo,ErrorBoundary:()=>Po,FX_DATA_ID:()=>we,For:()=>Ao,Index:()=>No,Island:()=>go,JSX_PROPERTIES:()=>ze,Match:()=>Ro,NoSsr:()=>ko,Portal:()=>Co,SVG_ELEMENTS:()=>Es,SVG_NAMESPACE:()=>fe,Show:()=>To,Switch:()=>_o,VOID_ELEMENTS:()=>Ss,addClass:()=>Ns,addDelegatedEventListener:()=>$r,addNativeEventListener:()=>sn,appendChildren:()=>js,applyElementProp:()=>Be,applyProps:()=>an,applyUse:()=>cn,asComponent:()=>Qt,asContext:()=>Ii,asOutlet:()=>Di,asProvider:()=>ji,asRoute:()=>Mi,asRouter:()=>ki,asRoutes:()=>Pi,asSuspense:()=>$i,batch:()=>S,bindPair:()=>dc,captureHydrationCursor:()=>kr,checkRenderType:()=>qi,classMap:()=>Mo,cleanChildren:()=>X,cloneTemplate:()=>Lr,closest:()=>As,createComponent:()=>vn,createComputed:()=>ur,createContext:()=>Ye,createDynamicElement:()=>eu,createEffect:()=>T,createElement:()=>Ms,createMemo:()=>m,createNativeElement:()=>on,createPortal:()=>uc,createRenderEffect:()=>b,createRequestContext:()=>be,createResource:()=>pr,createRoot:()=>M,createSignal:()=>g,createStore:()=>Lt,createTemplate:()=>qr,delegate:()=>Ls,delegateEvents:()=>rn,effect:()=>mr,escapeFxJson:()=>Ve,escapeHTML:()=>fc,fnName:()=>ec,generateID:()=>Wi,getAttribute:()=>Cs,getGlobal:()=>Xs,getLitEventName:()=>ws,getLocals:()=>Sn,getOffset:()=>qs,getRequestContext:()=>F,getRequestEvent:()=>St,getRequestLocals:()=>Et,getServerData:()=>He,getStableElementId:()=>Ui,getStyle:()=>Ps,handleRef:()=>qe,hasClass:()=>Os,holeContent:()=>Qi,holeEnd:()=>Zi,holeScope:()=>Ji,html:()=>vo,hydrate:()=>Rt,hydrateAdvancePast:()=>ye,hydrateIslands:()=>bo,indexArray:()=>tt,initializeIntegration:()=>Uc,insert:()=>H,insertExpression:()=>Me,intergartionInitialized:()=>Wc,isAccessor:()=>lc,isComponent:()=>$,isContext:()=>Nr,isCustomElement:()=>Kn,isDOMNode:()=>zs,isDelegatedEvent:()=>zi,isDomElement:()=>ot,isDomNode:()=>oe,isDomText:()=>st,isEventHandler:()=>vs,isFunction:()=>Gi,isIntegrationInitialized:()=>Kc,isJSXTemplate:()=>Bs,isLitTemplateResult:()=>zn,isNativeElement:()=>ac,isOutlet:()=>Tr,isPromise:()=>Pe,isProvider:()=>Ar,isReactElement:()=>Ws,isRoute:()=>Er,isRouter:()=>xr,isRoutes:()=>Sr,isSVGElement:()=>fn,isServer:()=>A,isSuspense:()=>Rr,isTemplateFactory:()=>Ks,isVisible:()=>Is,iterateFn:()=>tc,keyArray:()=>et,makeArrayFlat:()=>Vr,mapArray:()=>Qe,memo:()=>yr,mergeProps:()=>ic,observeIntersection:()=>Hs,observeResize:()=>Fs,onCleanup:()=>x,query:()=>Ht,queryAll:()=>Ts,registerCreateComponent:()=>Fc,registerGlobal:()=>Gs,removeAttribute:()=>ks,removeChildren:()=>Ds,removeClass:()=>Rs,removeDelegatedEventListener:()=>nn,render:()=>ln,renderToString:()=>Mn,renderToStringAsync:()=>jn,resetIntegration:()=>Bc,runHydrationAt:()=>ke,runWithRequestContext:()=>ve,runWithoutHydration:()=>Pr,scrollIntoView:()=>$s,serializeNode:()=>q,serializeResourceData:()=>Ct,setAttribute:()=>C,setClassList:()=>Ie,setClassName:()=>je,setDataRedactor:()=>Dn,setDynamicAttribute:()=>ft,setDynamicBoolAttribute:()=>un,setDynamicProperty:()=>lt,setProperty:()=>De,setRequestStore:()=>xn,setServerMode:()=>re,setStyle:()=>$e,setStyles:()=>Bn,shouldSetAsProperty:()=>xs,signal:()=>hr,splitProps:()=>cc,spread:()=>sc,store:()=>fs,styleMap:()=>Do,svg:()=>wo,templateNode:()=>Xi,toAttributeName:()=>bs,toggleClass:()=>_s,untrack:()=>E,useContext:()=>sr,waitForElement:()=>Vs});function bs(e){return e.startsWith("aria-")||e.startsWith("data-")?e:/[A-Z]/.test(e)?e.replace(/([A-Z])/g,"-$1").toLowerCase():e}function vs(e){return e.startsWith("@")||e.startsWith("on")&&e.length>2}function ws(e){return e.startsWith("@")?e.slice(1):e.startsWith("on")?e.slice(2).toLowerCase():e}function xs(e,t){let n=new Set(["checked","value","selected","disabled","readonly","required","multiple","open","contenteditable","draggable","spellcheck"]),r={input:new Set(["value","checked","indeterminate"]),textarea:new Set(["value"]),select:new Set(["value"]),option:new Set(["selected","value"]),audio:new Set(["volume","currentTime","paused"]),video:new Set(["volume","currentTime","paused"]),img:new Set(["src","srcset"]),iframe:new Set(["src"]),a:new Set(["href"])};return n.has(t)||r[e]&&r[e].has(t)}var Ss=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),Es=new Set(["svg","g","path","circle","rect","line","polyline","polygon","ellipse","text","tspan","use","defs","symbol","mask","clipPath","pattern","linearGradient","radialGradient","stop","filter","feGaussianBlur","feOffset","feMerge","feMergeNode","foreignObject"]),fe="http://www.w3.org/2000/svg";function Kn(e){return e.localName.includes("-")}function Be(e,t,n,r=!1){if(n==null){e.removeAttribute(t);return}if(Kn(e)){e[t]=n;return}C(e,t,n,r)}var ze=new Set(["className","value","checked","selected","innerHTML","innerText","textContent","indeterminate","htmlFor"]);function Ht(e,t=document){return t.querySelector(e)}function Ts(e,t=document){return Array.from(t.querySelectorAll(e))}function As(e,t){return e.closest(t)}function Ns(e,...t){e.classList.add(...t)}function Rs(e,...t){e.classList.remove(...t)}function _s(e,...t){t.forEach(n=>e.classList.toggle(n))}function Os(e,t){return e.classList.contains(t)}function C(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 Cs(e,t){return e.getAttribute(t)}function ks(e,t){e.removeAttribute(t)}function Bn(e,t){Object.assign(e.style,t)}function Ps(e,t){return window.getComputedStyle(e).getPropertyValue(t)}function Ms(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")Bn(r,s);else if(o.startsWith("on")&&typeof s=="function"){let i=o.slice(2).toLowerCase();r.addEventListener(i,s)}else C(r,o,s)}),n.forEach(o=>{typeof o=="string"?r.appendChild(document.createTextNode(o)):r.appendChild(o)}),r}function Ds(e){for(;e.firstChild;)e.removeChild(e.firstChild)}function js(e,...t){t.forEach(n=>{typeof n=="string"?e.appendChild(document.createTextNode(n)):e.appendChild(n)})}function Is(e){let t=e.getBoundingClientRect();return t.top>=0&&t.left>=0&&t.bottom<=window.innerHeight&&t.right<=window.innerWidth}function $s(e,t={behavior:"smooth",block:"nearest"}){e.scrollIntoView(t)}function qs(e){let t=e.getBoundingClientRect();return{top:t.top+window.pageYOffset,left:t.left+window.pageXOffset}}function Ls(e,t,n,r){let o=s=>{let i=s.target.closest(n);i&&e.contains(i)&&r(s,i)};return e.addEventListener(t,o),()=>{e.removeEventListener(t,o)}}function Vs(e,t=5e3){return new Promise((n,r)=>{let o=Ht(e);if(o){n(o);return}let s=new MutationObserver(()=>{let c=Ht(e);c&&(s.disconnect(),clearTimeout(i),n(c))});s.observe(document.body,{childList:!0,subtree:!0});let i=setTimeout(()=>{s.disconnect(),r(new Error(`Element ${e} not found within ${t}ms`))},t)})}function Hs(e,t,n={}){let r=new IntersectionObserver(o=>{o.forEach(s=>{t(s.isIntersecting)})},n);return r.observe(e),()=>{r.disconnect()}}function Fs(e,t){let n=new ResizeObserver(r=>{r.forEach(t)});return n.observe(e),()=>{n.disconnect()}}var Us=typeof Symbol=="function"&&Symbol.for?Symbol.for("react.element"):60103;function Ws(e){return typeof e=="object"&&e!==null&&e.$$typeof===Us}function zn(e){return e&&typeof e=="object"&&e.strings&&Array.isArray(e.strings)&&e.values&&Array.isArray(e.values)}function Ks(e){if(typeof e!="function")return!1;try{let t=e();return zn(t)}catch{return!1}}function Bs(e){return typeof e=="object"&&e!==null&&(e.$$typeof==="template"||typeof e.type=="function")}function zs(e){return e instanceof Node}function Gs(e,t,n="Fluixi"){typeof globalThis<"u"&&(typeof globalThis[n]>"u"&&(globalThis[n]={}),typeof globalThis[n][e]>"u"&&(globalThis[n][e]=t))}function Xs(e,t,n="Fluixi"){return typeof globalThis<"u"&&typeof globalThis[n]<"u"&&typeof globalThis[n][e]<"u"?globalThis[n][e]:t}var Xt="1.0.0-alpha.84",Zn=Xt.split(".")[0],Gn=`__fluixi_signal_state_v${Zn}__`,Qn=`__fluixi_signal_builds_v${Zn}__`,Js=e=>{typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e)};function er(){return{consumer:null,untracked:!1,owner:null,queue:[],scheduled:!1,flushing:!1,batchDepth:0,hostSchedule:Js,onSuspend:null,onError:null,observer:null}}var Ge=globalThis;function Ys(e){let t=er(),n=e;for(let r of Object.keys(t))r in e||(n[r]=t[r]);return e}function Zs(){let e=Ge[Gn];return e?Ys(e):Ge[Gn]=er()}var l=Zs();(Ge[Qn]??=[]).push(Xt);function tr(){return[...new Set(Ge[Qn]??[])]}function Qs(e){return l.observer=e,()=>{l.observer===e&&(l.observer=null)}}var k=[],ei;function Jt(e){let t=l.observer;t&&t.created(e.parents===void 0?{...e,parents:k,origin:e.origin??ei}:e)}function ti(e){return l.observer?(k.push(e),!0):!1}function ni(){k.pop()}function ri(e){l.observer?.ran?.(e)}function oi(e,t){l.observer?.wrote?.(e,t)}function D(e,t,n,r){let o=l.observer;!o?.bound||!k.length||o.bound(k[k.length-1],e,t,n,r)}function j(e,t,n,r){let o=l.observer;!o?.directive||!k.length||o.directive(k[k.length-1],e,t,n,r)}function si(e){l.observer?.contextCreated?.(e)}function Ut(e,t,n){let r=l.observer;!r?.context||!k.length||r.context(k[k.length-1],e,t,n)}function Yt(e){l.observer?.disposed?.(e)}var ii="__FLUIXI_DEVTOOLS_HOOK__",Xn=globalThis[ii];if(typeof Xn?.inject=="function")try{Xn.inject({observeReactiveNodes:Qs,version:Xt})}catch{}function nr(){return l.observer!=null}var Jn=0,Yn=1,Re=2,rr=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))}},ci=class extends rr{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++,oi(this,l.consumer),this.observers)for(let t of[...this.observers])t.markDirty(Re);Wt(this)}}peek(){return this._value}},or=class extends rr{constructor(e,t){super(),this._threw=!1,this._initialized=!1,this.state=Re,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===Yn&&this.sources){for(let e of this.sources)if(e.updateIfNecessary(),this.state===Re)break}(this.state===Re||!this._initialized)&&this.recompute(),this.state=Jn}recompute(){if(this.sources){for(let c of this.sources)c.observers?.delete(this);this.sources.clear()}let e=l.consumer,t=l.untracked,n=ti(this);l.consumer=this,l.untracked=!1;let r,o=!1,s;try{r=this._fn()}catch(c){o=!0,s=c,r=this._value}finally{l.consumer=e,l.untracked=t,n&&ni()}let i=!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,ri(this),i){if(this.version++,this.observers)for(let c of[...this.observers])c.markDirty(Re);Wt(this)}}markDirty(e){if(this.state>=e)return;let t=this.state===Jn;if(this.state=e,t){if(this.observers)for(let n of[...this.observers])n.markDirty(Yn);Wt(this)}}peek(){if(this.updateIfNecessary(),this._threw)throw this._error;return this._value}};function Wt(e){if(e.watchers)for(let t of[...e.watchers])t._notify(e)}var ui=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 ai(e){if(l.untracked)return e();l.untracked=!0;try{return e()}finally{l.untracked=!1}}function le(e){let t=Je(e);return e&&(e.owned??=[]).push(t),t}function de(e,t=!0){_e(e,t)}function Je(e){return{cleanups:null,owned:null,parent:e,contexts:null}}function Ye(e,t){let n=Symbol(t??"context");return si(n),{id:n,defaultValue:e,Provider:o=>{Ut(n,"provide",o.value);let s=l.owner,i=Je(s);(i.contexts=new Map).set(n,o.value),s&&(s.owned??=[]).push(i),l.owner=i;try{return o.children}finally{l.owner=s}}}}function sr(e){let t=l.owner;for(;t;){if(t.contexts&&t.contexts.has(e.id)){let n=t.contexts.get(e.id);return Ut(e.id,"read",n),n}t=t.parent}return Ut(e.id,"read",e.defaultValue),e.defaultValue}function ir(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 fi(e){l.onSuspend=e}function li(e){return l.onSuspend?(l.onSuspend(e,l.owner),!0):!1}function di(e){l.onError=e}function U(){return l.owner}function P(e,t){let n=l.owner;l.owner=e;try{return t()}finally{l.owner=n}}function x(e){if(l.owner){if(l.owner.disposed){e();return}(l.owner.cleanups??=[]).push(e)}}function _e(e,t=!0){if(!e.disposed){if(e.owned){for(let n=e.owned.length-1;n>=0;n--)_e(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 M(e){let t=Je(l.owner);l.owner&&(l.owner.owned??=[]).push(t);let n=l.owner;l.owner=t;try{return e(()=>_e(t))}finally{l.owner=n}}function pi(e){l.hostSchedule=e??(t=>{Promise.resolve().then(t)})}function hi(e){e.queued||(e.queued=!0,l.queue.push(e),!l.scheduled&&l.batchDepth===0&&(l.scheduled=!0,l.hostSchedule(Ze)))}function Ze(){if(l.scheduled=!1,l.flushing)return;l.flushing=!0;let e=0;try{for(;l.queue.length;){if(++e>1e5)throw new Error("[fluixi] effect flush did not settle (cycle?)");let t=l.queue;l.queue=[];for(let n of t)n.queued=!1,n.disposed||n.run()}}finally{l.flushing=!1}}function yi(){l.batchDepth===0&&Ze()}function mi(e){l.batchDepth++;try{return e()}finally{--l.batchDepth===0&&Ze()}}var gi=class{constructor(e,t=!1){this.queued=!1,this.disposed=!1,this.owner=Je(l.owner),l.owner&&(l.owner.cleanups??=[]).push(()=>this.dispose()),this.computed=new or(()=>{_e(this.owner,!1),P(this.owner,()=>{let n=e();typeof n=="function"&&(this.owner.cleanups??=[]).push(n)})}),Jt({kind:"effect",node:this.computed,handle:this,internal:!t}),this.watcher=new ui(()=>hi(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,Yt(this.computed),this.watcher.unwatch(this.computed),_e(this.owner))}};function Zt(e,t=!1){let n=new gi(e,t);return()=>n.dispose()}function bi(e){return!!e&&typeof e.then=="function"}pi(()=>{});var cr=Symbol.for("signal"),vi=Symbol.for("memo"),wi=Symbol.for("signal-node");function g(e,t){let n=new ci(e,{equals:t?.equals}),r=(()=>n.get()),o=(s=>{let i=typeof s=="function"?s(n.peek()):s;return n.set(i),yi(),i});return Object.defineProperty(r,cr,{value:!0,enumerable:!0}),Object.defineProperty(r,wi,{value:{get value(){return n.peek()},get version(){return n.version}},enumerable:!1}),Jt({kind:"signal",node:n,handle:r,name:t?.name,set:o}),nr()&&x(()=>Yt(n)),[r,o]}function m(e,t,n){let r=t,o=U(),s=new or(()=>P(o,()=>{try{return r=e(r)}catch(c){if(bi(c))return li(c),r;throw c}}),{equals:n?.equals}),i=(()=>s.get());return Object.defineProperty(i,cr,{value:!0,enumerable:!0}),Object.defineProperty(i,vi,{value:!0,enumerable:!0}),Jt({kind:"memo",node:s,handle:i,name:n?.name}),nr()&&x(()=>Yt(s)),i}function T(e,t){let n=t;return Zt(()=>{n=e(n)},!0)}function ur(e,t){let n=t;Zt(()=>{n=e(n)})}function b(e,t){let n=t;return Zt(()=>{n=e(n)})}function S(e){return mi(e)}function E(e){return ai(e)}function ar(){return Ze(),Promise.resolve()}function Qe(e,t,n){let r=[];return x(()=>{for(let o of r)o.dispose();r=[]}),m(()=>{let o=e()||[];return E(()=>{if(o.length===0){for(let u of r)u.dispose();return r=[],n?.fallback?n.fallback():[]}let s=new Map;for(let u of r)s.has(u.item)||s.set(u.item,u);let i=[],c=new Set;for(let u=0;u<o.length;u++){let a=o[u],f=s.get(a);if(f&&!c.has(f))f.setIndex(u),i.push(f),c.add(f);else{let d,h,y;M(w=>{y=w;let[V,Ae]=g(u,{name:"row index"});h=Ae,d=t(a,V)});let R={item:a,rendered:d,dispose:y,setIndex:h};i.push(R),c.add(R)}}for(let u of r)c.has(u)||u.dispose();return r=i,i.map(u=>u.rendered)})},void 0,{name:"mapArray"})}function et(e,t,n,r){let o=[],s=[];return x(()=>{for(let i of s)i.dispose();o=[],s=[]}),m(()=>{let i=e()||[];return E(()=>{if(i.length===0){for(let d of s)d.dispose();return o=[],s=[],r?.fallback?r.fallback():[]}let c=new Map;for(let d=0;d<o.length;d++)c.set(o[d],s[d]);let u=[],a=[],f=new Set;for(let d=0;d<i.length;d++){let h=t(i[d]),y=c.get(h);if(y&&!f.has(h))y.setIndex(d),u.push(y);else{let R,w,V;M(Ae=>{V=Ae;let[te,Ne]=g(d,{name:"row index"});w=Ne;let Ue=m(ae=>{let G=(e()||[])[te()];return G??ae},i[d]);R=n(Ue,te)}),u.push({rendered:R,dispose:V,setIndex:w})}a.push(h),f.add(h)}for(let[d,h]of c)f.has(d)||h.dispose();return o=a,s=u,u.map(d=>d.rendered)})},void 0,{name:"keyArray"})}function tt(e,t,n){let r=[];return x(()=>{for(let o of r)o.dispose();r=[]}),m(()=>{let o=e()||[];return E(()=>{if(o.length===0){for(let u of r)u.dispose();return r=[],n?.fallback?n.fallback():[]}let s=r.length,i=o.length;for(let u=s;u<i;u++){let a,f,d,h=o[u];M(y=>{d=y;let[R,w]=g(h);f=w,a=t(R,u)}),r.push({rendered:a,setItem:f,dispose:d})}for(let u=i;u<s;u++)r[u].dispose();i<s&&(r=r.slice(0,i));let c=Math.min(s,i);for(let u=0;u<c;u++)r[u].setItem(o[u]);return r.map(u=>u.rendered)})},void 0,{name:"indexArray"})}var xi=typeof window>"u"?!1:window.__FLUIXI_PROD__===!0,Si=typeof process>"u"?xi:!1,Ei=Symbol.for("signal");function N(e){return typeof e=="function"&&e[Ei]===!0}var Kt=null;function fr(e){Kt=e}function Ti(e){Kt&&Kt(e)}var Bt=null;function lr(e){Bt=e}function Ai(e){return Bt?Bt(e):void 0}var zt=null;function nt(e){zt=e}function Ni(){return zt?zt():void 0}var Gt=null;function dr(e){Gt=e}function Ri(e,t){Gt&&Gt(e,t)}function _i(e){return!!e&&typeof e.then=="function"}var Ft=Symbol();function pr(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:Ni(),i=s!==void 0?Ai(s):void 0,c=i!==void 0,[u,a]=g(i!==void 0?i.value:n.initialValue,{equals:!1}),[f,d]=g(void 0,{equals:!1}),[h,y]=g(i!==void 0||n.initialValue!==void 0?"ready":"unresolved",{equals:!1}),[R,w]=g(void 0,{equals:!1}),[V,Ae]=g(void 0,{equals:!1}),te=Ft,Ne=!1;T(()=>{let _=r();if(V(),_===!1||_===null||_===void 0){te=Ft,S(()=>{y("unresolved"),w(void 0),d(void 0)});return}let G=Ne;if(Ne=!1,te!==Ft&&_===te&&!G)return;if(te=_,c){c=!1;return}let We=!1;x(()=>We=!0);let Un=E(h),ls=E(u),Wn=Un==="ready"||Un==="refreshing";S(()=>{y(Wn?"refreshing":"pending"),d(void 0)});try{let ne=o(_,{value:ls,refetching:Wn});_i(ne)?(w(ne),Ti(ne),ne.then(Ke=>{We||(s!==void 0&&Ri(s,Ke),S(()=>{a(()=>Ke),y("ready"),w(void 0)}))},Ke=>{We||S(()=>{d(Ke),y("errored"),w(void 0)})})):S(()=>{a(()=>ne),y("ready"),w(void 0)})}catch(ne){if(We)return;S(()=>{d(ne),y("errored"),w(void 0)})}});let Ue=()=>{let _=h();return _==="pending"||_==="refreshing"},ae=(()=>{let _=f();if(_)throw _;if(Ue()){let G=R();if(G)throw G}return u()});return Object.defineProperties(ae,{state:{get:h},loading:{get:Ue},error:{get:f},latest:{get:u}}),Object.defineProperty(ae,Symbol.for("resource"),{value:!0,enumerable:!0}),Object.defineProperty(ae,Symbol.for("signal"),{value:!0,enumerable:!0}),[ae,{mutate:a,refetch:()=>{Ne=!0,Ae(void 0)}}]}function Xe(e){if(typeof e=="function"&&!e.length){let t=e();return N(t)?t:Xe(t)}if(Array.isArray(e)){let t=[];for(let n=0;n<e.length;n++){let r=Xe(e[n]);Array.isArray(r)?t.push.apply(t,r):t.push(r)}return t}return e}function rt(e){let t=m(e);return Si?m(()=>Xe(t()),void 0,{name:"children"}):m(()=>Xe(t()))}var Oi=Ye();fi((e,t)=>{let n=ir(t,Oi);n&&(n.increment(),e.finally(()=>n.decrement()))});var Ci=Ye();di((e,t)=>{let n=ir(t,Ci);return n?(n.setError(e),!0):!1});var pe=Symbol.for("fluixi-proxy");function hr(e,t){let[n,r]=g(e,t);return Object.assign(n,{set:r})}function yr(e,t,n){return m(e,t,n)}function mr(e,t){return T(e,t)}var gr="1.0.0-alpha.84";var br="1.0.0-alpha.84";var I={dom:gr,reactive:br};function vr(e){I.core&&e.setAttribute("fluixi",I.core),e.setAttribute("fx-dom",I.dom),e.setAttribute("fx-reactive",I.reactive),typeof globalThis<"u"&&(globalThis.Fluixi=I)}function wr(){let e=tr();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=[I.core,I.dom,I.reactive].filter(n=>n!==void 0);new Set(t).size<=1||console.warn(`[fluixi] package versions disagree: core ${I.core??"(absent)"}, dom ${I.dom}, reactive ${I.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 ki(e){return Object.defineProperty(e,Symbol.for("fluixi-router"),{value:!0,enumerable:!0}),e}function Pi(e){return Object.defineProperty(e,Symbol.for("fluixi-routes"),{value:!0,enumerable:!0}),e}function Mi(e){return Object.defineProperty(e,Symbol.for("fluixi-route"),{value:!0,enumerable:!0}),e}function Di(e){return typeof e!="function"||Object.defineProperty(e,Symbol.for("fluixi-outlet"),{value:!0,enumerable:!0}),e}function ji(e){return Object.defineProperty(e,Symbol.for("fluixi-provider"),{value:!0,enumerable:!0}),e}function Ii(e){return Object.defineProperty(e,Symbol.for("fluixi-context"),{value:!0,enumerable:!0}),e}function Qt(e){return typeof e!="function"||Object.defineProperty(e,Symbol.for("fluixi-component"),{value:!0,enumerable:!0}),e}function $i(e){return Object.defineProperty(e,Symbol.for("fluixi-suspense"),{value:!0,enumerable:!0}),e}function xr(e){return typeof e=="function"&&e[Symbol.for("fluixi-router")]===!0}function Sr(e){return typeof e=="function"&&e[Symbol.for("fluixi-routes")]===!0}function Er(e){return typeof e=="function"&&e[Symbol.for("fluixi-route")]===!0}function Tr(e){return typeof e=="function"&&e[Symbol.for("fluixi-outlet")]===!0}function Ar(e){return typeof e=="function"&&e[Symbol.for("fluixi-provider")]===!0}function Nr(e){return typeof e=="function"&&e[Symbol.for("fluixi-context")]===!0}function $(e){return typeof e=="function"&&e[Symbol.for("fluixi-component")]===!0}function Rr(e){return typeof e=="function"&&e[Symbol.for("fluixi-suspense")]===!0}function qi(e){return xr(e)?{type:"router",value:e}:Er(e)?{type:"route",value:e}:Sr(e)?{type:"routes",value:e}:Tr(e)?{type:"outlet",value:e}:$(e)?{type:"component",value:e}:Rr(e)?{type:"suspense",value:e}:Ar(e)?{type:"provider",value:e}:Nr(e)?{type:"context",value:e}:{type:"none",value:e}}var Ce=Symbol.for("fluixi.server-node"),Li=Symbol.for("fluixi.dom.server-host"),Vi=globalThis,Oe=Vi[Li]??={server:typeof document>"u",nodes:null};function A(){return Oe.server}function re(e){Oe.server=e}function _r(e){Oe.nodes=e}function he(){if(!Oe.nodes)throw new Error("[fluixi] server render ran before @fluixi/dom/server loaded");return Oe.nodes}function oe(e){return e!=null&&e[Ce]===!0?!0:typeof Node<"u"&&e instanceof Node}function ot(e){return e!=null&&e[Ce]===!0?e.nodeType===1:typeof Element<"u"&&e instanceof Element}function st(e){return e!=null&&e[Ce]===!0?e.nodeType===3:typeof Text<"u"&&e instanceof Text}var p={active:!1,cursor:null,parents:[]},Or=null;function Cr(e){Or=e}function it(){return Or}function en(e,t){return p.active&&t.parentNode===e}function tn(e){let t=p.parents.lastIndexOf(e);t!==-1&&(p.parents.length=t),p.cursor=e.nextSibling}function kr(){return p.active?p.cursor:null}function ke(e,t){if(!e||e.parentNode==null)return t();let n=p.active,r=p.cursor,o=p.parents;p.active=!0,p.cursor=e,p.parents=[];try{return t()}finally{p.active=n,p.cursor=r,p.parents=o}}function Pr(e){if(!p.active)return e();let t=p.cursor,n=p.parents;p.active=!1,p.parents=[];try{return e()}finally{p.active=!0,p.cursor=t,p.parents=n}}function ye(e){if(!p.active||e==null)return;let t=Array.isArray(e)?e[e.length-1]:e;t&&typeof t.nodeType=="number"&&tn(t)}function Hi(e){let t=[];for(;e&&e.nodeType===1;){let n=e.tagName.toLowerCase();if(e.id){n+=`#${e.id}`,t.unshift(n);break}e.getAttribute("data-id")&&(n+=`[data-id="${e.getAttribute("data-id")}"]`);let r=0,o=e;for(;o=o.previousElementSibling;)o.tagName===e.tagName&&r++;n+=`:nth-of-type(${r+1})`,t.unshift(n),e=e.parentElement}return t.join(">")}function Fi(e){let t=0;for(let n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n),t|=0;return`el_${Math.abs(t)}`}function Ui(e){return Fi(Hi(e))}var Wi=()=>"xxyxxxxxxy-4xx8".replace(/[xy]/g,function(e){let t=Math.random()*16|0;return(e==="x"?t:t&3|8).toString(16)}),Ki={};var ct="__fx_at",Ir="__fx_loc";function Mr(e,t){return t&&(e[Ir]=t),e}var Dr=new Map,ut=new Set,dt=new Set(["scroll","focus","blur","load","error","resize","mouseenter","mouseleave","pointerenter","pointerleave","gotpointercapture","lostpointercapture"]);function rn(e){if(!A())for(let t of e)ut.has(t)||dt.has(t)||(ut.add(t),document.addEventListener(t,Bi))}function Bi(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 $r(e,t,n){if(e[`$$${t}`]=n,dt.has(t)){let r=`__fx_${t}`;if(!e[r]){let o=s=>{e[`$$${t}`]?.(s)};e.addEventListener(t,o),e[r]=o}return}ut.has(t)||rn([t])}function nn(e,t){delete e[`$$${t}`];let n=`__fx_${t}`,r=e[n];r&&(e.removeEventListener(t,r),delete e[n])}function zi(e){return!dt.has(e)}function Gi(e){return typeof e=="function"}function J(e,t=!1){if(A())return he().createText(e);if(p.active&&!t){let n=it()?.hydrateText(e);if(n)return n}return document.createTextNode(e)}function on(e,t=!1,n){if(A())return he().createElement(e,t);if(p.active){let r=it()?.hydrateElement(e);if(r)return n?Mr(r,n):r}return Mr(t?document.createElementNS(fe,e):document.createElement(e),n)}function qr(e,t=!1){let n=Dr.get(e);if(n)return n;let r=document.createElement("template");return t?r.innerHTML=`<svg>${e}</svg>`:r.innerHTML=e,Dr.set(e,r),r}function Xi(e,t,n=!1,r=!1,o){if(A()){let s=he();return n?s.parseTemplate(e,r):s.createRaw(e)}if(p.active){let s=it()?.hydrateStatic(t);if(s)return jr(s,o)}return jr(Lr(qr(e,r),r).firstChild,o)}function jr(e,t){let n=e;if(!t||typeof n?.querySelectorAll!="function")return e;let r=[n,...n.querySelectorAll("*")];for(let o=0;o<r.length&&o*2+1<t.pos.length;o++){let s=t.pos[o*2];s&&(r[o][Ir]={file:t.file,line:s,column:t.pos[o*2+1]})}return e}function Ji(e,t){if(!p.active)return t();let n=ke(e.nextSibling,t);if(typeof n=="function"){let r=n;return Yi(r,(...s)=>p.active?ke(e.nextSibling,()=>r(...s)):r(...s))}return n}function Yi(e,t){let n=e[ct];return n!==void 0&&(t[ct]=n),t}function Zi(e){for(let t=e.nextSibling;t;t=t.nextSibling)if(t.nodeType===8&&t.data==="fx/")return t;throw new Error("[fluixi] template hole is missing its closing marker")}function Qi(e,t){let n=[];for(let r=e.nextSibling;r&&r!==t;r=r.nextSibling)n.push(r);return n}function Lr(e,t=!1){let n=e.content.cloneNode(!0);return t?n.firstChild:n}function Vr(e){return Array.isArray(e)?e.length===2&&e[1]===" "?Array.isArray(e[0])?Vr(e[0]):(typeof e[0]=="function",e[0]):e.length===1&&typeof e[0]=="function"?e[0]:e:e}function ec(e){return typeof e!="function"?null:e._name||e.name||"anonymous"}function tc(e){if(N(e)||$(e)||typeof e!="function")return e;let t=e();for(;typeof t=="function"&&!N(t)&&!$(t);)t=t();return t}var K=0,nc=200;function rc(e,t,n,r,o){let s=r,i=new Map;return b(()=>{D(n??t,"content",void 0,e);let c;if($(e)&&!N(e)){if(!i.has(e)){K++;try{let u=e();i.set(e,u)}finally{K--}}for(c=i.get(e);typeof c=="function"&&N(c);)c=c()}else for(c=e();typeof c=="function"&&N(c);)c=c();{let u=0;for(;typeof c=="function"&&u++<50;)if($(c)){if(!i.has(c)){let a=c;K++;try{let f=a();i.set(a,f)}finally{K--}}c=i.get(c)}else if(N(c))c=c();else if(c=c(),typeof c!="function"||!N(c)&&!$(c))break}K++;try{s=Me(t,c,n,s,i),o(s)}finally{K--}})}function H(e,t,n,r){if(K>nc)return console.error("[insert] Exceeded max call depth, possible infinite loop."),()=>null;n!==void 0&&!n&&(n=J("",!0),e.appendChild(n));let o=r??null,s=u=>Array.isArray(u)&&u.some(a=>typeof a=="function"),i=u=>typeof u=="function"?u:()=>u;if(typeof t!="function"&&!s(t)){K++;try{o=Me(e,t,n,o)}finally{K--}return()=>o}let c=rc(i(t),e,n,o,u=>{o=u});return()=>(c?.(),o)}function Me(e,t,n,r,o){if(t==null||typeof t=="boolean")return X(e,r,n);if(typeof t=="function")for(;typeof t=="function";)t=t();if(t==null||typeof t=="boolean")return X(e,r,n);if(Pe(t)){let i=J("",!0);return Array.isArray(r)?r.length>0?(e.replaceChild(i,r[0]),X(e,r.slice(1),n)):O(e,i,n):r?e.replaceChild(i,r):O(e,i,n),t.then(c=>{i.parentNode===e&&Me(e,c,i.nextSibling,i)}).catch(c=>{console.error("Error resolving promise in insertExpression:",c)}),i}let s=typeof t;if(s==="string"||s==="number"){if(s==="number"&&(t=String(t)),Array.isArray(r)){if(r.length===0){let c=J(t);return O(e,c,n),c}if(r.length===1&&r[0].nodeType===3)return r[0].data=t,r;r=X(e,r,n)}if(r&&st(r))return r.data=t,r;let i=J(t);return r&&r.parentNode===e?e.replaceChild(i,r):en(e,i)||O(e,i,n),i}if(oe(t))return en(e,t)?(tn(t),t):Array.isArray(r)?(r.length===0?O(e,t,n):r[0].parentNode===e?(e.replaceChild(t,r[0]),X(e,r.slice(1),n)):O(e,t,n),t):(r?r!==t&&(r.parentNode===e?e.replaceChild(t,r):O(e,t,n)):O(e,t,n),t);if(Array.isArray(t)){let i=[],c=Array.isArray(r)?r:r?[r]:[],u=[];W(t,i,e,n,!0,o,u);let a=oc(e,c,i,n);for(let f of u){let d=H(e,f.sig,f.marker);x(()=>{X(e,d()),f.marker.parentNode===e&&e.removeChild(f.marker)})}return a}if(s==="object"&&t!==null&&typeof t=="object"){let i=t;if("type"in i&&"props"in i){let c=i;if(typeof c.type=="function"){let u=c.type(c.props||{});return Me(e,u,n,r)}}}return X(e,r,n)}function W(e,t,n,r,o=!0,s,i){for(let c=0;c<e.length;c++){let u=e[c];if(!(u==null||typeof u=="boolean")){for(;typeof u=="function"&&!Pe(u)&&!N(u)&&!$(u)&&(u=u(),!(u==null||typeof u=="boolean")););if(!(u==null||typeof u=="boolean")){if(typeof u=="function"){let a;for($(u)&&!N(u)?(s||(s=new Map),s.has(u)||s.set(u,u()),a=s.get(u)):a=u();typeof a=="function"&&!Pe(a)&&!N(a)&&!$(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(N(a)){if(i){let d=J("",!0);t.push(d),i.push({marker:d,sig:a});continue}let f=a();for(;typeof f=="function"&&N(f);)f=f();if(f==null||typeof f=="boolean")continue;Array.isArray(f)?W(f,t,n,r,o,s):W([f],t,n,r,o,s);continue}continue}Array.isArray(a)?W(a,t,n,r,o,s,i):W([a],t,n,r,o,s,i);continue}if(Pe(u)){let a=J("",!0);t.push(a),u.then(f=>{if(a.parentNode){let d=[];if(W([f],d,a.parentNode,void 0,!1,s),d.length>0){a.parentNode.replaceChild(d[0],a);for(let h=1;h<d.length;h++)a.parentNode?.insertBefore(d[h],d[h-1].nextSibling)}}}).catch(f=>console.error("Error resolving promise in array:",f));continue}if(Array.isArray(u)){W(u,t,n,r,o,s,i);continue}if(oe(u)){t.push(u);continue}if(typeof u=="object"&&u!==null&&"type"in u&&"props"in u){let a=u;if(typeof a.type=="function"){let f=a.type(a.props||{});Array.isArray(f)?W(f,t,n,r,!1,s):W([f],t,n,r,!1,s);continue}}if(typeof u=="string"||typeof u=="number"){let a=String(u);if(a.trim()===""&&a!==" ")continue;t.push(J(a));continue}t.push(J(String(u)))}}}}function oc(e,t,n,r){for(let d=0;d<n.length;d++){let h=n[d].parentNode;h!==null&&h!==e&&h.nodeType!==11&&(n=n.slice(),n[d]=n[d].cloneNode(!0))}let o=n.length,s=t.length,i=o,c=0,u=0,a=s>0?t[s-1].nextSibling??void 0:r,f=null;for(;c<s||u<i;){if(t[c]===n[u]){c++,u++;continue}for(;s>c&&i>u&&t[s-1]===n[i-1];)s--,i--;if(s===c){let d=i<o?u?n[u-1].nextSibling??void 0:n[i-u]:a;for(;u<i;)O(e,n[u++],d)}else if(i===u)for(;c<s;)(!f||!f.has(t[c]))&&t[c].parentNode===e&&e.removeChild(t[c]),c++;else if(t[c]===n[i-1]&&n[u]===t[s-1]){let d=t[--s].nextSibling;O(e,n[u++],t[c++].nextSibling),O(e,n[--i],d),t[s]=t[c-1]}else{if(!f){f=new Map;let h=u;for(;h<i;)f.set(n[h],h++)}let d=f.get(t[c]);if(d!=null)if(u<d&&d<i){let h=c,y=1;for(;++h<s&&h<i&&!(!f.has(t[h])||f.get(t[h])!==d+y);)y++;if(y>d-u){let R=t[c];for(;u<d;)O(e,n[u++],R)}else t[c].parentNode===e?e.replaceChild(n[u++],t[c++]):(O(e,n[u++],a),c++)}else c++;else t[c].parentNode===e&&e.removeChild(t[c]),c++}}return n}function X(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 O(e,t,n){p.active&&t.parentNode===e||(n&&n.parentNode===e?e.insertBefore(t,n):e.appendChild(t))}function De(e,t,n){n==null?delete e[t]:e[t]=n}function sn(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 Hr(e,t){if(!t||typeof t!="function")return;let n=t[ct]?.name;if(!n)return;let r=n.indexOf(":");r!==-1&&j(e,n.slice(0,r),n.slice(r+1),t)}function at(e,t,n){let r=typeof n=="function"?E(()=>n()):n;if(!(!r||typeof r!="object"))for(let o of Object.keys(r))j(e,t,o)}function cn(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 ft(e,t,n,r=!1){return Hr(e,n),typeof n!="function"?(C(e,t,n,r),()=>{}):b(()=>{D(e,"attribute",t,n);let o=typeof n=="function"?n():n;C(e,t,o,r)})}function lt(e,t,n){return typeof n!="function"?(De(e,t,n),()=>{}):(Hr(e,n),b(()=>{D(e,"property",t,n);let r=typeof n=="function"?n():n;De(e,t,r)}))}function un(e,t,n){return typeof n!="function"?(C(e,t,!!n),()=>{}):b(()=>{D(e,"attribute",t,n);let r=n();C(e,t,!!r)})}function je(e,t){if(t==null){e.removeAttribute("class");return}if(typeof t=="function"){b(()=>{D(e,"attribute","class",t),je(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 Ie(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(b(()=>{let i=!!o();for(let c of s)e.classList.toggle(c,i)}));else{let i=!!(typeof o=="function"?o():o);for(let c of s)e.classList.toggle(c,i)}}}function $e(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 sc(e){let{element:t,props:n,prevProps:r=Ki,isSVG:o=!1,skipChildren:s=!1}=e;if(!t||!ot(t))return console.error("[spread] Error: element is not a DOM Element!"),()=>{};if(!n)return console.warn("[spread] Warning: props is undefined!"),()=>{};let i=o||t.namespaceURI===fe,c=[];for(let u in n){if(s&&u==="children")continue;let a=n[u],f=r[u];if(a===f)continue;if(u==="ref"){qe(a,t);continue}if(u==="use"){cn(t,a);continue}if(u.startsWith("on:")){c.push(sn(t,u.slice(3),a));continue}if(u.startsWith("prop:")){j(t,"prop",u.slice(5),a),c.push(lt(t,u.slice(5),a));continue}if(u.startsWith("attr:")){j(t,"attr",u.slice(5),a),c.push(ft(t,u.slice(5),a,i));continue}if(u.startsWith("bool:")){j(t,"bool",u.slice(5),a),c.push(un(t,u.slice(5),a));continue}if(u==="class"||u==="className"){typeof a=="function"?c.push(b(()=>{D(t,"attribute","class",a),je(t,a())})):je(t,a);continue}if(u==="classList"){at(t,"class",a),typeof a=="function"?c.push(b(()=>{D(t,"attribute","class",a),Ie(t,a())})):Ie(t,a,c);continue}if(u==="style"){at(t,"style",a),typeof a=="function"?c.push(b(()=>{D(t,"attribute","style",a),$e(t,a())})):$e(t,a);continue}if(u.startsWith("on")){let h=u.slice(2).toLowerCase();f&&nn(t,h),a&&$r(t,h,a);continue}let d=ze.has(u)||!i&&u in t;typeof a=="function"?c.push(d?lt(t,u,a):ft(t,u,a,i)):c.push(b(()=>d?De(t,u,n[u]):C(t,u,n[u],i)))}for(let u in r)if(!(u in n))if(u.startsWith("on")){let a=u.slice(2).toLowerCase();nn(t,a)}else ze.has(u)?De(t,u,null):t.removeAttribute(u);return()=>{c.forEach(u=>u())}}function an(e,t,n=!1){for(let r in t){let o=t[r];if(r==="ref"){qe(o,e);continue}if(r!=="children"){if(r==="use"){cn(e,o);continue}if(r.startsWith("on:")){sn(e,r.slice(3),o);continue}if(r.startsWith("prop:")){j(e,"prop",r.slice(5),o),lt(e,r.slice(5),o);continue}if(r.startsWith("attr:")){j(e,"attr",r.slice(5),o),ft(e,r.slice(5),o,n);continue}if(r.startsWith("bool:")){j(e,"bool",r.slice(5),o),un(e,r.slice(5),o);continue}if(r.startsWith("on")&&r.length>2){let s=r.slice(2).toLowerCase();if(typeof o=="function")if(dt.has(s)){e[`$$${s}`]=o;let i=`__fx_${s}`;if(!e[i]){let c=u=>{e[`$$${s}`]?.(u)};e.addEventListener(s,c),e[i]=c}}else e[`$$${s}`]=o,ut.has(s)||rn([s]);continue}if(r==="class"||r==="className"){je(e,o);continue}if(r==="classList"){at(e,"class",o),typeof o=="function"?b(()=>{D(e,"attribute","class",o),Ie(e,o())}):Ie(e,o);continue}if(r==="style"){at(e,"style",o),typeof o=="function"?b(()=>{D(e,"attribute","style",o),$e(e,o())}):$e(e,o);continue}if(r==="innerHTML"){if(typeof o=="function"){let s=T(()=>{let i=o();for(;typeof i=="function";)i=i();e.innerHTML=i});x(()=>s())}else e.innerHTML=o;continue}if(r==="value"&&(e.tagName==="INPUT"||e.tagName==="TEXTAREA")){if(typeof o=="function"){let s=T(()=>{let i=o();for(;typeof i=="function"&&i.length===0;)i=i();document.activeElement!==e&&(e.value=i??"")});x(()=>{s()})}else b(()=>{document.activeElement!==e&&(e.value=t[r]??"")});continue}if(r==="checked"&&e.tagName==="INPUT"){if(typeof o=="function"){let s=T(()=>{let i=o();for(;typeof i=="function"&&i.length===0;)i=i();document.activeElement!==e&&(e.checked=i??"")});x(()=>{s()})}else b(()=>{document.activeElement!==e&&(e.checked=t[r]??"")});continue}if(r==="value"&&e.tagName==="SELECT"){if(typeof o=="function"){let s=!0,i=T(()=>{let c=o();for(;typeof c=="function"&&c.length===0;)c=c();s?(s=!1,queueMicrotask(()=>{e.value=c??""})):e.value=c??""});x(()=>{i()})}else{let s=!0;b(()=>{let i=t[r];s?(s=!1,queueMicrotask(()=>{e.value=i??""})):e.value=i??""})}continue}if(typeof o=="function"){let s=T(()=>{let i=o();for(;typeof i=="function"&&i.length===0;)i=i();Be(e,r,i,n)});x(()=>{s()})}else b(()=>Be(e,r,t[r],n))}}}function ic(...e){let t=r=>{for(let o=e.length-1;o>=0;o--){let s=e[o];if(s&&r in s&&s[r]!==void 0)return s[r]}},n=r=>{for(let o of e)if(o&&r in o)return!0;return!1};return new Proxy({},{get:(r,o)=>t(o),has:(r,o)=>n(o),ownKeys:()=>{let r=new Set;for(let o of e)if(o)for(let s of Reflect.ownKeys(o))r.add(s);return[...r]},getOwnPropertyDescriptor:(r,o)=>n(o)?{enumerable:!0,configurable:!0,get:()=>t(o)}:void 0})}function cc(e,...t){let n=new Set;for(let i of t)for(let c of i)n.add(c);let r=i=>({enumerable:!0,configurable:!0,get:()=>e[i]}),o=t.map(i=>{let c=new Set(i);return new Proxy({},{get:(u,a)=>c.has(a)?e[a]:void 0,has:(u,a)=>c.has(a)&&a in e,ownKeys:()=>Array.from(c).filter(u=>u in e),getOwnPropertyDescriptor:(u,a)=>c.has(a)&&a in e?r(a):void 0})}),s=new Proxy({},{get:(i,c)=>n.has(c)?void 0:e[c],has:(i,c)=>!n.has(c)&&c in e,ownKeys:()=>Reflect.ownKeys(e).filter(i=>!n.has(i)),getOwnPropertyDescriptor:(i,c)=>!n.has(c)&&c in e?r(c):void 0});return[...o,s]}function qe(e,t){if(!e)return;let n=e[ct]?.name;if(j(t,"ref",n||typeof e=="function"&&e.name||"ref",e),oe(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 uc(e,t,n){let r=t||document.body,o=rt(()=>e),s=[];return S(()=>{let i=b(()=>{let c=o();Array.isArray(c)?(c.forEach(u=>r.appendChild(u)),s.push(()=>{c.forEach(u=>{u.parentNode===r&&r.removeChild(u)})})):oe(c)&&(r.appendChild(c),s.push(()=>{c.parentNode===r&&r.removeChild(c)}))});s.push(i),x(()=>{s.forEach(c=>c())})}),null}function ac(e){return typeof e=="string"&&e.toLowerCase()===e}function fn(e){return e==="svg"||e==="path"||e==="circle"||e==="rect"||e==="line"||e==="polygon"||e==="polyline"||e==="ellipse"||e==="g"||e==="defs"||e==="clipPath"||e==="text"}function fc(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function Pe(e){return e!=null&&(typeof e=="object"||typeof e=="function")&&typeof e.then=="function"||e instanceof Promise}function lc(e){return typeof e=="function"&&e.length===0&&N(e)}function ln(e,t,n){if(!t)throw new Error("Container element is required");let r,o,s=[];return M(i=>{S(()=>{p.active||(t.textContent=""),vr(t),wr(),H(t,e)}),o=i}),()=>{o?.(),r?.(),s.forEach(i=>i()),t.textContent=""}}function dc(e){if(Array.isArray(e))return e;if(typeof e=="function"&&typeof e.set=="function")return[e,e.set];throw new TypeError("[fluixi] bind: needs a signal, either `signal(...)` or the `[get, set]` pair from `createSignal(...)`.")}var gn="1.0.0-alpha.84";var eo=gn.split(".")[0],Fr=`__fluixi_signal_state_v${eo}__`,pc=`__fluixi_signal_builds_v${eo}__`,hc=e=>{typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e)};function to(){return{consumer:null,untracked:!1,owner:null,queue:[],scheduled:!1,flushing:!1,batchDepth:0,hostSchedule:hc,onSuspend:null,onError:null,observer:null}}var pn=globalThis;function yc(e){let t=to(),n=e;for(let r of Object.keys(t))r in e||(n[r]=t[r]);return e}function mc(){let e=pn[Fr];return e?yc(e):pn[Fr]=to()}var v=mc();(pn[pc]??=[]).push(gn);function gc(e){return v.observer=e,()=>{v.observer===e&&(v.observer=null)}}var se=[],pt;function bc(e,t){if(!v.observer)return t();let n=pt;pt=e;try{return t()}finally{pt=n}}function vc(e){let t=v.observer;t&&t.created(e.parents===void 0?{...e,parents:se,origin:e.origin??pt}:e)}function no(e){let t=v.observer;!t?.props||!se.length||!e||t.props(se[se.length-1],e)}function wc(e){v.observer?.contextCreated?.(e)}function xc(e,t,n){let r=v.observer;!r?.context||!se.length||r.context(se[se.length-1],e,t,n)}function Ur(e,t,n){v.observer?.moved?.(e,t,n)}function Wr(e){v.observer?.disposed?.(e)}var Sc="__FLUIXI_DEVTOOLS_HOOK__",Kr=globalThis[Sc];if(typeof Kr?.inject=="function")try{Kr.inject({observeReactiveNodes:gc,version:gn})}catch{}function ro(){return v.observer!=null}function Ec(e){if(v.untracked)return e();v.untracked=!0;try{return e()}finally{v.untracked=!1}}function Tc(e){return{cleanups:null,owned:null,parent:e,contexts:null}}function oo(e,t){let n=Symbol(t??"context");return wc(n),{id:n,defaultValue:e,Provider:o=>{xc(n,"provide",o.value);let s=v.owner,i=Tc(s);(i.contexts=new Map).set(n,o.value),s&&(s.owned??=[]).push(i),v.owner=i;try{return o.children}finally{v.owner=s}}}}function so(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 Ac(e){v.onSuspend=e}function Nc(e){v.onError=e}function Rc(e){v.hostSchedule=e??(t=>{Promise.resolve().then(t)})}Rc(()=>{});function io(e){return Ec(e)}var na=typeof window>"u"?!1:window.__FLUIXI_PROD__===!0;var _c=Symbol.for("signal");function co(e){return typeof e=="function"&&e[_c]===!0}var Oc=oo();Ac((e,t)=>{let n=so(t,Oc);n&&(n.increment(),e.finally(()=>n.decrement()))});var Cc=oo();Nc((e,t)=>{let n=so(t,Cc);return n?(n.setError(e),!0):!1});var mt=Symbol("store-raw"),Br=Symbol("store-node"),zr=Symbol("store-has"),Gr=Symbol("store-self"),Xr=Symbol("store-track");var Le=new WeakMap,hn=new WeakMap,ge=new WeakMap,gt=new WeakMap;function kc(e,t){if(!me(e)||!ro())return;let n=new Set,r=i=>{if(!(!me(i)||n.has(i))){n.add(i);for(let c of Object.values(i))r(c)}};r(gt.get(t)??t);let o=new Set,s=i=>{if(!me(i))return;let c=i;if(n.has(c)||o.has(c))return;o.add(c);let u=Le.get(c);if(u){for(let a of u.keys.values())Wr(a);u.all&&Wr(u.all),Le.delete(c),ge.delete(c),hn.delete(c)}for(let a of Object.values(c))s(a)};s(e)}var bt=(e,t,n)=>n?`${e}[${String(t)}]`:`${e}.${String(t)}`;function uo(e,t,n){let r=t?.owner,o=r&&n!==void 0?bt(r.name,n,t?.array):void 0,[s,i]=bc(r?.store,()=>g(e,o?{name:o}:void 0)),c=s;return c.$=i,c}function vt(e){let t=Le.get(e);return t?t.owner||(t.owner=ge.get(e)):Le.set(e,t={keys:new Map,owner:ge.get(e),array:Array.isArray(e)}),t}function Jr(e,t,n){let r=e.keys.get(t);return r||e.keys.set(t,r=uo(n,e,t)),r}function Pc(e,t,n,r){let o=ge.get(e);if(o&&o.store===t&&o.name===n)return;let s={store:t,name:n};ge.set(e,s),gt.set(e,gt.get(r)??r);let i=Le.get(e);if(i&&(i.owner=s,!!ro())){for(let[c,u]of i.keys)Ur(u,t,bt(n,c,i.array));i.all&&Ur(i.all,t,bt(n,"*",i.array))}}function Yr(e){let t=vt(e);(t.all||(t.all=uo(void 0,t,"*")))()}function Zr(e,t){e.$(typeof t=="function"?()=>t:t)}function me(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 ht(e){if(!me(e))return e;let t=hn.get(e);if(t)return t;let n=new Proxy(e,Mc);return hn.set(e,n),n}var Mc={get(e,t,n){if(t===mt||t===Br)return e;if(t===pe)return n;if(t===zr)return u=>u in e;if(t==="__proxy")return!0;if(t===Xr||t===Gr)return Yr(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=vt(e),i=Jr(s,t,r),c=i();return me(c)?(s.owner&&Pc(c,i,bt(s.owner.name,t,s.array),e),ht(c)):c},set(){return!0},deleteProperty(e,t){return t in e&&B(e,t,void 0),!0},has(e,t){return t===mt||t===pe||t===Br||t===zr||t===Gr||t===Xr?!0:(Jr(vt(e),t,e[t])(),t in e)},ownKeys(e){return Yr(e),Reflect.ownKeys(e)},getOwnPropertyDescriptor(e,t){return Reflect.getOwnPropertyDescriptor(e,t)}};function ao(e,t=new Set){if(e==null||typeof e!="object")return e;let n=e[mt]??e;if(t.has(n)||!me(n))return n;t.add(n);let r=!1,o=i=>{let c=ao(i,t);return c!==i&&(r=!0),c};if(Array.isArray(n)){let i=n.map(o);return r?i:n}let s={};for(let i of Object.keys(n))s[i]=o(n[i]);return r?s:n}function B(e,t,n){let r=ao(n),o=e[t];if(o===r&&(r!==void 0||t in e))return;let s=Array.isArray(e),i=s?e.length:0;r===void 0?delete e[t]:e[t]=r;let c=vt(e),u=c.keys.get(t);if(u&&Zr(u,r),kc(o,e),s&&e.length!==i){let a=c.keys.get("length");a&&Zr(a,e.length)}c.all&&c.all.$(void 0)}function Qr(e,t){return typeof e=="function"?e(t):e}function yn(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)?yn(o,r):B(e,n,r)}}function bn(e){let t=[],n=e.replace(/\[([^\]]*)\]/g,".$1");for(let r of n.split("."))r.length&&t.push(r);return t}function fo(e,t,n){let r=t.length-1;for(let s=0;s<r;s++){let i=t[s];if(i==="*"){let u=t.slice(s+1);if(Array.isArray(e))for(let a=0;a<e.length;a++)fo(e[a],u,n);return}let c=e[i];(c==null||typeof c!="object")&&(c=/^\d+$/.test(t[s+1])?[]:{},B(e,i,c)),e=c}let o=t[r];if(o==="*"){if(Array.isArray(e))for(let s=0;s<e.length;s++)B(e,s,Qr(n,e[s]));return}B(e,o,Qr(n,e[o]))}function dn(e,t,n){fo(e,bn(t),n)}function Dc(e){return Array.isArray(e)&&e.length>0&&e.every(t=>Array.isArray(t)&&t.length>=2&&typeof t[0]=="string")}function yt(e,t){for(let n=e.length-1;n>=t.length;n--)B(e,String(n),void 0);e.length!==t.length&&B(e,"length",t.length);for(let n=0;n<t.length;n++)B(e,String(n),t[n])}function jc(e,t){let n=t[0];if(typeof n=="function"&&t.length===1){let r=n(e);r&&r!==e&&yn(e,r);return}if(Array.isArray(n)&&t.length===1){if(Dc(n)){for(let r of n)dn(e,r[0],r[1]);return}if(Array.isArray(e)){yt(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){yn(e,n);return}if(Array.isArray(t[1])&&t.length>=3){dn(e,`${n}.${t[1].join(".")}`,t[2]);return}dn(e,String(n),t[1])}function mn(e){if(e==null||typeof e!="object")return e;if(Array.isArray(e))return e.map(mn);let t={};for(let n of Object.keys(e))t[n]=mn(e[n]);return t}function Y(e,t){let n=e;for(let r of bn(t)){if(n==null)return;n=n[r]}return n}var lo=class{constructor(e,t={immutable:!0}){this.options=t,this.root=e,this.set=((...n)=>S(()=>jc(this.root,n))),e&&typeof e=="object"&&(ge.set(e,{store:this,name:t.name??"store"}),gt.set(e,e)),vc({kind:"store",node:this,handle:()=>this.root,name:t.name})}get state(){return ht(this.root)}get proxy(){return ht(this.root)}get accessor(){return(()=>ht(this.root))}unwrap(){return this.root}getNode(e){return this.root&&this.root[e]}get(e){if(e==null||e==="")return wt(this.state);let t=this.state;for(let n of bn(e)){if(t==null)return;t=t[n]}return wt(t)}select(e){return m(()=>e(this.state))}subscribe(e){return T(()=>e(this.state))}watch(e,t){let n;return T(()=>{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=mn(t);return e(n),n}))}reconcile(e,t={}){this.set(e)}push(e,...t){let n=Y(this.root,e);this.set(e,n.concat(t))}pop(e){let t=Y(this.root,e).slice(),n=t.pop();return this.set(e,t),n}shift(e){let t=Y(this.root,e).slice(),n=t.shift();return this.set(e,t),n}splice(e,t,n,...r){let o=Y(this.root,e).slice(),s=o.splice(t,n,...r);return this.set(e,o),s}insert(e,t,n){let r=Y(this.root,e).slice();r.splice(t,0,n),this.set(e,r)}removeAt(e,t){let n=Y(this.root,e).slice(),r=n.splice(t,1);return this.set(e,n),r}replace(e,t){if(arguments.length>=2){let r=Y(this.root,String(e)),o=t;if(Array.isArray(r)&&Array.isArray(o)){yt(r,o);return}this.set(e,o);return}let n=this.root;if(Array.isArray(n)&&Array.isArray(e)){yt(n,e);return}this.set(e)}clear(e){let t=e===void 0?this.root:Y(this.root,e);if(Array.isArray(t)){yt(t,[]);return}if(t&&typeof t=="object")for(let n of Object.keys(t))B(t,n,void 0)}toObservable(){let[e]=g(this.state);return e.toObservable()}dispose(){}},Ic=["get","select","watch","subscribe","produce","reconcile","push","pop","shift","splice","insert","removeAt","replace","clear","unwrap","toObservable"];function $c(e,t){for(let n of Ic)e[n]=t[n].bind(t);e.$=t.reactive.bind(t)}function qc(e,t={immutable:!0}){let n=new lo(e,t);return $c(n.set,n),[n.proxy,n.set]}function Lc(e,t={}){return new lo(e,{...t,immutable:!1})}function wt(e){if(e==null||typeof e!="object")return e;let t=e[mt];return t!==void 0?t:e}function Vc(e){return E(()=>wt(e))}var oa=Object.freeze({createStore:qc,createMutableStore:Lc,batch:S,unwrap:wt,untrackStore:Vc});var Hc="__fx_dom_create_component__",ie=globalThis[Hc]??={fn:null};function Fc(e){ie.fn=e}function Uc(e={}){let t=e.signalSystem?.createComponent;t&&(ie.fn=t)}function vn(e,t){if(ie.fn)return ie.fn(e,t);t&&no(t);let n=typeof e=="function"?io(()=>e(t)):e,r=n!=null&&(typeof n=="function"||typeof n=="object");if(r)try{n.$name=e?.name}catch{}return r&&!co(n)?Qt(n):n}var Wc=()=>ie.fn!==null,Kc=()=>ie.fn!==null;function Bc(){ie.fn=null}var xt,ho={getStore:()=>xt,run(e,t){let n=xt;xt=e;try{return t()}finally{xt=n}}},wn=ho;function xn(e){wn=e??ho}function be(e={}){e.locals||(e.locals=e.request?Et(e.request):{});let t=0,n=0,r=null,o=new Map,s=new Map;return{event:e,routeData:new Map,matchedRoute:new Map,nextId:()=>`s${t++}`,nextResourceId:()=>{if(r===null)return`r${n++}`;let i=o.get(r)??0;return o.set(r,i+1),`${r}:r${i}`},nextIslandNamespace:i=>{let c=s.get(i)??0;return s.set(i,c+1),`${i}#${c}`},withResourceScope(i,c){let u=r;r=i;try{return c()}finally{r=u}},pending:new Set,data:new Map}}function ve(e,t){return wn.run(e,t)}function F(){return wn.getStore()}function St(){return F()?.event}function Sn(){let e=St();return e?(e.locals||(e.locals={}),e.locals):{}}var po=new WeakMap;function Et(e){let t=po.get(e);return t||(t={},po.set(e,t)),t}var we="__FX_DATA__";function Ve(e){return e.replace(/[<>&\u2028\u2029]/g,t=>"\\u"+t.charCodeAt(0).toString(16).padStart(4,"0"))}var En;function He(){let e=globalThis.__FX_DATA__;if(e)return e;if(En!==void 0)return En;let t=null;if(typeof document<"u"){let n=document.getElementById(we)?.textContent;if(n)try{t=JSON.parse(n)}catch{t=null}}return En=t}function Tt(){for(;;){for(;p.cursor&&p.cursor.nodeType===3&&p.cursor.data==="";)p.cursor=p.cursor.nextSibling;if(p.cursor!=null||!p.parents.length)return;p.cursor=p.parents.pop().nextSibling}}var zc=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),At=typeof process<"u"&&process.env&&!1;function Nt(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 Gc(e){Tt();let t=p.cursor;return t&&t.nodeType===1&&t.tagName.toLowerCase()===e.toLowerCase()?(zc.has(e.toLowerCase())?p.cursor=t.nextSibling:(p.parents.push(t),p.cursor=t.firstChild),t):(At&&t&&Nt(`<${e}>`,t),null)}function Xc(e){Tt();let t=p.cursor;return t&&t.nodeType===1&&t.tagName.toLowerCase()===e.toLowerCase()?(p.cursor=t.nextSibling,t):(At&&t&&Nt(`<${e}> (static)`,t),null)}function Jc(e){if(e===""){let n=p.cursor;return n&&n.nodeType===3&&n.data!==""?(p.cursor=n.nextSibling,n.data="",n):null}Tt();let t=p.cursor;return t&&t.nodeType===3?(p.cursor=t.nextSibling,t.nodeValue!==e&&(t.nodeValue=e),t):(At&&t&&Nt(`text ${JSON.stringify(e.slice(0,24))}`,t),null)}function Yc(e){Tt();let t=p.cursor;return t&&t.nodeType===8&&t.data===e?(p.cursor=t.nextSibling,t):(At&&t&&Nt(`marker <!--${e.slice(0,24)}-->`,t),null)}var yo=!1;function Zc(){yo||(yo=!0,Cr({hydrateElement:Gc,hydrateText:Jc,hydrateMarker:Yc,hydrateStatic:Xc}))}function Rt(e,t,n){Zc(),p.active=!0,p.cursor=t.firstChild,p.parents=[];let r=He(),o=n?.resourceNamespace,s=0;nt(()=>o?`${o}:r${s++}`:`r${s++}`),lr(r?i=>i in r?{value:r[i]}:void 0:null);try{return ln(e,t)}finally{p.active=!1,p.cursor=null,p.parents=[]}}var Tn="fluixi-island";function go(e){let{component:t,props:n={},name:r}=e,o=on(Tn),s=r??t.name??"Island";C(o,"name",s),C(o,"props",JSON.stringify(n??{}));let i=A()?F():void 0;if(i){let c=i.nextIslandNamespace(s);H(o,()=>i.withResourceScope(c,()=>t(n)))}else H(o,()=>t(n));return o}var mo=!1;function Qc(){if(mo||typeof document>"u")return;mo=!0;let e=document.createElement("style");e.textContent=`${Tn}{display:contents}`,document.head.appendChild(e)}function bo(e){if(typeof document>"u")return;Qc();let t=document.querySelectorAll(Tn),n=new Map;t.forEach(r=>{let o=r.getAttribute("name")??"",s=n.get(o)??0;n.set(o,s+1);let i=e[o];if(!i){typeof process>"u"&&console.warn(`[fluixi] island "${o}" has no component in the registry, left static.`);return}let c={};try{c=JSON.parse(r.getAttribute("props")||"{}")}catch{}Rt(()=>i(c),r,{resourceNamespace:`${o}#${s}`})})}function vo(e,...t){throw new Error("html`` was not compiled, enable the lit format: fluixi({ format: 'lit' }).")}function wo(e,...t){throw new Error("svg`` was not compiled, enable the lit format: fluixi({ format: 'lit' }).")}function eu(e,t={}){if(typeof e=="function")return vn(e,t);if(typeof e!="string"||e.length===0)return null;let n=fn(e);if(A())return he().createElement(e,n);let r=n?document.createElementNS(fe,e):document.createElement(e);return an(r,t,n),tu(r,t),r}function tu(e,t){if(!t||t.children===void 0)return;let n=rt(()=>t.children),r=o=>{H(e,o,typeof o=="function"?null:void 0)};Array.isArray(n)?n.forEach(r):r(n)}function xo(e){return typeof e=="function"?e:(()=>e)}function Z(e){return()=>{let t=e();return typeof t=="function"?t():t}}function So(e){return e!=null&&e!==!1}function Eo(e){return!e||typeof e!="object"?!1:!!(typeof e._$litType$<"u"||typeof e._$litDirective$<"u"||Array.isArray(e.strings)&&Array.isArray(e.values))}function To(e){let t=Z(()=>e.when),n=m(t,void 0,{name:"Show.when"}),r=m(n,void 0,{name:"Show.cond"}),o=U(),s=null,i=null,c=u=>{u!==i&&(s&&de(s),s=le(o),i=u)};return m(()=>{let u=r();return c(u?"when":"fallback"),P(s,()=>{if(u){let a=e.children;return typeof a=="function"&&!Eo(a)?typeof n=="function"?E(()=>E(n)?a(n()):e.fallback):a(n):a}return e.fallback});return e.fallback??null},void 0,{name:"Show.result"})}function Ao(e){let t=Z(()=>e.each),n=()=>e.fallback??null,r=(o,s)=>{let i=e.children,c=Array.isArray(i)?i.map(u=>typeof u=="function"?u(o,s):u):typeof i=="function"?i(o,s):i;return ye(c),c};return e.by?et(t,e.by,(o,s)=>r(o,s),{fallback:n}):Qe(t,(o,s)=>r(o,s),{fallback:n})}function No(e){let t=Z(()=>e.each);return tt(t,(n,r)=>{let o=e.children(n,r);return ye(o),o},{fallback:()=>e.fallback??null})}var An=Symbol("match");function Ro(e){return{[An]:!0,when:Z(()=>e.when),get children(){return e.children}}}function _o(e){let t=Array.isArray(e.children)?e.children:[e.children],n=U(),r=null,o=-1,s=i=>{i!==o&&(r&&de(r),r=le(n),o=i)};return m(()=>{for(let i=0;i<t.length;i+=1){let u=t[i],a=0;for(;typeof u=="function"&&!u[An]&&a++<10;)u=u();if(!u||typeof u!="object"||u[An]!==!0)continue;let f=u.when();if(So(f))return s(i),P(r,()=>typeof u.children=="function"?u.children(f):u.children)}return s(-2),P(r,()=>e.fallback??null)},void 0,{name:"Switch"})}function Oo(e){let t=xo(e.component),{component:n,...r}=e,o=U(),s=null,i;return m(()=>{let c=t();return c!==i&&(s&&de(s),s=le(o),i=c),c==null?null:typeof c=="string"?{tag:c,props:r}:P(s,()=>c(r))},void 0,{name:"Dynamic"})}function Co(e){let t=()=>e.mount?typeof e.mount=="function"?e.mount():e.mount:document.body,n,r;return M(o=>{n=o,r=document.createElement("div"),r.style.display="contents",t().appendChild(r),H(r,e.children)&&qe(e.ref,r)}),x(()=>{n(),r.remove()}),null}function Nn(e){if(A())return e.fallback??null;let t=p.active,[n,r]=g(!t);return t&&queueMicrotask(()=>r(!0)),m(()=>n()?e.children:e.fallback??null,void 0,{name:"client-only"})}var ko=Nn;function Po(e){let[t,n]=g(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 Mo(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 nu(e){return e.startsWith("--")?e:e.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`)}function Do(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(`${nu(r)}: ${s}`)}return n.join("; ")},void 0,{name:"StyleMap"})}var Ot=1,On=3,Cn=8,jo;jo=Ce;var xe=class{constructor(){this[jo]=!0;this.parentNode=null;this.childNodes=[]}get firstChild(){return this.childNodes[0]??null}get lastChild(){return this.childNodes[this.childNodes.length-1]??null}get nextSibling(){let t=this.parentNode;if(!t)return null;let n=t.childNodes.indexOf(this);return n>=0?t.childNodes[n+1]??null:null}get previousSibling(){let t=this.parentNode;if(!t)return null;let n=t.childNodes.indexOf(this);return n>0?t.childNodes[n-1]??null:null}get parentElement(){return this.parentNode}appendChild(t){return t.parentNode&&t.parentNode.removeChild(t),t.parentNode=this,this.childNodes.push(t),t}insertBefore(t,n){if(n==null)return this.appendChild(t);t.parentNode&&t.parentNode.removeChild(t);let r=this.childNodes.indexOf(n);return t.parentNode=this,r<0?this.childNodes.push(t):this.childNodes.splice(r,0,t),t}removeChild(t){let n=this.childNodes.indexOf(t);return n>=0&&this.childNodes.splice(n,1),t.parentNode=null,t}replaceChild(t,n){let r=this.childNodes.indexOf(n);return r>=0&&(t.parentNode&&t.parentNode.removeChild(t),t.parentNode=this,this.childNodes[r]=t,n.parentNode=null),n}addEventListener(){}removeEventListener(){}},ce=class e extends xe{constructor(n){super();this.nodeType=On;this.data=n}get nodeValue(){return this.data}set nodeValue(n){this.data=n==null?"":String(n)}get textContent(){return this.data}set textContent(n){this.data=n==null?"":String(n)}cloneNode(){return new e(this.data)}},_t=class e extends xe{constructor(n){super();this.nodeType=Ot;this.rawOuterHTML=n}get textContent(){return this.rawOuterHTML.replace(/<[^>]*>/g,"")}cloneNode(){return new e(this.rawOuterHTML)}},Se=class e extends xe{constructor(n){super();this.nodeType=Cn;this.data=n}get nodeValue(){return this.data}set nodeValue(n){this.data=n==null?"":String(n)}cloneNode(){return new e(this.data)}},Rn=class{constructor(){this.cssText=""}setProperty(t,n){this[t]=n}removeProperty(t){delete this[t]}},_n=class{constructor(t){this.el=t}list(){let t=this.el.getAttribute("class");return t?t.split(/\s+/).filter(Boolean):[]}write(t){t.length?this.el.setAttribute("class",t.join(" ")):this.el.removeAttribute("class")}add(...t){let n=this.list();for(let r of t)n.includes(r)||n.push(r);this.write(n)}remove(...t){this.write(this.list().filter(n=>!t.includes(n)))}contains(t){return this.list().includes(t)}toggle(t,n){let r=this.contains(t),o=n===void 0?!r:n;return o?this.add(t):this.remove(t),o}},ue=class e extends xe{constructor(n,r=!1){super();this.nodeType=Ot;this.attributes=new Map;this.style=new Rn;this.classList=new _n(this);this.rawHTML=null;this.localName=n.toLowerCase(),this.tagName=r?n:n.toUpperCase(),this.isSVG=r,this.namespaceURI=r?"http://www.w3.org/2000/svg":null}setAttribute(n,r){this.attributes.set(n,String(r))}removeAttribute(n){this.attributes.delete(n)}getAttribute(n){return this.attributes.has(n)?this.attributes.get(n):null}hasAttribute(n){return this.attributes.has(n)}get id(){return this.getAttribute("id")??""}set id(n){n==null?this.removeAttribute("id"):this.setAttribute("id",n)}get className(){return this.getAttribute("class")??""}set className(n){n==null?this.removeAttribute("class"):this.setAttribute("class",n)}get htmlFor(){return this.getAttribute("for")??""}set htmlFor(n){n==null?this.removeAttribute("for"):this.setAttribute("for",n)}set value(n){n==null?this.removeAttribute("value"):this.setAttribute("value",String(n))}set checked(n){n?this.setAttribute("checked",""):this.removeAttribute("checked")}set selected(n){n?this.setAttribute("selected",""):this.removeAttribute("selected")}set indeterminate(n){}get textContent(){return this.childNodes.map(n=>n.textContent??"").join("")}set textContent(n){for(let r of this.childNodes)r.parentNode=null;this.childNodes=[],this.rawHTML=null,n!=null&&n!==""&&this.appendChild(new ce(String(n)))}set innerText(n){this.textContent=n}set innerHTML(n){for(let r of this.childNodes)r.parentNode=null;this.childNodes=[],this.rawHTML=n==null?"":String(n)}cloneNode(n=!1){let r=new e(this.localName,this.isSVG);if(r.attributes=new Map(this.attributes),r.style.cssText=this.style.cssText,r.rawHTML=this.rawHTML,n)for(let o of this.childNodes)r.appendChild(o.cloneNode(!0));return r}};var ru=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),$o=/&/g,qo=/</g,Lo=/>/g,ou=/"/g;function kn(e){return e.replace($o,"&").replace(qo,"<").replace(Lo,">")}function Io(e){return e.replace($o,"&").replace(ou,""").replace(qo,"<").replace(Lo,">")}function su(e){return e.startsWith("--")?e:e.replace(/[A-Z]/g,t=>"-"+t.toLowerCase())}function iu(e){if(!e)return"";let t=[];e.cssText&&t.push(e.cssText.trim().replace(/;\s*$/,""));for(let n of Object.keys(e)){if(n==="cssText")continue;let r=e[n];r==null||r===""||t.push(`${su(n)}: ${r}`)}return t.join("; ")}function cu(e){let t="",n=iu(e.style);for(let[r,o]of e.attributes)r==="style"&&n||(t+=` ${r}="${Io(o)}"`);if(n){let r=e.attributes.get("style"),o=r?`${r.replace(/;\s*$/,"")}; ${n}`:n;t+=` style="${Io(o)}"`}return t}function q(e){if(e==null||e===!1||e===!0)return"";if(typeof e=="string")return kn(e);if(typeof e=="number")return kn(String(e));if(typeof e=="function")return q(e());if(Array.isArray(e))return e.map(q).join("");if(typeof e.rawOuterHTML=="string")return e.rawOuterHTML;switch(e.nodeType){case On:return kn(e.data??"");case Cn:return`<!--${e.data??""}-->`;case Ot:{let t=e.localName,n=`<${t}${cu(e)}>`;if(ru.has(t))return n;let r=e.rawHTML!=null?e.rawHTML:(e.childNodes??[]).map(q).join("");return`${n}${r}</${t}>`}}return Array.isArray(e.childNodes)?e.childNodes.map(q).join(""):""}var uu=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),au={amp:"&",lt:"<",gt:">",quot:'"',"#39":"'"};function Vo(e){return e.replace(/&(#?\w+);/g,(t,n)=>au[n]??t)}var L=class extends Error{};function Ho(e,t=!1){let n=0,r=[],o=[],s=a=>{let f=o[o.length-1];f?f.appendChild(a):r.push(a)};for(;n<e.length;){let a=e.indexOf("<",n);if(a===-1){c(e.slice(n));break}if(a>n&&c(e.slice(n,a)),e.startsWith("<!--",a)){let f=e.indexOf("-->",a);if(f===-1)throw new L(`unterminated comment at ${a}`);s(new Se(e.slice(a+4,f))),n=f+3;continue}if(e[a+1]==="/"){let f=e.indexOf(">",a);if(f===-1)throw new L(`unterminated closing tag at ${a}`);let d=e.slice(a+2,f).trim().toLowerCase(),h=o.pop();if(!h||h.localName!==d)throw new L(`</${d}> does not close <${h?.localName??"nothing"}>`);n=f+1;continue}n=u(a)}if(o.length>0)throw new L(`unclosed <${o[o.length-1].localName}>`);let i=r[0];if(r.length!==1||!(i instanceof ue))throw new L(`expected exactly one root element, got ${r.length}`);return i;function c(a){a!==""&&s(new ce(Vo(a)))}function u(a){let f=/[\s/>]/.exec(e.slice(a+1));if(!f)throw new L(`unterminated tag at ${a}`);let d=e.slice(a+1,a+1+f.index).toLowerCase(),h=new ue(d,t),y=a+1+f.index;for(;y<e.length;){for(;y<e.length&&/\s/.test(e[y]);)y++;if(e[y]===">"){y++;break}if(e[y]==="/"&&e[y+1]===">"){y+=2;break}let R=y;for(;y<e.length&&!/[\s=/>]/.test(e[y]);)y++;let w=e.slice(R,y);if(w==="")throw new L(`malformed attribute at ${y}`);if(e[y]==="="){if(e[y+1]!=='"')throw new L(`attribute ${w} must have a double-quoted value`);let V=e.indexOf('"',y+2);if(V===-1)throw new L(`unterminated value for ${w}`);h.setAttribute(w,Vo(e.slice(y+2,V))),y=V+1}else h.setAttribute(w,"")}return s(h),uu.has(d)||o.push(h),y}}var Fo=!1;function Wo(){Fo||(Fo=!0,_r({createElement:(e,t)=>new ue(e,t),createText:e=>new ce(e),createRaw:e=>new _t(e),parseTemplate:(e,t)=>Ho(e,t),createComment:e=>new Se(e)}))}function Mn(e,t={}){let n=A();Wo(),re(!0);let r=be(t.event);try{return ve(r,()=>M(o=>{try{let s=typeof e=="function"?e():e;return q(s)}finally{o()}}))}finally{re(n)}}var Uo=!1;function fu(){Uo||(Uo=!0,fr(e=>{F()?.pending.add(e)}),nt(()=>F()?.nextResourceId()??""),dr((e,t)=>{e&&F()?.data.set(e,t)}))}var Pn=null;function Dn(e){Pn=e}function Ct(e){if(e.data.size===0)return"";let t={};for(let[r,o]of e.data){let s=o;if(Pn)try{s=Pn(o,r)}catch{continue}s!==void 0&&(typeof s=="function"||typeof s=="symbol"||(t[r]=s))}if(Object.keys(t).length===0)return"";let n=Ve(JSON.stringify(t));return n==="{}"?"":`<script type="application/json" id="${we}">${n}<\/script>`}var lu=50;async function jn(e,t={}){let n=A();Wo(),re(!0),fu();let r=be(t.event);try{return await ve(r,async()=>{t.preload&&await t.preload(t.event);let o,s=null,i=()=>{};M(f=>{i=f,s=U(),o=typeof e=="function"?e():e});let c=()=>{try{P(s,()=>q(o))}catch{}};c();let u=0;for(;r.pending.size>0&&u++<lu;){let f=Array.from(r.pending);r.pending.clear(),await Promise.allSettled(f),await ar(),c()}let a=P(s,()=>q(o))+Ct(r);return i(),a})}finally{re(n)}}var Hn="1.0.0-alpha.84",rs=Hn.split(".")[0],Ko=`__fluixi_signal_state_v${rs}__`,du=`__fluixi_signal_builds_v${rs}__`,pu=e=>{typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e)};function os(){return{consumer:null,untracked:!1,owner:null,queue:[],scheduled:!1,flushing:!1,batchDepth:0,hostSchedule:pu,onSuspend:null,onError:null,observer:null}}var $n=globalThis;function hu(e){let t=os(),n=e;for(let r of Object.keys(t))r in e||(n[r]=t[r]);return e}function yu(){let e=$n[Ko];return e?hu(e):$n[Ko]=os()}var ee=yu();($n[du]??=[]).push(Hn);function mu(e){return ee.observer=e,()=>{ee.observer===e&&(ee.observer=null)}}var gu=[],kt;function bu(e,t){if(!ee.observer)return t();let n=kt;kt=e;try{return t()}finally{kt=n}}function vu(e){let t=ee.observer;t&&t.created(e.parents===void 0?{...e,parents:gu,origin:e.origin??kt}:e)}function Bo(e,t,n){ee.observer?.moved?.(e,t,n)}function zo(e){ee.observer?.disposed?.(e)}var wu="__FLUIXI_DEVTOOLS_HOOK__",Go=globalThis[wu];if(typeof Go?.inject=="function")try{Go.inject({observeReactiveNodes:mu,version:Hn})}catch{}function ss(){return ee.observer!=null}var Dt=Symbol("store-raw"),Xo=Symbol("store-node"),Jo=Symbol("store-has"),Yo=Symbol("store-self"),Zo=Symbol("store-track");var Fe=new WeakMap,qn=new WeakMap,Te=new WeakMap,jt=new WeakMap;function xu(e,t){if(!Ee(e)||!ss())return;let n=new Set,r=i=>{if(!(!Ee(i)||n.has(i))){n.add(i);for(let c of Object.values(i))r(c)}};r(jt.get(t)??t);let o=new Set,s=i=>{if(!Ee(i))return;let c=i;if(n.has(c)||o.has(c))return;o.add(c);let u=Fe.get(c);if(u){for(let a of u.keys.values())zo(a);u.all&&zo(u.all),Fe.delete(c),Te.delete(c),qn.delete(c)}for(let a of Object.values(c))s(a)};s(e)}var It=(e,t,n)=>n?`${e}[${String(t)}]`:`${e}.${String(t)}`;function is(e,t,n){let r=t?.owner,o=r&&n!==void 0?It(r.name,n,t?.array):void 0,[s,i]=bu(r?.store,()=>g(e,o?{name:o}:void 0)),c=s;return c.$=i,c}function $t(e){let t=Fe.get(e);return t?t.owner||(t.owner=Te.get(e)):Fe.set(e,t={keys:new Map,owner:Te.get(e),array:Array.isArray(e)}),t}function Qo(e,t,n){let r=e.keys.get(t);return r||e.keys.set(t,r=is(n,e,t)),r}function Su(e,t,n,r){let o=Te.get(e);if(o&&o.store===t&&o.name===n)return;let s={store:t,name:n};Te.set(e,s),jt.set(e,jt.get(r)??r);let i=Fe.get(e);if(i&&(i.owner=s,!!ss())){for(let[c,u]of i.keys)Bo(u,t,It(n,c,i.array));i.all&&Bo(i.all,t,It(n,"*",i.array))}}function es(e){let t=$t(e);(t.all||(t.all=is(void 0,t,"*")))()}function ts(e,t){e.$(typeof t=="function"?()=>t:t)}function Ee(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 Pt(e){if(!Ee(e))return e;let t=qn.get(e);if(t)return t;let n=new Proxy(e,Eu);return qn.set(e,n),n}var Eu={get(e,t,n){if(t===Dt||t===Xo)return e;if(t===pe)return n;if(t===Jo)return u=>u in e;if(t==="__proxy")return!0;if(t===Zo||t===Yo)return es(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=$t(e),i=Qo(s,t,r),c=i();return Ee(c)?(s.owner&&Su(c,i,It(s.owner.name,t,s.array),e),Pt(c)):c},set(){return!0},deleteProperty(e,t){return t in e&&z(e,t,void 0),!0},has(e,t){return t===Dt||t===pe||t===Xo||t===Jo||t===Yo||t===Zo?!0:(Qo($t(e),t,e[t])(),t in e)},ownKeys(e){return es(e),Reflect.ownKeys(e)},getOwnPropertyDescriptor(e,t){return Reflect.getOwnPropertyDescriptor(e,t)}};function cs(e,t=new Set){if(e==null||typeof e!="object")return e;let n=e[Dt]??e;if(t.has(n)||!Ee(n))return n;t.add(n);let r=!1,o=i=>{let c=cs(i,t);return c!==i&&(r=!0),c};if(Array.isArray(n)){let i=n.map(o);return r?i:n}let s={};for(let i of Object.keys(n))s[i]=o(n[i]);return r?s:n}function z(e,t,n){let r=cs(n),o=e[t];if(o===r&&(r!==void 0||t in e))return;let s=Array.isArray(e),i=s?e.length:0;r===void 0?delete e[t]:e[t]=r;let c=$t(e),u=c.keys.get(t);if(u&&ts(u,r),xu(o,e),s&&e.length!==i){let a=c.keys.get("length");a&&ts(a,e.length)}c.all&&c.all.$(void 0)}function ns(e,t){return typeof e=="function"?e(t):e}function Ln(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)?Ln(o,r):z(e,n,r)}}function Fn(e){let t=[],n=e.replace(/\[([^\]]*)\]/g,".$1");for(let r of n.split("."))r.length&&t.push(r);return t}function us(e,t,n){let r=t.length-1;for(let s=0;s<r;s++){let i=t[s];if(i==="*"){let u=t.slice(s+1);if(Array.isArray(e))for(let a=0;a<e.length;a++)us(e[a],u,n);return}let c=e[i];(c==null||typeof c!="object")&&(c=/^\d+$/.test(t[s+1])?[]:{},z(e,i,c)),e=c}let o=t[r];if(o==="*"){if(Array.isArray(e))for(let s=0;s<e.length;s++)z(e,s,ns(n,e[s]));return}z(e,o,ns(n,e[o]))}function In(e,t,n){us(e,Fn(t),n)}function Tu(e){return Array.isArray(e)&&e.length>0&&e.every(t=>Array.isArray(t)&&t.length>=2&&typeof t[0]=="string")}function Mt(e,t){for(let n=e.length-1;n>=t.length;n--)z(e,String(n),void 0);e.length!==t.length&&z(e,"length",t.length);for(let n=0;n<t.length;n++)z(e,String(n),t[n])}function Au(e,t){let n=t[0];if(typeof n=="function"&&t.length===1){let r=n(e);r&&r!==e&&Ln(e,r);return}if(Array.isArray(n)&&t.length===1){if(Tu(n)){for(let r of n)In(e,r[0],r[1]);return}if(Array.isArray(e)){Mt(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){Ln(e,n);return}if(Array.isArray(t[1])&&t.length>=3){In(e,`${n}.${t[1].join(".")}`,t[2]);return}In(e,String(n),t[1])}function Vn(e){if(e==null||typeof e!="object")return e;if(Array.isArray(e))return e.map(Vn);let t={};for(let n of Object.keys(e))t[n]=Vn(e[n]);return t}function Q(e,t){let n=e;for(let r of Fn(t)){if(n==null)return;n=n[r]}return n}var as=class{constructor(e,t={immutable:!0}){this.options=t,this.root=e,this.set=((...n)=>S(()=>Au(this.root,n))),e&&typeof e=="object"&&(Te.set(e,{store:this,name:t.name??"store"}),jt.set(e,e)),vu({kind:"store",node:this,handle:()=>this.root,name:t.name})}get state(){return Pt(this.root)}get proxy(){return Pt(this.root)}get accessor(){return(()=>Pt(this.root))}unwrap(){return this.root}getNode(e){return this.root&&this.root[e]}get(e){if(e==null||e==="")return qt(this.state);let t=this.state;for(let n of Fn(e)){if(t==null)return;t=t[n]}return qt(t)}select(e){return m(()=>e(this.state))}subscribe(e){return T(()=>e(this.state))}watch(e,t){let n;return T(()=>{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=Vn(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)){Mt(r,o);return}this.set(e,o);return}let n=this.root;if(Array.isArray(n)&&Array.isArray(e)){Mt(n,e);return}this.set(e)}clear(e){let t=e===void 0?this.root:Q(this.root,e);if(Array.isArray(t)){Mt(t,[]);return}if(t&&typeof t=="object")for(let n of Object.keys(t))z(t,n,void 0)}toObservable(){let[e]=g(this.state);return e.toObservable()}dispose(){}},Nu=["get","select","watch","subscribe","produce","reconcile","push","pop","shift","splice","insert","removeAt","replace","clear","unwrap","toObservable"];function Ru(e,t){for(let n of Nu)e[n]=t[n].bind(t);e.$=t.reactive.bind(t)}function Lt(e,t={immutable:!0}){let n=new as(e,t);return Ru(n.set,n),[n.proxy,n.set]}function _u(e,t={}){return new as(e,{...t,immutable:!1})}function qt(e){if(e==null||typeof e!="object")return e;let t=e[Dt];return t!==void 0?t:e}function Ou(e){return E(()=>qt(e))}var gl=Object.freeze({createStore:Lt,createMutableStore:_u,batch:S,unwrap:qt,untrackStore:Ou});function fs(e,t){let[n,r]=Lt(e,t);return new Proxy(n,{get:(o,s)=>s==="set"?r:o[s],has:(o,s)=>s==="set"||Reflect.has(o,s)})}return gs(Cu);})();
|
package/dist/cdn/dom.js
CHANGED
|
@@ -6,18 +6,18 @@
|
|
|
6
6
|
* FluixiDOM.render(() => App(), document.getElementById('root'));
|
|
7
7
|
*
|
|
8
8
|
* Self-contained: the dom runtime (render/insert/spread/createComponent/control
|
|
9
|
-
* flow) AND the reactive API (createSignal/createMemo/createEffect
|
|
10
|
-
* in, so a single <script> gives you everything to build a reactive UI
|
|
9
|
+
* flow) AND the reactive API (createSignal/createMemo/createEffect/...) are bundled
|
|
10
|
+
* in, so a single <script> gives you everything to build a reactive UI:
|
|
11
11
|
* everything hangs off window.FluixiDOM.
|
|
12
12
|
*/
|
|
13
13
|
export * from '../lib/index.js';
|
|
14
14
|
// The short API first, because that is what the documentation teaches. A script tag
|
|
15
|
-
// has no imports, so whatever is not on the global does not exist for a CDN user
|
|
15
|
+
// has no imports, so whatever is not on the global does not exist for a CDN user,
|
|
16
16
|
// and until now `signal` was not, while every doc page opened with it.
|
|
17
17
|
export { signal, memo, effect } from '@fluixi/reactive/signal';
|
|
18
18
|
export { store } from '@fluixi/reactive/store';
|
|
19
19
|
// The tuple form stays. `signal` is the accessor `createSignal` returns with `.set`
|
|
20
20
|
// attached, so the two share their implementation and carrying both costs 65 bytes
|
|
21
|
-
// gzipped
|
|
21
|
+
// gzipped: measured, not assumed.
|
|
22
22
|
export { createSignal, createMemo, createEffect, createComputed, createRenderEffect, createRoot, createResource, createContext, useContext, onCleanup, batch, untrack, } from '@fluixi/reactive/signal';
|
|
23
23
|
export { createStore } from '@fluixi/reactive/store';
|