@fluixi/dom 1.0.0-alpha.78 → 1.0.0-alpha.79

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/index.mjs CHANGED
@@ -1 +1 @@
1
- function Ir(e){return e.startsWith("aria-")||e.startsWith("data-")?e:/[A-Z]/.test(e)?e.replace(/([A-Z])/g,"-$1").toLowerCase():e}function qr(e){return e.startsWith("@")||e.startsWith("on")&&e.length>2}function jr(e){return e.startsWith("@")?e.slice(1):e.startsWith("on")?e.slice(2).toLowerCase():e}function Fr(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 Hr=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),Vr=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"]),U="http://www.w3.org/2000/svg";function Qt(e){return e.localName.includes("-")}function Se(e,t,n,r=!1){if(n==null){e.removeAttribute(t);return}if(Qt(e)){e[t]=n;return}h(e,t,n,r)}var ve=new Set(["className","value","checked","selected","innerHTML","innerText","textContent","indeterminate","htmlFor"]);function Ze(e,t=document){return t.querySelector(e)}function Wr(e,t=document){return Array.from(t.querySelectorAll(e))}function Ur(e,t){return e.closest(t)}function Qe(e,...t){e.classList.add(...t)}function et(e,...t){e.classList.remove(...t)}function tt(e,...t){t.forEach(n=>e.classList.toggle(n))}function Br(e,t){return e.classList.contains(t)}function h(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 nt(e,t){return e.getAttribute(t)}function rt(e,t){e.removeAttribute(t)}function Ae(e,t){Object.assign(e.style,t)}function Kr(e,t){return window.getComputedStyle(e).getPropertyValue(t)}function ot(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")Ae(r,i);else if(o.startsWith("on")&&typeof i=="function"){let s=o.slice(2).toLowerCase();r.addEventListener(s,i)}else h(r,o,i)}),n.forEach(o=>{typeof o=="string"?r.appendChild(document.createTextNode(o)):r.appendChild(o)}),r}function it(e){for(;e.firstChild;)e.removeChild(e.firstChild)}function st(e,...t){t.forEach(n=>{typeof n=="string"?e.appendChild(document.createTextNode(n)):e.appendChild(n)})}function zr(e){let t=e.getBoundingClientRect();return t.top>=0&&t.left>=0&&t.bottom<=window.innerHeight&&t.right<=window.innerWidth}function Gr(e,t={behavior:"smooth",block:"nearest"}){e.scrollIntoView(t)}function Xr(e){let t=e.getBoundingClientRect();return{top:t.top+window.pageYOffset,left:t.left+window.pageXOffset}}function Jr(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 Yr(e,t=5e3){return new Promise((n,r)=>{let o=Ze(e);if(o){n(o);return}let i=new MutationObserver(()=>{let a=Ze(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 Zr(e,t,n={}){let r=new IntersectionObserver(o=>{o.forEach(i=>{t(i.isIntersecting)})},n);return r.observe(e),()=>{r.disconnect()}}function Qr(e,t){let n=new ResizeObserver(r=>{r.forEach(t)});return n.observe(e),()=>{n.disconnect()}}var en=typeof Symbol=="function"&&Symbol.for?Symbol.for("react.element"):60103;function eo(e){return typeof e=="object"&&e!==null&&e.$$typeof===en}function tn(e){return e&&typeof e=="object"&&e.strings&&Array.isArray(e.strings)&&e.values&&Array.isArray(e.values)}function to(e){if(typeof e!="function")return!1;try{let t=e();return tn(t)}catch{return!1}}function no(e){return typeof e=="object"&&e!==null&&(e.$$typeof==="template"||typeof e.type=="function")}function ro(e){return e instanceof Node}function oo(e,t,n="Fluixi"){typeof globalThis<"u"&&(typeof globalThis[n]>"u"&&(globalThis[n]={}),typeof globalThis[n][e]>"u"&&(globalThis[n][e]=t))}function io(e,t,n="Fluixi"){return typeof globalThis<"u"&&typeof globalThis[n]<"u"&&typeof globalThis[n][e]<"u"?globalThis[n][e]:t}import{isSignal as b}from"@fluixi/reactive/signal";var Ce="1.0.0-alpha.78";import{VERSION as nn}from"@fluixi/reactive/version";var x={dom:Ce,reactive:nn};function rn(e){x.core=e}function Re(e){x.core&&e.setAttribute("fluixi",x.core),e.setAttribute("fx-dom",x.dom),e.setAttribute("fx-reactive",x.reactive),typeof globalThis<"u"&&(globalThis.Fluixi=x)}function Me(){let e=[x.core,x.dom,x.reactive].filter(t=>t!==void 0);new Set(e).size<=1||console.warn(`[fluixi] package versions disagree — core ${x.core??"(absent)"}, dom ${x.dom}, reactive ${x.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 fo(e){return Object.defineProperty(e,Symbol.for("fluixi-router"),{value:!0,enumerable:!0}),e}function po(e){return Object.defineProperty(e,Symbol.for("fluixi-routes"),{value:!0,enumerable:!0}),e}function yo(e){return Object.defineProperty(e,Symbol.for("fluixi-route"),{value:!0,enumerable:!0}),e}function mo(e){return typeof e!="function"||Object.defineProperty(e,Symbol.for("fluixi-outlet"),{value:!0,enumerable:!0}),e}function go(e){return Object.defineProperty(e,Symbol.for("fluixi-provider"),{value:!0,enumerable:!0}),e}function ho(e){return Object.defineProperty(e,Symbol.for("fluixi-context"),{value:!0,enumerable:!0}),e}function xo(e){return typeof e!="function"||Object.defineProperty(e,Symbol.for("fluixi-component"),{value:!0,enumerable:!0}),e}function To(e){return Object.defineProperty(e,Symbol.for("fluixi-suspense"),{value:!0,enumerable:!0}),e}function on(e){return typeof e=="function"&&e[Symbol.for("fluixi-router")]===!0}function sn(e){return typeof e=="function"&&e[Symbol.for("fluixi-routes")]===!0}function an(e){return typeof e=="function"&&e[Symbol.for("fluixi-route")]===!0}function ln(e){return typeof e=="function"&&e[Symbol.for("fluixi-outlet")]===!0}function cn(e){return typeof e=="function"&&e[Symbol.for("fluixi-provider")]===!0}function un(e){return typeof e=="function"&&e[Symbol.for("fluixi-context")]===!0}function N(e){return typeof e=="function"&&e[Symbol.for("fluixi-component")]===!0}function fn(e){return typeof e=="function"&&e[Symbol.for("fluixi-suspense")]===!0}function bo(e){return on(e)?{type:"router",value:e}:an(e)?{type:"route",value:e}:sn(e)?{type:"routes",value:e}:ln(e)?{type:"outlet",value:e}:N(e)?{type:"component",value:e}:fn(e)?{type:"suspense",value:e}:cn(e)?{type:"provider",value:e}:un(e)?{type:"context",value:e}:{type:"none",value:e}}import{batch as ft,createEffect as z,createRenderEffect as m,createRoot as yn,onCleanup as O,readChildren as mn}from"@fluixi/reactive/signal";var g=typeof document>"u";function _(e){g=e}var B=Symbol.for("fluixi.server-node"),Pe=null;function at(e){Pe=e}function $(){if(!Pe)throw new Error("[fluixi] server render ran before @fluixi/dom/server loaded");return Pe}function I(e){return e!=null&&e[B]===!0?!0:typeof Node<"u"&&e instanceof Node}function Oe(e){return e!=null&&e[B]===!0?e.nodeType===1:typeof Element<"u"&&e instanceof Element}function Le(e){return e!=null&&e[B]===!0?e.nodeType===3:typeof Text<"u"&&e instanceof Text}var u={active:!1,cursor:null,parents:[]},lt=null;function ct(e){lt=e}function ee(){return lt}function ke(e,t){return u.active&&t.parentNode===e}function De(e){let t=u.parents.lastIndexOf(e);t!==-1&&(u.parents.length=t),u.cursor=e.nextSibling}function dn(){return u.active?u.cursor:null}function te(e,t){if(!e||e.parentNode==null)return t();let n=u.active,r=u.cursor,o=u.parents;u.active=!0,u.cursor=e,u.parents=[];try{return t()}finally{u.active=n,u.cursor=r,u.parents=o}}function pn(e){if(!u.active)return e();let t=u.cursor,n=u.parents;u.active=!1,u.parents=[];try{return e()}finally{u.active=!0,u.cursor=t,u.parents=n}}function K(e){if(!u.active||e==null)return;let t=Array.isArray(e)?e[e.length-1]:e;t&&typeof t.nodeType=="number"&&De(t)}function gn(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 hn(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 Lo(e){return hn(gn(e))}var ko=()=>"xxyxxxxxxy-4xx8".replace(/[xy]/g,function(e){let t=Math.random()*16|0;return(e==="x"?t:t&3|8).toString(16)}),xn={};var ut=new Map,re=new Set,le=new Set(["scroll","focus","blur","load","error","resize","mouseenter","mouseleave","pointerenter","pointerleave","gotpointercapture","lostpointercapture"]);function ce(e){if(!g)for(let t of e)re.has(t)||le.has(t)||(re.add(t),document.addEventListener(t,Tn))}function Tn(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 _e(e,t,n){if(e[`$$${t}`]=n,le.has(t)){let r=`__fx_${t}`;if(!e[r]){let o=i=>{e[`$$${t}`]?.(i)};e.addEventListener(t,o),e[r]=o}return}re.has(t)||ce([t])}function oe(e,t){delete e[`$$${t}`];let n=`__fx_${t}`,r=e[n];r&&(e.removeEventListener(t,r),delete e[n])}function Do(e){return!le.has(e)}function _o(e){return typeof e=="function"}function R(e,t=!1){if(g)return $().createText(e);if(u.active&&!t){let n=ee()?.hydrateText(e);if(n)return n}return document.createTextNode(e)}function ue(e,t=!1){if(g)return $().createElement(e,t);if(u.active){let n=ee()?.hydrateElement(e);if(n)return n}return t?document.createElementNS(U,e):document.createElement(e)}function $e(e,t=!1){let n=ut.get(e);if(n)return n;let r=document.createElement("template");return t?r.innerHTML=`<svg>${e}</svg>`:r.innerHTML=e,ut.set(e,r),r}function dt(e,t,n=!1,r=!1){if(g){let o=$();return n?o.parseTemplate(e,r):o.createRaw(e)}if(u.active){let o=ee()?.hydrateStatic(t);if(o)return o}return Ie($e(e,r),r).firstChild}function pt(e,t){if(!u.active)return t();let n=te(e.nextSibling,t);if(typeof n=="function"){let r=n;return((...o)=>u.active?te(e.nextSibling,()=>r(...o)):r(...o))}return n}function yt(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 mt(e,t){let n=[];for(let r=e.nextSibling;r&&r!==t;r=r.nextSibling)n.push(r);return n}function Ie(e,t=!1){let n=e.content.cloneNode(!0);return t?n.firstChild:n}function bn(e){return Array.isArray(e)?e.length===2&&e[1]===" "?Array.isArray(e[0])?bn(e[0]):(typeof e[0]=="function",e[0]):e.length===1&&typeof e[0]=="function"?e[0]:e:e}function $o(e){return typeof e!="function"?null:e._name||e.name||"anonymous"}function Io(e){if(b(e)||N(e)||typeof e!="function")return e;let t=e();for(;typeof t=="function"&&!b(t)&&!N(t);)t=t();return t}var A=0,En=200;function wn(e,t,n,r,o){let i=r,s=new Map;return m(()=>{let a;if(N(e)&&!b(e)){if(!s.has(e)){A++;try{let l=e();s.set(e,l)}finally{A--}}for(a=s.get(e);typeof a=="function"&&b(a);)a=a()}else for(a=e();typeof a=="function"&&b(a);)a=a();{let l=0;for(;typeof a=="function"&&l++<50;)if(N(a)){if(!s.has(a)){let c=a;A++;try{let f=c();s.set(c,f)}finally{A--}}a=s.get(a)}else if(b(a))a=a();else if(a=a(),typeof a!="function"||!b(a)&&!N(a))break}A++;try{i=ie(t,a,n,i,s),o(i)}finally{A--}})}function E(e,t,n,r){if(A>En)return console.error("[insert] Exceeded max call depth — possible infinite loop."),()=>null;n!==void 0&&!n&&(n=R("",!0),e.appendChild(n));let o=r??null,i=l=>Array.isArray(l)&&l.some(c=>typeof c=="function"),s=l=>typeof l=="function"?l:()=>l;if(typeof t!="function"&&!i(t)){A++;try{o=ie(e,t,n,o)}finally{A--}return()=>o}let a=wn(s(t),e,n,o,l=>{o=l});return()=>(a?.(),o)}function ie(e,t,n,r,o){if(t==null||typeof t=="boolean")return P(e,r,n);if(typeof t=="function")for(;typeof t=="function";)t=t();if(t==null||typeof t=="boolean")return P(e,r,n);if(ne(t)){let s=R("",!0);return Array.isArray(r)?r.length>0?(e.replaceChild(s,r[0]),P(e,r.slice(1),n)):T(e,s,n):r?e.replaceChild(s,r):T(e,s,n),t.then(a=>{s.parentNode===e&&ie(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=R(t);return T(e,a,n),a}if(r.length===1&&r[0].nodeType===3)return r[0].data=t,r;r=P(e,r,n)}if(r&&Le(r))return r.data=t,r;let s=R(t);return r&&r.parentNode===e?e.replaceChild(s,r):ke(e,s)||T(e,s,n),s}if(I(t))return ke(e,t)?(De(t),t):Array.isArray(r)?(r.length===0?T(e,t,n):r[0].parentNode===e?(e.replaceChild(t,r[0]),P(e,r.slice(1),n)):T(e,t,n),t):(r?r!==t&&(r.parentNode===e?e.replaceChild(t,r):T(e,t,n)):T(e,t,n),t);if(Array.isArray(t)){let s=[],a=Array.isArray(r)?r:r?[r]:[],l=[];v(t,s,e,n,!0,o,l);let c=Nn(e,a,s,n);for(let f of l){let d=E(e,f.sig,f.marker);O(()=>{P(e,d()),f.marker.parentNode===e&&e.removeChild(f.marker)})}return c}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 l=a.type(a.props||{});return ie(e,l,n,r)}}}return P(e,r,n)}function v(e,t,n,r,o=!0,i,s){for(let a=0;a<e.length;a++){let l=e[a];if(!(l==null||typeof l=="boolean")){for(;typeof l=="function"&&!ne(l)&&!b(l)&&!N(l)&&(l=l(),!(l==null||typeof l=="boolean")););if(!(l==null||typeof l=="boolean")){if(typeof l=="function"){let c;for(N(l)&&!b(l)?(i||(i=new Map),i.has(l)||i.set(l,l()),c=i.get(l)):c=l();typeof c=="function"&&!ne(c)&&!b(c)&&!N(c);)i||(i=new Map),i.has(c)||i.set(c,c()),c=i.get(c);if(c==null||typeof c=="boolean")continue;if(typeof c=="function"){if(b(c)){if(s){let d=R("",!0);t.push(d),s.push({marker:d,sig:c});continue}let f=c();for(;typeof f=="function"&&b(f);)f=f();if(f==null||typeof f=="boolean")continue;Array.isArray(f)?v(f,t,n,r,o,i):v([f],t,n,r,o,i);continue}continue}Array.isArray(c)?v(c,t,n,r,o,i,s):v([c],t,n,r,o,i,s);continue}if(ne(l)){let c=R("",!0);t.push(c),l.then(f=>{if(c.parentNode){let d=[];if(v([f],d,c.parentNode,void 0,!1,i),d.length>0){c.parentNode.replaceChild(d[0],c);for(let p=1;p<d.length;p++)c.parentNode?.insertBefore(d[p],d[p-1].nextSibling)}}}).catch(f=>console.error("Error resolving promise in array:",f));continue}if(Array.isArray(l)){v(l,t,n,r,o,i,s);continue}if(I(l)){t.push(l);continue}if(typeof l=="object"&&l!==null&&"type"in l&&"props"in l){let c=l;if(typeof c.type=="function"){let f=c.type(c.props||{});Array.isArray(f)?v(f,t,n,r,!1,i):v([f],t,n,r,!1,i);continue}}if(typeof l=="string"||typeof l=="number"){let c=String(l);if(c.trim()===""&&c!==" ")continue;t.push(R(c));continue}t.push(R(String(l)))}}}}function Nn(e,t,n,r){for(let d=0;d<n.length;d++){let p=n[d].parentNode;p!==null&&p!==e&&p.nodeType!==11&&(n=n.slice(),n[d]=n[d].cloneNode(!0))}let o=n.length,i=t.length,s=o,a=0,l=0,c=i>0?t[i-1].nextSibling??void 0:r,f=null;for(;a<i||l<s;){if(t[a]===n[l]){a++,l++;continue}for(;i>a&&s>l&&t[i-1]===n[s-1];)i--,s--;if(i===a){let d=s<o?l?n[l-1].nextSibling??void 0:n[s-l]:c;for(;l<s;)T(e,n[l++],d)}else if(s===l)for(;a<i;)(!f||!f.has(t[a]))&&t[a].parentNode===e&&e.removeChild(t[a]),a++;else if(t[a]===n[s-1]&&n[l]===t[i-1]){let d=t[--i].nextSibling;T(e,n[l++],t[a++].nextSibling),T(e,n[--s],d),t[i]=t[a-1]}else{if(!f){f=new Map;let p=l;for(;p<s;)f.set(n[p],p++)}let d=f.get(t[a]);if(d!=null)if(l<d&&d<s){let p=a,y=1;for(;++p<i&&p<s&&!(!f.has(t[p])||f.get(t[p])!==d+y);)y++;if(y>d-l){let we=t[a];for(;l<d;)T(e,n[l++],we)}else t[a].parentNode===e?e.replaceChild(n[l++],t[a++]):(T(e,n[l++],c),a++)}else a++;else t[a].parentNode===e&&e.removeChild(t[a]),a++}}return n}function P(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 T(e,t,n){u.active&&t.parentNode===e||(n&&n.parentNode===e?e.insertBefore(t,n):e.appendChild(t))}function q(e,t,n){n==null?delete e[t]:e[t]=n}function gt(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 ht(e,t){let n=(r,o)=>{typeof r=="function"&&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 G(e,t,n,r=!1){return typeof n!="function"?(h(e,t,n,r),()=>{}):m(()=>{let o=typeof n=="function"?n():n;h(e,t,o,r)})}function X(e,t,n){return typeof n!="function"?(q(e,t,n),()=>{}):m(()=>{let r=typeof n=="function"?n():n;q(e,t,r)})}function xt(e,t,n){return typeof n!="function"?(h(e,t,!!n),()=>{}):m(()=>{let r=n();h(e,t,!!r)})}function j(e,t){if(t==null){e.removeAttribute("class");return}if(typeof t=="function"){m(()=>j(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 se(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(m(()=>{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 ae(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 Tt(e){let{element:t,props:n,prevProps:r=xn,isSVG:o=!1,skipChildren:i=!1}=e;if(!t||!Oe(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===U,a=[];for(let l in n){if(i&&l==="children")continue;let c=n[l],f=r[l];if(c===f)continue;if(l==="ref"){F(c,t);continue}if(l==="use"){ht(t,c);continue}if(l.startsWith("on:")){a.push(gt(t,l.slice(3),c));continue}if(l.startsWith("prop:")){a.push(X(t,l.slice(5),c));continue}if(l.startsWith("attr:")){a.push(G(t,l.slice(5),c,s));continue}if(l.startsWith("bool:")){a.push(xt(t,l.slice(5),c));continue}if(l==="class"||l==="className"){typeof c=="function"?a.push(m(()=>j(t,c()))):j(t,c);continue}if(l==="classList"){typeof c=="function"?a.push(m(()=>se(t,c()))):se(t,c,a);continue}if(l==="style"){typeof c=="function"?a.push(m(()=>ae(t,c()))):ae(t,c);continue}if(l.startsWith("on")){let p=l.slice(2).toLowerCase();f&&oe(t,p),c&&_e(t,p,c);continue}let d=ve.has(l)||!s&&l in t;typeof c=="function"?a.push(d?X(t,l,c):G(t,l,c,s)):a.push(m(()=>d?q(t,l,n[l]):h(t,l,n[l],s)))}for(let l in r)if(!(l in n))if(l.startsWith("on")){let c=l.slice(2).toLowerCase();oe(t,c)}else ve.has(l)?q(t,l,null):t.removeAttribute(l);return()=>{a.forEach(l=>l())}}function fe(e,t,n=!1){for(let r in t){let o=t[r];if(r==="ref"){F(o,e);continue}if(r!=="children"){if(r==="use"){ht(e,o);continue}if(r.startsWith("on:")){gt(e,r.slice(3),o);continue}if(r.startsWith("prop:")){X(e,r.slice(5),o);continue}if(r.startsWith("attr:")){G(e,r.slice(5),o,n);continue}if(r.startsWith("bool:")){xt(e,r.slice(5),o);continue}if(r.startsWith("on")&&r.length>2){let i=r.slice(2).toLowerCase();if(typeof o=="function")if(le.has(i)){e[`$$${i}`]=o;let s=`__fx_${i}`;if(!e[s]){let a=l=>{e[`$$${i}`]?.(l)};e.addEventListener(i,a),e[s]=a}}else e[`$$${i}`]=o,re.has(i)||ce([i]);continue}if(r==="class"||r==="className"){j(e,o);continue}if(r==="classList"){typeof o=="function"?m(()=>se(e,o())):se(e,o);continue}if(r==="style"){typeof o=="function"?m(()=>ae(e,o())):ae(e,o);continue}if(r==="innerHTML"){if(typeof o=="function"){let i=z(()=>{let s=o();for(;typeof s=="function";)s=s();e.innerHTML=s});O(()=>i())}else e.innerHTML=o;continue}if(r==="value"&&(e.tagName==="INPUT"||e.tagName==="TEXTAREA")){if(typeof o=="function"){let i=z(()=>{let s=o();for(;typeof s=="function"&&s.length===0;)s=s();document.activeElement!==e&&(e.value=s??"")});O(()=>{i()})}else m(()=>{document.activeElement!==e&&(e.value=t[r]??"")});continue}if(r==="checked"&&e.tagName==="INPUT"){if(typeof o=="function"){let i=z(()=>{let s=o();for(;typeof s=="function"&&s.length===0;)s=s();document.activeElement!==e&&(e.checked=s??"")});O(()=>{i()})}else m(()=>{document.activeElement!==e&&(e.checked=t[r]??"")});continue}if(r==="value"&&e.tagName==="SELECT"){if(typeof o=="function"){let i=!0,s=z(()=>{let a=o();for(;typeof a=="function"&&a.length===0;)a=a();i?(i=!1,queueMicrotask(()=>{e.value=a??""})):e.value=a??""});O(()=>{s()})}else{let i=!0;m(()=>{let s=t[r];i?(i=!1,queueMicrotask(()=>{e.value=s??""})):e.value=s??""})}continue}if(typeof o=="function"){let i=z(()=>{let s=o();for(;typeof s=="function"&&s.length===0;)s=s();Se(e,r,s,n)});O(()=>{i()})}else m(()=>Se(e,r,t[r],n))}}}function bt(...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 qo(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:(l,c)=>a.has(c)?e[c]:void 0,has:(l,c)=>a.has(c)&&c in e,ownKeys:()=>Array.from(a).filter(l=>l in e),getOwnPropertyDescriptor:(l,c)=>a.has(c)&&c in e?r(c):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 F(e,t){if(e){if(I(e)){let n=t,r=e;if(!n)return;typeof n=="function"?n(r):typeof n=="object"&&"current"in n&&(n.current=r);return}typeof e=="function"?e(t):typeof e=="object"&&"current"in e&&(e.current=t)}}function Et(e,t,n){let r=t||document.body,o=mn(()=>e),i=[];return ft(()=>{let s=m(()=>{let a=o();Array.isArray(a)?(a.forEach(l=>r.appendChild(l)),i.push(()=>{a.forEach(l=>{l.parentNode===r&&r.removeChild(l)})})):I(a)&&(r.appendChild(a),i.push(()=>{a.parentNode===r&&r.removeChild(a)}))});i.push(s),O(()=>{i.forEach(a=>a())})}),null}function jo(e){return typeof e=="string"&&e.toLowerCase()===e}function wt(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 Fo(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}function ne(e){return e!=null&&(typeof e=="object"||typeof e=="function")&&typeof e.then=="function"||e instanceof Promise}function Ho(e){return typeof e=="function"&&e.length===0&&b(e)}function de(e,t,n){if(!t)throw new Error("Container element is required");let r,o,i=[];return yn(s=>{ft(()=>{u.active||(t.textContent=""),Re(t),Me(),E(t,e)}),o=s}),()=>{o?.(),r?.(),i.forEach(s=>s()),t.textContent=""}}function Nt(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 Sn="__fx_dom_create_component__",L=globalThis[Sn]??={fn:null};function Wo(e){L.fn=e}function Uo(e={}){let t=e.signalSystem?.createComponent;t&&(L.fn=t)}function pe(e,t){return L.fn?L.fn(e,t):(()=>e(t))}var Bo=()=>L.fn!==null,St=()=>L.fn!==null;function vt(){L.fn=null}var ye,Ct={getStore:()=>ye,run(e,t){let n=ye;ye=e;try{return t()}finally{ye=n}}},qe=Ct;function Rt(e){qe=e??Ct}function J(e={}){e.locals||(e.locals=e.request?Fe(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 l=r;r=s;try{return a()}finally{r=l}},pending:new Set,data:new Map}}function Y(e,t){return qe.run(e,t)}function C(){return qe.getStore()}function je(){return C()?.event}function Mt(){let e=je();return e?(e.locals||(e.locals={}),e.locals):{}}var At=new WeakMap;function Fe(e){let t=At.get(e);return t||(t={},At.set(e,t)),t}import{setResourceIdSource as vn,setServerDataGetter as An}from"@fluixi/reactive/signal";var Z="__FX_DATA__";function me(e){return e.replace(/[<>&\u2028\u2029]/g,t=>"\\u"+t.charCodeAt(0).toString(16).padStart(4,"0"))}var He;function ge(){let e=globalThis.__FX_DATA__;if(e)return e;if(He!==void 0)return He;let t=null;if(typeof document<"u"){let n=document.getElementById(Z)?.textContent;if(n)try{t=JSON.parse(n)}catch{t=null}}return He=t}function he(){for(;;){for(;u.cursor&&u.cursor.nodeType===3&&u.cursor.data==="";)u.cursor=u.cursor.nextSibling;if(u.cursor!=null||!u.parents.length)return;u.cursor=u.parents.pop().nextSibling}}var Cn=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),xe=typeof process<"u"&&process.env&&!1;function Te(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 Rn(e){he();let t=u.cursor;return t&&t.nodeType===1&&t.tagName.toLowerCase()===e.toLowerCase()?(Cn.has(e.toLowerCase())?u.cursor=t.nextSibling:(u.parents.push(t),u.cursor=t.firstChild),t):(xe&&t&&Te(`<${e}>`,t),null)}function Mn(e){he();let t=u.cursor;return t&&t.nodeType===1&&t.tagName.toLowerCase()===e.toLowerCase()?(u.cursor=t.nextSibling,t):(xe&&t&&Te(`<${e}> (static)`,t),null)}function Pn(e){if(e===""){let n=u.cursor;return n&&n.nodeType===3&&n.data!==""?(u.cursor=n.nextSibling,n.data="",n):null}he();let t=u.cursor;return t&&t.nodeType===3?(u.cursor=t.nextSibling,t.nodeValue!==e&&(t.nodeValue=e),t):(xe&&t&&Te(`text ${JSON.stringify(e.slice(0,24))}`,t),null)}function On(e){he();let t=u.cursor;return t&&t.nodeType===8&&t.data===e?(u.cursor=t.nextSibling,t):(xe&&t&&Te(`marker <!--${e.slice(0,24)}-->`,t),null)}var Pt=!1;function Ln(){Pt||(Pt=!0,ct({hydrateElement:Rn,hydrateText:Pn,hydrateMarker:On,hydrateStatic:Mn}))}function Q(e,t,n){Ln(),u.active=!0,u.cursor=t.firstChild,u.parents=[];let r=ge(),o=n?.resourceNamespace,i=0;vn(()=>o?`${o}:r${i++}`:`r${i++}`),An(r?s=>s in r?{value:r[s]}:void 0:null);try{return de(e,t)}finally{u.active=!1,u.cursor=null,u.parents=[]}}var Ve="fluixi-island";function kn(e){let{component:t,props:n={},name:r}=e,o=ue(Ve),i=r??t.name??"Island";h(o,"name",i),h(o,"props",JSON.stringify(n??{}));let s=g?C():void 0;if(s){let a=s.nextIslandNamespace(i);E(o,()=>s.withResourceScope(a,()=>t(n)))}else E(o,()=>t(n));return o}var Ot=!1;function Dn(){if(Ot||typeof document>"u")return;Ot=!0;let e=document.createElement("style");e.textContent=`${Ve}{display:contents}`,document.head.appendChild(e)}function _n(e){if(typeof document>"u")return;Dn();let t=document.querySelectorAll(Ve),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{}Q(()=>s(a),r,{resourceNamespace:`${o}#${i}`})})}function $n(e,...t){throw new Error("html`` was not compiled — enable the lit format: fluixi({ format: 'lit' }).")}function In(e,...t){throw new Error("svg`` was not compiled — enable the lit format: fluixi({ format: 'lit' }).")}import{readChildren as qn}from"@fluixi/reactive/signal";function bi(e,t={}){if(typeof e=="function")return pe(e,t);if(typeof e!="string"||e.length===0)return null;let n=wt(e);if(g)return $().createElement(e,n);let r=n?document.createElementNS(U,e):document.createElement(e);return fe(r,t,n),jn(r,t),r}function jn(e,t){if(!t||t.children===void 0)return;let n=qn(()=>t.children),r=o=>{E(e,o,typeof o=="function"?null:void 0)};Array.isArray(n)?n.forEach(r):r(n)}import{createChildOwner as Fn,createMemo as We,disposeScope as Hn,getOwner as Vn,runWithOwner as Wn,untrack as _t}from"@fluixi/reactive/signal";function Lt(e){return typeof e=="function"?e:(()=>e)}function M(e){return()=>{let t=e();return typeof t=="function"?t():t}}function kt(e){return e!=null&&e!==!1}function Dt(e){return!e||typeof e!="object"?!1:!!(typeof e._$litType$<"u"||typeof e._$litDirective$<"u"||Array.isArray(e.strings)&&Array.isArray(e.values))}function Un(e){let t=M(()=>e.when),n=We(t,void 0),r=We(n,void 0),o=Vn(),i=null,s=null,a=l=>{l!==s&&(i&&Hn(i),i=Fn(o),s=l)};return We(()=>{let l=r();return a(l?"when":"fallback"),Wn(i,()=>{if(l){let c=e.children;return typeof c=="function"&&!Dt(c)?typeof n=="function"?_t(()=>_t(n)?c(n()):e.fallback):c(n):c}return e.fallback});return e.fallback??null},void 0,{name:"show"})}import{mapArray as Bn,keyArray as Kn}from"@fluixi/reactive/signal";function zn(e){let t=M(()=>e.each),n=()=>e.fallback??null,r=(o,i)=>{let s=e.children,a=Array.isArray(s)?s.map(l=>typeof l=="function"?l(o,i):l):typeof s=="function"?s(o,i):s;return K(a),a};return e.by?Kn(t,e.by,(o,i)=>r(o,i),{fallback:n}):Bn(t,(o,i)=>r(o,i),{fallback:n})}import{indexArray as Gn}from"@fluixi/reactive/signal";function Xn(e){let t=M(()=>e.each);return Gn(t,(n,r)=>{let o=e.children(n,r);return K(o),o},{fallback:()=>e.fallback??null})}import{mapArray as gs,keyArray as hs,indexArray as xs}from"@fluixi/reactive/signal";import{createMemo as Jn,createChildOwner as Yn,disposeScope as Zn,getOwner as Qn,runWithOwner as $t}from"@fluixi/reactive/signal";var Ue=Symbol("match");function er(e){return{[Ue]:!0,when:M(()=>e.when),get children(){return e.children}}}function tr(e){let t=Array.isArray(e.children)?e.children:[e.children],n=Qn(),r=null,o=-1,i=s=>{s!==o&&(r&&Zn(r),r=Yn(n),o=s)};return Jn(()=>{for(let s=0;s<t.length;s+=1){let l=t[s],c=0;for(;typeof l=="function"&&!l[Ue]&&c++<10;)l=l();if(!l||typeof l!="object"||l[Ue]!==!0)continue;let f=l.when();if(kt(f))return i(s),$t(r,()=>typeof l.children=="function"?l.children(f):l.children)}return i(-2),$t(r,()=>e.fallback??null)})}import{createMemo as nr,createChildOwner as rr,disposeScope as or,getOwner as ir,runWithOwner as sr}from"@fluixi/reactive/signal";function ar(e){let t=Lt(e.component),{component:n,...r}=e,o=ir(),i=null,s;return nr(()=>{let a=t();return a!==s&&(i&&or(i),i=rr(o),s=a),a==null?null:typeof a=="string"?{tag:a,props:r}:sr(i,()=>a(r))})}import{createRoot as lr,onCleanup as cr}from"@fluixi/reactive/signal";function ur(e){let t=()=>e.mount?typeof e.mount=="function"?e.mount():e.mount:document.body,n,r;return lr(o=>{n=o,r=document.createElement("div"),r.style.display="contents",t().appendChild(r),E(r,e.children)&&F(e.ref,r)}),cr(()=>{n(),r.remove()}),null}import{createMemo as fr,createSignal as dr}from"@fluixi/reactive/signal";function It(e){if(g)return e.fallback??null;let t=u.active,[n,r]=dr(!t);return t&&queueMicrotask(()=>r(!0)),fr(()=>n()?e.children:e.fallback??null,void 0,{name:"client-only"})}var pr=It;import{createMemo as yr,createSignal as mr}from"@fluixi/reactive/signal";function gr(e){let[t,n]=mr(null),r=()=>n(null);return yr(()=>{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}})}import{createMemo as hr}from"@fluixi/reactive/signal";function xr(e){return hr(()=>{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(" ")})}import{createMemo as Tr}from"@fluixi/reactive/signal";function br(e){return e.startsWith("--")?e:e.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`)}function Er(e){return Tr(()=>{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(`${br(r)}: ${i}`)}return n.join("; ")})}var Ee=1,ze=3,Ge=8,qt;qt=B;var H=class{constructor(){this[qt]=!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(){}},k=class e extends H{constructor(n){super();this.nodeType=ze;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)}},be=class e extends H{constructor(n){super();this.nodeType=Ee;this.rawOuterHTML=n}get textContent(){return this.rawOuterHTML.replace(/<[^>]*>/g,"")}cloneNode(){return new e(this.rawOuterHTML)}},V=class e extends H{constructor(n){super();this.nodeType=Ge;this.data=n}get nodeValue(){return this.data}set nodeValue(n){this.data=n==null?"":String(n)}cloneNode(){return new e(this.data)}},Be=class{constructor(){this.cssText=""}setProperty(t,n){this[t]=n}removeProperty(t){delete this[t]}},Ke=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}},D=class e extends H{constructor(n,r=!1){super();this.nodeType=Ee;this.attributes=new Map;this.style=new Be;this.classList=new Ke(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 k(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 wr=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),Ft=/&/g,Ht=/</g,Vt=/>/g,Nr=/"/g;function Xe(e){return e.replace(Ft,"&amp;").replace(Ht,"&lt;").replace(Vt,"&gt;")}function jt(e){return e.replace(Ft,"&amp;").replace(Nr,"&quot;").replace(Ht,"&lt;").replace(Vt,"&gt;")}function Sr(e){return e.startsWith("--")?e:e.replace(/[A-Z]/g,t=>"-"+t.toLowerCase())}function vr(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(`${Sr(n)}: ${r}`)}return t.join("; ")}function Ar(e){let t="",n=vr(e.style);for(let[r,o]of e.attributes)r==="style"&&n||(t+=` ${r}="${jt(o)}"`);if(n){let r=e.attributes.get("style"),o=r?`${r.replace(/;\s*$/,"")}; ${n}`:n;t+=` style="${jt(o)}"`}return t}function S(e){if(e==null||e===!1||e===!0)return"";if(typeof e=="string")return Xe(e);if(typeof e=="number")return Xe(String(e));if(typeof e=="function")return S(e());if(Array.isArray(e))return e.map(S).join("");if(typeof e.rawOuterHTML=="string")return e.rawOuterHTML;switch(e.nodeType){case ze:return Xe(e.data??"");case Ge:return`<!--${e.data??""}-->`;case Ee:{let t=e.localName,n=`<${t}${Ar(e)}>`;if(wr.has(t))return n;let r=e.rawHTML!=null?e.rawHTML:(e.childNodes??[]).map(S).join("");return`${n}${r}</${t}>`}}return Array.isArray(e.childNodes)?e.childNodes.map(S).join(""):""}import{createRoot as Gt}from"@fluixi/reactive/signal";import{setResourceTracker as Mr,setResourceIdSource as Pr,setResourceDataSink as Or,getOwner as Lr,runWithOwner as Bt,flush as kr}from"@fluixi/reactive/signal";var Cr=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),Rr={amp:"&",lt:"<",gt:">",quot:'"',"#39":"'"};function Wt(e){return e.replace(/&(#?\w+);/g,(t,n)=>Rr[n]??t)}var w=class extends Error{};function Ut(e,t=!1){let n=0,r=[],o=[],i=c=>{let f=o[o.length-1];f?f.appendChild(c):r.push(c)};for(;n<e.length;){let c=e.indexOf("<",n);if(c===-1){a(e.slice(n));break}if(c>n&&a(e.slice(n,c)),e.startsWith("<!--",c)){let f=e.indexOf("-->",c);if(f===-1)throw new w(`unterminated comment at ${c}`);i(new V(e.slice(c+4,f))),n=f+3;continue}if(e[c+1]==="/"){let f=e.indexOf(">",c);if(f===-1)throw new w(`unterminated closing tag at ${c}`);let d=e.slice(c+2,f).trim().toLowerCase(),p=o.pop();if(!p||p.localName!==d)throw new w(`</${d}> does not close <${p?.localName??"nothing"}>`);n=f+1;continue}n=l(c)}if(o.length>0)throw new w(`unclosed <${o[o.length-1].localName}>`);let s=r[0];if(r.length!==1||!(s instanceof D))throw new w(`expected exactly one root element, got ${r.length}`);return s;function a(c){c!==""&&i(new k(Wt(c)))}function l(c){let f=/[\s/>]/.exec(e.slice(c+1));if(!f)throw new w(`unterminated tag at ${c}`);let d=e.slice(c+1,c+1+f.index).toLowerCase(),p=new D(d,t),y=c+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 we=y;for(;y<e.length&&!/[\s=/>]/.test(e[y]);)y++;let W=e.slice(we,y);if(W==="")throw new w(`malformed attribute at ${y}`);if(e[y]==="="){if(e[y+1]!=='"')throw new w(`attribute ${W} must have a double-quoted value`);let Ne=e.indexOf('"',y+2);if(Ne===-1)throw new w(`unterminated value for ${W}`);p.setAttribute(W,Wt(e.slice(y+2,Ne))),y=Ne+1}else p.setAttribute(W,"")}return i(p),Cr.has(d)||o.push(p),y}}var Kt=!1;function Xt(){Kt||(Kt=!0,at({createElement:(e,t)=>new D(e,t),createText:e=>new k(e),createRaw:e=>new be(e),parseTemplate:(e,t)=>Ut(e,t),createComment:e=>new V(e)}))}function Jt(e,t={}){let n=g;Xt(),_(!0);let r=J(t.event);try{return Y(r,()=>Gt(o=>{try{let i=typeof e=="function"?e():e;return S(i)}finally{o()}}))}finally{_(n)}}var zt=!1;function Dr(){zt||(zt=!0,Mr(e=>{C()?.pending.add(e)}),Pr(()=>C()?.nextResourceId()??""),Or((e,t)=>{e&&C()?.data.set(e,t)}))}var Je=null;function Yt(e){Je=e}function Ye(e){if(e.data.size===0)return"";let t={};for(let[r,o]of e.data){let i=o;if(Je)try{i=Je(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=me(JSON.stringify(t));return n==="{}"?"":`<script type="application/json" id="${Z}">${n}<\/script>`}var _r=50;async function Zt(e,t={}){let n=g;Xt(),_(!0),Dr();let r=J(t.event);try{return await Y(r,async()=>{t.preload&&await t.preload(t.event);let o,i=null,s=()=>{};Gt(f=>{s=f,i=Lr(),o=typeof e=="function"?e():e});let a=()=>{try{Bt(i,()=>S(o))}catch{}};a();let l=0;for(;r.pending.size>0&&l++<_r;){let f=Array.from(r.pending);r.pending.clear(),await Promise.allSettled(f),await kr(),a()}let c=Bt(i,()=>S(o))+Ye(r);return s(),c})}finally{_(n)}}var $r={createComponent:pe,createElement:ot,createNativeElement:ue,createTemplate:$e,cloneTemplate:Ie,templateNode:dt,holeContent:mt,holeEnd:yt,holeScope:pt,createPortal:Et,render:de,hydrate:Q,insert:E,appendChildren:st,removeChildren:it,spread:Tt,applyProps:fe,mergeProps:bt,bindPair:Nt,setProperty:q,setDynamicProperty:X,setAttribute:h,setDynamicAttribute:G,removeAttribute:rt,getAttribute:nt,setClassName:j,addClass:Qe,removeClass:et,toggleClass:tt,setStyles:Ae,delegateEvents:ce,addDelegatedEventListener:_e,removeDelegatedEventListener:oe,handleRef:F,resetIntegration:vt,isIntegrationInitialized:St},ra=$r;export{It as ClientOnly,ar as Dynamic,gr as ErrorBoundary,Z as FX_DATA_ID,zn as For,Xn as Index,kn as Island,ve as JSX_PROPERTIES,er as Match,pr as NoSsr,ur as Portal,Vr as SVG_ELEMENTS,U as SVG_NAMESPACE,Un as Show,tr as Switch,Ce as VERSION,Hr as VOID_ELEMENTS,Qe as addClass,_e as addDelegatedEventListener,gt as addNativeEventListener,st as appendChildren,Se as applyElementProp,fe as applyProps,ht as applyUse,xo as asComponent,ho as asContext,mo as asOutlet,go as asProvider,yo as asRoute,fo as asRouter,po as asRoutes,To as asSuspense,Nt as bindPair,dn as captureHydrationCursor,bo as checkRenderType,xr as classMap,P as cleanChildren,Ie as cloneTemplate,Ur as closest,pe as createComponent,bi as createDynamicElement,ot as createElement,ue as createNativeElement,Et as createPortal,J as createRequestContext,$e as createTemplate,ra as default,Jr as delegate,ce as delegateEvents,me as escapeFxJson,Fo as escapeHTML,$o as fnName,ko as generateID,nt as getAttribute,io as getGlobal,jr as getLitEventName,Mt as getLocals,Xr as getOffset,C as getRequestContext,je as getRequestEvent,Fe as getRequestLocals,ge as getServerData,Lo as getStableElementId,Kr as getStyle,F as handleRef,Br as hasClass,mt as holeContent,yt as holeEnd,pt as holeScope,$n as html,Q as hydrate,K as hydrateAdvancePast,_n as hydrateIslands,xs as indexArray,Uo as initializeIntegration,E as insert,ie as insertExpression,Bo as intergartionInitialized,Ho as isAccessor,N as isComponent,un as isContext,Qt as isCustomElement,ro as isDOMNode,Do as isDelegatedEvent,Oe as isDomElement,I as isDomNode,Le as isDomText,qr as isEventHandler,_o as isFunction,St as isIntegrationInitialized,no as isJSXTemplate,tn as isLitTemplateResult,jo as isNativeElement,ln as isOutlet,ne as isPromise,cn as isProvider,eo as isReactElement,an as isRoute,on as isRouter,sn as isRoutes,wt as isSVGElement,g as isServer,fn as isSuspense,to as isTemplateFactory,zr as isVisible,Io as iterateFn,hs as keyArray,bn as makeArrayFlat,gs as mapArray,bt as mergeProps,Zr as observeIntersection,Qr as observeResize,Ze as query,Wr as queryAll,rn as registerCoreVersion,Wo as registerCreateComponent,oo as registerGlobal,rt as removeAttribute,it as removeChildren,et as removeClass,oe as removeDelegatedEventListener,de as render,Jt as renderToString,Zt as renderToStringAsync,vt as resetIntegration,te as runHydrationAt,Y as runWithRequestContext,pn as runWithoutHydration,Gr as scrollIntoView,S as serializeNode,Ye as serializeResourceData,h as setAttribute,se as setClassList,j as setClassName,Yt as setDataRedactor,G as setDynamicAttribute,xt as setDynamicBoolAttribute,X as setDynamicProperty,q as setProperty,Rt as setRequestStore,_ as setServerMode,ae as setStyle,Ae as setStyles,Fr as shouldSetAsProperty,qo as splitProps,Tt as spread,Re as stampVersions,Er as styleMap,In as svg,dt as templateNode,Ir as toAttributeName,tt as toggleClass,x as versions,Yr as waitForElement,Me as warnOnVersionSkew};
1
+ function Ir(e){return e.startsWith("aria-")||e.startsWith("data-")?e:/[A-Z]/.test(e)?e.replace(/([A-Z])/g,"-$1").toLowerCase():e}function qr(e){return e.startsWith("@")||e.startsWith("on")&&e.length>2}function jr(e){return e.startsWith("@")?e.slice(1):e.startsWith("on")?e.slice(2).toLowerCase():e}function Fr(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 Hr=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),Vr=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"]),U="http://www.w3.org/2000/svg";function Qt(e){return e.localName.includes("-")}function Se(e,t,n,r=!1){if(n==null){e.removeAttribute(t);return}if(Qt(e)){e[t]=n;return}h(e,t,n,r)}var ve=new Set(["className","value","checked","selected","innerHTML","innerText","textContent","indeterminate","htmlFor"]);function Ze(e,t=document){return t.querySelector(e)}function Wr(e,t=document){return Array.from(t.querySelectorAll(e))}function Ur(e,t){return e.closest(t)}function Qe(e,...t){e.classList.add(...t)}function et(e,...t){e.classList.remove(...t)}function tt(e,...t){t.forEach(n=>e.classList.toggle(n))}function Br(e,t){return e.classList.contains(t)}function h(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 nt(e,t){return e.getAttribute(t)}function rt(e,t){e.removeAttribute(t)}function Ae(e,t){Object.assign(e.style,t)}function Kr(e,t){return window.getComputedStyle(e).getPropertyValue(t)}function ot(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")Ae(r,i);else if(o.startsWith("on")&&typeof i=="function"){let s=o.slice(2).toLowerCase();r.addEventListener(s,i)}else h(r,o,i)}),n.forEach(o=>{typeof o=="string"?r.appendChild(document.createTextNode(o)):r.appendChild(o)}),r}function it(e){for(;e.firstChild;)e.removeChild(e.firstChild)}function st(e,...t){t.forEach(n=>{typeof n=="string"?e.appendChild(document.createTextNode(n)):e.appendChild(n)})}function zr(e){let t=e.getBoundingClientRect();return t.top>=0&&t.left>=0&&t.bottom<=window.innerHeight&&t.right<=window.innerWidth}function Gr(e,t={behavior:"smooth",block:"nearest"}){e.scrollIntoView(t)}function Xr(e){let t=e.getBoundingClientRect();return{top:t.top+window.pageYOffset,left:t.left+window.pageXOffset}}function Jr(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 Yr(e,t=5e3){return new Promise((n,r)=>{let o=Ze(e);if(o){n(o);return}let i=new MutationObserver(()=>{let a=Ze(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 Zr(e,t,n={}){let r=new IntersectionObserver(o=>{o.forEach(i=>{t(i.isIntersecting)})},n);return r.observe(e),()=>{r.disconnect()}}function Qr(e,t){let n=new ResizeObserver(r=>{r.forEach(t)});return n.observe(e),()=>{n.disconnect()}}var en=typeof Symbol=="function"&&Symbol.for?Symbol.for("react.element"):60103;function eo(e){return typeof e=="object"&&e!==null&&e.$$typeof===en}function tn(e){return e&&typeof e=="object"&&e.strings&&Array.isArray(e.strings)&&e.values&&Array.isArray(e.values)}function to(e){if(typeof e!="function")return!1;try{let t=e();return tn(t)}catch{return!1}}function no(e){return typeof e=="object"&&e!==null&&(e.$$typeof==="template"||typeof e.type=="function")}function ro(e){return e instanceof Node}function oo(e,t,n="Fluixi"){typeof globalThis<"u"&&(typeof globalThis[n]>"u"&&(globalThis[n]={}),typeof globalThis[n][e]>"u"&&(globalThis[n][e]=t))}function io(e,t,n="Fluixi"){return typeof globalThis<"u"&&typeof globalThis[n]<"u"&&typeof globalThis[n][e]<"u"?globalThis[n][e]:t}import{isSignal as b}from"@fluixi/reactive/signal";var Ce="1.0.0-alpha.79";import{VERSION as nn}from"@fluixi/reactive/version";var x={dom:Ce,reactive:nn};function rn(e){x.core=e}function Re(e){x.core&&e.setAttribute("fluixi",x.core),e.setAttribute("fx-dom",x.dom),e.setAttribute("fx-reactive",x.reactive),typeof globalThis<"u"&&(globalThis.Fluixi=x)}function Me(){let e=[x.core,x.dom,x.reactive].filter(t=>t!==void 0);new Set(e).size<=1||console.warn(`[fluixi] package versions disagree — core ${x.core??"(absent)"}, dom ${x.dom}, reactive ${x.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 fo(e){return Object.defineProperty(e,Symbol.for("fluixi-router"),{value:!0,enumerable:!0}),e}function po(e){return Object.defineProperty(e,Symbol.for("fluixi-routes"),{value:!0,enumerable:!0}),e}function yo(e){return Object.defineProperty(e,Symbol.for("fluixi-route"),{value:!0,enumerable:!0}),e}function mo(e){return typeof e!="function"||Object.defineProperty(e,Symbol.for("fluixi-outlet"),{value:!0,enumerable:!0}),e}function go(e){return Object.defineProperty(e,Symbol.for("fluixi-provider"),{value:!0,enumerable:!0}),e}function ho(e){return Object.defineProperty(e,Symbol.for("fluixi-context"),{value:!0,enumerable:!0}),e}function xo(e){return typeof e!="function"||Object.defineProperty(e,Symbol.for("fluixi-component"),{value:!0,enumerable:!0}),e}function To(e){return Object.defineProperty(e,Symbol.for("fluixi-suspense"),{value:!0,enumerable:!0}),e}function on(e){return typeof e=="function"&&e[Symbol.for("fluixi-router")]===!0}function sn(e){return typeof e=="function"&&e[Symbol.for("fluixi-routes")]===!0}function an(e){return typeof e=="function"&&e[Symbol.for("fluixi-route")]===!0}function ln(e){return typeof e=="function"&&e[Symbol.for("fluixi-outlet")]===!0}function cn(e){return typeof e=="function"&&e[Symbol.for("fluixi-provider")]===!0}function un(e){return typeof e=="function"&&e[Symbol.for("fluixi-context")]===!0}function N(e){return typeof e=="function"&&e[Symbol.for("fluixi-component")]===!0}function fn(e){return typeof e=="function"&&e[Symbol.for("fluixi-suspense")]===!0}function bo(e){return on(e)?{type:"router",value:e}:an(e)?{type:"route",value:e}:sn(e)?{type:"routes",value:e}:ln(e)?{type:"outlet",value:e}:N(e)?{type:"component",value:e}:fn(e)?{type:"suspense",value:e}:cn(e)?{type:"provider",value:e}:un(e)?{type:"context",value:e}:{type:"none",value:e}}import{batch as ft,createEffect as z,createRenderEffect as m,createRoot as yn,onCleanup as O,readChildren as mn}from"@fluixi/reactive/signal";var g=typeof document>"u";function _(e){g=e}var B=Symbol.for("fluixi.server-node"),Pe=null;function at(e){Pe=e}function $(){if(!Pe)throw new Error("[fluixi] server render ran before @fluixi/dom/server loaded");return Pe}function I(e){return e!=null&&e[B]===!0?!0:typeof Node<"u"&&e instanceof Node}function Oe(e){return e!=null&&e[B]===!0?e.nodeType===1:typeof Element<"u"&&e instanceof Element}function Le(e){return e!=null&&e[B]===!0?e.nodeType===3:typeof Text<"u"&&e instanceof Text}var u={active:!1,cursor:null,parents:[]},lt=null;function ct(e){lt=e}function ee(){return lt}function ke(e,t){return u.active&&t.parentNode===e}function De(e){let t=u.parents.lastIndexOf(e);t!==-1&&(u.parents.length=t),u.cursor=e.nextSibling}function dn(){return u.active?u.cursor:null}function te(e,t){if(!e||e.parentNode==null)return t();let n=u.active,r=u.cursor,o=u.parents;u.active=!0,u.cursor=e,u.parents=[];try{return t()}finally{u.active=n,u.cursor=r,u.parents=o}}function pn(e){if(!u.active)return e();let t=u.cursor,n=u.parents;u.active=!1,u.parents=[];try{return e()}finally{u.active=!0,u.cursor=t,u.parents=n}}function K(e){if(!u.active||e==null)return;let t=Array.isArray(e)?e[e.length-1]:e;t&&typeof t.nodeType=="number"&&De(t)}function gn(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 hn(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 Lo(e){return hn(gn(e))}var ko=()=>"xxyxxxxxxy-4xx8".replace(/[xy]/g,function(e){let t=Math.random()*16|0;return(e==="x"?t:t&3|8).toString(16)}),xn={};var ut=new Map,re=new Set,le=new Set(["scroll","focus","blur","load","error","resize","mouseenter","mouseleave","pointerenter","pointerleave","gotpointercapture","lostpointercapture"]);function ce(e){if(!g)for(let t of e)re.has(t)||le.has(t)||(re.add(t),document.addEventListener(t,Tn))}function Tn(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 _e(e,t,n){if(e[`$$${t}`]=n,le.has(t)){let r=`__fx_${t}`;if(!e[r]){let o=i=>{e[`$$${t}`]?.(i)};e.addEventListener(t,o),e[r]=o}return}re.has(t)||ce([t])}function oe(e,t){delete e[`$$${t}`];let n=`__fx_${t}`,r=e[n];r&&(e.removeEventListener(t,r),delete e[n])}function Do(e){return!le.has(e)}function _o(e){return typeof e=="function"}function R(e,t=!1){if(g)return $().createText(e);if(u.active&&!t){let n=ee()?.hydrateText(e);if(n)return n}return document.createTextNode(e)}function ue(e,t=!1){if(g)return $().createElement(e,t);if(u.active){let n=ee()?.hydrateElement(e);if(n)return n}return t?document.createElementNS(U,e):document.createElement(e)}function $e(e,t=!1){let n=ut.get(e);if(n)return n;let r=document.createElement("template");return t?r.innerHTML=`<svg>${e}</svg>`:r.innerHTML=e,ut.set(e,r),r}function dt(e,t,n=!1,r=!1){if(g){let o=$();return n?o.parseTemplate(e,r):o.createRaw(e)}if(u.active){let o=ee()?.hydrateStatic(t);if(o)return o}return Ie($e(e,r),r).firstChild}function pt(e,t){if(!u.active)return t();let n=te(e.nextSibling,t);if(typeof n=="function"){let r=n;return((...o)=>u.active?te(e.nextSibling,()=>r(...o)):r(...o))}return n}function yt(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 mt(e,t){let n=[];for(let r=e.nextSibling;r&&r!==t;r=r.nextSibling)n.push(r);return n}function Ie(e,t=!1){let n=e.content.cloneNode(!0);return t?n.firstChild:n}function bn(e){return Array.isArray(e)?e.length===2&&e[1]===" "?Array.isArray(e[0])?bn(e[0]):(typeof e[0]=="function",e[0]):e.length===1&&typeof e[0]=="function"?e[0]:e:e}function $o(e){return typeof e!="function"?null:e._name||e.name||"anonymous"}function Io(e){if(b(e)||N(e)||typeof e!="function")return e;let t=e();for(;typeof t=="function"&&!b(t)&&!N(t);)t=t();return t}var A=0,En=200;function wn(e,t,n,r,o){let i=r,s=new Map;return m(()=>{let a;if(N(e)&&!b(e)){if(!s.has(e)){A++;try{let l=e();s.set(e,l)}finally{A--}}for(a=s.get(e);typeof a=="function"&&b(a);)a=a()}else for(a=e();typeof a=="function"&&b(a);)a=a();{let l=0;for(;typeof a=="function"&&l++<50;)if(N(a)){if(!s.has(a)){let c=a;A++;try{let f=c();s.set(c,f)}finally{A--}}a=s.get(a)}else if(b(a))a=a();else if(a=a(),typeof a!="function"||!b(a)&&!N(a))break}A++;try{i=ie(t,a,n,i,s),o(i)}finally{A--}})}function E(e,t,n,r){if(A>En)return console.error("[insert] Exceeded max call depth — possible infinite loop."),()=>null;n!==void 0&&!n&&(n=R("",!0),e.appendChild(n));let o=r??null,i=l=>Array.isArray(l)&&l.some(c=>typeof c=="function"),s=l=>typeof l=="function"?l:()=>l;if(typeof t!="function"&&!i(t)){A++;try{o=ie(e,t,n,o)}finally{A--}return()=>o}let a=wn(s(t),e,n,o,l=>{o=l});return()=>(a?.(),o)}function ie(e,t,n,r,o){if(t==null||typeof t=="boolean")return P(e,r,n);if(typeof t=="function")for(;typeof t=="function";)t=t();if(t==null||typeof t=="boolean")return P(e,r,n);if(ne(t)){let s=R("",!0);return Array.isArray(r)?r.length>0?(e.replaceChild(s,r[0]),P(e,r.slice(1),n)):T(e,s,n):r?e.replaceChild(s,r):T(e,s,n),t.then(a=>{s.parentNode===e&&ie(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=R(t);return T(e,a,n),a}if(r.length===1&&r[0].nodeType===3)return r[0].data=t,r;r=P(e,r,n)}if(r&&Le(r))return r.data=t,r;let s=R(t);return r&&r.parentNode===e?e.replaceChild(s,r):ke(e,s)||T(e,s,n),s}if(I(t))return ke(e,t)?(De(t),t):Array.isArray(r)?(r.length===0?T(e,t,n):r[0].parentNode===e?(e.replaceChild(t,r[0]),P(e,r.slice(1),n)):T(e,t,n),t):(r?r!==t&&(r.parentNode===e?e.replaceChild(t,r):T(e,t,n)):T(e,t,n),t);if(Array.isArray(t)){let s=[],a=Array.isArray(r)?r:r?[r]:[],l=[];v(t,s,e,n,!0,o,l);let c=Nn(e,a,s,n);for(let f of l){let d=E(e,f.sig,f.marker);O(()=>{P(e,d()),f.marker.parentNode===e&&e.removeChild(f.marker)})}return c}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 l=a.type(a.props||{});return ie(e,l,n,r)}}}return P(e,r,n)}function v(e,t,n,r,o=!0,i,s){for(let a=0;a<e.length;a++){let l=e[a];if(!(l==null||typeof l=="boolean")){for(;typeof l=="function"&&!ne(l)&&!b(l)&&!N(l)&&(l=l(),!(l==null||typeof l=="boolean")););if(!(l==null||typeof l=="boolean")){if(typeof l=="function"){let c;for(N(l)&&!b(l)?(i||(i=new Map),i.has(l)||i.set(l,l()),c=i.get(l)):c=l();typeof c=="function"&&!ne(c)&&!b(c)&&!N(c);)i||(i=new Map),i.has(c)||i.set(c,c()),c=i.get(c);if(c==null||typeof c=="boolean")continue;if(typeof c=="function"){if(b(c)){if(s){let d=R("",!0);t.push(d),s.push({marker:d,sig:c});continue}let f=c();for(;typeof f=="function"&&b(f);)f=f();if(f==null||typeof f=="boolean")continue;Array.isArray(f)?v(f,t,n,r,o,i):v([f],t,n,r,o,i);continue}continue}Array.isArray(c)?v(c,t,n,r,o,i,s):v([c],t,n,r,o,i,s);continue}if(ne(l)){let c=R("",!0);t.push(c),l.then(f=>{if(c.parentNode){let d=[];if(v([f],d,c.parentNode,void 0,!1,i),d.length>0){c.parentNode.replaceChild(d[0],c);for(let p=1;p<d.length;p++)c.parentNode?.insertBefore(d[p],d[p-1].nextSibling)}}}).catch(f=>console.error("Error resolving promise in array:",f));continue}if(Array.isArray(l)){v(l,t,n,r,o,i,s);continue}if(I(l)){t.push(l);continue}if(typeof l=="object"&&l!==null&&"type"in l&&"props"in l){let c=l;if(typeof c.type=="function"){let f=c.type(c.props||{});Array.isArray(f)?v(f,t,n,r,!1,i):v([f],t,n,r,!1,i);continue}}if(typeof l=="string"||typeof l=="number"){let c=String(l);if(c.trim()===""&&c!==" ")continue;t.push(R(c));continue}t.push(R(String(l)))}}}}function Nn(e,t,n,r){for(let d=0;d<n.length;d++){let p=n[d].parentNode;p!==null&&p!==e&&p.nodeType!==11&&(n=n.slice(),n[d]=n[d].cloneNode(!0))}let o=n.length,i=t.length,s=o,a=0,l=0,c=i>0?t[i-1].nextSibling??void 0:r,f=null;for(;a<i||l<s;){if(t[a]===n[l]){a++,l++;continue}for(;i>a&&s>l&&t[i-1]===n[s-1];)i--,s--;if(i===a){let d=s<o?l?n[l-1].nextSibling??void 0:n[s-l]:c;for(;l<s;)T(e,n[l++],d)}else if(s===l)for(;a<i;)(!f||!f.has(t[a]))&&t[a].parentNode===e&&e.removeChild(t[a]),a++;else if(t[a]===n[s-1]&&n[l]===t[i-1]){let d=t[--i].nextSibling;T(e,n[l++],t[a++].nextSibling),T(e,n[--s],d),t[i]=t[a-1]}else{if(!f){f=new Map;let p=l;for(;p<s;)f.set(n[p],p++)}let d=f.get(t[a]);if(d!=null)if(l<d&&d<s){let p=a,y=1;for(;++p<i&&p<s&&!(!f.has(t[p])||f.get(t[p])!==d+y);)y++;if(y>d-l){let we=t[a];for(;l<d;)T(e,n[l++],we)}else t[a].parentNode===e?e.replaceChild(n[l++],t[a++]):(T(e,n[l++],c),a++)}else a++;else t[a].parentNode===e&&e.removeChild(t[a]),a++}}return n}function P(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 T(e,t,n){u.active&&t.parentNode===e||(n&&n.parentNode===e?e.insertBefore(t,n):e.appendChild(t))}function q(e,t,n){n==null?delete e[t]:e[t]=n}function gt(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 ht(e,t){let n=(r,o)=>{typeof r=="function"&&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 G(e,t,n,r=!1){return typeof n!="function"?(h(e,t,n,r),()=>{}):m(()=>{let o=typeof n=="function"?n():n;h(e,t,o,r)})}function X(e,t,n){return typeof n!="function"?(q(e,t,n),()=>{}):m(()=>{let r=typeof n=="function"?n():n;q(e,t,r)})}function xt(e,t,n){return typeof n!="function"?(h(e,t,!!n),()=>{}):m(()=>{let r=n();h(e,t,!!r)})}function j(e,t){if(t==null){e.removeAttribute("class");return}if(typeof t=="function"){m(()=>j(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 se(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(m(()=>{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 ae(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 Tt(e){let{element:t,props:n,prevProps:r=xn,isSVG:o=!1,skipChildren:i=!1}=e;if(!t||!Oe(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===U,a=[];for(let l in n){if(i&&l==="children")continue;let c=n[l],f=r[l];if(c===f)continue;if(l==="ref"){F(c,t);continue}if(l==="use"){ht(t,c);continue}if(l.startsWith("on:")){a.push(gt(t,l.slice(3),c));continue}if(l.startsWith("prop:")){a.push(X(t,l.slice(5),c));continue}if(l.startsWith("attr:")){a.push(G(t,l.slice(5),c,s));continue}if(l.startsWith("bool:")){a.push(xt(t,l.slice(5),c));continue}if(l==="class"||l==="className"){typeof c=="function"?a.push(m(()=>j(t,c()))):j(t,c);continue}if(l==="classList"){typeof c=="function"?a.push(m(()=>se(t,c()))):se(t,c,a);continue}if(l==="style"){typeof c=="function"?a.push(m(()=>ae(t,c()))):ae(t,c);continue}if(l.startsWith("on")){let p=l.slice(2).toLowerCase();f&&oe(t,p),c&&_e(t,p,c);continue}let d=ve.has(l)||!s&&l in t;typeof c=="function"?a.push(d?X(t,l,c):G(t,l,c,s)):a.push(m(()=>d?q(t,l,n[l]):h(t,l,n[l],s)))}for(let l in r)if(!(l in n))if(l.startsWith("on")){let c=l.slice(2).toLowerCase();oe(t,c)}else ve.has(l)?q(t,l,null):t.removeAttribute(l);return()=>{a.forEach(l=>l())}}function fe(e,t,n=!1){for(let r in t){let o=t[r];if(r==="ref"){F(o,e);continue}if(r!=="children"){if(r==="use"){ht(e,o);continue}if(r.startsWith("on:")){gt(e,r.slice(3),o);continue}if(r.startsWith("prop:")){X(e,r.slice(5),o);continue}if(r.startsWith("attr:")){G(e,r.slice(5),o,n);continue}if(r.startsWith("bool:")){xt(e,r.slice(5),o);continue}if(r.startsWith("on")&&r.length>2){let i=r.slice(2).toLowerCase();if(typeof o=="function")if(le.has(i)){e[`$$${i}`]=o;let s=`__fx_${i}`;if(!e[s]){let a=l=>{e[`$$${i}`]?.(l)};e.addEventListener(i,a),e[s]=a}}else e[`$$${i}`]=o,re.has(i)||ce([i]);continue}if(r==="class"||r==="className"){j(e,o);continue}if(r==="classList"){typeof o=="function"?m(()=>se(e,o())):se(e,o);continue}if(r==="style"){typeof o=="function"?m(()=>ae(e,o())):ae(e,o);continue}if(r==="innerHTML"){if(typeof o=="function"){let i=z(()=>{let s=o();for(;typeof s=="function";)s=s();e.innerHTML=s});O(()=>i())}else e.innerHTML=o;continue}if(r==="value"&&(e.tagName==="INPUT"||e.tagName==="TEXTAREA")){if(typeof o=="function"){let i=z(()=>{let s=o();for(;typeof s=="function"&&s.length===0;)s=s();document.activeElement!==e&&(e.value=s??"")});O(()=>{i()})}else m(()=>{document.activeElement!==e&&(e.value=t[r]??"")});continue}if(r==="checked"&&e.tagName==="INPUT"){if(typeof o=="function"){let i=z(()=>{let s=o();for(;typeof s=="function"&&s.length===0;)s=s();document.activeElement!==e&&(e.checked=s??"")});O(()=>{i()})}else m(()=>{document.activeElement!==e&&(e.checked=t[r]??"")});continue}if(r==="value"&&e.tagName==="SELECT"){if(typeof o=="function"){let i=!0,s=z(()=>{let a=o();for(;typeof a=="function"&&a.length===0;)a=a();i?(i=!1,queueMicrotask(()=>{e.value=a??""})):e.value=a??""});O(()=>{s()})}else{let i=!0;m(()=>{let s=t[r];i?(i=!1,queueMicrotask(()=>{e.value=s??""})):e.value=s??""})}continue}if(typeof o=="function"){let i=z(()=>{let s=o();for(;typeof s=="function"&&s.length===0;)s=s();Se(e,r,s,n)});O(()=>{i()})}else m(()=>Se(e,r,t[r],n))}}}function bt(...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 qo(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:(l,c)=>a.has(c)?e[c]:void 0,has:(l,c)=>a.has(c)&&c in e,ownKeys:()=>Array.from(a).filter(l=>l in e),getOwnPropertyDescriptor:(l,c)=>a.has(c)&&c in e?r(c):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 F(e,t){if(e){if(I(e)){let n=t,r=e;if(!n)return;typeof n=="function"?n(r):typeof n=="object"&&"current"in n&&(n.current=r);return}typeof e=="function"?e(t):typeof e=="object"&&"current"in e&&(e.current=t)}}function Et(e,t,n){let r=t||document.body,o=mn(()=>e),i=[];return ft(()=>{let s=m(()=>{let a=o();Array.isArray(a)?(a.forEach(l=>r.appendChild(l)),i.push(()=>{a.forEach(l=>{l.parentNode===r&&r.removeChild(l)})})):I(a)&&(r.appendChild(a),i.push(()=>{a.parentNode===r&&r.removeChild(a)}))});i.push(s),O(()=>{i.forEach(a=>a())})}),null}function jo(e){return typeof e=="string"&&e.toLowerCase()===e}function wt(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 Fo(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}function ne(e){return e!=null&&(typeof e=="object"||typeof e=="function")&&typeof e.then=="function"||e instanceof Promise}function Ho(e){return typeof e=="function"&&e.length===0&&b(e)}function de(e,t,n){if(!t)throw new Error("Container element is required");let r,o,i=[];return yn(s=>{ft(()=>{u.active||(t.textContent=""),Re(t),Me(),E(t,e)}),o=s}),()=>{o?.(),r?.(),i.forEach(s=>s()),t.textContent=""}}function Nt(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 Sn="__fx_dom_create_component__",L=globalThis[Sn]??={fn:null};function Wo(e){L.fn=e}function Uo(e={}){let t=e.signalSystem?.createComponent;t&&(L.fn=t)}function pe(e,t){return L.fn?L.fn(e,t):(()=>e(t))}var Bo=()=>L.fn!==null,St=()=>L.fn!==null;function vt(){L.fn=null}var ye,Ct={getStore:()=>ye,run(e,t){let n=ye;ye=e;try{return t()}finally{ye=n}}},qe=Ct;function Rt(e){qe=e??Ct}function J(e={}){e.locals||(e.locals=e.request?Fe(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 l=r;r=s;try{return a()}finally{r=l}},pending:new Set,data:new Map}}function Y(e,t){return qe.run(e,t)}function C(){return qe.getStore()}function je(){return C()?.event}function Mt(){let e=je();return e?(e.locals||(e.locals={}),e.locals):{}}var At=new WeakMap;function Fe(e){let t=At.get(e);return t||(t={},At.set(e,t)),t}import{setResourceIdSource as vn,setServerDataGetter as An}from"@fluixi/reactive/signal";var Z="__FX_DATA__";function me(e){return e.replace(/[<>&\u2028\u2029]/g,t=>"\\u"+t.charCodeAt(0).toString(16).padStart(4,"0"))}var He;function ge(){let e=globalThis.__FX_DATA__;if(e)return e;if(He!==void 0)return He;let t=null;if(typeof document<"u"){let n=document.getElementById(Z)?.textContent;if(n)try{t=JSON.parse(n)}catch{t=null}}return He=t}function he(){for(;;){for(;u.cursor&&u.cursor.nodeType===3&&u.cursor.data==="";)u.cursor=u.cursor.nextSibling;if(u.cursor!=null||!u.parents.length)return;u.cursor=u.parents.pop().nextSibling}}var Cn=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),xe=typeof process<"u"&&process.env&&!1;function Te(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 Rn(e){he();let t=u.cursor;return t&&t.nodeType===1&&t.tagName.toLowerCase()===e.toLowerCase()?(Cn.has(e.toLowerCase())?u.cursor=t.nextSibling:(u.parents.push(t),u.cursor=t.firstChild),t):(xe&&t&&Te(`<${e}>`,t),null)}function Mn(e){he();let t=u.cursor;return t&&t.nodeType===1&&t.tagName.toLowerCase()===e.toLowerCase()?(u.cursor=t.nextSibling,t):(xe&&t&&Te(`<${e}> (static)`,t),null)}function Pn(e){if(e===""){let n=u.cursor;return n&&n.nodeType===3&&n.data!==""?(u.cursor=n.nextSibling,n.data="",n):null}he();let t=u.cursor;return t&&t.nodeType===3?(u.cursor=t.nextSibling,t.nodeValue!==e&&(t.nodeValue=e),t):(xe&&t&&Te(`text ${JSON.stringify(e.slice(0,24))}`,t),null)}function On(e){he();let t=u.cursor;return t&&t.nodeType===8&&t.data===e?(u.cursor=t.nextSibling,t):(xe&&t&&Te(`marker <!--${e.slice(0,24)}-->`,t),null)}var Pt=!1;function Ln(){Pt||(Pt=!0,ct({hydrateElement:Rn,hydrateText:Pn,hydrateMarker:On,hydrateStatic:Mn}))}function Q(e,t,n){Ln(),u.active=!0,u.cursor=t.firstChild,u.parents=[];let r=ge(),o=n?.resourceNamespace,i=0;vn(()=>o?`${o}:r${i++}`:`r${i++}`),An(r?s=>s in r?{value:r[s]}:void 0:null);try{return de(e,t)}finally{u.active=!1,u.cursor=null,u.parents=[]}}var Ve="fluixi-island";function kn(e){let{component:t,props:n={},name:r}=e,o=ue(Ve),i=r??t.name??"Island";h(o,"name",i),h(o,"props",JSON.stringify(n??{}));let s=g?C():void 0;if(s){let a=s.nextIslandNamespace(i);E(o,()=>s.withResourceScope(a,()=>t(n)))}else E(o,()=>t(n));return o}var Ot=!1;function Dn(){if(Ot||typeof document>"u")return;Ot=!0;let e=document.createElement("style");e.textContent=`${Ve}{display:contents}`,document.head.appendChild(e)}function _n(e){if(typeof document>"u")return;Dn();let t=document.querySelectorAll(Ve),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{}Q(()=>s(a),r,{resourceNamespace:`${o}#${i}`})})}function $n(e,...t){throw new Error("html`` was not compiled — enable the lit format: fluixi({ format: 'lit' }).")}function In(e,...t){throw new Error("svg`` was not compiled — enable the lit format: fluixi({ format: 'lit' }).")}import{readChildren as qn}from"@fluixi/reactive/signal";function bi(e,t={}){if(typeof e=="function")return pe(e,t);if(typeof e!="string"||e.length===0)return null;let n=wt(e);if(g)return $().createElement(e,n);let r=n?document.createElementNS(U,e):document.createElement(e);return fe(r,t,n),jn(r,t),r}function jn(e,t){if(!t||t.children===void 0)return;let n=qn(()=>t.children),r=o=>{E(e,o,typeof o=="function"?null:void 0)};Array.isArray(n)?n.forEach(r):r(n)}import{createChildOwner as Fn,createMemo as We,disposeScope as Hn,getOwner as Vn,runWithOwner as Wn,untrack as _t}from"@fluixi/reactive/signal";function Lt(e){return typeof e=="function"?e:(()=>e)}function M(e){return()=>{let t=e();return typeof t=="function"?t():t}}function kt(e){return e!=null&&e!==!1}function Dt(e){return!e||typeof e!="object"?!1:!!(typeof e._$litType$<"u"||typeof e._$litDirective$<"u"||Array.isArray(e.strings)&&Array.isArray(e.values))}function Un(e){let t=M(()=>e.when),n=We(t,void 0),r=We(n,void 0),o=Vn(),i=null,s=null,a=l=>{l!==s&&(i&&Hn(i),i=Fn(o),s=l)};return We(()=>{let l=r();return a(l?"when":"fallback"),Wn(i,()=>{if(l){let c=e.children;return typeof c=="function"&&!Dt(c)?typeof n=="function"?_t(()=>_t(n)?c(n()):e.fallback):c(n):c}return e.fallback});return e.fallback??null},void 0,{name:"show"})}import{mapArray as Bn,keyArray as Kn}from"@fluixi/reactive/signal";function zn(e){let t=M(()=>e.each),n=()=>e.fallback??null,r=(o,i)=>{let s=e.children,a=Array.isArray(s)?s.map(l=>typeof l=="function"?l(o,i):l):typeof s=="function"?s(o,i):s;return K(a),a};return e.by?Kn(t,e.by,(o,i)=>r(o,i),{fallback:n}):Bn(t,(o,i)=>r(o,i),{fallback:n})}import{indexArray as Gn}from"@fluixi/reactive/signal";function Xn(e){let t=M(()=>e.each);return Gn(t,(n,r)=>{let o=e.children(n,r);return K(o),o},{fallback:()=>e.fallback??null})}import{mapArray as gs,keyArray as hs,indexArray as xs}from"@fluixi/reactive/signal";import{createMemo as Jn,createChildOwner as Yn,disposeScope as Zn,getOwner as Qn,runWithOwner as $t}from"@fluixi/reactive/signal";var Ue=Symbol("match");function er(e){return{[Ue]:!0,when:M(()=>e.when),get children(){return e.children}}}function tr(e){let t=Array.isArray(e.children)?e.children:[e.children],n=Qn(),r=null,o=-1,i=s=>{s!==o&&(r&&Zn(r),r=Yn(n),o=s)};return Jn(()=>{for(let s=0;s<t.length;s+=1){let l=t[s],c=0;for(;typeof l=="function"&&!l[Ue]&&c++<10;)l=l();if(!l||typeof l!="object"||l[Ue]!==!0)continue;let f=l.when();if(kt(f))return i(s),$t(r,()=>typeof l.children=="function"?l.children(f):l.children)}return i(-2),$t(r,()=>e.fallback??null)})}import{createMemo as nr,createChildOwner as rr,disposeScope as or,getOwner as ir,runWithOwner as sr}from"@fluixi/reactive/signal";function ar(e){let t=Lt(e.component),{component:n,...r}=e,o=ir(),i=null,s;return nr(()=>{let a=t();return a!==s&&(i&&or(i),i=rr(o),s=a),a==null?null:typeof a=="string"?{tag:a,props:r}:sr(i,()=>a(r))})}import{createRoot as lr,onCleanup as cr}from"@fluixi/reactive/signal";function ur(e){let t=()=>e.mount?typeof e.mount=="function"?e.mount():e.mount:document.body,n,r;return lr(o=>{n=o,r=document.createElement("div"),r.style.display="contents",t().appendChild(r),E(r,e.children)&&F(e.ref,r)}),cr(()=>{n(),r.remove()}),null}import{createMemo as fr,createSignal as dr}from"@fluixi/reactive/signal";function It(e){if(g)return e.fallback??null;let t=u.active,[n,r]=dr(!t);return t&&queueMicrotask(()=>r(!0)),fr(()=>n()?e.children:e.fallback??null,void 0,{name:"client-only"})}var pr=It;import{createMemo as yr,createSignal as mr}from"@fluixi/reactive/signal";function gr(e){let[t,n]=mr(null),r=()=>n(null);return yr(()=>{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}})}import{createMemo as hr}from"@fluixi/reactive/signal";function xr(e){return hr(()=>{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(" ")})}import{createMemo as Tr}from"@fluixi/reactive/signal";function br(e){return e.startsWith("--")?e:e.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`)}function Er(e){return Tr(()=>{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(`${br(r)}: ${i}`)}return n.join("; ")})}var Ee=1,ze=3,Ge=8,qt;qt=B;var H=class{constructor(){this[qt]=!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(){}},k=class e extends H{constructor(n){super();this.nodeType=ze;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)}},be=class e extends H{constructor(n){super();this.nodeType=Ee;this.rawOuterHTML=n}get textContent(){return this.rawOuterHTML.replace(/<[^>]*>/g,"")}cloneNode(){return new e(this.rawOuterHTML)}},V=class e extends H{constructor(n){super();this.nodeType=Ge;this.data=n}get nodeValue(){return this.data}set nodeValue(n){this.data=n==null?"":String(n)}cloneNode(){return new e(this.data)}},Be=class{constructor(){this.cssText=""}setProperty(t,n){this[t]=n}removeProperty(t){delete this[t]}},Ke=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}},D=class e extends H{constructor(n,r=!1){super();this.nodeType=Ee;this.attributes=new Map;this.style=new Be;this.classList=new Ke(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 k(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 wr=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),Ft=/&/g,Ht=/</g,Vt=/>/g,Nr=/"/g;function Xe(e){return e.replace(Ft,"&amp;").replace(Ht,"&lt;").replace(Vt,"&gt;")}function jt(e){return e.replace(Ft,"&amp;").replace(Nr,"&quot;").replace(Ht,"&lt;").replace(Vt,"&gt;")}function Sr(e){return e.startsWith("--")?e:e.replace(/[A-Z]/g,t=>"-"+t.toLowerCase())}function vr(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(`${Sr(n)}: ${r}`)}return t.join("; ")}function Ar(e){let t="",n=vr(e.style);for(let[r,o]of e.attributes)r==="style"&&n||(t+=` ${r}="${jt(o)}"`);if(n){let r=e.attributes.get("style"),o=r?`${r.replace(/;\s*$/,"")}; ${n}`:n;t+=` style="${jt(o)}"`}return t}function S(e){if(e==null||e===!1||e===!0)return"";if(typeof e=="string")return Xe(e);if(typeof e=="number")return Xe(String(e));if(typeof e=="function")return S(e());if(Array.isArray(e))return e.map(S).join("");if(typeof e.rawOuterHTML=="string")return e.rawOuterHTML;switch(e.nodeType){case ze:return Xe(e.data??"");case Ge:return`<!--${e.data??""}-->`;case Ee:{let t=e.localName,n=`<${t}${Ar(e)}>`;if(wr.has(t))return n;let r=e.rawHTML!=null?e.rawHTML:(e.childNodes??[]).map(S).join("");return`${n}${r}</${t}>`}}return Array.isArray(e.childNodes)?e.childNodes.map(S).join(""):""}import{createRoot as Gt}from"@fluixi/reactive/signal";import{setResourceTracker as Mr,setResourceIdSource as Pr,setResourceDataSink as Or,getOwner as Lr,runWithOwner as Bt,flush as kr}from"@fluixi/reactive/signal";var Cr=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),Rr={amp:"&",lt:"<",gt:">",quot:'"',"#39":"'"};function Wt(e){return e.replace(/&(#?\w+);/g,(t,n)=>Rr[n]??t)}var w=class extends Error{};function Ut(e,t=!1){let n=0,r=[],o=[],i=c=>{let f=o[o.length-1];f?f.appendChild(c):r.push(c)};for(;n<e.length;){let c=e.indexOf("<",n);if(c===-1){a(e.slice(n));break}if(c>n&&a(e.slice(n,c)),e.startsWith("<!--",c)){let f=e.indexOf("-->",c);if(f===-1)throw new w(`unterminated comment at ${c}`);i(new V(e.slice(c+4,f))),n=f+3;continue}if(e[c+1]==="/"){let f=e.indexOf(">",c);if(f===-1)throw new w(`unterminated closing tag at ${c}`);let d=e.slice(c+2,f).trim().toLowerCase(),p=o.pop();if(!p||p.localName!==d)throw new w(`</${d}> does not close <${p?.localName??"nothing"}>`);n=f+1;continue}n=l(c)}if(o.length>0)throw new w(`unclosed <${o[o.length-1].localName}>`);let s=r[0];if(r.length!==1||!(s instanceof D))throw new w(`expected exactly one root element, got ${r.length}`);return s;function a(c){c!==""&&i(new k(Wt(c)))}function l(c){let f=/[\s/>]/.exec(e.slice(c+1));if(!f)throw new w(`unterminated tag at ${c}`);let d=e.slice(c+1,c+1+f.index).toLowerCase(),p=new D(d,t),y=c+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 we=y;for(;y<e.length&&!/[\s=/>]/.test(e[y]);)y++;let W=e.slice(we,y);if(W==="")throw new w(`malformed attribute at ${y}`);if(e[y]==="="){if(e[y+1]!=='"')throw new w(`attribute ${W} must have a double-quoted value`);let Ne=e.indexOf('"',y+2);if(Ne===-1)throw new w(`unterminated value for ${W}`);p.setAttribute(W,Wt(e.slice(y+2,Ne))),y=Ne+1}else p.setAttribute(W,"")}return i(p),Cr.has(d)||o.push(p),y}}var Kt=!1;function Xt(){Kt||(Kt=!0,at({createElement:(e,t)=>new D(e,t),createText:e=>new k(e),createRaw:e=>new be(e),parseTemplate:(e,t)=>Ut(e,t),createComment:e=>new V(e)}))}function Jt(e,t={}){let n=g;Xt(),_(!0);let r=J(t.event);try{return Y(r,()=>Gt(o=>{try{let i=typeof e=="function"?e():e;return S(i)}finally{o()}}))}finally{_(n)}}var zt=!1;function Dr(){zt||(zt=!0,Mr(e=>{C()?.pending.add(e)}),Pr(()=>C()?.nextResourceId()??""),Or((e,t)=>{e&&C()?.data.set(e,t)}))}var Je=null;function Yt(e){Je=e}function Ye(e){if(e.data.size===0)return"";let t={};for(let[r,o]of e.data){let i=o;if(Je)try{i=Je(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=me(JSON.stringify(t));return n==="{}"?"":`<script type="application/json" id="${Z}">${n}<\/script>`}var _r=50;async function Zt(e,t={}){let n=g;Xt(),_(!0),Dr();let r=J(t.event);try{return await Y(r,async()=>{t.preload&&await t.preload(t.event);let o,i=null,s=()=>{};Gt(f=>{s=f,i=Lr(),o=typeof e=="function"?e():e});let a=()=>{try{Bt(i,()=>S(o))}catch{}};a();let l=0;for(;r.pending.size>0&&l++<_r;){let f=Array.from(r.pending);r.pending.clear(),await Promise.allSettled(f),await kr(),a()}let c=Bt(i,()=>S(o))+Ye(r);return s(),c})}finally{_(n)}}var $r={createComponent:pe,createElement:ot,createNativeElement:ue,createTemplate:$e,cloneTemplate:Ie,templateNode:dt,holeContent:mt,holeEnd:yt,holeScope:pt,createPortal:Et,render:de,hydrate:Q,insert:E,appendChildren:st,removeChildren:it,spread:Tt,applyProps:fe,mergeProps:bt,bindPair:Nt,setProperty:q,setDynamicProperty:X,setAttribute:h,setDynamicAttribute:G,removeAttribute:rt,getAttribute:nt,setClassName:j,addClass:Qe,removeClass:et,toggleClass:tt,setStyles:Ae,delegateEvents:ce,addDelegatedEventListener:_e,removeDelegatedEventListener:oe,handleRef:F,resetIntegration:vt,isIntegrationInitialized:St},ra=$r;export{It as ClientOnly,ar as Dynamic,gr as ErrorBoundary,Z as FX_DATA_ID,zn as For,Xn as Index,kn as Island,ve as JSX_PROPERTIES,er as Match,pr as NoSsr,ur as Portal,Vr as SVG_ELEMENTS,U as SVG_NAMESPACE,Un as Show,tr as Switch,Ce as VERSION,Hr as VOID_ELEMENTS,Qe as addClass,_e as addDelegatedEventListener,gt as addNativeEventListener,st as appendChildren,Se as applyElementProp,fe as applyProps,ht as applyUse,xo as asComponent,ho as asContext,mo as asOutlet,go as asProvider,yo as asRoute,fo as asRouter,po as asRoutes,To as asSuspense,Nt as bindPair,dn as captureHydrationCursor,bo as checkRenderType,xr as classMap,P as cleanChildren,Ie as cloneTemplate,Ur as closest,pe as createComponent,bi as createDynamicElement,ot as createElement,ue as createNativeElement,Et as createPortal,J as createRequestContext,$e as createTemplate,ra as default,Jr as delegate,ce as delegateEvents,me as escapeFxJson,Fo as escapeHTML,$o as fnName,ko as generateID,nt as getAttribute,io as getGlobal,jr as getLitEventName,Mt as getLocals,Xr as getOffset,C as getRequestContext,je as getRequestEvent,Fe as getRequestLocals,ge as getServerData,Lo as getStableElementId,Kr as getStyle,F as handleRef,Br as hasClass,mt as holeContent,yt as holeEnd,pt as holeScope,$n as html,Q as hydrate,K as hydrateAdvancePast,_n as hydrateIslands,xs as indexArray,Uo as initializeIntegration,E as insert,ie as insertExpression,Bo as intergartionInitialized,Ho as isAccessor,N as isComponent,un as isContext,Qt as isCustomElement,ro as isDOMNode,Do as isDelegatedEvent,Oe as isDomElement,I as isDomNode,Le as isDomText,qr as isEventHandler,_o as isFunction,St as isIntegrationInitialized,no as isJSXTemplate,tn as isLitTemplateResult,jo as isNativeElement,ln as isOutlet,ne as isPromise,cn as isProvider,eo as isReactElement,an as isRoute,on as isRouter,sn as isRoutes,wt as isSVGElement,g as isServer,fn as isSuspense,to as isTemplateFactory,zr as isVisible,Io as iterateFn,hs as keyArray,bn as makeArrayFlat,gs as mapArray,bt as mergeProps,Zr as observeIntersection,Qr as observeResize,Ze as query,Wr as queryAll,rn as registerCoreVersion,Wo as registerCreateComponent,oo as registerGlobal,rt as removeAttribute,it as removeChildren,et as removeClass,oe as removeDelegatedEventListener,de as render,Jt as renderToString,Zt as renderToStringAsync,vt as resetIntegration,te as runHydrationAt,Y as runWithRequestContext,pn as runWithoutHydration,Gr as scrollIntoView,S as serializeNode,Ye as serializeResourceData,h as setAttribute,se as setClassList,j as setClassName,Yt as setDataRedactor,G as setDynamicAttribute,xt as setDynamicBoolAttribute,X as setDynamicProperty,q as setProperty,Rt as setRequestStore,_ as setServerMode,ae as setStyle,Ae as setStyles,Fr as shouldSetAsProperty,qo as splitProps,Tt as spread,Re as stampVersions,Er as styleMap,In as svg,dt as templateNode,Ir as toAttributeName,tt as toggleClass,x as versions,Yr as waitForElement,Me as warnOnVersionSkew};
@@ -1 +1 @@
1
- "use strict";var _=Object.defineProperty;var Q=Object.getOwnPropertyDescriptor;var Z=Object.getOwnPropertyNames;var ee=Object.prototype.hasOwnProperty;var ne=(n,e)=>{for(var t in e)_(n,t,{get:e[t],enumerable:!0})},te=(n,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let c of Z(e))!ee.call(n,c)&&c!==t&&_(n,c,{get:()=>e[c],enumerable:!(i=Q(e,c))||i.enumerable});return n};var oe=n=>te(_({},"__esModule",{value:!0}),n);var he={};ne(he,{hydrate:()=>pe});module.exports=oe(he);var x=require("@fluixi/reactive/signal");var $="1.0.0-alpha.78";var D=require("@fluixi/reactive/version"),h={dom:$,reactive:D.VERSION};function O(n){h.core&&n.setAttribute("fluixi",h.core),n.setAttribute("fx-dom",h.dom),n.setAttribute("fx-reactive",h.reactive),typeof globalThis<"u"&&(globalThis.Fluixi=h)}function F(){let n=[h.core,h.dom,h.reactive].filter(e=>e!==void 0);new Set(n).size<=1||console.warn(`[fluixi] package versions disagree — core ${h.core??"(absent)"}, dom ${h.dom}, reactive ${h.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 E(n){return typeof n=="function"&&n[Symbol.for("fluixi-component")]===!0}var g=require("@fluixi/reactive/signal");var j=typeof document>"u";var V=Symbol.for("fluixi.server-node"),H=null;function I(){if(!H)throw new Error("[fluixi] server render ran before @fluixi/dom/server loaded");return H}function L(n){return n!=null&&n[V]===!0?!0:typeof Node<"u"&&n instanceof Node}function W(n){return n!=null&&n[V]===!0?n.nodeType===3:typeof Text<"u"&&n instanceof Text}var u={active:!1,cursor:null,parents:[]},K=null;function B(n){K=n}function X(){return K}function R(n,e){return u.active&&e.parentNode===n}function q(n){let e=u.parents.lastIndexOf(n);e!==-1&&(u.parents.length=e),u.cursor=n.nextSibling}function b(n,e=!1){if(j)return I().createText(n);if(u.active&&!e){let t=X()?.hydrateText(n);if(t)return t}return document.createTextNode(n)}var N=0,re=200;function ie(n,e,t,i,c){let f=i,s=new Map;return(0,g.createRenderEffect)(()=>{let r;if(E(n)&&!(0,x.isSignal)(n)){if(!s.has(n)){N++;try{let o=n();s.set(n,o)}finally{N--}}for(r=s.get(n);typeof r=="function"&&(0,x.isSignal)(r);)r=r()}else for(r=n();typeof r=="function"&&(0,x.isSignal)(r);)r=r();{let o=0;for(;typeof r=="function"&&o++<50;)if(E(r)){if(!s.has(r)){let a=r;N++;try{let l=a();s.set(a,l)}finally{N--}}r=s.get(r)}else if((0,x.isSignal)(r))r=r();else if(r=r(),typeof r!="function"||!(0,x.isSignal)(r)&&!E(r))break}N++;try{f=S(e,r,t,f,s),c(f)}finally{N--}})}function J(n,e,t,i){if(N>re)return console.error("[insert] Exceeded max call depth — possible infinite loop."),()=>null;t!==void 0&&!t&&(t=b("",!0),n.appendChild(t));let c=i??null,f=o=>Array.isArray(o)&&o.some(a=>typeof a=="function"),s=o=>typeof o=="function"?o:()=>o;if(typeof e!="function"&&!f(e)){N++;try{c=S(n,e,t,c)}finally{N--}return()=>c}let r=ie(s(e),n,t,c,o=>{c=o});return()=>(r?.(),c)}function S(n,e,t,i,c){if(e==null||typeof e=="boolean")return T(n,i,t);if(typeof e=="function")for(;typeof e=="function";)e=e();if(e==null||typeof e=="boolean")return T(n,i,t);if(w(e)){let s=b("",!0);return Array.isArray(i)?i.length>0?(n.replaceChild(s,i[0]),T(n,i.slice(1),t)):p(n,s,t):i?n.replaceChild(s,i):p(n,s,t),e.then(r=>{s.parentNode===n&&S(n,r,s.nextSibling,s)}).catch(r=>{console.error("Error resolving promise in insertExpression:",r)}),s}let f=typeof e;if(f==="string"||f==="number"){if(f==="number"&&(e=String(e)),Array.isArray(i)){if(i.length===0){let r=b(e);return p(n,r,t),r}if(i.length===1&&i[0].nodeType===3)return i[0].data=e,i;i=T(n,i,t)}if(i&&W(i))return i.data=e,i;let s=b(e);return i&&i.parentNode===n?n.replaceChild(s,i):R(n,s)||p(n,s,t),s}if(L(e))return R(n,e)?(q(e),e):Array.isArray(i)?(i.length===0?p(n,e,t):i[0].parentNode===n?(n.replaceChild(e,i[0]),T(n,i.slice(1),t)):p(n,e,t),e):(i?i!==e&&(i.parentNode===n?n.replaceChild(e,i):p(n,e,t)):p(n,e,t),e);if(Array.isArray(e)){let s=[],r=Array.isArray(i)?i:i?[i]:[],o=[];m(e,s,n,t,!0,c,o);let a=se(n,r,s,t);for(let l of o){let d=J(n,l.sig,l.marker);(0,g.onCleanup)(()=>{T(n,d()),l.marker.parentNode===n&&n.removeChild(l.marker)})}return a}if(f==="object"&&e!==null&&typeof e=="object"){let s=e;if("type"in s&&"props"in s){let r=s;if(typeof r.type=="function"){let o=r.type(r.props||{});return S(n,o,t,i)}}}return T(n,i,t)}function m(n,e,t,i,c=!0,f,s){for(let r=0;r<n.length;r++){let o=n[r];if(!(o==null||typeof o=="boolean")){for(;typeof o=="function"&&!w(o)&&!(0,x.isSignal)(o)&&!E(o)&&(o=o(),!(o==null||typeof o=="boolean")););if(!(o==null||typeof o=="boolean")){if(typeof o=="function"){let a;for(E(o)&&!(0,x.isSignal)(o)?(f||(f=new Map),f.has(o)||f.set(o,o()),a=f.get(o)):a=o();typeof a=="function"&&!w(a)&&!(0,x.isSignal)(a)&&!E(a);)f||(f=new Map),f.has(a)||f.set(a,a()),a=f.get(a);if(a==null||typeof a=="boolean")continue;if(typeof a=="function"){if((0,x.isSignal)(a)){if(s){let d=b("",!0);e.push(d),s.push({marker:d,sig:a});continue}let l=a();for(;typeof l=="function"&&(0,x.isSignal)(l);)l=l();if(l==null||typeof l=="boolean")continue;Array.isArray(l)?m(l,e,t,i,c,f):m([l],e,t,i,c,f);continue}continue}Array.isArray(a)?m(a,e,t,i,c,f,s):m([a],e,t,i,c,f,s);continue}if(w(o)){let a=b("",!0);e.push(a),o.then(l=>{if(a.parentNode){let d=[];if(m([l],d,a.parentNode,void 0,!1,f),d.length>0){a.parentNode.replaceChild(d[0],a);for(let y=1;y<d.length;y++)a.parentNode?.insertBefore(d[y],d[y-1].nextSibling)}}}).catch(l=>console.error("Error resolving promise in array:",l));continue}if(Array.isArray(o)){m(o,e,t,i,c,f,s);continue}if(L(o)){e.push(o);continue}if(typeof o=="object"&&o!==null&&"type"in o&&"props"in o){let a=o;if(typeof a.type=="function"){let l=a.type(a.props||{});Array.isArray(l)?m(l,e,t,i,!1,f):m([l],e,t,i,!1,f);continue}}if(typeof o=="string"||typeof o=="number"){let a=String(o);if(a.trim()===""&&a!==" ")continue;e.push(b(a));continue}e.push(b(String(o)))}}}}function se(n,e,t,i){for(let d=0;d<t.length;d++){let y=t[d].parentNode;y!==null&&y!==n&&y.nodeType!==11&&(t=t.slice(),t[d]=t[d].cloneNode(!0))}let c=t.length,f=e.length,s=c,r=0,o=0,a=f>0?e[f-1].nextSibling??void 0:i,l=null;for(;r<f||o<s;){if(e[r]===t[o]){r++,o++;continue}for(;f>r&&s>o&&e[f-1]===t[s-1];)f--,s--;if(f===r){let d=s<c?o?t[o-1].nextSibling??void 0:t[s-o]:a;for(;o<s;)p(n,t[o++],d)}else if(s===o)for(;r<f;)(!l||!l.has(e[r]))&&e[r].parentNode===n&&n.removeChild(e[r]),r++;else if(e[r]===t[s-1]&&t[o]===e[f-1]){let d=e[--f].nextSibling;p(n,t[o++],e[r++].nextSibling),p(n,t[--s],d),e[f]=e[r-1]}else{if(!l){l=new Map;let y=o;for(;y<s;)l.set(t[y],y++)}let d=l.get(e[r]);if(d!=null)if(o<d&&d<s){let y=r,k=1;for(;++y<f&&y<s&&!(!l.has(e[y])||l.get(e[y])!==d+k);)k++;if(k>d-o){let Y=e[r];for(;o<d;)p(n,t[o++],Y)}else e[r].parentNode===n?n.replaceChild(t[o++],e[r++]):(p(n,t[o++],a),r++)}else r++;else e[r].parentNode===n&&n.removeChild(e[r]),r++}}return t}function T(n,e,t){if(e)if(Array.isArray(e))for(let i=0;i<e.length;i++)e[i].parentNode===n&&n.removeChild(e[i]);else e.parentNode===n&&n.removeChild(e);return null}function p(n,e,t){u.active&&e.parentNode===n||(t&&t.parentNode===n?n.insertBefore(e,t):n.appendChild(e))}function w(n){return n!=null&&(typeof n=="object"||typeof n=="function")&&typeof n.then=="function"||n instanceof Promise}function U(n,e,t){if(!e)throw new Error("Container element is required");let i,c,f=[];return(0,g.createRoot)(s=>{(0,g.batch)(()=>{u.active||(e.textContent=""),O(e),F(),J(e,n)}),c=s}),()=>{c?.(),i?.(),f.forEach(s=>s()),e.textContent=""}}var A=require("@fluixi/reactive/signal");var fe="__FX_DATA__";var M;function z(){let n=globalThis.__FX_DATA__;if(n)return n;if(M!==void 0)return M;let e=null;if(typeof document<"u"){let t=document.getElementById(fe)?.textContent;if(t)try{e=JSON.parse(t)}catch{e=null}}return M=e}function v(){for(;;){for(;u.cursor&&u.cursor.nodeType===3&&u.cursor.data==="";)u.cursor=u.cursor.nextSibling;if(u.cursor!=null||!u.parents.length)return;u.cursor=u.parents.pop().nextSibling}}var ae=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),C=typeof process<"u"&&process.env&&!1;function P(n,e){let t=e.nodeType===1?`<${e.tagName.toLowerCase()}>`:e.nodeType===3?`text ${JSON.stringify((e.nodeValue??"").slice(0,24))}`:e.nodeType===8?"comment":"node";console.warn(`[fluixi] hydration mismatch: expected ${n} but the server DOM has ${t}. 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 ue(n){v();let e=u.cursor;return e&&e.nodeType===1&&e.tagName.toLowerCase()===n.toLowerCase()?(ae.has(n.toLowerCase())?u.cursor=e.nextSibling:(u.parents.push(e),u.cursor=e.firstChild),e):(C&&e&&P(`<${n}>`,e),null)}function le(n){v();let e=u.cursor;return e&&e.nodeType===1&&e.tagName.toLowerCase()===n.toLowerCase()?(u.cursor=e.nextSibling,e):(C&&e&&P(`<${n}> (static)`,e),null)}function ce(n){if(n===""){let t=u.cursor;return t&&t.nodeType===3&&t.data!==""?(u.cursor=t.nextSibling,t.data="",t):null}v();let e=u.cursor;return e&&e.nodeType===3?(u.cursor=e.nextSibling,e.nodeValue!==n&&(e.nodeValue=n),e):(C&&e&&P(`text ${JSON.stringify(n.slice(0,24))}`,e),null)}function de(n){v();let e=u.cursor;return e&&e.nodeType===8&&e.data===n?(u.cursor=e.nextSibling,e):(C&&e&&P(`marker <!--${n.slice(0,24)}-->`,e),null)}var G=!1;function ye(){G||(G=!0,B({hydrateElement:ue,hydrateText:ce,hydrateMarker:de,hydrateStatic:le}))}function pe(n,e,t){ye(),u.active=!0,u.cursor=e.firstChild,u.parents=[];let i=z(),c=t?.resourceNamespace,f=0;(0,A.setResourceIdSource)(()=>c?`${c}:r${f++}`:`r${f++}`),(0,A.setServerDataGetter)(i?s=>s in i?{value:i[s]}:void 0:null);try{return U(n,e)}finally{u.active=!1,u.cursor=null,u.parents=[]}}
1
+ "use strict";var _=Object.defineProperty;var Q=Object.getOwnPropertyDescriptor;var Z=Object.getOwnPropertyNames;var ee=Object.prototype.hasOwnProperty;var ne=(n,e)=>{for(var t in e)_(n,t,{get:e[t],enumerable:!0})},te=(n,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let c of Z(e))!ee.call(n,c)&&c!==t&&_(n,c,{get:()=>e[c],enumerable:!(i=Q(e,c))||i.enumerable});return n};var oe=n=>te(_({},"__esModule",{value:!0}),n);var he={};ne(he,{hydrate:()=>pe});module.exports=oe(he);var x=require("@fluixi/reactive/signal");var $="1.0.0-alpha.79";var D=require("@fluixi/reactive/version"),h={dom:$,reactive:D.VERSION};function O(n){h.core&&n.setAttribute("fluixi",h.core),n.setAttribute("fx-dom",h.dom),n.setAttribute("fx-reactive",h.reactive),typeof globalThis<"u"&&(globalThis.Fluixi=h)}function F(){let n=[h.core,h.dom,h.reactive].filter(e=>e!==void 0);new Set(n).size<=1||console.warn(`[fluixi] package versions disagree — core ${h.core??"(absent)"}, dom ${h.dom}, reactive ${h.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 E(n){return typeof n=="function"&&n[Symbol.for("fluixi-component")]===!0}var g=require("@fluixi/reactive/signal");var j=typeof document>"u";var V=Symbol.for("fluixi.server-node"),H=null;function I(){if(!H)throw new Error("[fluixi] server render ran before @fluixi/dom/server loaded");return H}function L(n){return n!=null&&n[V]===!0?!0:typeof Node<"u"&&n instanceof Node}function W(n){return n!=null&&n[V]===!0?n.nodeType===3:typeof Text<"u"&&n instanceof Text}var u={active:!1,cursor:null,parents:[]},K=null;function B(n){K=n}function X(){return K}function R(n,e){return u.active&&e.parentNode===n}function q(n){let e=u.parents.lastIndexOf(n);e!==-1&&(u.parents.length=e),u.cursor=n.nextSibling}function b(n,e=!1){if(j)return I().createText(n);if(u.active&&!e){let t=X()?.hydrateText(n);if(t)return t}return document.createTextNode(n)}var N=0,re=200;function ie(n,e,t,i,c){let f=i,s=new Map;return(0,g.createRenderEffect)(()=>{let r;if(E(n)&&!(0,x.isSignal)(n)){if(!s.has(n)){N++;try{let o=n();s.set(n,o)}finally{N--}}for(r=s.get(n);typeof r=="function"&&(0,x.isSignal)(r);)r=r()}else for(r=n();typeof r=="function"&&(0,x.isSignal)(r);)r=r();{let o=0;for(;typeof r=="function"&&o++<50;)if(E(r)){if(!s.has(r)){let a=r;N++;try{let l=a();s.set(a,l)}finally{N--}}r=s.get(r)}else if((0,x.isSignal)(r))r=r();else if(r=r(),typeof r!="function"||!(0,x.isSignal)(r)&&!E(r))break}N++;try{f=S(e,r,t,f,s),c(f)}finally{N--}})}function J(n,e,t,i){if(N>re)return console.error("[insert] Exceeded max call depth — possible infinite loop."),()=>null;t!==void 0&&!t&&(t=b("",!0),n.appendChild(t));let c=i??null,f=o=>Array.isArray(o)&&o.some(a=>typeof a=="function"),s=o=>typeof o=="function"?o:()=>o;if(typeof e!="function"&&!f(e)){N++;try{c=S(n,e,t,c)}finally{N--}return()=>c}let r=ie(s(e),n,t,c,o=>{c=o});return()=>(r?.(),c)}function S(n,e,t,i,c){if(e==null||typeof e=="boolean")return T(n,i,t);if(typeof e=="function")for(;typeof e=="function";)e=e();if(e==null||typeof e=="boolean")return T(n,i,t);if(w(e)){let s=b("",!0);return Array.isArray(i)?i.length>0?(n.replaceChild(s,i[0]),T(n,i.slice(1),t)):p(n,s,t):i?n.replaceChild(s,i):p(n,s,t),e.then(r=>{s.parentNode===n&&S(n,r,s.nextSibling,s)}).catch(r=>{console.error("Error resolving promise in insertExpression:",r)}),s}let f=typeof e;if(f==="string"||f==="number"){if(f==="number"&&(e=String(e)),Array.isArray(i)){if(i.length===0){let r=b(e);return p(n,r,t),r}if(i.length===1&&i[0].nodeType===3)return i[0].data=e,i;i=T(n,i,t)}if(i&&W(i))return i.data=e,i;let s=b(e);return i&&i.parentNode===n?n.replaceChild(s,i):R(n,s)||p(n,s,t),s}if(L(e))return R(n,e)?(q(e),e):Array.isArray(i)?(i.length===0?p(n,e,t):i[0].parentNode===n?(n.replaceChild(e,i[0]),T(n,i.slice(1),t)):p(n,e,t),e):(i?i!==e&&(i.parentNode===n?n.replaceChild(e,i):p(n,e,t)):p(n,e,t),e);if(Array.isArray(e)){let s=[],r=Array.isArray(i)?i:i?[i]:[],o=[];m(e,s,n,t,!0,c,o);let a=se(n,r,s,t);for(let l of o){let d=J(n,l.sig,l.marker);(0,g.onCleanup)(()=>{T(n,d()),l.marker.parentNode===n&&n.removeChild(l.marker)})}return a}if(f==="object"&&e!==null&&typeof e=="object"){let s=e;if("type"in s&&"props"in s){let r=s;if(typeof r.type=="function"){let o=r.type(r.props||{});return S(n,o,t,i)}}}return T(n,i,t)}function m(n,e,t,i,c=!0,f,s){for(let r=0;r<n.length;r++){let o=n[r];if(!(o==null||typeof o=="boolean")){for(;typeof o=="function"&&!w(o)&&!(0,x.isSignal)(o)&&!E(o)&&(o=o(),!(o==null||typeof o=="boolean")););if(!(o==null||typeof o=="boolean")){if(typeof o=="function"){let a;for(E(o)&&!(0,x.isSignal)(o)?(f||(f=new Map),f.has(o)||f.set(o,o()),a=f.get(o)):a=o();typeof a=="function"&&!w(a)&&!(0,x.isSignal)(a)&&!E(a);)f||(f=new Map),f.has(a)||f.set(a,a()),a=f.get(a);if(a==null||typeof a=="boolean")continue;if(typeof a=="function"){if((0,x.isSignal)(a)){if(s){let d=b("",!0);e.push(d),s.push({marker:d,sig:a});continue}let l=a();for(;typeof l=="function"&&(0,x.isSignal)(l);)l=l();if(l==null||typeof l=="boolean")continue;Array.isArray(l)?m(l,e,t,i,c,f):m([l],e,t,i,c,f);continue}continue}Array.isArray(a)?m(a,e,t,i,c,f,s):m([a],e,t,i,c,f,s);continue}if(w(o)){let a=b("",!0);e.push(a),o.then(l=>{if(a.parentNode){let d=[];if(m([l],d,a.parentNode,void 0,!1,f),d.length>0){a.parentNode.replaceChild(d[0],a);for(let y=1;y<d.length;y++)a.parentNode?.insertBefore(d[y],d[y-1].nextSibling)}}}).catch(l=>console.error("Error resolving promise in array:",l));continue}if(Array.isArray(o)){m(o,e,t,i,c,f,s);continue}if(L(o)){e.push(o);continue}if(typeof o=="object"&&o!==null&&"type"in o&&"props"in o){let a=o;if(typeof a.type=="function"){let l=a.type(a.props||{});Array.isArray(l)?m(l,e,t,i,!1,f):m([l],e,t,i,!1,f);continue}}if(typeof o=="string"||typeof o=="number"){let a=String(o);if(a.trim()===""&&a!==" ")continue;e.push(b(a));continue}e.push(b(String(o)))}}}}function se(n,e,t,i){for(let d=0;d<t.length;d++){let y=t[d].parentNode;y!==null&&y!==n&&y.nodeType!==11&&(t=t.slice(),t[d]=t[d].cloneNode(!0))}let c=t.length,f=e.length,s=c,r=0,o=0,a=f>0?e[f-1].nextSibling??void 0:i,l=null;for(;r<f||o<s;){if(e[r]===t[o]){r++,o++;continue}for(;f>r&&s>o&&e[f-1]===t[s-1];)f--,s--;if(f===r){let d=s<c?o?t[o-1].nextSibling??void 0:t[s-o]:a;for(;o<s;)p(n,t[o++],d)}else if(s===o)for(;r<f;)(!l||!l.has(e[r]))&&e[r].parentNode===n&&n.removeChild(e[r]),r++;else if(e[r]===t[s-1]&&t[o]===e[f-1]){let d=e[--f].nextSibling;p(n,t[o++],e[r++].nextSibling),p(n,t[--s],d),e[f]=e[r-1]}else{if(!l){l=new Map;let y=o;for(;y<s;)l.set(t[y],y++)}let d=l.get(e[r]);if(d!=null)if(o<d&&d<s){let y=r,k=1;for(;++y<f&&y<s&&!(!l.has(e[y])||l.get(e[y])!==d+k);)k++;if(k>d-o){let Y=e[r];for(;o<d;)p(n,t[o++],Y)}else e[r].parentNode===n?n.replaceChild(t[o++],e[r++]):(p(n,t[o++],a),r++)}else r++;else e[r].parentNode===n&&n.removeChild(e[r]),r++}}return t}function T(n,e,t){if(e)if(Array.isArray(e))for(let i=0;i<e.length;i++)e[i].parentNode===n&&n.removeChild(e[i]);else e.parentNode===n&&n.removeChild(e);return null}function p(n,e,t){u.active&&e.parentNode===n||(t&&t.parentNode===n?n.insertBefore(e,t):n.appendChild(e))}function w(n){return n!=null&&(typeof n=="object"||typeof n=="function")&&typeof n.then=="function"||n instanceof Promise}function U(n,e,t){if(!e)throw new Error("Container element is required");let i,c,f=[];return(0,g.createRoot)(s=>{(0,g.batch)(()=>{u.active||(e.textContent=""),O(e),F(),J(e,n)}),c=s}),()=>{c?.(),i?.(),f.forEach(s=>s()),e.textContent=""}}var A=require("@fluixi/reactive/signal");var fe="__FX_DATA__";var M;function z(){let n=globalThis.__FX_DATA__;if(n)return n;if(M!==void 0)return M;let e=null;if(typeof document<"u"){let t=document.getElementById(fe)?.textContent;if(t)try{e=JSON.parse(t)}catch{e=null}}return M=e}function v(){for(;;){for(;u.cursor&&u.cursor.nodeType===3&&u.cursor.data==="";)u.cursor=u.cursor.nextSibling;if(u.cursor!=null||!u.parents.length)return;u.cursor=u.parents.pop().nextSibling}}var ae=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),C=typeof process<"u"&&process.env&&!1;function P(n,e){let t=e.nodeType===1?`<${e.tagName.toLowerCase()}>`:e.nodeType===3?`text ${JSON.stringify((e.nodeValue??"").slice(0,24))}`:e.nodeType===8?"comment":"node";console.warn(`[fluixi] hydration mismatch: expected ${n} but the server DOM has ${t}. 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 ue(n){v();let e=u.cursor;return e&&e.nodeType===1&&e.tagName.toLowerCase()===n.toLowerCase()?(ae.has(n.toLowerCase())?u.cursor=e.nextSibling:(u.parents.push(e),u.cursor=e.firstChild),e):(C&&e&&P(`<${n}>`,e),null)}function le(n){v();let e=u.cursor;return e&&e.nodeType===1&&e.tagName.toLowerCase()===n.toLowerCase()?(u.cursor=e.nextSibling,e):(C&&e&&P(`<${n}> (static)`,e),null)}function ce(n){if(n===""){let t=u.cursor;return t&&t.nodeType===3&&t.data!==""?(u.cursor=t.nextSibling,t.data="",t):null}v();let e=u.cursor;return e&&e.nodeType===3?(u.cursor=e.nextSibling,e.nodeValue!==n&&(e.nodeValue=n),e):(C&&e&&P(`text ${JSON.stringify(n.slice(0,24))}`,e),null)}function de(n){v();let e=u.cursor;return e&&e.nodeType===8&&e.data===n?(u.cursor=e.nextSibling,e):(C&&e&&P(`marker <!--${n.slice(0,24)}-->`,e),null)}var G=!1;function ye(){G||(G=!0,B({hydrateElement:ue,hydrateText:ce,hydrateMarker:de,hydrateStatic:le}))}function pe(n,e,t){ye(),u.active=!0,u.cursor=e.firstChild,u.parents=[];let i=z(),c=t?.resourceNamespace,f=0;(0,A.setResourceIdSource)(()=>c?`${c}:r${f++}`:`r${f++}`),(0,A.setServerDataGetter)(i?s=>s in i?{value:i[s]}:void 0:null);try{return U(n,e)}finally{u.active=!1,u.cursor=null,u.parents=[]}}
@@ -1 +1 @@
1
- import{isSignal as x}from"@fluixi/reactive/signal";var L="1.0.0-alpha.78";import{VERSION as U}from"@fluixi/reactive/version";var h={dom:L,reactive:U};function R(n){h.core&&n.setAttribute("fluixi",h.core),n.setAttribute("fx-dom",h.dom),n.setAttribute("fx-reactive",h.reactive),typeof globalThis<"u"&&(globalThis.Fluixi=h)}function M(){let n=[h.core,h.dom,h.reactive].filter(e=>e!==void 0);new Set(n).size<=1||console.warn(`[fluixi] package versions disagree — core ${h.core??"(absent)"}, dom ${h.dom}, reactive ${h.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 b(n){return typeof n=="function"&&n[Symbol.for("fluixi-component")]===!0}import{batch as z,createEffect as Se,createRenderEffect as G,createRoot as Y,onCleanup as Q,readChildren as Ae}from"@fluixi/reactive/signal";var D=typeof document>"u";var O=Symbol.for("fluixi.server-node"),$=null;function F(){if(!$)throw new Error("[fluixi] server render ran before @fluixi/dom/server loaded");return $}function P(n){return n!=null&&n[O]===!0?!0:typeof Node<"u"&&n instanceof Node}function H(n){return n!=null&&n[O]===!0?n.nodeType===3:typeof Text<"u"&&n instanceof Text}var u={active:!1,cursor:null,parents:[]},j=null;function V(n){j=n}function I(){return j}function k(n,e){return u.active&&e.parentNode===n}function W(n){let e=u.parents.lastIndexOf(n);e!==-1&&(u.parents.length=e),u.cursor=n.nextSibling}function N(n,e=!1){if(D)return F().createText(n);if(u.active&&!e){let t=I()?.hydrateText(n);if(t)return t}return document.createTextNode(n)}var m=0,Z=200;function ee(n,e,t,i,d){let f=i,s=new Map;return G(()=>{let r;if(b(n)&&!x(n)){if(!s.has(n)){m++;try{let o=n();s.set(n,o)}finally{m--}}for(r=s.get(n);typeof r=="function"&&x(r);)r=r()}else for(r=n();typeof r=="function"&&x(r);)r=r();{let o=0;for(;typeof r=="function"&&o++<50;)if(b(r)){if(!s.has(r)){let a=r;m++;try{let l=a();s.set(a,l)}finally{m--}}r=s.get(r)}else if(x(r))r=r();else if(r=r(),typeof r!="function"||!x(r)&&!b(r))break}m++;try{f=w(e,r,t,f,s),d(f)}finally{m--}})}function K(n,e,t,i){if(m>Z)return console.error("[insert] Exceeded max call depth — possible infinite loop."),()=>null;t!==void 0&&!t&&(t=N("",!0),n.appendChild(t));let d=i??null,f=o=>Array.isArray(o)&&o.some(a=>typeof a=="function"),s=o=>typeof o=="function"?o:()=>o;if(typeof e!="function"&&!f(e)){m++;try{d=w(n,e,t,d)}finally{m--}return()=>d}let r=ee(s(e),n,t,d,o=>{d=o});return()=>(r?.(),d)}function w(n,e,t,i,d){if(e==null||typeof e=="boolean")return E(n,i,t);if(typeof e=="function")for(;typeof e=="function";)e=e();if(e==null||typeof e=="boolean")return E(n,i,t);if(T(e)){let s=N("",!0);return Array.isArray(i)?i.length>0?(n.replaceChild(s,i[0]),E(n,i.slice(1),t)):p(n,s,t):i?n.replaceChild(s,i):p(n,s,t),e.then(r=>{s.parentNode===n&&w(n,r,s.nextSibling,s)}).catch(r=>{console.error("Error resolving promise in insertExpression:",r)}),s}let f=typeof e;if(f==="string"||f==="number"){if(f==="number"&&(e=String(e)),Array.isArray(i)){if(i.length===0){let r=N(e);return p(n,r,t),r}if(i.length===1&&i[0].nodeType===3)return i[0].data=e,i;i=E(n,i,t)}if(i&&H(i))return i.data=e,i;let s=N(e);return i&&i.parentNode===n?n.replaceChild(s,i):k(n,s)||p(n,s,t),s}if(P(e))return k(n,e)?(W(e),e):Array.isArray(i)?(i.length===0?p(n,e,t):i[0].parentNode===n?(n.replaceChild(e,i[0]),E(n,i.slice(1),t)):p(n,e,t),e):(i?i!==e&&(i.parentNode===n?n.replaceChild(e,i):p(n,e,t)):p(n,e,t),e);if(Array.isArray(e)){let s=[],r=Array.isArray(i)?i:i?[i]:[],o=[];g(e,s,n,t,!0,d,o);let a=ne(n,r,s,t);for(let l of o){let c=K(n,l.sig,l.marker);Q(()=>{E(n,c()),l.marker.parentNode===n&&n.removeChild(l.marker)})}return a}if(f==="object"&&e!==null&&typeof e=="object"){let s=e;if("type"in s&&"props"in s){let r=s;if(typeof r.type=="function"){let o=r.type(r.props||{});return w(n,o,t,i)}}}return E(n,i,t)}function g(n,e,t,i,d=!0,f,s){for(let r=0;r<n.length;r++){let o=n[r];if(!(o==null||typeof o=="boolean")){for(;typeof o=="function"&&!T(o)&&!x(o)&&!b(o)&&(o=o(),!(o==null||typeof o=="boolean")););if(!(o==null||typeof o=="boolean")){if(typeof o=="function"){let a;for(b(o)&&!x(o)?(f||(f=new Map),f.has(o)||f.set(o,o()),a=f.get(o)):a=o();typeof a=="function"&&!T(a)&&!x(a)&&!b(a);)f||(f=new Map),f.has(a)||f.set(a,a()),a=f.get(a);if(a==null||typeof a=="boolean")continue;if(typeof a=="function"){if(x(a)){if(s){let c=N("",!0);e.push(c),s.push({marker:c,sig:a});continue}let l=a();for(;typeof l=="function"&&x(l);)l=l();if(l==null||typeof l=="boolean")continue;Array.isArray(l)?g(l,e,t,i,d,f):g([l],e,t,i,d,f);continue}continue}Array.isArray(a)?g(a,e,t,i,d,f,s):g([a],e,t,i,d,f,s);continue}if(T(o)){let a=N("",!0);e.push(a),o.then(l=>{if(a.parentNode){let c=[];if(g([l],c,a.parentNode,void 0,!1,f),c.length>0){a.parentNode.replaceChild(c[0],a);for(let y=1;y<c.length;y++)a.parentNode?.insertBefore(c[y],c[y-1].nextSibling)}}}).catch(l=>console.error("Error resolving promise in array:",l));continue}if(Array.isArray(o)){g(o,e,t,i,d,f,s);continue}if(P(o)){e.push(o);continue}if(typeof o=="object"&&o!==null&&"type"in o&&"props"in o){let a=o;if(typeof a.type=="function"){let l=a.type(a.props||{});Array.isArray(l)?g(l,e,t,i,!1,f):g([l],e,t,i,!1,f);continue}}if(typeof o=="string"||typeof o=="number"){let a=String(o);if(a.trim()===""&&a!==" ")continue;e.push(N(a));continue}e.push(N(String(o)))}}}}function ne(n,e,t,i){for(let c=0;c<t.length;c++){let y=t[c].parentNode;y!==null&&y!==n&&y.nodeType!==11&&(t=t.slice(),t[c]=t[c].cloneNode(!0))}let d=t.length,f=e.length,s=d,r=0,o=0,a=f>0?e[f-1].nextSibling??void 0:i,l=null;for(;r<f||o<s;){if(e[r]===t[o]){r++,o++;continue}for(;f>r&&s>o&&e[f-1]===t[s-1];)f--,s--;if(f===r){let c=s<d?o?t[o-1].nextSibling??void 0:t[s-o]:a;for(;o<s;)p(n,t[o++],c)}else if(s===o)for(;r<f;)(!l||!l.has(e[r]))&&e[r].parentNode===n&&n.removeChild(e[r]),r++;else if(e[r]===t[s-1]&&t[o]===e[f-1]){let c=e[--f].nextSibling;p(n,t[o++],e[r++].nextSibling),p(n,t[--s],c),e[f]=e[r-1]}else{if(!l){l=new Map;let y=o;for(;y<s;)l.set(t[y],y++)}let c=l.get(e[r]);if(c!=null)if(o<c&&c<s){let y=r,C=1;for(;++y<f&&y<s&&!(!l.has(e[y])||l.get(e[y])!==c+C);)C++;if(C>c-o){let J=e[r];for(;o<c;)p(n,t[o++],J)}else e[r].parentNode===n?n.replaceChild(t[o++],e[r++]):(p(n,t[o++],a),r++)}else r++;else e[r].parentNode===n&&n.removeChild(e[r]),r++}}return t}function E(n,e,t){if(e)if(Array.isArray(e))for(let i=0;i<e.length;i++)e[i].parentNode===n&&n.removeChild(e[i]);else e.parentNode===n&&n.removeChild(e);return null}function p(n,e,t){u.active&&e.parentNode===n||(t&&t.parentNode===n?n.insertBefore(e,t):n.appendChild(e))}function T(n){return n!=null&&(typeof n=="object"||typeof n=="function")&&typeof n.then=="function"||n instanceof Promise}function B(n,e,t){if(!e)throw new Error("Container element is required");let i,d,f=[];return Y(s=>{z(()=>{u.active||(e.textContent=""),R(e),M(),K(e,n)}),d=s}),()=>{d?.(),i?.(),f.forEach(s=>s()),e.textContent=""}}import{setResourceIdSource as oe,setServerDataGetter as re}from"@fluixi/reactive/signal";var te="__FX_DATA__";var _;function X(){let n=globalThis.__FX_DATA__;if(n)return n;if(_!==void 0)return _;let e=null;if(typeof document<"u"){let t=document.getElementById(te)?.textContent;if(t)try{e=JSON.parse(t)}catch{e=null}}return _=e}function S(){for(;;){for(;u.cursor&&u.cursor.nodeType===3&&u.cursor.data==="";)u.cursor=u.cursor.nextSibling;if(u.cursor!=null||!u.parents.length)return;u.cursor=u.parents.pop().nextSibling}}var ie=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),A=typeof process<"u"&&process.env&&!1;function v(n,e){let t=e.nodeType===1?`<${e.tagName.toLowerCase()}>`:e.nodeType===3?`text ${JSON.stringify((e.nodeValue??"").slice(0,24))}`:e.nodeType===8?"comment":"node";console.warn(`[fluixi] hydration mismatch: expected ${n} but the server DOM has ${t}. 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 se(n){S();let e=u.cursor;return e&&e.nodeType===1&&e.tagName.toLowerCase()===n.toLowerCase()?(ie.has(n.toLowerCase())?u.cursor=e.nextSibling:(u.parents.push(e),u.cursor=e.firstChild),e):(A&&e&&v(`<${n}>`,e),null)}function fe(n){S();let e=u.cursor;return e&&e.nodeType===1&&e.tagName.toLowerCase()===n.toLowerCase()?(u.cursor=e.nextSibling,e):(A&&e&&v(`<${n}> (static)`,e),null)}function ae(n){if(n===""){let t=u.cursor;return t&&t.nodeType===3&&t.data!==""?(u.cursor=t.nextSibling,t.data="",t):null}S();let e=u.cursor;return e&&e.nodeType===3?(u.cursor=e.nextSibling,e.nodeValue!==n&&(e.nodeValue=n),e):(A&&e&&v(`text ${JSON.stringify(n.slice(0,24))}`,e),null)}function ue(n){S();let e=u.cursor;return e&&e.nodeType===8&&e.data===n?(u.cursor=e.nextSibling,e):(A&&e&&v(`marker <!--${n.slice(0,24)}-->`,e),null)}var q=!1;function le(){q||(q=!0,V({hydrateElement:se,hydrateText:ae,hydrateMarker:ue,hydrateStatic:fe}))}function De(n,e,t){le(),u.active=!0,u.cursor=e.firstChild,u.parents=[];let i=X(),d=t?.resourceNamespace,f=0;oe(()=>d?`${d}:r${f++}`:`r${f++}`),re(i?s=>s in i?{value:i[s]}:void 0:null);try{return B(n,e)}finally{u.active=!1,u.cursor=null,u.parents=[]}}export{De as hydrate};
1
+ import{isSignal as x}from"@fluixi/reactive/signal";var L="1.0.0-alpha.79";import{VERSION as U}from"@fluixi/reactive/version";var h={dom:L,reactive:U};function R(n){h.core&&n.setAttribute("fluixi",h.core),n.setAttribute("fx-dom",h.dom),n.setAttribute("fx-reactive",h.reactive),typeof globalThis<"u"&&(globalThis.Fluixi=h)}function M(){let n=[h.core,h.dom,h.reactive].filter(e=>e!==void 0);new Set(n).size<=1||console.warn(`[fluixi] package versions disagree — core ${h.core??"(absent)"}, dom ${h.dom}, reactive ${h.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 b(n){return typeof n=="function"&&n[Symbol.for("fluixi-component")]===!0}import{batch as z,createEffect as Se,createRenderEffect as G,createRoot as Y,onCleanup as Q,readChildren as Ae}from"@fluixi/reactive/signal";var D=typeof document>"u";var O=Symbol.for("fluixi.server-node"),$=null;function F(){if(!$)throw new Error("[fluixi] server render ran before @fluixi/dom/server loaded");return $}function P(n){return n!=null&&n[O]===!0?!0:typeof Node<"u"&&n instanceof Node}function H(n){return n!=null&&n[O]===!0?n.nodeType===3:typeof Text<"u"&&n instanceof Text}var u={active:!1,cursor:null,parents:[]},j=null;function V(n){j=n}function I(){return j}function k(n,e){return u.active&&e.parentNode===n}function W(n){let e=u.parents.lastIndexOf(n);e!==-1&&(u.parents.length=e),u.cursor=n.nextSibling}function N(n,e=!1){if(D)return F().createText(n);if(u.active&&!e){let t=I()?.hydrateText(n);if(t)return t}return document.createTextNode(n)}var m=0,Z=200;function ee(n,e,t,i,d){let f=i,s=new Map;return G(()=>{let r;if(b(n)&&!x(n)){if(!s.has(n)){m++;try{let o=n();s.set(n,o)}finally{m--}}for(r=s.get(n);typeof r=="function"&&x(r);)r=r()}else for(r=n();typeof r=="function"&&x(r);)r=r();{let o=0;for(;typeof r=="function"&&o++<50;)if(b(r)){if(!s.has(r)){let a=r;m++;try{let l=a();s.set(a,l)}finally{m--}}r=s.get(r)}else if(x(r))r=r();else if(r=r(),typeof r!="function"||!x(r)&&!b(r))break}m++;try{f=w(e,r,t,f,s),d(f)}finally{m--}})}function K(n,e,t,i){if(m>Z)return console.error("[insert] Exceeded max call depth — possible infinite loop."),()=>null;t!==void 0&&!t&&(t=N("",!0),n.appendChild(t));let d=i??null,f=o=>Array.isArray(o)&&o.some(a=>typeof a=="function"),s=o=>typeof o=="function"?o:()=>o;if(typeof e!="function"&&!f(e)){m++;try{d=w(n,e,t,d)}finally{m--}return()=>d}let r=ee(s(e),n,t,d,o=>{d=o});return()=>(r?.(),d)}function w(n,e,t,i,d){if(e==null||typeof e=="boolean")return E(n,i,t);if(typeof e=="function")for(;typeof e=="function";)e=e();if(e==null||typeof e=="boolean")return E(n,i,t);if(T(e)){let s=N("",!0);return Array.isArray(i)?i.length>0?(n.replaceChild(s,i[0]),E(n,i.slice(1),t)):p(n,s,t):i?n.replaceChild(s,i):p(n,s,t),e.then(r=>{s.parentNode===n&&w(n,r,s.nextSibling,s)}).catch(r=>{console.error("Error resolving promise in insertExpression:",r)}),s}let f=typeof e;if(f==="string"||f==="number"){if(f==="number"&&(e=String(e)),Array.isArray(i)){if(i.length===0){let r=N(e);return p(n,r,t),r}if(i.length===1&&i[0].nodeType===3)return i[0].data=e,i;i=E(n,i,t)}if(i&&H(i))return i.data=e,i;let s=N(e);return i&&i.parentNode===n?n.replaceChild(s,i):k(n,s)||p(n,s,t),s}if(P(e))return k(n,e)?(W(e),e):Array.isArray(i)?(i.length===0?p(n,e,t):i[0].parentNode===n?(n.replaceChild(e,i[0]),E(n,i.slice(1),t)):p(n,e,t),e):(i?i!==e&&(i.parentNode===n?n.replaceChild(e,i):p(n,e,t)):p(n,e,t),e);if(Array.isArray(e)){let s=[],r=Array.isArray(i)?i:i?[i]:[],o=[];g(e,s,n,t,!0,d,o);let a=ne(n,r,s,t);for(let l of o){let c=K(n,l.sig,l.marker);Q(()=>{E(n,c()),l.marker.parentNode===n&&n.removeChild(l.marker)})}return a}if(f==="object"&&e!==null&&typeof e=="object"){let s=e;if("type"in s&&"props"in s){let r=s;if(typeof r.type=="function"){let o=r.type(r.props||{});return w(n,o,t,i)}}}return E(n,i,t)}function g(n,e,t,i,d=!0,f,s){for(let r=0;r<n.length;r++){let o=n[r];if(!(o==null||typeof o=="boolean")){for(;typeof o=="function"&&!T(o)&&!x(o)&&!b(o)&&(o=o(),!(o==null||typeof o=="boolean")););if(!(o==null||typeof o=="boolean")){if(typeof o=="function"){let a;for(b(o)&&!x(o)?(f||(f=new Map),f.has(o)||f.set(o,o()),a=f.get(o)):a=o();typeof a=="function"&&!T(a)&&!x(a)&&!b(a);)f||(f=new Map),f.has(a)||f.set(a,a()),a=f.get(a);if(a==null||typeof a=="boolean")continue;if(typeof a=="function"){if(x(a)){if(s){let c=N("",!0);e.push(c),s.push({marker:c,sig:a});continue}let l=a();for(;typeof l=="function"&&x(l);)l=l();if(l==null||typeof l=="boolean")continue;Array.isArray(l)?g(l,e,t,i,d,f):g([l],e,t,i,d,f);continue}continue}Array.isArray(a)?g(a,e,t,i,d,f,s):g([a],e,t,i,d,f,s);continue}if(T(o)){let a=N("",!0);e.push(a),o.then(l=>{if(a.parentNode){let c=[];if(g([l],c,a.parentNode,void 0,!1,f),c.length>0){a.parentNode.replaceChild(c[0],a);for(let y=1;y<c.length;y++)a.parentNode?.insertBefore(c[y],c[y-1].nextSibling)}}}).catch(l=>console.error("Error resolving promise in array:",l));continue}if(Array.isArray(o)){g(o,e,t,i,d,f,s);continue}if(P(o)){e.push(o);continue}if(typeof o=="object"&&o!==null&&"type"in o&&"props"in o){let a=o;if(typeof a.type=="function"){let l=a.type(a.props||{});Array.isArray(l)?g(l,e,t,i,!1,f):g([l],e,t,i,!1,f);continue}}if(typeof o=="string"||typeof o=="number"){let a=String(o);if(a.trim()===""&&a!==" ")continue;e.push(N(a));continue}e.push(N(String(o)))}}}}function ne(n,e,t,i){for(let c=0;c<t.length;c++){let y=t[c].parentNode;y!==null&&y!==n&&y.nodeType!==11&&(t=t.slice(),t[c]=t[c].cloneNode(!0))}let d=t.length,f=e.length,s=d,r=0,o=0,a=f>0?e[f-1].nextSibling??void 0:i,l=null;for(;r<f||o<s;){if(e[r]===t[o]){r++,o++;continue}for(;f>r&&s>o&&e[f-1]===t[s-1];)f--,s--;if(f===r){let c=s<d?o?t[o-1].nextSibling??void 0:t[s-o]:a;for(;o<s;)p(n,t[o++],c)}else if(s===o)for(;r<f;)(!l||!l.has(e[r]))&&e[r].parentNode===n&&n.removeChild(e[r]),r++;else if(e[r]===t[s-1]&&t[o]===e[f-1]){let c=e[--f].nextSibling;p(n,t[o++],e[r++].nextSibling),p(n,t[--s],c),e[f]=e[r-1]}else{if(!l){l=new Map;let y=o;for(;y<s;)l.set(t[y],y++)}let c=l.get(e[r]);if(c!=null)if(o<c&&c<s){let y=r,C=1;for(;++y<f&&y<s&&!(!l.has(e[y])||l.get(e[y])!==c+C);)C++;if(C>c-o){let J=e[r];for(;o<c;)p(n,t[o++],J)}else e[r].parentNode===n?n.replaceChild(t[o++],e[r++]):(p(n,t[o++],a),r++)}else r++;else e[r].parentNode===n&&n.removeChild(e[r]),r++}}return t}function E(n,e,t){if(e)if(Array.isArray(e))for(let i=0;i<e.length;i++)e[i].parentNode===n&&n.removeChild(e[i]);else e.parentNode===n&&n.removeChild(e);return null}function p(n,e,t){u.active&&e.parentNode===n||(t&&t.parentNode===n?n.insertBefore(e,t):n.appendChild(e))}function T(n){return n!=null&&(typeof n=="object"||typeof n=="function")&&typeof n.then=="function"||n instanceof Promise}function B(n,e,t){if(!e)throw new Error("Container element is required");let i,d,f=[];return Y(s=>{z(()=>{u.active||(e.textContent=""),R(e),M(),K(e,n)}),d=s}),()=>{d?.(),i?.(),f.forEach(s=>s()),e.textContent=""}}import{setResourceIdSource as oe,setServerDataGetter as re}from"@fluixi/reactive/signal";var te="__FX_DATA__";var _;function X(){let n=globalThis.__FX_DATA__;if(n)return n;if(_!==void 0)return _;let e=null;if(typeof document<"u"){let t=document.getElementById(te)?.textContent;if(t)try{e=JSON.parse(t)}catch{e=null}}return _=e}function S(){for(;;){for(;u.cursor&&u.cursor.nodeType===3&&u.cursor.data==="";)u.cursor=u.cursor.nextSibling;if(u.cursor!=null||!u.parents.length)return;u.cursor=u.parents.pop().nextSibling}}var ie=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),A=typeof process<"u"&&process.env&&!1;function v(n,e){let t=e.nodeType===1?`<${e.tagName.toLowerCase()}>`:e.nodeType===3?`text ${JSON.stringify((e.nodeValue??"").slice(0,24))}`:e.nodeType===8?"comment":"node";console.warn(`[fluixi] hydration mismatch: expected ${n} but the server DOM has ${t}. 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 se(n){S();let e=u.cursor;return e&&e.nodeType===1&&e.tagName.toLowerCase()===n.toLowerCase()?(ie.has(n.toLowerCase())?u.cursor=e.nextSibling:(u.parents.push(e),u.cursor=e.firstChild),e):(A&&e&&v(`<${n}>`,e),null)}function fe(n){S();let e=u.cursor;return e&&e.nodeType===1&&e.tagName.toLowerCase()===n.toLowerCase()?(u.cursor=e.nextSibling,e):(A&&e&&v(`<${n}> (static)`,e),null)}function ae(n){if(n===""){let t=u.cursor;return t&&t.nodeType===3&&t.data!==""?(u.cursor=t.nextSibling,t.data="",t):null}S();let e=u.cursor;return e&&e.nodeType===3?(u.cursor=e.nextSibling,e.nodeValue!==n&&(e.nodeValue=n),e):(A&&e&&v(`text ${JSON.stringify(n.slice(0,24))}`,e),null)}function ue(n){S();let e=u.cursor;return e&&e.nodeType===8&&e.data===n?(u.cursor=e.nextSibling,e):(A&&e&&v(`marker <!--${n.slice(0,24)}-->`,e),null)}var q=!1;function le(){q||(q=!0,V({hydrateElement:se,hydrateText:ae,hydrateMarker:ue,hydrateStatic:fe}))}function De(n,e,t){le(),u.active=!0,u.cursor=e.firstChild,u.parents=[];let i=X(),d=t?.resourceNamespace,f=0;oe(()=>d?`${d}:r${f++}`:`r${f++}`),re(i?s=>s in i?{value:i[s]}:void 0:null);try{return B(n,e)}finally{u.active=!1,u.cursor=null,u.parents=[]}}export{De as hydrate};
@@ -1 +1 @@
1
- "use strict";var Q=Object.defineProperty;var je=Object.getOwnPropertyDescriptor;var qe=Object.getOwnPropertyNames;var Ve=Object.prototype.hasOwnProperty;var We=(e,t)=>{for(var n in t)Q(e,n,{get:t[n],enumerable:!0})},Ke=(e,t,n,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of qe(t))!Ve.call(e,r)&&r!==n&&Q(e,r,{get:()=>t[r],enumerable:!(o=je(t,r))||o.enumerable});return e};var Be=e=>Ke(Q({},"__esModule",{value:!0}),e);var mn={};We(mn,{Island:()=>De,JSX_PROPERTIES:()=>D,SVG_ELEMENTS:()=>Ye,SVG_NAMESPACE:()=>O,VOID_ELEMENTS:()=>Ue,addClass:()=>et,addDelegatedEventListener:()=>Le,addNativeEventListener:()=>ae,appendChildren:()=>ut,applyElementProp:()=>k,applyProps:()=>Vt,applyUse:()=>fe,bindPair:()=>Ut,captureHydrationCursor:()=>ve,cleanChildren:()=>w,cloneTemplate:()=>Me,closest:()=>Qe,createComponent:()=>en,createElement:()=>at,createNativeElement:()=>se,createPortal:()=>Bt,createTemplate:()=>Pe,delegate:()=>pt,delegateEvents:()=>ie,escapeHTML:()=>Xt,fnName:()=>kt,generateID:()=>At,getAttribute:()=>rt,getGlobal:()=>wt,getLitEventName:()=>Xe,getOffset:()=>dt,getStableElementId:()=>Ct,getStyle:()=>st,handleRef:()=>le,hasClass:()=>ot,holeContent:()=>Ot,holeEnd:()=>$t,holeScope:()=>It,hydrate:()=>Y,hydrateAdvancePast:()=>Ae,hydrateIslands:()=>Fe,initializeIntegration:()=>Qt,insert:()=>A,insertExpression:()=>P,intergartionInitialized:()=>tn,isAccessor:()=>zt,isCustomElement:()=>ye,isDOMNode:()=>Nt,isDelegatedEvent:()=>Pt,isDomElement:()=>H,isDomNode:()=>v,isDomText:()=>j,isEventHandler:()=>Je,isFunction:()=>Mt,isIntegrationInitialized:()=>nn,isJSXTemplate:()=>bt,isLitTemplateResult:()=>ge,isNativeElement:()=>Gt,isPromise:()=>L,isReactElement:()=>ht,isSVGElement:()=>Jt,isServer:()=>E,isTemplateFactory:()=>Et,isVisible:()=>lt,iterateFn:()=>Dt,makeArrayFlat:()=>_e,mergeProps:()=>Wt,observeIntersection:()=>mt,observeResize:()=>gt,query:()=>ee,queryAll:()=>Ze,registerCreateComponent:()=>Zt,registerGlobal:()=>Tt,removeAttribute:()=>it,removeChildren:()=>ft,removeClass:()=>tt,removeDelegatedEventListener:()=>re,render:()=>ce,resetIntegration:()=>on,runHydrationAt:()=>R,runWithoutHydration:()=>Ce,scrollIntoView:()=>ct,setAttribute:()=>x,setClassList:()=>I,setClassName:()=>_,setDynamicAttribute:()=>W,setDynamicBoolAttribute:()=>ue,setDynamicProperty:()=>K,setProperty:()=>M,setServerMode:()=>Te,setStyle:()=>$,setStyles:()=>me,shouldSetAsProperty:()=>ze,splitProps:()=>Kt,spread:()=>qt,templateNode:()=>_t,toAttributeName:()=>Ge,toggleClass:()=>nt,waitForElement:()=>yt});module.exports=Be(mn);function Ge(e){return e.startsWith("aria-")||e.startsWith("data-")?e:/[A-Z]/.test(e)?e.replace(/([A-Z])/g,"-$1").toLowerCase():e}function Je(e){return e.startsWith("@")||e.startsWith("on")&&e.length>2}function Xe(e){return e.startsWith("@")?e.slice(1):e.startsWith("on")?e.slice(2).toLowerCase():e}function ze(e,t){let n=new Set(["checked","value","selected","disabled","readonly","required","multiple","open","contenteditable","draggable","spellcheck"]),o={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)||o[e]&&o[e].has(t)}var Ue=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),Ye=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"]),O="http://www.w3.org/2000/svg";function ye(e){return e.localName.includes("-")}function k(e,t,n,o=!1){if(n==null){e.removeAttribute(t);return}if(ye(e)){e[t]=n;return}x(e,t,n,o)}var D=new Set(["className","value","checked","selected","innerHTML","innerText","textContent","indeterminate","htmlFor"]);function ee(e,t=document){return t.querySelector(e)}function Ze(e,t=document){return Array.from(t.querySelectorAll(e))}function Qe(e,t){return e.closest(t)}function et(e,...t){e.classList.add(...t)}function tt(e,...t){e.classList.remove(...t)}function nt(e,...t){t.forEach(n=>e.classList.toggle(n))}function ot(e,t){return e.classList.contains(t)}function x(e,t,n,o=!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 rt(e,t){return e.getAttribute(t)}function it(e,t){e.removeAttribute(t)}function me(e,t){Object.assign(e.style,t)}function st(e,t){return window.getComputedStyle(e).getPropertyValue(t)}function at(e,t={},...n){let o=document.createElement(e);return Object.entries(t).forEach(([r,f])=>{if(r==="class"||r==="className")o.className=f;else if(r==="style"&&typeof f=="object")me(o,f);else if(r.startsWith("on")&&typeof f=="function"){let s=r.slice(2).toLowerCase();o.addEventListener(s,f)}else x(o,r,f)}),n.forEach(r=>{typeof r=="string"?o.appendChild(document.createTextNode(r)):o.appendChild(r)}),o}function ft(e){for(;e.firstChild;)e.removeChild(e.firstChild)}function ut(e,...t){t.forEach(n=>{typeof n=="string"?e.appendChild(document.createTextNode(n)):e.appendChild(n)})}function lt(e){let t=e.getBoundingClientRect();return t.top>=0&&t.left>=0&&t.bottom<=window.innerHeight&&t.right<=window.innerWidth}function ct(e,t={behavior:"smooth",block:"nearest"}){e.scrollIntoView(t)}function dt(e){let t=e.getBoundingClientRect();return{top:t.top+window.pageYOffset,left:t.left+window.pageXOffset}}function pt(e,t,n,o){let r=f=>{let s=f.target.closest(n);s&&e.contains(s)&&o(f,s)};return e.addEventListener(t,r),()=>{e.removeEventListener(t,r)}}function yt(e,t=5e3){return new Promise((n,o)=>{let r=ee(e);if(r){n(r);return}let f=new MutationObserver(()=>{let i=ee(e);i&&(f.disconnect(),clearTimeout(s),n(i))});f.observe(document.body,{childList:!0,subtree:!0});let s=setTimeout(()=>{f.disconnect(),o(new Error(`Element ${e} not found within ${t}ms`))},t)})}function mt(e,t,n={}){let o=new IntersectionObserver(r=>{r.forEach(f=>{t(f.isIntersecting)})},n);return o.observe(e),()=>{o.disconnect()}}function gt(e,t){let n=new ResizeObserver(o=>{o.forEach(t)});return n.observe(e),()=>{n.disconnect()}}var xt=typeof Symbol=="function"&&Symbol.for?Symbol.for("react.element"):60103;function ht(e){return typeof e=="object"&&e!==null&&e.$$typeof===xt}function ge(e){return e&&typeof e=="object"&&e.strings&&Array.isArray(e.strings)&&e.values&&Array.isArray(e.values)}function Et(e){if(typeof e!="function")return!1;try{let t=e();return ge(t)}catch{return!1}}function bt(e){return typeof e=="object"&&e!==null&&(e.$$typeof==="template"||typeof e.type=="function")}function Nt(e){return e instanceof Node}function Tt(e,t,n="Fluixi"){typeof globalThis<"u"&&(typeof globalThis[n]>"u"&&(globalThis[n]={}),typeof globalThis[n][e]>"u"&&(globalThis[n][e]=t))}function wt(e,t,n="Fluixi"){return typeof globalThis<"u"&&typeof globalThis[n]<"u"&&typeof globalThis[n][e]<"u"?globalThis[n][e]:t}var m=require("@fluixi/reactive/signal");var xe="1.0.0-alpha.78";var he=require("@fluixi/reactive/version"),h={dom:xe,reactive:he.VERSION};function Ee(e){h.core&&e.setAttribute("fluixi",h.core),e.setAttribute("fx-dom",h.dom),e.setAttribute("fx-reactive",h.reactive),typeof globalThis<"u"&&(globalThis.Fluixi=h)}function be(){let e=[h.core,h.dom,h.reactive].filter(t=>t!==void 0);new Set(e).size<=1||console.warn(`[fluixi] package versions disagree — core ${h.core??"(absent)"}, dom ${h.dom}, reactive ${h.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 b(e){return typeof e=="function"&&e[Symbol.for("fluixi-component")]===!0}var c=require("@fluixi/reactive/signal");var E=typeof document>"u";function Te(e){E=e}var te=Symbol.for("fluixi.server-node"),Ne=null;function F(){if(!Ne)throw new Error("[fluixi] server render ran before @fluixi/dom/server loaded");return Ne}function v(e){return e!=null&&e[te]===!0?!0:typeof Node<"u"&&e instanceof Node}function H(e){return e!=null&&e[te]===!0?e.nodeType===1:typeof Element<"u"&&e instanceof Element}function j(e){return e!=null&&e[te]===!0?e.nodeType===3:typeof Text<"u"&&e instanceof Text}var l={active:!1,cursor:null,parents:[]},we=null;function Se(e){we=e}function q(){return we}function ne(e,t){return l.active&&t.parentNode===e}function oe(e){let t=l.parents.lastIndexOf(e);t!==-1&&(l.parents.length=t),l.cursor=e.nextSibling}function ve(){return l.active?l.cursor:null}function R(e,t){if(!e||e.parentNode==null)return t();let n=l.active,o=l.cursor,r=l.parents;l.active=!0,l.cursor=e,l.parents=[];try{return t()}finally{l.active=n,l.cursor=o,l.parents=r}}function Ce(e){if(!l.active)return e();let t=l.cursor,n=l.parents;l.active=!1,l.parents=[];try{return e()}finally{l.active=!0,l.cursor=t,l.parents=n}}function Ae(e){if(!l.active||e==null)return;let t=Array.isArray(e)?e[e.length-1]:e;t&&typeof t.nodeType=="number"&&oe(t)}function St(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 o=0,r=e;for(;r=r.previousElementSibling;)r.tagName===e.tagName&&o++;n+=`:nth-of-type(${o+1})`,t.unshift(n),e=e.parentElement}return t.join(">")}function vt(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 Ct(e){return vt(St(e))}var At=()=>"xxyxxxxxxy-4xx8".replace(/[xy]/g,function(e){let t=Math.random()*16|0;return(e==="x"?t:t&3|8).toString(16)}),Rt={};var Re=new Map,V=new Set,B=new Set(["scroll","focus","blur","load","error","resize","mouseenter","mouseleave","pointerenter","pointerleave","gotpointercapture","lostpointercapture"]);function ie(e){if(!E)for(let t of e)V.has(t)||B.has(t)||(V.add(t),document.addEventListener(t,Lt))}function Lt(e){let t=`$$${e.type}`,n=e.composedPath&&e.composedPath()[0]||e.target;for(;n;){let o=n[t];if(o&&!n.disabled&&(o(e),e.cancelBubble))return;n=n.host&&n.host!==n&&n.host instanceof Element?n.host:n.parentNode}}function Le(e,t,n){if(e[`$$${t}`]=n,B.has(t)){let o=`__fx_${t}`;if(!e[o]){let r=f=>{e[`$$${t}`]?.(f)};e.addEventListener(t,r),e[o]=r}return}V.has(t)||ie([t])}function re(e,t){delete e[`$$${t}`];let n=`__fx_${t}`,o=e[n];o&&(e.removeEventListener(t,o),delete e[n])}function Pt(e){return!B.has(e)}function Mt(e){return typeof e=="function"}function S(e,t=!1){if(E)return F().createText(e);if(l.active&&!t){let n=q()?.hydrateText(e);if(n)return n}return document.createTextNode(e)}function se(e,t=!1){if(E)return F().createElement(e,t);if(l.active){let n=q()?.hydrateElement(e);if(n)return n}return t?document.createElementNS(O,e):document.createElement(e)}function Pe(e,t=!1){let n=Re.get(e);if(n)return n;let o=document.createElement("template");return t?o.innerHTML=`<svg>${e}</svg>`:o.innerHTML=e,Re.set(e,o),o}function _t(e,t,n=!1,o=!1){if(E){let r=F();return n?r.parseTemplate(e,o):r.createRaw(e)}if(l.active){let r=q()?.hydrateStatic(t);if(r)return r}return Me(Pe(e,o),o).firstChild}function It(e,t){if(!l.active)return t();let n=R(e.nextSibling,t);if(typeof n=="function"){let o=n;return((...r)=>l.active?R(e.nextSibling,()=>o(...r)):o(...r))}return n}function $t(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 Ot(e,t){let n=[];for(let o=e.nextSibling;o&&o!==t;o=o.nextSibling)n.push(o);return n}function Me(e,t=!1){let n=e.content.cloneNode(!0);return t?n.firstChild:n}function _e(e){return Array.isArray(e)?e.length===2&&e[1]===" "?Array.isArray(e[0])?_e(e[0]):(typeof e[0]=="function",e[0]):e.length===1&&typeof e[0]=="function"?e[0]:e:e}function kt(e){return typeof e!="function"?null:e._name||e.name||"anonymous"}function Dt(e){if((0,m.isSignal)(e)||b(e)||typeof e!="function")return e;let t=e();for(;typeof t=="function"&&!(0,m.isSignal)(t)&&!b(t);)t=t();return t}var T=0,Ft=200;function Ht(e,t,n,o,r){let f=o,s=new Map;return(0,c.createRenderEffect)(()=>{let i;if(b(e)&&!(0,m.isSignal)(e)){if(!s.has(e)){T++;try{let a=e();s.set(e,a)}finally{T--}}for(i=s.get(e);typeof i=="function"&&(0,m.isSignal)(i);)i=i()}else for(i=e();typeof i=="function"&&(0,m.isSignal)(i);)i=i();{let a=0;for(;typeof i=="function"&&a++<50;)if(b(i)){if(!s.has(i)){let u=i;T++;try{let d=u();s.set(u,d)}finally{T--}}i=s.get(i)}else if((0,m.isSignal)(i))i=i();else if(i=i(),typeof i!="function"||!(0,m.isSignal)(i)&&!b(i))break}T++;try{f=P(t,i,n,f,s),r(f)}finally{T--}})}function A(e,t,n,o){if(T>Ft)return console.error("[insert] Exceeded max call depth — possible infinite loop."),()=>null;n!==void 0&&!n&&(n=S("",!0),e.appendChild(n));let r=o??null,f=a=>Array.isArray(a)&&a.some(u=>typeof u=="function"),s=a=>typeof a=="function"?a:()=>a;if(typeof t!="function"&&!f(t)){T++;try{r=P(e,t,n,r)}finally{T--}return()=>r}let i=Ht(s(t),e,n,r,a=>{r=a});return()=>(i?.(),r)}function P(e,t,n,o,r){if(t==null||typeof t=="boolean")return w(e,o,n);if(typeof t=="function")for(;typeof t=="function";)t=t();if(t==null||typeof t=="boolean")return w(e,o,n);if(L(t)){let s=S("",!0);return Array.isArray(o)?o.length>0?(e.replaceChild(s,o[0]),w(e,o.slice(1),n)):g(e,s,n):o?e.replaceChild(s,o):g(e,s,n),t.then(i=>{s.parentNode===e&&P(e,i,s.nextSibling,s)}).catch(i=>{console.error("Error resolving promise in insertExpression:",i)}),s}let f=typeof t;if(f==="string"||f==="number"){if(f==="number"&&(t=String(t)),Array.isArray(o)){if(o.length===0){let i=S(t);return g(e,i,n),i}if(o.length===1&&o[0].nodeType===3)return o[0].data=t,o;o=w(e,o,n)}if(o&&j(o))return o.data=t,o;let s=S(t);return o&&o.parentNode===e?e.replaceChild(s,o):ne(e,s)||g(e,s,n),s}if(v(t))return ne(e,t)?(oe(t),t):Array.isArray(o)?(o.length===0?g(e,t,n):o[0].parentNode===e?(e.replaceChild(t,o[0]),w(e,o.slice(1),n)):g(e,t,n),t):(o?o!==t&&(o.parentNode===e?e.replaceChild(t,o):g(e,t,n)):g(e,t,n),t);if(Array.isArray(t)){let s=[],i=Array.isArray(o)?o:o?[o]:[],a=[];N(t,s,e,n,!0,r,a);let u=jt(e,i,s,n);for(let d of a){let p=A(e,d.sig,d.marker);(0,c.onCleanup)(()=>{w(e,p()),d.marker.parentNode===e&&e.removeChild(d.marker)})}return u}if(f==="object"&&t!==null&&typeof t=="object"){let s=t;if("type"in s&&"props"in s){let i=s;if(typeof i.type=="function"){let a=i.type(i.props||{});return P(e,a,n,o)}}}return w(e,o,n)}function N(e,t,n,o,r=!0,f,s){for(let i=0;i<e.length;i++){let a=e[i];if(!(a==null||typeof a=="boolean")){for(;typeof a=="function"&&!L(a)&&!(0,m.isSignal)(a)&&!b(a)&&(a=a(),!(a==null||typeof a=="boolean")););if(!(a==null||typeof a=="boolean")){if(typeof a=="function"){let u;for(b(a)&&!(0,m.isSignal)(a)?(f||(f=new Map),f.has(a)||f.set(a,a()),u=f.get(a)):u=a();typeof u=="function"&&!L(u)&&!(0,m.isSignal)(u)&&!b(u);)f||(f=new Map),f.has(u)||f.set(u,u()),u=f.get(u);if(u==null||typeof u=="boolean")continue;if(typeof u=="function"){if((0,m.isSignal)(u)){if(s){let p=S("",!0);t.push(p),s.push({marker:p,sig:u});continue}let d=u();for(;typeof d=="function"&&(0,m.isSignal)(d);)d=d();if(d==null||typeof d=="boolean")continue;Array.isArray(d)?N(d,t,n,o,r,f):N([d],t,n,o,r,f);continue}continue}Array.isArray(u)?N(u,t,n,o,r,f,s):N([u],t,n,o,r,f,s);continue}if(L(a)){let u=S("",!0);t.push(u),a.then(d=>{if(u.parentNode){let p=[];if(N([d],p,u.parentNode,void 0,!1,f),p.length>0){u.parentNode.replaceChild(p[0],u);for(let y=1;y<p.length;y++)u.parentNode?.insertBefore(p[y],p[y-1].nextSibling)}}}).catch(d=>console.error("Error resolving promise in array:",d));continue}if(Array.isArray(a)){N(a,t,n,o,r,f,s);continue}if(v(a)){t.push(a);continue}if(typeof a=="object"&&a!==null&&"type"in a&&"props"in a){let u=a;if(typeof u.type=="function"){let d=u.type(u.props||{});Array.isArray(d)?N(d,t,n,o,!1,f):N([d],t,n,o,!1,f);continue}}if(typeof a=="string"||typeof a=="number"){let u=String(a);if(u.trim()===""&&u!==" ")continue;t.push(S(u));continue}t.push(S(String(a)))}}}}function jt(e,t,n,o){for(let p=0;p<n.length;p++){let y=n[p].parentNode;y!==null&&y!==e&&y.nodeType!==11&&(n=n.slice(),n[p]=n[p].cloneNode(!0))}let r=n.length,f=t.length,s=r,i=0,a=0,u=f>0?t[f-1].nextSibling??void 0:o,d=null;for(;i<f||a<s;){if(t[i]===n[a]){i++,a++;continue}for(;f>i&&s>a&&t[f-1]===n[s-1];)f--,s--;if(f===i){let p=s<r?a?n[a-1].nextSibling??void 0:n[s-a]:u;for(;a<s;)g(e,n[a++],p)}else if(s===a)for(;i<f;)(!d||!d.has(t[i]))&&t[i].parentNode===e&&e.removeChild(t[i]),i++;else if(t[i]===n[s-1]&&n[a]===t[f-1]){let p=t[--f].nextSibling;g(e,n[a++],t[i++].nextSibling),g(e,n[--s],p),t[f]=t[i-1]}else{if(!d){d=new Map;let y=a;for(;y<s;)d.set(n[y],y++)}let p=d.get(t[i]);if(p!=null)if(a<p&&p<s){let y=i,Z=1;for(;++y<f&&y<s&&!(!d.has(t[y])||d.get(t[y])!==p+Z);)Z++;if(Z>p-a){let He=t[i];for(;a<p;)g(e,n[a++],He)}else t[i].parentNode===e?e.replaceChild(n[a++],t[i++]):(g(e,n[a++],u),i++)}else i++;else t[i].parentNode===e&&e.removeChild(t[i]),i++}}return n}function w(e,t,n){if(t)if(Array.isArray(t))for(let o=0;o<t.length;o++)t[o].parentNode===e&&e.removeChild(t[o]);else t.parentNode===e&&e.removeChild(t);return null}function g(e,t,n){l.active&&t.parentNode===e||(n&&n.parentNode===e?e.insertBefore(t,n):e.appendChild(t))}function M(e,t,n){n==null?delete e[t]:e[t]=n}function ae(e,t,n){let o=n,r;return Array.isArray(n)&&(o=n[0],r=n[1]),typeof o!="function"?()=>{}:(e.addEventListener(t,o,r),()=>e.removeEventListener(t,o,r))}function fe(e,t){let n=(o,r)=>{typeof o=="function"&&o(e,r??(()=>{}))};if(typeof t=="function"){n(t);return}if(Array.isArray(t)){if(typeof t[0]=="function"){n(t[0],t[1]);return}for(let o of t)Array.isArray(o)?n(o[0],o[1]):n(o)}}function W(e,t,n,o=!1){return typeof n!="function"?(x(e,t,n,o),()=>{}):(0,c.createRenderEffect)(()=>{let r=typeof n=="function"?n():n;x(e,t,r,o)})}function K(e,t,n){return typeof n!="function"?(M(e,t,n),()=>{}):(0,c.createRenderEffect)(()=>{let o=typeof n=="function"?n():n;M(e,t,o)})}function ue(e,t,n){return typeof n!="function"?(x(e,t,!!n),()=>{}):(0,c.createRenderEffect)(()=>{let o=n();x(e,t,!!o)})}function _(e,t){if(t==null){e.removeAttribute("class");return}if(typeof t=="function"){(0,c.createRenderEffect)(()=>_(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(o=>{let r=t[o];return typeof r=="function"?r():!!r}).join(" ");e.setAttribute("class",n);return}e.setAttribute("class",String(t))}function I(e,t,n){if(!(!t||typeof t!="object"))for(let o in t){let r=t[o],f=o.split(/\s+/).filter(Boolean);if(typeof r=="function"&&n)n.push((0,c.createRenderEffect)(()=>{let s=!!r();for(let i of f)e.classList.toggle(i,s)}));else{let s=!!(typeof r=="function"?r():r);for(let i of f)e.classList.toggle(i,s)}}}function $(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 o in n){let r=n[o];r==null?e.style[o]="":e.style[o]=r}}function qt(e){let{element:t,props:n,prevProps:o=Rt,isSVG:r=!1,skipChildren:f=!1}=e;if(!t||!H(t))return console.error("[spread] Error: element is not a DOM Element!"),()=>{};if(!n)return console.warn("[spread] Warning: props is undefined!"),()=>{};let s=r||t.namespaceURI===O,i=[];for(let a in n){if(f&&a==="children")continue;let u=n[a],d=o[a];if(u===d)continue;if(a==="ref"){le(u,t);continue}if(a==="use"){fe(t,u);continue}if(a.startsWith("on:")){i.push(ae(t,a.slice(3),u));continue}if(a.startsWith("prop:")){i.push(K(t,a.slice(5),u));continue}if(a.startsWith("attr:")){i.push(W(t,a.slice(5),u,s));continue}if(a.startsWith("bool:")){i.push(ue(t,a.slice(5),u));continue}if(a==="class"||a==="className"){typeof u=="function"?i.push((0,c.createRenderEffect)(()=>_(t,u()))):_(t,u);continue}if(a==="classList"){typeof u=="function"?i.push((0,c.createRenderEffect)(()=>I(t,u()))):I(t,u,i);continue}if(a==="style"){typeof u=="function"?i.push((0,c.createRenderEffect)(()=>$(t,u()))):$(t,u);continue}if(a.startsWith("on")){let y=a.slice(2).toLowerCase();d&&re(t,y),u&&Le(t,y,u);continue}let p=D.has(a)||!s&&a in t;typeof u=="function"?i.push(p?K(t,a,u):W(t,a,u,s)):i.push((0,c.createRenderEffect)(()=>p?M(t,a,n[a]):x(t,a,n[a],s)))}for(let a in o)if(!(a in n))if(a.startsWith("on")){let u=a.slice(2).toLowerCase();re(t,u)}else D.has(a)?M(t,a,null):t.removeAttribute(a);return()=>{i.forEach(a=>a())}}function Vt(e,t,n=!1){for(let o in t){let r=t[o];if(o==="ref"){le(r,e);continue}if(o!=="children"){if(o==="use"){fe(e,r);continue}if(o.startsWith("on:")){ae(e,o.slice(3),r);continue}if(o.startsWith("prop:")){K(e,o.slice(5),r);continue}if(o.startsWith("attr:")){W(e,o.slice(5),r,n);continue}if(o.startsWith("bool:")){ue(e,o.slice(5),r);continue}if(o.startsWith("on")&&o.length>2){let f=o.slice(2).toLowerCase();if(typeof r=="function")if(B.has(f)){e[`$$${f}`]=r;let s=`__fx_${f}`;if(!e[s]){let i=a=>{e[`$$${f}`]?.(a)};e.addEventListener(f,i),e[s]=i}}else e[`$$${f}`]=r,V.has(f)||ie([f]);continue}if(o==="class"||o==="className"){_(e,r);continue}if(o==="classList"){typeof r=="function"?(0,c.createRenderEffect)(()=>I(e,r())):I(e,r);continue}if(o==="style"){typeof r=="function"?(0,c.createRenderEffect)(()=>$(e,r())):$(e,r);continue}if(o==="innerHTML"){if(typeof r=="function"){let f=(0,c.createEffect)(()=>{let s=r();for(;typeof s=="function";)s=s();e.innerHTML=s});(0,c.onCleanup)(()=>f())}else e.innerHTML=r;continue}if(o==="value"&&(e.tagName==="INPUT"||e.tagName==="TEXTAREA")){if(typeof r=="function"){let f=(0,c.createEffect)(()=>{let s=r();for(;typeof s=="function"&&s.length===0;)s=s();document.activeElement!==e&&(e.value=s??"")});(0,c.onCleanup)(()=>{f()})}else(0,c.createRenderEffect)(()=>{document.activeElement!==e&&(e.value=t[o]??"")});continue}if(o==="checked"&&e.tagName==="INPUT"){if(typeof r=="function"){let f=(0,c.createEffect)(()=>{let s=r();for(;typeof s=="function"&&s.length===0;)s=s();document.activeElement!==e&&(e.checked=s??"")});(0,c.onCleanup)(()=>{f()})}else(0,c.createRenderEffect)(()=>{document.activeElement!==e&&(e.checked=t[o]??"")});continue}if(o==="value"&&e.tagName==="SELECT"){if(typeof r=="function"){let f=!0,s=(0,c.createEffect)(()=>{let i=r();for(;typeof i=="function"&&i.length===0;)i=i();f?(f=!1,queueMicrotask(()=>{e.value=i??""})):e.value=i??""});(0,c.onCleanup)(()=>{s()})}else{let f=!0;(0,c.createRenderEffect)(()=>{let s=t[o];f?(f=!1,queueMicrotask(()=>{e.value=s??""})):e.value=s??""})}continue}if(typeof r=="function"){let f=(0,c.createEffect)(()=>{let s=r();for(;typeof s=="function"&&s.length===0;)s=s();k(e,o,s,n)});(0,c.onCleanup)(()=>{f()})}else(0,c.createRenderEffect)(()=>k(e,o,t[o],n))}}}function Wt(...e){let t=o=>{for(let r=e.length-1;r>=0;r--){let f=e[r];if(f&&o in f&&f[o]!==void 0)return f[o]}},n=o=>{for(let r of e)if(r&&o in r)return!0;return!1};return new Proxy({},{get:(o,r)=>t(r),has:(o,r)=>n(r),ownKeys:()=>{let o=new Set;for(let r of e)if(r)for(let f of Reflect.ownKeys(r))o.add(f);return[...o]},getOwnPropertyDescriptor:(o,r)=>n(r)?{enumerable:!0,configurable:!0,get:()=>t(r)}:void 0})}function Kt(e,...t){let n=new Set;for(let s of t)for(let i of s)n.add(i);let o=s=>({enumerable:!0,configurable:!0,get:()=>e[s]}),r=t.map(s=>{let i=new Set(s);return new Proxy({},{get:(a,u)=>i.has(u)?e[u]:void 0,has:(a,u)=>i.has(u)&&u in e,ownKeys:()=>Array.from(i).filter(a=>a in e),getOwnPropertyDescriptor:(a,u)=>i.has(u)&&u in e?o(u):void 0})}),f=new Proxy({},{get:(s,i)=>n.has(i)?void 0:e[i],has:(s,i)=>!n.has(i)&&i in e,ownKeys:()=>Reflect.ownKeys(e).filter(s=>!n.has(s)),getOwnPropertyDescriptor:(s,i)=>!n.has(i)&&i in e?o(i):void 0});return[...r,f]}function le(e,t){if(e){if(v(e)){let n=t,o=e;if(!n)return;typeof n=="function"?n(o):typeof n=="object"&&"current"in n&&(n.current=o);return}typeof e=="function"?e(t):typeof e=="object"&&"current"in e&&(e.current=t)}}function Bt(e,t,n){let o=t||document.body,r=(0,c.readChildren)(()=>e),f=[];return(0,c.batch)(()=>{let s=(0,c.createRenderEffect)(()=>{let i=r();Array.isArray(i)?(i.forEach(a=>o.appendChild(a)),f.push(()=>{i.forEach(a=>{a.parentNode===o&&o.removeChild(a)})})):v(i)&&(o.appendChild(i),f.push(()=>{i.parentNode===o&&o.removeChild(i)}))});f.push(s),(0,c.onCleanup)(()=>{f.forEach(i=>i())})}),null}function Gt(e){return typeof e=="string"&&e.toLowerCase()===e}function Jt(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 Xt(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}function L(e){return e!=null&&(typeof e=="object"||typeof e=="function")&&typeof e.then=="function"||e instanceof Promise}function zt(e){return typeof e=="function"&&e.length===0&&(0,m.isSignal)(e)}function ce(e,t,n){if(!t)throw new Error("Container element is required");let o,r,f=[];return(0,c.createRoot)(s=>{(0,c.batch)(()=>{l.active||(t.textContent=""),Ee(t),be(),A(t,e)}),r=s}),()=>{r?.(),o?.(),f.forEach(s=>s()),t.textContent=""}}function Ut(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 Yt="__fx_dom_create_component__",C=globalThis[Yt]??={fn:null};function Zt(e){C.fn=e}function Qt(e={}){let t=e.signalSystem?.createComponent;t&&(C.fn=t)}function en(e,t){return C.fn?C.fn(e,t):(()=>e(t))}var tn=()=>C.fn!==null,nn=()=>C.fn!==null;function on(){C.fn=null}var G,rn={getStore:()=>G,run(e,t){let n=G;G=e;try{return t()}finally{G=n}}},sn=rn;function Ie(){return sn.getStore()}var J=require("@fluixi/reactive/signal");var an="__FX_DATA__";var de;function $e(){let e=globalThis.__FX_DATA__;if(e)return e;if(de!==void 0)return de;let t=null;if(typeof document<"u"){let n=document.getElementById(an)?.textContent;if(n)try{t=JSON.parse(n)}catch{t=null}}return de=t}function X(){for(;;){for(;l.cursor&&l.cursor.nodeType===3&&l.cursor.data==="";)l.cursor=l.cursor.nextSibling;if(l.cursor!=null||!l.parents.length)return;l.cursor=l.parents.pop().nextSibling}}var fn=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),z=typeof process<"u"&&process.env&&!1;function U(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 un(e){X();let t=l.cursor;return t&&t.nodeType===1&&t.tagName.toLowerCase()===e.toLowerCase()?(fn.has(e.toLowerCase())?l.cursor=t.nextSibling:(l.parents.push(t),l.cursor=t.firstChild),t):(z&&t&&U(`<${e}>`,t),null)}function ln(e){X();let t=l.cursor;return t&&t.nodeType===1&&t.tagName.toLowerCase()===e.toLowerCase()?(l.cursor=t.nextSibling,t):(z&&t&&U(`<${e}> (static)`,t),null)}function cn(e){if(e===""){let n=l.cursor;return n&&n.nodeType===3&&n.data!==""?(l.cursor=n.nextSibling,n.data="",n):null}X();let t=l.cursor;return t&&t.nodeType===3?(l.cursor=t.nextSibling,t.nodeValue!==e&&(t.nodeValue=e),t):(z&&t&&U(`text ${JSON.stringify(e.slice(0,24))}`,t),null)}function dn(e){X();let t=l.cursor;return t&&t.nodeType===8&&t.data===e?(l.cursor=t.nextSibling,t):(z&&t&&U(`marker <!--${e.slice(0,24)}-->`,t),null)}var Oe=!1;function pn(){Oe||(Oe=!0,Se({hydrateElement:un,hydrateText:cn,hydrateMarker:dn,hydrateStatic:ln}))}function Y(e,t,n){pn(),l.active=!0,l.cursor=t.firstChild,l.parents=[];let o=$e(),r=n?.resourceNamespace,f=0;(0,J.setResourceIdSource)(()=>r?`${r}:r${f++}`:`r${f++}`),(0,J.setServerDataGetter)(o?s=>s in o?{value:o[s]}:void 0:null);try{return ce(e,t)}finally{l.active=!1,l.cursor=null,l.parents=[]}}var pe="fluixi-island";function De(e){let{component:t,props:n={},name:o}=e,r=se(pe),f=o??t.name??"Island";x(r,"name",f),x(r,"props",JSON.stringify(n??{}));let s=E?Ie():void 0;if(s){let i=s.nextIslandNamespace(f);A(r,()=>s.withResourceScope(i,()=>t(n)))}else A(r,()=>t(n));return r}var ke=!1;function yn(){if(ke||typeof document>"u")return;ke=!0;let e=document.createElement("style");e.textContent=`${pe}{display:contents}`,document.head.appendChild(e)}function Fe(e){if(typeof document>"u")return;yn();let t=document.querySelectorAll(pe),n=new Map;t.forEach(o=>{let r=o.getAttribute("name")??"",f=n.get(r)??0;n.set(r,f+1);let s=e[r];if(!s){typeof process>"u"&&console.warn(`[fluixi] island "${r}" has no component in the registry — left static.`);return}let i={};try{i=JSON.parse(o.getAttribute("props")||"{}")}catch{}Y(()=>s(i),o,{resourceNamespace:`${r}#${f}`})})}
1
+ "use strict";var Q=Object.defineProperty;var je=Object.getOwnPropertyDescriptor;var qe=Object.getOwnPropertyNames;var Ve=Object.prototype.hasOwnProperty;var We=(e,t)=>{for(var n in t)Q(e,n,{get:t[n],enumerable:!0})},Ke=(e,t,n,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of qe(t))!Ve.call(e,r)&&r!==n&&Q(e,r,{get:()=>t[r],enumerable:!(o=je(t,r))||o.enumerable});return e};var Be=e=>Ke(Q({},"__esModule",{value:!0}),e);var mn={};We(mn,{Island:()=>De,JSX_PROPERTIES:()=>D,SVG_ELEMENTS:()=>Ye,SVG_NAMESPACE:()=>O,VOID_ELEMENTS:()=>Ue,addClass:()=>et,addDelegatedEventListener:()=>Le,addNativeEventListener:()=>ae,appendChildren:()=>ut,applyElementProp:()=>k,applyProps:()=>Vt,applyUse:()=>fe,bindPair:()=>Ut,captureHydrationCursor:()=>ve,cleanChildren:()=>w,cloneTemplate:()=>Me,closest:()=>Qe,createComponent:()=>en,createElement:()=>at,createNativeElement:()=>se,createPortal:()=>Bt,createTemplate:()=>Pe,delegate:()=>pt,delegateEvents:()=>ie,escapeHTML:()=>Xt,fnName:()=>kt,generateID:()=>At,getAttribute:()=>rt,getGlobal:()=>wt,getLitEventName:()=>Xe,getOffset:()=>dt,getStableElementId:()=>Ct,getStyle:()=>st,handleRef:()=>le,hasClass:()=>ot,holeContent:()=>Ot,holeEnd:()=>$t,holeScope:()=>It,hydrate:()=>Y,hydrateAdvancePast:()=>Ae,hydrateIslands:()=>Fe,initializeIntegration:()=>Qt,insert:()=>A,insertExpression:()=>P,intergartionInitialized:()=>tn,isAccessor:()=>zt,isCustomElement:()=>ye,isDOMNode:()=>Nt,isDelegatedEvent:()=>Pt,isDomElement:()=>H,isDomNode:()=>v,isDomText:()=>j,isEventHandler:()=>Je,isFunction:()=>Mt,isIntegrationInitialized:()=>nn,isJSXTemplate:()=>bt,isLitTemplateResult:()=>ge,isNativeElement:()=>Gt,isPromise:()=>L,isReactElement:()=>ht,isSVGElement:()=>Jt,isServer:()=>E,isTemplateFactory:()=>Et,isVisible:()=>lt,iterateFn:()=>Dt,makeArrayFlat:()=>_e,mergeProps:()=>Wt,observeIntersection:()=>mt,observeResize:()=>gt,query:()=>ee,queryAll:()=>Ze,registerCreateComponent:()=>Zt,registerGlobal:()=>Tt,removeAttribute:()=>it,removeChildren:()=>ft,removeClass:()=>tt,removeDelegatedEventListener:()=>re,render:()=>ce,resetIntegration:()=>on,runHydrationAt:()=>R,runWithoutHydration:()=>Ce,scrollIntoView:()=>ct,setAttribute:()=>x,setClassList:()=>I,setClassName:()=>_,setDynamicAttribute:()=>W,setDynamicBoolAttribute:()=>ue,setDynamicProperty:()=>K,setProperty:()=>M,setServerMode:()=>Te,setStyle:()=>$,setStyles:()=>me,shouldSetAsProperty:()=>ze,splitProps:()=>Kt,spread:()=>qt,templateNode:()=>_t,toAttributeName:()=>Ge,toggleClass:()=>nt,waitForElement:()=>yt});module.exports=Be(mn);function Ge(e){return e.startsWith("aria-")||e.startsWith("data-")?e:/[A-Z]/.test(e)?e.replace(/([A-Z])/g,"-$1").toLowerCase():e}function Je(e){return e.startsWith("@")||e.startsWith("on")&&e.length>2}function Xe(e){return e.startsWith("@")?e.slice(1):e.startsWith("on")?e.slice(2).toLowerCase():e}function ze(e,t){let n=new Set(["checked","value","selected","disabled","readonly","required","multiple","open","contenteditable","draggable","spellcheck"]),o={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)||o[e]&&o[e].has(t)}var Ue=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),Ye=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"]),O="http://www.w3.org/2000/svg";function ye(e){return e.localName.includes("-")}function k(e,t,n,o=!1){if(n==null){e.removeAttribute(t);return}if(ye(e)){e[t]=n;return}x(e,t,n,o)}var D=new Set(["className","value","checked","selected","innerHTML","innerText","textContent","indeterminate","htmlFor"]);function ee(e,t=document){return t.querySelector(e)}function Ze(e,t=document){return Array.from(t.querySelectorAll(e))}function Qe(e,t){return e.closest(t)}function et(e,...t){e.classList.add(...t)}function tt(e,...t){e.classList.remove(...t)}function nt(e,...t){t.forEach(n=>e.classList.toggle(n))}function ot(e,t){return e.classList.contains(t)}function x(e,t,n,o=!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 rt(e,t){return e.getAttribute(t)}function it(e,t){e.removeAttribute(t)}function me(e,t){Object.assign(e.style,t)}function st(e,t){return window.getComputedStyle(e).getPropertyValue(t)}function at(e,t={},...n){let o=document.createElement(e);return Object.entries(t).forEach(([r,f])=>{if(r==="class"||r==="className")o.className=f;else if(r==="style"&&typeof f=="object")me(o,f);else if(r.startsWith("on")&&typeof f=="function"){let s=r.slice(2).toLowerCase();o.addEventListener(s,f)}else x(o,r,f)}),n.forEach(r=>{typeof r=="string"?o.appendChild(document.createTextNode(r)):o.appendChild(r)}),o}function ft(e){for(;e.firstChild;)e.removeChild(e.firstChild)}function ut(e,...t){t.forEach(n=>{typeof n=="string"?e.appendChild(document.createTextNode(n)):e.appendChild(n)})}function lt(e){let t=e.getBoundingClientRect();return t.top>=0&&t.left>=0&&t.bottom<=window.innerHeight&&t.right<=window.innerWidth}function ct(e,t={behavior:"smooth",block:"nearest"}){e.scrollIntoView(t)}function dt(e){let t=e.getBoundingClientRect();return{top:t.top+window.pageYOffset,left:t.left+window.pageXOffset}}function pt(e,t,n,o){let r=f=>{let s=f.target.closest(n);s&&e.contains(s)&&o(f,s)};return e.addEventListener(t,r),()=>{e.removeEventListener(t,r)}}function yt(e,t=5e3){return new Promise((n,o)=>{let r=ee(e);if(r){n(r);return}let f=new MutationObserver(()=>{let i=ee(e);i&&(f.disconnect(),clearTimeout(s),n(i))});f.observe(document.body,{childList:!0,subtree:!0});let s=setTimeout(()=>{f.disconnect(),o(new Error(`Element ${e} not found within ${t}ms`))},t)})}function mt(e,t,n={}){let o=new IntersectionObserver(r=>{r.forEach(f=>{t(f.isIntersecting)})},n);return o.observe(e),()=>{o.disconnect()}}function gt(e,t){let n=new ResizeObserver(o=>{o.forEach(t)});return n.observe(e),()=>{n.disconnect()}}var xt=typeof Symbol=="function"&&Symbol.for?Symbol.for("react.element"):60103;function ht(e){return typeof e=="object"&&e!==null&&e.$$typeof===xt}function ge(e){return e&&typeof e=="object"&&e.strings&&Array.isArray(e.strings)&&e.values&&Array.isArray(e.values)}function Et(e){if(typeof e!="function")return!1;try{let t=e();return ge(t)}catch{return!1}}function bt(e){return typeof e=="object"&&e!==null&&(e.$$typeof==="template"||typeof e.type=="function")}function Nt(e){return e instanceof Node}function Tt(e,t,n="Fluixi"){typeof globalThis<"u"&&(typeof globalThis[n]>"u"&&(globalThis[n]={}),typeof globalThis[n][e]>"u"&&(globalThis[n][e]=t))}function wt(e,t,n="Fluixi"){return typeof globalThis<"u"&&typeof globalThis[n]<"u"&&typeof globalThis[n][e]<"u"?globalThis[n][e]:t}var m=require("@fluixi/reactive/signal");var xe="1.0.0-alpha.79";var he=require("@fluixi/reactive/version"),h={dom:xe,reactive:he.VERSION};function Ee(e){h.core&&e.setAttribute("fluixi",h.core),e.setAttribute("fx-dom",h.dom),e.setAttribute("fx-reactive",h.reactive),typeof globalThis<"u"&&(globalThis.Fluixi=h)}function be(){let e=[h.core,h.dom,h.reactive].filter(t=>t!==void 0);new Set(e).size<=1||console.warn(`[fluixi] package versions disagree — core ${h.core??"(absent)"}, dom ${h.dom}, reactive ${h.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 b(e){return typeof e=="function"&&e[Symbol.for("fluixi-component")]===!0}var c=require("@fluixi/reactive/signal");var E=typeof document>"u";function Te(e){E=e}var te=Symbol.for("fluixi.server-node"),Ne=null;function F(){if(!Ne)throw new Error("[fluixi] server render ran before @fluixi/dom/server loaded");return Ne}function v(e){return e!=null&&e[te]===!0?!0:typeof Node<"u"&&e instanceof Node}function H(e){return e!=null&&e[te]===!0?e.nodeType===1:typeof Element<"u"&&e instanceof Element}function j(e){return e!=null&&e[te]===!0?e.nodeType===3:typeof Text<"u"&&e instanceof Text}var l={active:!1,cursor:null,parents:[]},we=null;function Se(e){we=e}function q(){return we}function ne(e,t){return l.active&&t.parentNode===e}function oe(e){let t=l.parents.lastIndexOf(e);t!==-1&&(l.parents.length=t),l.cursor=e.nextSibling}function ve(){return l.active?l.cursor:null}function R(e,t){if(!e||e.parentNode==null)return t();let n=l.active,o=l.cursor,r=l.parents;l.active=!0,l.cursor=e,l.parents=[];try{return t()}finally{l.active=n,l.cursor=o,l.parents=r}}function Ce(e){if(!l.active)return e();let t=l.cursor,n=l.parents;l.active=!1,l.parents=[];try{return e()}finally{l.active=!0,l.cursor=t,l.parents=n}}function Ae(e){if(!l.active||e==null)return;let t=Array.isArray(e)?e[e.length-1]:e;t&&typeof t.nodeType=="number"&&oe(t)}function St(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 o=0,r=e;for(;r=r.previousElementSibling;)r.tagName===e.tagName&&o++;n+=`:nth-of-type(${o+1})`,t.unshift(n),e=e.parentElement}return t.join(">")}function vt(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 Ct(e){return vt(St(e))}var At=()=>"xxyxxxxxxy-4xx8".replace(/[xy]/g,function(e){let t=Math.random()*16|0;return(e==="x"?t:t&3|8).toString(16)}),Rt={};var Re=new Map,V=new Set,B=new Set(["scroll","focus","blur","load","error","resize","mouseenter","mouseleave","pointerenter","pointerleave","gotpointercapture","lostpointercapture"]);function ie(e){if(!E)for(let t of e)V.has(t)||B.has(t)||(V.add(t),document.addEventListener(t,Lt))}function Lt(e){let t=`$$${e.type}`,n=e.composedPath&&e.composedPath()[0]||e.target;for(;n;){let o=n[t];if(o&&!n.disabled&&(o(e),e.cancelBubble))return;n=n.host&&n.host!==n&&n.host instanceof Element?n.host:n.parentNode}}function Le(e,t,n){if(e[`$$${t}`]=n,B.has(t)){let o=`__fx_${t}`;if(!e[o]){let r=f=>{e[`$$${t}`]?.(f)};e.addEventListener(t,r),e[o]=r}return}V.has(t)||ie([t])}function re(e,t){delete e[`$$${t}`];let n=`__fx_${t}`,o=e[n];o&&(e.removeEventListener(t,o),delete e[n])}function Pt(e){return!B.has(e)}function Mt(e){return typeof e=="function"}function S(e,t=!1){if(E)return F().createText(e);if(l.active&&!t){let n=q()?.hydrateText(e);if(n)return n}return document.createTextNode(e)}function se(e,t=!1){if(E)return F().createElement(e,t);if(l.active){let n=q()?.hydrateElement(e);if(n)return n}return t?document.createElementNS(O,e):document.createElement(e)}function Pe(e,t=!1){let n=Re.get(e);if(n)return n;let o=document.createElement("template");return t?o.innerHTML=`<svg>${e}</svg>`:o.innerHTML=e,Re.set(e,o),o}function _t(e,t,n=!1,o=!1){if(E){let r=F();return n?r.parseTemplate(e,o):r.createRaw(e)}if(l.active){let r=q()?.hydrateStatic(t);if(r)return r}return Me(Pe(e,o),o).firstChild}function It(e,t){if(!l.active)return t();let n=R(e.nextSibling,t);if(typeof n=="function"){let o=n;return((...r)=>l.active?R(e.nextSibling,()=>o(...r)):o(...r))}return n}function $t(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 Ot(e,t){let n=[];for(let o=e.nextSibling;o&&o!==t;o=o.nextSibling)n.push(o);return n}function Me(e,t=!1){let n=e.content.cloneNode(!0);return t?n.firstChild:n}function _e(e){return Array.isArray(e)?e.length===2&&e[1]===" "?Array.isArray(e[0])?_e(e[0]):(typeof e[0]=="function",e[0]):e.length===1&&typeof e[0]=="function"?e[0]:e:e}function kt(e){return typeof e!="function"?null:e._name||e.name||"anonymous"}function Dt(e){if((0,m.isSignal)(e)||b(e)||typeof e!="function")return e;let t=e();for(;typeof t=="function"&&!(0,m.isSignal)(t)&&!b(t);)t=t();return t}var T=0,Ft=200;function Ht(e,t,n,o,r){let f=o,s=new Map;return(0,c.createRenderEffect)(()=>{let i;if(b(e)&&!(0,m.isSignal)(e)){if(!s.has(e)){T++;try{let a=e();s.set(e,a)}finally{T--}}for(i=s.get(e);typeof i=="function"&&(0,m.isSignal)(i);)i=i()}else for(i=e();typeof i=="function"&&(0,m.isSignal)(i);)i=i();{let a=0;for(;typeof i=="function"&&a++<50;)if(b(i)){if(!s.has(i)){let u=i;T++;try{let d=u();s.set(u,d)}finally{T--}}i=s.get(i)}else if((0,m.isSignal)(i))i=i();else if(i=i(),typeof i!="function"||!(0,m.isSignal)(i)&&!b(i))break}T++;try{f=P(t,i,n,f,s),r(f)}finally{T--}})}function A(e,t,n,o){if(T>Ft)return console.error("[insert] Exceeded max call depth — possible infinite loop."),()=>null;n!==void 0&&!n&&(n=S("",!0),e.appendChild(n));let r=o??null,f=a=>Array.isArray(a)&&a.some(u=>typeof u=="function"),s=a=>typeof a=="function"?a:()=>a;if(typeof t!="function"&&!f(t)){T++;try{r=P(e,t,n,r)}finally{T--}return()=>r}let i=Ht(s(t),e,n,r,a=>{r=a});return()=>(i?.(),r)}function P(e,t,n,o,r){if(t==null||typeof t=="boolean")return w(e,o,n);if(typeof t=="function")for(;typeof t=="function";)t=t();if(t==null||typeof t=="boolean")return w(e,o,n);if(L(t)){let s=S("",!0);return Array.isArray(o)?o.length>0?(e.replaceChild(s,o[0]),w(e,o.slice(1),n)):g(e,s,n):o?e.replaceChild(s,o):g(e,s,n),t.then(i=>{s.parentNode===e&&P(e,i,s.nextSibling,s)}).catch(i=>{console.error("Error resolving promise in insertExpression:",i)}),s}let f=typeof t;if(f==="string"||f==="number"){if(f==="number"&&(t=String(t)),Array.isArray(o)){if(o.length===0){let i=S(t);return g(e,i,n),i}if(o.length===1&&o[0].nodeType===3)return o[0].data=t,o;o=w(e,o,n)}if(o&&j(o))return o.data=t,o;let s=S(t);return o&&o.parentNode===e?e.replaceChild(s,o):ne(e,s)||g(e,s,n),s}if(v(t))return ne(e,t)?(oe(t),t):Array.isArray(o)?(o.length===0?g(e,t,n):o[0].parentNode===e?(e.replaceChild(t,o[0]),w(e,o.slice(1),n)):g(e,t,n),t):(o?o!==t&&(o.parentNode===e?e.replaceChild(t,o):g(e,t,n)):g(e,t,n),t);if(Array.isArray(t)){let s=[],i=Array.isArray(o)?o:o?[o]:[],a=[];N(t,s,e,n,!0,r,a);let u=jt(e,i,s,n);for(let d of a){let p=A(e,d.sig,d.marker);(0,c.onCleanup)(()=>{w(e,p()),d.marker.parentNode===e&&e.removeChild(d.marker)})}return u}if(f==="object"&&t!==null&&typeof t=="object"){let s=t;if("type"in s&&"props"in s){let i=s;if(typeof i.type=="function"){let a=i.type(i.props||{});return P(e,a,n,o)}}}return w(e,o,n)}function N(e,t,n,o,r=!0,f,s){for(let i=0;i<e.length;i++){let a=e[i];if(!(a==null||typeof a=="boolean")){for(;typeof a=="function"&&!L(a)&&!(0,m.isSignal)(a)&&!b(a)&&(a=a(),!(a==null||typeof a=="boolean")););if(!(a==null||typeof a=="boolean")){if(typeof a=="function"){let u;for(b(a)&&!(0,m.isSignal)(a)?(f||(f=new Map),f.has(a)||f.set(a,a()),u=f.get(a)):u=a();typeof u=="function"&&!L(u)&&!(0,m.isSignal)(u)&&!b(u);)f||(f=new Map),f.has(u)||f.set(u,u()),u=f.get(u);if(u==null||typeof u=="boolean")continue;if(typeof u=="function"){if((0,m.isSignal)(u)){if(s){let p=S("",!0);t.push(p),s.push({marker:p,sig:u});continue}let d=u();for(;typeof d=="function"&&(0,m.isSignal)(d);)d=d();if(d==null||typeof d=="boolean")continue;Array.isArray(d)?N(d,t,n,o,r,f):N([d],t,n,o,r,f);continue}continue}Array.isArray(u)?N(u,t,n,o,r,f,s):N([u],t,n,o,r,f,s);continue}if(L(a)){let u=S("",!0);t.push(u),a.then(d=>{if(u.parentNode){let p=[];if(N([d],p,u.parentNode,void 0,!1,f),p.length>0){u.parentNode.replaceChild(p[0],u);for(let y=1;y<p.length;y++)u.parentNode?.insertBefore(p[y],p[y-1].nextSibling)}}}).catch(d=>console.error("Error resolving promise in array:",d));continue}if(Array.isArray(a)){N(a,t,n,o,r,f,s);continue}if(v(a)){t.push(a);continue}if(typeof a=="object"&&a!==null&&"type"in a&&"props"in a){let u=a;if(typeof u.type=="function"){let d=u.type(u.props||{});Array.isArray(d)?N(d,t,n,o,!1,f):N([d],t,n,o,!1,f);continue}}if(typeof a=="string"||typeof a=="number"){let u=String(a);if(u.trim()===""&&u!==" ")continue;t.push(S(u));continue}t.push(S(String(a)))}}}}function jt(e,t,n,o){for(let p=0;p<n.length;p++){let y=n[p].parentNode;y!==null&&y!==e&&y.nodeType!==11&&(n=n.slice(),n[p]=n[p].cloneNode(!0))}let r=n.length,f=t.length,s=r,i=0,a=0,u=f>0?t[f-1].nextSibling??void 0:o,d=null;for(;i<f||a<s;){if(t[i]===n[a]){i++,a++;continue}for(;f>i&&s>a&&t[f-1]===n[s-1];)f--,s--;if(f===i){let p=s<r?a?n[a-1].nextSibling??void 0:n[s-a]:u;for(;a<s;)g(e,n[a++],p)}else if(s===a)for(;i<f;)(!d||!d.has(t[i]))&&t[i].parentNode===e&&e.removeChild(t[i]),i++;else if(t[i]===n[s-1]&&n[a]===t[f-1]){let p=t[--f].nextSibling;g(e,n[a++],t[i++].nextSibling),g(e,n[--s],p),t[f]=t[i-1]}else{if(!d){d=new Map;let y=a;for(;y<s;)d.set(n[y],y++)}let p=d.get(t[i]);if(p!=null)if(a<p&&p<s){let y=i,Z=1;for(;++y<f&&y<s&&!(!d.has(t[y])||d.get(t[y])!==p+Z);)Z++;if(Z>p-a){let He=t[i];for(;a<p;)g(e,n[a++],He)}else t[i].parentNode===e?e.replaceChild(n[a++],t[i++]):(g(e,n[a++],u),i++)}else i++;else t[i].parentNode===e&&e.removeChild(t[i]),i++}}return n}function w(e,t,n){if(t)if(Array.isArray(t))for(let o=0;o<t.length;o++)t[o].parentNode===e&&e.removeChild(t[o]);else t.parentNode===e&&e.removeChild(t);return null}function g(e,t,n){l.active&&t.parentNode===e||(n&&n.parentNode===e?e.insertBefore(t,n):e.appendChild(t))}function M(e,t,n){n==null?delete e[t]:e[t]=n}function ae(e,t,n){let o=n,r;return Array.isArray(n)&&(o=n[0],r=n[1]),typeof o!="function"?()=>{}:(e.addEventListener(t,o,r),()=>e.removeEventListener(t,o,r))}function fe(e,t){let n=(o,r)=>{typeof o=="function"&&o(e,r??(()=>{}))};if(typeof t=="function"){n(t);return}if(Array.isArray(t)){if(typeof t[0]=="function"){n(t[0],t[1]);return}for(let o of t)Array.isArray(o)?n(o[0],o[1]):n(o)}}function W(e,t,n,o=!1){return typeof n!="function"?(x(e,t,n,o),()=>{}):(0,c.createRenderEffect)(()=>{let r=typeof n=="function"?n():n;x(e,t,r,o)})}function K(e,t,n){return typeof n!="function"?(M(e,t,n),()=>{}):(0,c.createRenderEffect)(()=>{let o=typeof n=="function"?n():n;M(e,t,o)})}function ue(e,t,n){return typeof n!="function"?(x(e,t,!!n),()=>{}):(0,c.createRenderEffect)(()=>{let o=n();x(e,t,!!o)})}function _(e,t){if(t==null){e.removeAttribute("class");return}if(typeof t=="function"){(0,c.createRenderEffect)(()=>_(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(o=>{let r=t[o];return typeof r=="function"?r():!!r}).join(" ");e.setAttribute("class",n);return}e.setAttribute("class",String(t))}function I(e,t,n){if(!(!t||typeof t!="object"))for(let o in t){let r=t[o],f=o.split(/\s+/).filter(Boolean);if(typeof r=="function"&&n)n.push((0,c.createRenderEffect)(()=>{let s=!!r();for(let i of f)e.classList.toggle(i,s)}));else{let s=!!(typeof r=="function"?r():r);for(let i of f)e.classList.toggle(i,s)}}}function $(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 o in n){let r=n[o];r==null?e.style[o]="":e.style[o]=r}}function qt(e){let{element:t,props:n,prevProps:o=Rt,isSVG:r=!1,skipChildren:f=!1}=e;if(!t||!H(t))return console.error("[spread] Error: element is not a DOM Element!"),()=>{};if(!n)return console.warn("[spread] Warning: props is undefined!"),()=>{};let s=r||t.namespaceURI===O,i=[];for(let a in n){if(f&&a==="children")continue;let u=n[a],d=o[a];if(u===d)continue;if(a==="ref"){le(u,t);continue}if(a==="use"){fe(t,u);continue}if(a.startsWith("on:")){i.push(ae(t,a.slice(3),u));continue}if(a.startsWith("prop:")){i.push(K(t,a.slice(5),u));continue}if(a.startsWith("attr:")){i.push(W(t,a.slice(5),u,s));continue}if(a.startsWith("bool:")){i.push(ue(t,a.slice(5),u));continue}if(a==="class"||a==="className"){typeof u=="function"?i.push((0,c.createRenderEffect)(()=>_(t,u()))):_(t,u);continue}if(a==="classList"){typeof u=="function"?i.push((0,c.createRenderEffect)(()=>I(t,u()))):I(t,u,i);continue}if(a==="style"){typeof u=="function"?i.push((0,c.createRenderEffect)(()=>$(t,u()))):$(t,u);continue}if(a.startsWith("on")){let y=a.slice(2).toLowerCase();d&&re(t,y),u&&Le(t,y,u);continue}let p=D.has(a)||!s&&a in t;typeof u=="function"?i.push(p?K(t,a,u):W(t,a,u,s)):i.push((0,c.createRenderEffect)(()=>p?M(t,a,n[a]):x(t,a,n[a],s)))}for(let a in o)if(!(a in n))if(a.startsWith("on")){let u=a.slice(2).toLowerCase();re(t,u)}else D.has(a)?M(t,a,null):t.removeAttribute(a);return()=>{i.forEach(a=>a())}}function Vt(e,t,n=!1){for(let o in t){let r=t[o];if(o==="ref"){le(r,e);continue}if(o!=="children"){if(o==="use"){fe(e,r);continue}if(o.startsWith("on:")){ae(e,o.slice(3),r);continue}if(o.startsWith("prop:")){K(e,o.slice(5),r);continue}if(o.startsWith("attr:")){W(e,o.slice(5),r,n);continue}if(o.startsWith("bool:")){ue(e,o.slice(5),r);continue}if(o.startsWith("on")&&o.length>2){let f=o.slice(2).toLowerCase();if(typeof r=="function")if(B.has(f)){e[`$$${f}`]=r;let s=`__fx_${f}`;if(!e[s]){let i=a=>{e[`$$${f}`]?.(a)};e.addEventListener(f,i),e[s]=i}}else e[`$$${f}`]=r,V.has(f)||ie([f]);continue}if(o==="class"||o==="className"){_(e,r);continue}if(o==="classList"){typeof r=="function"?(0,c.createRenderEffect)(()=>I(e,r())):I(e,r);continue}if(o==="style"){typeof r=="function"?(0,c.createRenderEffect)(()=>$(e,r())):$(e,r);continue}if(o==="innerHTML"){if(typeof r=="function"){let f=(0,c.createEffect)(()=>{let s=r();for(;typeof s=="function";)s=s();e.innerHTML=s});(0,c.onCleanup)(()=>f())}else e.innerHTML=r;continue}if(o==="value"&&(e.tagName==="INPUT"||e.tagName==="TEXTAREA")){if(typeof r=="function"){let f=(0,c.createEffect)(()=>{let s=r();for(;typeof s=="function"&&s.length===0;)s=s();document.activeElement!==e&&(e.value=s??"")});(0,c.onCleanup)(()=>{f()})}else(0,c.createRenderEffect)(()=>{document.activeElement!==e&&(e.value=t[o]??"")});continue}if(o==="checked"&&e.tagName==="INPUT"){if(typeof r=="function"){let f=(0,c.createEffect)(()=>{let s=r();for(;typeof s=="function"&&s.length===0;)s=s();document.activeElement!==e&&(e.checked=s??"")});(0,c.onCleanup)(()=>{f()})}else(0,c.createRenderEffect)(()=>{document.activeElement!==e&&(e.checked=t[o]??"")});continue}if(o==="value"&&e.tagName==="SELECT"){if(typeof r=="function"){let f=!0,s=(0,c.createEffect)(()=>{let i=r();for(;typeof i=="function"&&i.length===0;)i=i();f?(f=!1,queueMicrotask(()=>{e.value=i??""})):e.value=i??""});(0,c.onCleanup)(()=>{s()})}else{let f=!0;(0,c.createRenderEffect)(()=>{let s=t[o];f?(f=!1,queueMicrotask(()=>{e.value=s??""})):e.value=s??""})}continue}if(typeof r=="function"){let f=(0,c.createEffect)(()=>{let s=r();for(;typeof s=="function"&&s.length===0;)s=s();k(e,o,s,n)});(0,c.onCleanup)(()=>{f()})}else(0,c.createRenderEffect)(()=>k(e,o,t[o],n))}}}function Wt(...e){let t=o=>{for(let r=e.length-1;r>=0;r--){let f=e[r];if(f&&o in f&&f[o]!==void 0)return f[o]}},n=o=>{for(let r of e)if(r&&o in r)return!0;return!1};return new Proxy({},{get:(o,r)=>t(r),has:(o,r)=>n(r),ownKeys:()=>{let o=new Set;for(let r of e)if(r)for(let f of Reflect.ownKeys(r))o.add(f);return[...o]},getOwnPropertyDescriptor:(o,r)=>n(r)?{enumerable:!0,configurable:!0,get:()=>t(r)}:void 0})}function Kt(e,...t){let n=new Set;for(let s of t)for(let i of s)n.add(i);let o=s=>({enumerable:!0,configurable:!0,get:()=>e[s]}),r=t.map(s=>{let i=new Set(s);return new Proxy({},{get:(a,u)=>i.has(u)?e[u]:void 0,has:(a,u)=>i.has(u)&&u in e,ownKeys:()=>Array.from(i).filter(a=>a in e),getOwnPropertyDescriptor:(a,u)=>i.has(u)&&u in e?o(u):void 0})}),f=new Proxy({},{get:(s,i)=>n.has(i)?void 0:e[i],has:(s,i)=>!n.has(i)&&i in e,ownKeys:()=>Reflect.ownKeys(e).filter(s=>!n.has(s)),getOwnPropertyDescriptor:(s,i)=>!n.has(i)&&i in e?o(i):void 0});return[...r,f]}function le(e,t){if(e){if(v(e)){let n=t,o=e;if(!n)return;typeof n=="function"?n(o):typeof n=="object"&&"current"in n&&(n.current=o);return}typeof e=="function"?e(t):typeof e=="object"&&"current"in e&&(e.current=t)}}function Bt(e,t,n){let o=t||document.body,r=(0,c.readChildren)(()=>e),f=[];return(0,c.batch)(()=>{let s=(0,c.createRenderEffect)(()=>{let i=r();Array.isArray(i)?(i.forEach(a=>o.appendChild(a)),f.push(()=>{i.forEach(a=>{a.parentNode===o&&o.removeChild(a)})})):v(i)&&(o.appendChild(i),f.push(()=>{i.parentNode===o&&o.removeChild(i)}))});f.push(s),(0,c.onCleanup)(()=>{f.forEach(i=>i())})}),null}function Gt(e){return typeof e=="string"&&e.toLowerCase()===e}function Jt(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 Xt(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}function L(e){return e!=null&&(typeof e=="object"||typeof e=="function")&&typeof e.then=="function"||e instanceof Promise}function zt(e){return typeof e=="function"&&e.length===0&&(0,m.isSignal)(e)}function ce(e,t,n){if(!t)throw new Error("Container element is required");let o,r,f=[];return(0,c.createRoot)(s=>{(0,c.batch)(()=>{l.active||(t.textContent=""),Ee(t),be(),A(t,e)}),r=s}),()=>{r?.(),o?.(),f.forEach(s=>s()),t.textContent=""}}function Ut(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 Yt="__fx_dom_create_component__",C=globalThis[Yt]??={fn:null};function Zt(e){C.fn=e}function Qt(e={}){let t=e.signalSystem?.createComponent;t&&(C.fn=t)}function en(e,t){return C.fn?C.fn(e,t):(()=>e(t))}var tn=()=>C.fn!==null,nn=()=>C.fn!==null;function on(){C.fn=null}var G,rn={getStore:()=>G,run(e,t){let n=G;G=e;try{return t()}finally{G=n}}},sn=rn;function Ie(){return sn.getStore()}var J=require("@fluixi/reactive/signal");var an="__FX_DATA__";var de;function $e(){let e=globalThis.__FX_DATA__;if(e)return e;if(de!==void 0)return de;let t=null;if(typeof document<"u"){let n=document.getElementById(an)?.textContent;if(n)try{t=JSON.parse(n)}catch{t=null}}return de=t}function X(){for(;;){for(;l.cursor&&l.cursor.nodeType===3&&l.cursor.data==="";)l.cursor=l.cursor.nextSibling;if(l.cursor!=null||!l.parents.length)return;l.cursor=l.parents.pop().nextSibling}}var fn=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),z=typeof process<"u"&&process.env&&!1;function U(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 un(e){X();let t=l.cursor;return t&&t.nodeType===1&&t.tagName.toLowerCase()===e.toLowerCase()?(fn.has(e.toLowerCase())?l.cursor=t.nextSibling:(l.parents.push(t),l.cursor=t.firstChild),t):(z&&t&&U(`<${e}>`,t),null)}function ln(e){X();let t=l.cursor;return t&&t.nodeType===1&&t.tagName.toLowerCase()===e.toLowerCase()?(l.cursor=t.nextSibling,t):(z&&t&&U(`<${e}> (static)`,t),null)}function cn(e){if(e===""){let n=l.cursor;return n&&n.nodeType===3&&n.data!==""?(l.cursor=n.nextSibling,n.data="",n):null}X();let t=l.cursor;return t&&t.nodeType===3?(l.cursor=t.nextSibling,t.nodeValue!==e&&(t.nodeValue=e),t):(z&&t&&U(`text ${JSON.stringify(e.slice(0,24))}`,t),null)}function dn(e){X();let t=l.cursor;return t&&t.nodeType===8&&t.data===e?(l.cursor=t.nextSibling,t):(z&&t&&U(`marker <!--${e.slice(0,24)}-->`,t),null)}var Oe=!1;function pn(){Oe||(Oe=!0,Se({hydrateElement:un,hydrateText:cn,hydrateMarker:dn,hydrateStatic:ln}))}function Y(e,t,n){pn(),l.active=!0,l.cursor=t.firstChild,l.parents=[];let o=$e(),r=n?.resourceNamespace,f=0;(0,J.setResourceIdSource)(()=>r?`${r}:r${f++}`:`r${f++}`),(0,J.setServerDataGetter)(o?s=>s in o?{value:o[s]}:void 0:null);try{return ce(e,t)}finally{l.active=!1,l.cursor=null,l.parents=[]}}var pe="fluixi-island";function De(e){let{component:t,props:n={},name:o}=e,r=se(pe),f=o??t.name??"Island";x(r,"name",f),x(r,"props",JSON.stringify(n??{}));let s=E?Ie():void 0;if(s){let i=s.nextIslandNamespace(f);A(r,()=>s.withResourceScope(i,()=>t(n)))}else A(r,()=>t(n));return r}var ke=!1;function yn(){if(ke||typeof document>"u")return;ke=!0;let e=document.createElement("style");e.textContent=`${pe}{display:contents}`,document.head.appendChild(e)}function Fe(e){if(typeof document>"u")return;yn();let t=document.querySelectorAll(pe),n=new Map;t.forEach(o=>{let r=o.getAttribute("name")??"",f=n.get(r)??0;n.set(r,f+1);let s=e[r];if(!s){typeof process>"u"&&console.warn(`[fluixi] island "${r}" has no component in the registry — left static.`);return}let i={};try{i=JSON.parse(o.getAttribute("props")||"{}")}catch{}Y(()=>s(i),o,{resourceNamespace:`${r}#${f}`})})}