@fluixi/core 1.0.0-alpha.76 → 1.0.0-alpha.77
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/README.md +104 -39
- package/dist/cdn/core.global.js +1 -1
- package/dist/src/cdn/core.cjs +1 -1
- package/dist/src/cdn/core.mjs +1 -1
- package/dist/src/index.cjs +1 -1
- package/dist/src/index.mjs +1 -1
- package/dist/src/lib/client/index.cjs +1 -1
- package/dist/src/lib/client/index.mjs +1 -1
- package/dist/src/lib/core.cjs +1 -1
- package/dist/src/lib/core.d.ts +4 -3
- package/dist/src/lib/core.d.ts.map +1 -1
- package/dist/src/lib/core.js +4 -3
- package/dist/src/lib/core.mjs +1 -1
- package/dist/src/lib/index.cjs +1 -1
- package/dist/src/lib/index.mjs +1 -1
- package/dist/src/lib/render/index.cjs +1 -1
- package/dist/src/lib/render/index.mjs +1 -1
- package/dist/src/lib/render/versions.cjs +1 -1
- package/dist/src/lib/render/versions.mjs +1 -1
- package/dist/src/version.generated.cjs +1 -1
- package/dist/src/version.generated.d.ts +1 -1
- package/dist/src/version.generated.js +1 -1
- package/dist/src/version.generated.mjs +1 -1
- package/dist/tsconfig.lib.tsbuildinfo +1 -1
- package/package.json +11 -11
package/dist/cdn/core.global.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var Fluixi=(()=>{var jt=Object.defineProperty;var Ci=Object.getOwnPropertyDescriptor;var _i=Object.getOwnPropertyNames;var Pi=Object.prototype.hasOwnProperty;var N=(e,t)=>()=>(e&&(t=e(e=0)),t);var Jr=(e,t)=>{for(var r in t)jt(e,r,{get:t[r],enumerable:!0})},Ei=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of _i(t))!Pi.call(e,o)&&o!==r&&jt(e,o,{get:()=>t[o],enumerable:!(n=Ci(t,o))||n.enumerable});return e};var $i=e=>Ei(jt({},"__esModule",{value:!0}),e);function Nt(e){if(e.watchers)for(let t of[...e.watchers])t._notify(e)}function Li(e){if(m.untracked)return e();m.untracked=!0;try{return e()}finally{m.untracked=!1}}function ae(e){let t=Oe(e);return e&&(e.owned??=[]).push(t),t}function le(e,t=!0){ke(e,t)}function tn(e){return!!e&&e.disposed===!0}function Oe(e){return{cleanups:null,owned:null,parent:e,contexts:null}}function W(e){let t=Symbol("context");return{id:t,defaultValue:e,Provider:r=>{let n=m.owner,o=Oe(n);(o.contexts=new Map).set(t,r.value),n&&(n.owned??=[]).push(o),m.owner=o;try{return r.children}finally{m.owner=n}}}}function H(e){let t=m.owner;for(;t;){if(t.contexts&&t.contexts.has(e.id))return t.contexts.get(e.id);t=t.parent}return e.defaultValue}function rn(e,t){let r=e;for(;r;){if(r.contexts&&r.contexts.has(t.id))return r.contexts.get(t.id);r=r.parent}return t.defaultValue}function Di(e,t,r){let n=Oe(m.owner);(n.contexts=new Map).set(e.id,t),m.owner&&(m.owner.owned??=[]).push(n);let o=m.owner;m.owner=n;try{return r()}finally{m.owner=o}}function Ii(e){m.onSuspend=e}function qi(e){return m.onSuspend?(m.onSuspend(e,m.owner),!0):!1}function Fi(e){m.onError=e}function $(){return m.owner}function nn(e){let t=m.owner;return m.owner=e,t}function j(e,t){let r=m.owner;m.owner=e;try{return t()}finally{m.owner=r}}function x(e){if(m.owner){if(m.owner.disposed){e();return}(m.owner.cleanups??=[]).push(e)}}function ke(e,t=!0){if(!e.disposed){if(e.owned){for(let r=e.owned.length-1;r>=0;r--)ke(e.owned[r]);e.owned=null}if(e.cleanups){for(let r=e.cleanups.length-1;r>=0;r--)e.cleanups[r]();e.cleanups=null}t&&(e.disposed=!0)}}function D(e){let t=Oe(m.owner);m.owner&&(m.owner.owned??=[]).push(t);let r=m.owner;m.owner=t;try{return e(()=>ke(t))}finally{m.owner=r}}function Hi(e){m.hostSchedule=e??(t=>{Promise.resolve().then(t)})}function Vi(e){e.queued||(e.queued=!0,m.queue.push(e),!m.scheduled&&m.batchDepth===0&&(m.scheduled=!0,m.hostSchedule(It)))}function It(){if(m.scheduled=!1,m.flushing)return;m.flushing=!0;let e=0;try{for(;m.queue.length;){if(++e>1e5)throw new Error("[fluixi] effect flush did not settle (cycle?)");let t=m.queue;m.queue=[];for(let r of t)r.queued=!1,r.disposed||r.run()}}finally{m.flushing=!1}}function Wi(){m.batchDepth===0&&It()}function zi(e){m.batchDepth++;try{return e()}finally{--m.batchDepth===0&&It()}}function qt(e){let t=new Ui(e);return()=>t.dispose()}function Bi(e){return!!e&&typeof e.then=="function"}function v(e,t){let r=new Ni(e,{equals:t?.equals}),n=(()=>r.get()),o=(i=>{let a=typeof i=="function"?i(r.peek()):i;return r.set(a),Wi(),a});return Object.defineProperty(n,on,{value:!0,enumerable:!0}),Object.defineProperty(n,Ji,{value:{get value(){return r.peek()},get version(){return r.version}},enumerable:!1}),[n,o]}function g(e,t,r){let n=t,o=$(),i=new en(()=>j(o,()=>{try{return n=e(n)}catch(s){if(Bi(s))return qi(s),n;throw s}}),{equals:r?.equals}),a=(()=>i.get());return Object.defineProperty(a,on,{value:!0,enumerable:!0}),Object.defineProperty(a,Ki,{value:!0,enumerable:!0}),a}function S(e,t){let r=t;return qt(()=>{r=e(r)})}function sn(e,t){let r=t;qt(()=>{r=e(r)})}function C(e,t){let r=t;return qt(()=>{r=e(r)})}function _(e){return zi(e)}function O(e){return Li(e)}function an(e,t,r){let n=[];return x(()=>{for(let o of n)o.dispose();n=[]}),g(()=>{let o=e()||[];return O(()=>{if(o.length===0){for(let l of n)l.dispose();return n=[],r?.fallback?r.fallback():[]}let i=new Map;for(let l of n)i.has(l.item)||i.set(l.item,l);let a=[],s=new Set;for(let l=0;l<o.length;l++){let u=o[l],f=i.get(u);if(f&&!s.has(f))f.setIndex(l),a.push(f),s.add(f);else{let c,p,h;D(y=>{h=y;let[w,k]=v(l);p=k,c=t(u,w)});let d={item:u,rendered:c,dispose:h,setIndex:p};a.push(d),s.add(d)}}for(let l of n)s.has(l)||l.dispose();return n=a,a.map(l=>l.rendered)})})}function ln(e,t,r,n){let o=[],i=[];return x(()=>{for(let a of i)a.dispose();o=[],i=[]}),g(()=>{let a=e()||[];return O(()=>{if(a.length===0){for(let c of i)c.dispose();return o=[],i=[],n?.fallback?n.fallback():[]}let s=new Map;for(let c=0;c<o.length;c++)s.set(o[c],i[c]);let l=[],u=[],f=new Set;for(let c=0;c<a.length;c++){let p=t(a[c]),h=s.get(p);if(h&&!f.has(p))h.setIndex(c),l.push(h);else{let d,y,w;D(k=>{w=k;let[R,xe]=v(c);y=xe;let He=g(se=>(e()||[])[R()]??se,a[c]);d=r(He,R)}),l.push({rendered:d,dispose:w,setIndex:y})}u.push(p),f.add(p)}for(let[c,p]of s)f.has(c)||p.dispose();return o=u,i=l,l.map(c=>c.rendered)})})}function un(e,t,r){let n=[];return x(()=>{for(let o of n)o.dispose();n=[]}),g(()=>{let o=e()||[];return O(()=>{if(o.length===0){for(let l of n)l.dispose();return n=[],r?.fallback?r.fallback():[]}let i=n.length,a=o.length;for(let l=i;l<a;l++){let u,f,c,p=o[l];D(h=>{c=h;let[d,y]=v(p);f=y,u=t(d,l)}),n.push({rendered:u,setItem:f,dispose:c})}for(let l=a;l<i;l++)n[l].dispose();a<i&&(n=n.slice(0,a));let s=Math.min(i,a);for(let l=0;l<s;l++)n[l].setItem(o[l]);return n.map(l=>l.rendered)})})}function P(e){return typeof e=="function"&&e[Xi]===!0}function Gi(e){Yr&&Yr(e)}function cn(e){Mt=e}function Yi(e){return Mt?Mt(e):void 0}function fn(e){Lt=e}function Zi(){return Lt?Lt():void 0}function Qi(e,t){Zr&&Zr(e,t)}function pn(e,t=(r,n)=>r===n){let r=new Map;return S(()=>{let n=e();for(let[o,i]of r){let[a,s]=i,l=t(o,n);a()!==l&&s(l)}}),n=>{let o=r.get(n);if(!o){let[i,a]=v(!1);o=[i,a],r.set(n,o);let s=e();a(t(n,s))}return o[0]()}}function dn(e,t){let[r,n]=v(e(),t);return S(()=>{let o=e();t?.timeoutMs?setTimeout(()=>n(()=>o),t.timeoutMs):typeof requestIdleCallback=="function"?requestIdleCallback(()=>n(()=>o)):Promise.resolve().then(()=>n(()=>o))}),r}function hn(e,t){let r,n=(...o)=>{r!==void 0&&clearTimeout(r),r=setTimeout(()=>{r=void 0,e(...o)},t)};return x(()=>{r!==void 0&&clearTimeout(r)}),n}function es(e){return!!e&&typeof e.then=="function"}function J(e,t,r={}){let n,o;typeof t=="function"?(n=typeof e=="function"?e:()=>e,o=t):(n=()=>!0,o=e,t&&typeof t=="object"&&(r=t));let i=r.transport===!1?void 0:Zi(),a=i!==void 0?Yi(i):void 0,s=a!==void 0,[l,u]=v(a!==void 0?a.value:r.initialValue,{equals:!1}),[f,c]=v(void 0,{equals:!1}),[p,h]=v(a!==void 0||r.initialValue!==void 0?"ready":"unresolved",{equals:!1}),[d,y]=v(void 0,{equals:!1}),[w,k]=v(void 0,{equals:!1}),R=Rt,xe=!1;S(()=>{let L=n();if(w(),L===!1||L===null||L===void 0){R=Rt,_(()=>{h("unresolved"),y(void 0),c(void 0)});return}let Ve=xe;if(xe=!1,R!==Rt&&L===R&&!Ve)return;if(R=L,s){s=!1;return}let We=!1;x(()=>We=!0);let Br=O(p),Ti=O(l),Kr=Br==="ready"||Br==="refreshing";_(()=>{h(Kr?"refreshing":"pending"),c(void 0)});try{let Z=o(L,{value:Ti,refetching:Kr});es(Z)?(y(Z),Gi(Z),Z.then(ze=>{We||(i!==void 0&&Qi(i,ze),_(()=>{u(()=>ze),h("ready"),y(void 0)}))},ze=>{We||_(()=>{c(ze),h("errored"),y(void 0)})})):_(()=>{u(()=>Z),h("ready"),y(void 0)})}catch(Z){if(We)return;_(()=>{c(Z),h("errored"),y(void 0)})}});let He=()=>{let L=p();return L==="pending"||L==="refreshing"},se=(()=>{let L=f();if(L)throw L;if(He()){let Ve=d();if(Ve)throw Ve}return l()});return Object.defineProperties(se,{state:{get:p},loading:{get:He},error:{get:f},latest:{get:l}}),Object.defineProperty(se,Symbol.for("resource"),{value:!0,enumerable:!0}),Object.defineProperty(se,Symbol.for("signal"),{value:!0,enumerable:!0}),[se,{mutate:u,refetch:()=>{xe=!0,k(void 0)}}]}function Dt(e){if(typeof e=="function"&&!e.length){let t=e();return P(t)?t:Dt(t)}if(Array.isArray(e)){let t=[];for(let r=0;r<e.length;r++){let n=Dt(e[r]);Array.isArray(n)?t.push.apply(t,n):t.push(n)}return t}return e}function Q(e){let t=g(e);return g(()=>Dt(t()))}function mn(){let[e,t]=v(0),r=0;return{increment:()=>t(r+=1),decrement:()=>t(r-=1),inFallback:()=>e()>0}}function Ft(e,t){return Di(yn,e,t)}var ji,Ri,m,Xr,Gr,Se,Qr,Ni,en,Mi,Ui,on,Ki,Ji,Xi,Yr,Mt,Lt,Zr,Rt,yn,ts,ue,A=N(()=>{"use strict";ji="__fluixi_signal_next_state__",Ri=e=>{typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e)},m=globalThis[ji]??={consumer:null,untracked:!1,owner:null,queue:[],scheduled:!1,flushing:!1,batchDepth:0,hostSchedule:Ri,onSuspend:null,onError:null},Xr=0,Gr=1,Se=2,Qr=class{constructor(){this.observers=null,this.watchers=null,this.version=0}updateIfNecessary(){}track(){if(m.untracked)return;let e=m.consumer;e&&((this.observers??=new Set).add(e),(e.sources??=new Set).add(this))}},Ni=class extends Qr{constructor(e,t){super(),this._value=e,this._equals=t?.equals===!1?()=>!1:t?.equals??Object.is}get(){return this.track(),this._value}set(e){if(!this._equals(this._value,e)){if(this._value=e,this.version++,this.observers)for(let t of[...this.observers])t.markDirty(Se);Nt(this)}}peek(){return this._value}},en=class extends Qr{constructor(e,t){super(),this._threw=!1,this._initialized=!1,this.state=Se,this.sources=null,this._fn=e,this._equals=t?.equals===!1?()=>!1:t?.equals??Object.is}get(){if(m.consumer===this)throw new Error("Signal.Computed cannot read itself");if(this.track(),this.updateIfNecessary(),this._threw)throw this._error;return this._value}updateIfNecessary(){if(this.state===Gr&&this.sources){for(let e of this.sources)if(e.updateIfNecessary(),this.state===Se)break}(this.state===Se||!this._initialized)&&this.recompute(),this.state=Xr}recompute(){if(this.sources){for(let a of this.sources)a.observers?.delete(this);this.sources.clear()}let e=m.consumer,t=m.untracked;m.consumer=this,m.untracked=!1;let r,n=!1,o;try{r=this._fn()}catch(a){n=!0,o=a,r=this._value}finally{m.consumer=e,m.untracked=t}let i=!this._initialized||this._threw!==n||(n?o!==this._error:!this._equals(this._value,r));if(this._initialized=!0,this._threw=n,this._error=o,this._value=r,i){if(this.version++,this.observers)for(let a of[...this.observers])a.markDirty(Se);Nt(this)}}markDirty(e){if(this.state>=e)return;let t=this.state===Xr;if(this.state=e,t){if(this.observers)for(let r of[...this.observers])r.markDirty(Gr);Nt(this)}}peek(){if(this.updateIfNecessary(),this._threw)throw this._error;return this._value}};Mi=class{constructor(e){this._watched=new Set,this._pending=new Set,this._notifyFn=e}watch(...e){for(let t of e)this._watched.add(t),(t.watchers??=new Set).add(this)}unwatch(...e){for(let t of e)this._watched.delete(t),t.watchers?.delete(this),this._pending.delete(t)}getPending(){let e=[...this._pending];return this._pending.clear(),e}_notify(e){if(!this._watched.has(e)||this._pending.has(e))return;let t=this._pending.size===0;this._pending.add(e),t&&this._notifyFn()}};Ui=class{constructor(e){this.queued=!1,this.disposed=!1,this.owner=Oe(m.owner),m.owner&&(m.owner.cleanups??=[]).push(()=>this.dispose()),this.computed=new en(()=>{ke(this.owner,!1),j(this.owner,()=>{let t=e();typeof t=="function"&&(this.owner.cleanups??=[]).push(t)})}),this.watcher=new Mi(()=>Vi(this)),this.run(),this.watcher.watch(this.computed)}run(){if(!this.disposed){this.watcher.getPending();try{this.computed.get()}catch(e){if(e&&typeof e.then=="function"&&m.onSuspend){m.onSuspend(e,this.owner);return}if(m.onError&&m.onError(e,this.owner))return;throw e}}}dispose(){this.disposed||(this.disposed=!0,this.watcher.unwatch(this.computed),ke(this.owner))}};Hi(()=>{});on=Symbol.for("signal"),Ki=Symbol.for("memo"),Ji=Symbol.for("signal-node");Xi=Symbol.for("signal");Yr=null;Mt=null;Lt=null;Zr=null;Rt=Symbol();yn=W();Ii((e,t)=>{let r=rn(t,yn);r&&(r.increment(),e.finally(()=>r.decrement()))});ts=W();Fi((e,t)=>{let r=rn(t,ts);return r?(r.setError(e),!0):!1});ue=Symbol.for("fluixi-proxy")});function Ue(e,t,r={}){let{preserveStructure:n,multiple:o,throwOnError:i=!1,defaultValue:a,maxDepth:s=20}=r;if(!e||typeof e!="object")return a;if(!t)return e;if(Array.isArray(t))if(n){let f={};for(let c of t){let p=Ue(e,c,{...r,preserveStructure:!1});p!==void 0&&ns(f,c,p)}return f}else return t.map(f=>Ue(e,f,{...r,preserveStructure:!1}));let l=Ht(t,{...r,throwOnError:i});if(l.length===0)return e;if(typeof n>"u"||n===!1){let f=os(e,t);return o===!1&&Array.isArray(f)?f[0]:f===void 0&&a!==void 0?a:f}let u=V(e,l,0,s);return u===void 0&&a!==void 0?a:u}function os(e,t,r={}){let{createMissing:n=!1,add:o=!1,debug:i=!1}=r,a=Ht(t),s=e,l=!1,u="",f=t;if(typeof s=="object"&&!Array.isArray(s)&&f.length>0&&s[f])return s=s[f],s;for(let c=0;c<a.length;c++){let p=a[c],h=a.length>1?c===a.length-1:!1;if(s===null&&!n)return;let d=a[c+1];switch(p.type){case"property":if(s&&typeof s=="object")if(Array.isArray(s)){if(typeof p.value=="number"){let y=p.value;if(n&&y>=s.length)for(let w=s.length;w<=y;w++)s.push(void 0);if(n&&(s[y]===null||s[y]===void 0)&&(!h||l)&&(d?s[y]=d.type==="index"||d.type==="slice"||d.type==="union"||d.type==="wildcard"?[]:{}:s[y]=null,l=!1),s=s[y],d){l=!0;continue}}else o?s.push({[String(p.value)]:null}):s=s.map(y=>y[String(p.value)]);if(d)continue;return gn(s)}else{if(s[u]&&u.split(".").length>=2){s=s[u];continue}if(n&&(s[String(p.value)]===null||s[String(p.value)]===void 0)&&(!h||l)&&(d?s[String(p.value)]=d.type==="index"||d.type==="slice"||d.type==="union"||d.type==="wildcard"?[]:{}:s[String(p.value)]=null,l=!1,s=s[String(p.value)],d)){l=!0;continue}if(s?(!s[String(p.value)]&&n&&(s[String(p.value)]=null),s=s[String(p.value)]):s={[String(p.value)]:null},d)continue}else if(n)s={},s[String(p.value)]=d.type==="index"||d.type==="slice"||d.type==="union"||d.type==="wildcard"||r.type==="array"?[]:{},s=s[String(p.value)];else return;break;case"index":case"wildcard":if(Array.isArray(s)){if(p.type==="index"){let y=p.value;if(y<0){s=s[s.length-Math.abs(y)];continue}if(n&&(y>=s.length||s[y]==null||s[y]==null)&&!h){for(let w=s.length;w<=y;w++)s.push(void 0);d&&(s[y]=d.type==="index"||d.type==="slice"||d.type==="union"||d.type==="wildcard"?[]:{})}s=s[y]}else if(!h)continue}else if(n){let y=a[c+1];s=[];let w=p.value;for(let k=0;k<=w;k++)s.push(void 0);s[w]=y.type==="index"||y.type==="slice"||y.type==="union"||y.type==="wildcard"||r.type==="array"?[]:{},s=s[w]}else{if(p.type==="index"&&typeof s=="object"&&s&&s[String(p.value)]!==void 0){s=s[String(p.value)];continue}if(typeof s=="object"){s=Object.values(s);continue}return}break;default:return}}return gn(s)}function gn(e){return Array.isArray(e)?e.filter(t=>typeof t<"u"):e}var Be,V,Ht,rs,ns,Vt=N(()=>{"use strict";Be=e=>e==null||Array.isArray(e)||typeof e=="function"||e instanceof Date||e instanceof RegExp||e instanceof Map||e instanceof Set||e instanceof Error?!1:typeof e=="object",V=(e,t,r,n)=>{if(r>n)return;if(t.length===0)return e;let o=t[0],i=t.slice(1);if(o.type==="descendant"){let a=V(e,i,r+1,n);if(a!==void 0)return a;if(e&&typeof e=="object")if(Array.isArray(e)){let s=[];for(let l=0;l<e.length;l++){let u=V(e[l],t,r+1,n);u!==void 0&&(s[l]=u)}return s.length>0?s:void 0}else{let s={};for(let l in e)if(e.hasOwnProperty(l)){let u=V(e[l],t,r+1,n);u!==void 0&&(s[l]=u)}return Object.keys(s).length>0?s:void 0}return}switch(o.type){case"property":if(Be(e)&&o.value&&String(o.value)in e){let a=e[String(o.value)],s=V(a,i,r+1,n);if(s!==void 0)return{[String(o.value)]:s}}break;case"index":if(Array.isArray(e)){let a=o.value;if(a>=0&&a<e.length){let s=V(e[a],i,r+1,n);if(s!==void 0){let l=new Array(e.length).filter(u=>u!==void 0);return l[a]=s,l}}}else if(e&&typeof e=="object"){let a=String(o.value);if(a in e){let s=V(e[a],i,r+1,n);if(s!==void 0)return{[a]:s}}}break;case"wildcard":if(e&&typeof e=="object")if(Array.isArray(e)){let a=[],s=!1;for(let l=0;l<e.length;l++){let u=V(e[l],i,r+1,n);u!==void 0&&(a[l]=u,s=!0)}return s?a:void 0}else{let a={},s=!1;for(let l in e)if(e.hasOwnProperty(l)){let u=V(e[l],i,r+1,n);u!==void 0&&(a[l]=u,s=!0)}return s?a:void 0}break;case"slice":if(Array.isArray(e)){let[a,s]=o.value,l=Math.max(0,a),u=Math.min(e.length,s===1/0?e.length:s),f=[],c=!1;for(let p=l;p<u;p++){let h=V(e[p],i,r+1,n);h!==void 0&&(f[p]=h,c=!0)}return c?f:void 0}break;case"union":if(Array.isArray(e)){let a=o.value,s=[],l=!1;for(let u of a)if(u>=0&&u<e.length){let f=V(e[u],i,r+1,n);f!==void 0&&(s[u]=f,l=!0)}return l?s:void 0}break;case"filter":if(Array.isArray(e)){let a=o.value,s=[],l=!1;for(let u=0;u<e.length;u++)if(a(e[u])){let f=V(e[u],i,r+1,n);f!==void 0&&(s[u]=f,l=!0)}return l?s:void 0}break}},Ht=(e,t={})=>{let{type:r="auto",throwOnError:n=!1}=t;if(!e||typeof e!="string")return[];let o=[],i="",a=!1,s=!1,l="",u="",f=0,c=r==="auto"?(h=>h.includes("..")?"descendant":h.includes("[?(")?"filter":h.includes("[:")||h.includes("[0:")?"slice":h.includes("[,")||h.includes("[0,1]")?"union":h.includes("[*]")||h.includes(".*.")?"wildcard":h.includes("[]")?"array-wildcard":h.includes("[")&&h.includes("]")?"bracket":"dot")(e):r,p=h=>{let d=h.trim();if(d==="*"||d==="")return{type:"wildcard",value:d===""?"[]":"*",raw:d===""?"[]":h};if(d==="[]")return{type:"wildcard",value:"[]",raw:h};if(/^-?\d+$/.test(d))return{type:"index",value:parseInt(d,10),raw:h};if(d.includes(":")){let y=d.split(":").map(R=>R.trim()),w=y[0]===""?0:parseInt(y[0],10),k=y[1]===""?1/0:parseInt(y[1],10);if(isNaN(w)||isNaN(k)){if(n)throw new Error(`Invalid slice notation: ${h}`);return{type:"wildcard",value:"*",raw:h}}return{type:"slice",value:[w,k],raw:h}}if(d.includes(",")){let y=d.split(",").map(w=>{let k=parseInt(w.trim(),10);return isNaN(k)?-1:k}).filter(w=>w>=0);if(y.length===0){if(n)throw new Error(`Invalid union notation: ${h}`);return{type:"wildcard",value:"*",raw:h}}return{type:"union",value:y,raw:h}}if(d.startsWith("?(")&&d.endsWith(")")){let y=d.slice(2,-1);try{return{type:"filter",value:rs(y),raw:h}}catch(w){if(n)throw w;return{type:"wildcard",value:"*",raw:h}}}return d.startsWith('"')&&d.endsWith('"')||d.startsWith("'")&&d.endsWith("'")?{type:"property",value:d.slice(1,-1),raw:h}:{type:"property",value:d,raw:h}};for(let h=0;h<e.length;h++){let d=e[h],y=e[h+1];if((d==='"'||d==="'")&&!s){s=!0,l=d;continue}else if(d===l&&s){s=!1,l="",d==='"'||d==="'"||(a?u+=d:i+=d);continue}if(s){a?u+=d:i+=d;continue}if(d==="["&&!a){i&&(o.push({type:"property",value:i,raw:i}),i=""),a=!0,u="";continue}if(d==="]"&&a&&!s){a=!1;let k=p(u);o.push(k);continue}let w=o.length>0?o[o.length-1]:null;if(d==="."&&!a&&!s){if(y==="."){let k=e.split("..")[0];o.push({type:"property",value:k,raw:k}),o.push({type:"descendant",value:"..",raw:".."}),h++}else i&&(i==="*"?o.push({type:"wildcard",value:i,raw:i}):o.push({type:"property",value:i,raw:i}),i="");continue}if(a)u+=d;else if(w&&w.type!=="descendant")i+=d;else{let k=e.split(w?.raw)[1];k!==void 0?i=k:i+=d}}return i&&o.push({type:"property",value:i,raw:i}),o.map(h=>{if(h.type==="property"&&typeof h.value=="string"&&/^-?\d+$/.test(h.value)){let d=parseInt(h.value,10);if(!isNaN(d))return{...h,type:"index",value:d}}return h})},rs=e=>{let t=e.replace(/@\.([a-zA-Z_$][\w$]*)/g,(r,n)=>`item.${n}`).replace(/@/g,"item");try{return new Function("item",`return ${t}`)}catch{throw new Error(`Invalid filter expression: ${e}`)}},ns=(e,t,r)=>{let n=Ht(t),o=e;for(let i=0;i<n.length;i++){let a=n[i],s=i===n.length-1;switch(a.type){case"property":if(s)o[String(a.value)]=r;else{if(!o[String(a.value)]){let u=n[i+1];o[String(a.value)]=u.type==="index"||u.type==="slice"||u.type==="union"||u.type==="wildcard"?[]:{}}o=o[String(a.value)]}break;case"index":Array.isArray(o)||(o=[]);let l=a.value;if(s){if(l>=o.length)for(let u=o.length;u<=l;u++)o.push(void 0);o[l]=r}else{if(!o[l]){let u=n[i+1];o[l]=u.type==="index"||u.type==="slice"||u.type==="union"||u.type==="wildcard"?[]:{}}o=o[l]}break;case"wildcard":if(Array.isArray(o))if(s)for(let u=0;u<o.length;u++)o[u]=r;else{let u=n[i+1];for(let f=0;f<o.length;f++)o[f]||(o[f]=u.type==="index"||u.type==="slice"||u.type==="union"||u.type==="wildcard"?[]:{});o.length>0&&(o=o[0])}break}}}});function ks(e){return{cleanups:null,owned:null,parent:e,contexts:null}}function Kn(e){let t=Symbol("context");return{id:t,defaultValue:e,Provider:r=>{let n=pe.owner,o=ks(n);(o.contexts=new Map).set(t,r.value),n&&(n.owned??=[]).push(o),pe.owner=o;try{return r.children}finally{pe.owner=n}}}}function Jn(e,t){let r=e;for(;r;){if(r.contexts&&r.contexts.has(t.id))return r.contexts.get(t.id);r=r.parent}return t.defaultValue}function Os(e){pe.onSuspend=e}function Ts(e){pe.onError=e}function Cs(e){pe.hostSchedule=e??(t=>{Promise.resolve().then(t)})}function Xn(e){let[t,r]=v(e),n=t;return n.$=r,n}function Qe(e){let t=Fn.get(e);return t||Fn.set(e,t={keys:new Map}),t}function Vn(e,t,r){let n=e.keys.get(t);return n||e.keys.set(t,n=Xn(r)),n}function Wn(e){let t=Qe(e);(t.all||(t.all=Xn()))()}function zn(e,t){e.$(typeof t=="function"?()=>t:t)}function Gn(e){if(e==null||typeof e!="object")return!1;if(Array.isArray(e))return!0;let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}function Ze(e){if(!Gn(e))return e;let t=Hn.get(e);if(t)return t;let r=new Proxy(e,Es);return Hn.set(e,r),r}function Ce(e,t,r){if(e[t]===r&&(r!==void 0||t in e))return;let n=Array.isArray(e),o=n?e.length:0;r===void 0?delete e[t]:e[t]=r;let i=Qe(e),a=i.keys.get(t);if(a&&zn(a,r),n&&e.length!==o){let s=i.keys.get("length");s&&zn(s,e.length)}i.all&&i.all.$(void 0)}function Un(e,t){return typeof e=="function"?e(t):e}function Zt(e,t){for(let r of Object.keys(t)){let n=t[r],o=e[r];n&&typeof n=="object"&&!Array.isArray(n)&&o&&typeof o=="object"&&!Array.isArray(o)?Zt(o,n):Ce(e,r,n)}}function er(e){let t=[],r=e.replace(/\[([^\]]*)\]/g,".$1");for(let n of r.split("."))n.length&&t.push(n);return t}function Yn(e,t,r){let n=t.length-1;for(let i=0;i<n;i++){let a=t[i];if(a==="*"){let l=t.slice(i+1);if(Array.isArray(e))for(let u=0;u<e.length;u++)Yn(e[u],l,r);return}let s=e[a];(s==null||typeof s!="object")&&(s=/^\d+$/.test(t[i+1])?[]:{},Ce(e,a,s)),e=s}let o=t[n];if(o==="*"){if(Array.isArray(e))for(let i=0;i<e.length;i++)Ce(e,i,Un(r,e[i]));return}Ce(e,o,Un(r,e[o]))}function Gt(e,t,r){Yn(e,er(t),r)}function $s(e,t){let r=t[0];if(typeof r=="function"&&t.length===1){let n=r(e);n&&n!==e&&Zt(e,n);return}if(Array.isArray(r)&&t.length===1){for(let n of r)Array.isArray(n)&&Gt(e,n[0],n[1]);return}if(r&&typeof r=="object"&&!Array.isArray(r)&&t.length===1){Zt(e,r);return}if(Array.isArray(t[1])&&t.length>=3){Gt(e,`${r}.${t[1].join(".")}`,t[2]);return}Gt(e,String(r),t[1])}function Qt(e){if(e==null||typeof e!="object")return e;if(Array.isArray(e))return e.map(Qt);let t={};for(let r of Object.keys(e))t[r]=Qt(e[r]);return t}function fe(e,t){let r=e;for(let n of er(t)){if(r==null)return;r=r[n]}return r}function Rs(e,t){for(let r of js)e[r]=t[r].bind(t);e.$=t.reactive.bind(t)}function Ns(e,t={immutable:!0}){let r=new Zn(e,t);return Rs(r.set,r),[r.proxy,r.set]}function Ms(e,t={}){return new Zn(e,{...t,immutable:!1})}function et(e){if(e==null||typeof e!="object")return e;let t=e[Yt];return t!==void 0?t:e}function Ls(e){return O(()=>et(e))}var Bn,xs,Ss,pe,_s,Ps,Yt,Ln,Dn,In,qn,Fn,Hn,Es,Zn,js,Cl,Qn=N(()=>{"use strict";A();Bn="1.0.0-alpha.76",xs="__fluixi_signal_next_state__",Ss=e=>{typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e)},pe=globalThis[xs]??={consumer:null,untracked:!1,owner:null,queue:[],scheduled:!1,flushing:!1,batchDepth:0,hostSchedule:Ss,onSuspend:null,onError:null};Cs(()=>{});_s=Kn();Os((e,t)=>{let r=Jn(t,_s);r&&(r.increment(),e.finally(()=>r.decrement()))});Ps=Kn();Ts((e,t)=>{let r=Jn(t,Ps);return r?(r.setError(e),!0):!1});Yt=Symbol("store-raw"),Ln=Symbol("store-node"),Dn=Symbol("store-has"),In=Symbol("store-self"),qn=Symbol("store-track"),Fn=new WeakMap,Hn=new WeakMap;Es={get(e,t,r){if(t===Yt||t===Ln)return e;if(t===ue)return r;if(t===Dn)return a=>a in e;if(t==="__proxy")return!0;if(t===qn||t===In)return Wn(e),r;let n=e[t];if(typeof n=="function"&&!Object.prototype.hasOwnProperty.call(e,t))return n;let o=Object.getOwnPropertyDescriptor(e,t);if(o&&o.get)return o.get.call(r);let i=Vn(Qe(e),t,n)();return Gn(i)?Ze(i):i},set(){return!0},deleteProperty(e,t){return t in e&&Ce(e,t,void 0),!0},has(e,t){return t===Yt||t===ue||t===Ln||t===Dn||t===In||t===qn?!0:(Vn(Qe(e),t,e[t])(),t in e)},ownKeys(e){return Wn(e),Reflect.ownKeys(e)},getOwnPropertyDescriptor(e,t){return Reflect.getOwnPropertyDescriptor(e,t)}};Zn=class{constructor(e,t={immutable:!0}){this.options=t,this.root=e,this.set=((...r)=>_(()=>$s(this.root,r)))}get state(){return Ze(this.root)}get proxy(){return Ze(this.root)}get accessor(){return(()=>Ze(this.root))}unwrap(){return this.root}getNode(e){return this.root&&this.root[e]}get(e){if(e==null||e==="")return et(this.state);let t=this.state;for(let r of er(e)){if(t==null)return;t=t[r]}return et(t)}select(e){return g(()=>e(this.state))}subscribe(e){return S(()=>e(this.state))}watch(e,t){let r;return S(()=>{let n=e(this.state);Object.is(n,r)||(t(n,r),r=n)})}reactive(e){return g(()=>this.state[e])}produce(e){this.set((t=>{let r=Qt(t);return e(r),r}))}reconcile(e,t={}){this.set(e)}push(e,...t){let r=fe(this.root,e);this.set(e,r.concat(t))}pop(e){let t=fe(this.root,e).slice(),r=t.pop();return this.set(e,t),r}shift(e){let t=fe(this.root,e).slice(),r=t.shift();return this.set(e,t),r}splice(e,t,r,...n){let o=fe(this.root,e).slice(),i=o.splice(t,r,...n);return this.set(e,o),i}insert(e,t,r){let n=fe(this.root,e).slice();n.splice(t,0,r),this.set(e,n)}removeAt(e,t){let r=fe(this.root,e).slice(),n=r.splice(t,1);return this.set(e,r),n}toObservable(){let[e]=v(this.state);return e.toObservable()}dispose(){}},js=["get","select","watch","subscribe","produce","reconcile","push","pop","shift","splice","insert","removeAt","unwrap","toObservable"];Cl=Object.freeze({createStore:Ns,createMutableStore:Ms,batch:_,unwrap:et,untrackStore:Ls})});function Ds(e){return e.localName.includes("-")}function eo(e,t,r,n=!1){if(r==null){e.removeAttribute(t);return}if(Ds(e)){e[t]=r;return}T(e,t,r,n)}function so(e,...t){e.classList.add(...t)}function ao(e,...t){e.classList.remove(...t)}function lo(e,...t){t.forEach(r=>e.classList.toggle(r))}function T(e,t,r,n=!1){if(r==null||r===!1){e.removeAttribute(t);return}if(r===!0){e.setAttribute(t,"");return}if(typeof r=="object"){e.setAttribute(t,JSON.stringify(r));return}e.setAttribute(t,String(r))}function uo(e){return e&&typeof e=="object"&&e.strings&&Array.isArray(e.strings)&&e.values&&Array.isArray(e.values)}function at(e){return e instanceof Node}function co(e){q.core=e}function lt(e){q.core&&e.setAttribute("fluixi",q.core),e.setAttribute("fx-dom",q.dom),e.setAttribute("fx-reactive",q.reactive),typeof globalThis<"u"&&(globalThis.Fluixi=q)}function ut(){let e=[q.core,q.dom,q.reactive].filter(t=>t!==void 0);new Set(e).size<=1||console.warn(`[fluixi] package versions disagree — core ${q.core??"(absent)"}, dom ${q.dom}, reactive ${q.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-provider"),{value:!0,enumerable:!0}),e}function ct(e){return typeof e!="function"||Object.defineProperty(e,Symbol.for("fluixi-component"),{value:!0,enumerable:!0}),e}function po(e){return Object.defineProperty(e,Symbol.for("fluixi-suspense"),{value:!0,enumerable:!0}),e}function qs(e){return typeof e=="function"&&e[Symbol.for("fluixi-router")]===!0}function Fs(e){return typeof e=="function"&&e[Symbol.for("fluixi-routes")]===!0}function Hs(e){return typeof e=="function"&&e[Symbol.for("fluixi-route")]===!0}function Vs(e){return typeof e=="function"&&e[Symbol.for("fluixi-outlet")]===!0}function Ws(e){return typeof e=="function"&&e[Symbol.for("fluixi-provider")]===!0}function zs(e){return typeof e=="function"&&e[Symbol.for("fluixi-context")]===!0}function B(e){return typeof e=="function"&&e[Symbol.for("fluixi-component")]===!0}function Us(e){return typeof e=="function"&&e[Symbol.for("fluixi-suspense")]===!0}function ho(e){return qs(e)?{type:"router",value:e}:Hs(e)?{type:"route",value:e}:Fs(e)?{type:"routes",value:e}:Vs(e)?{type:"outlet",value:e}:B(e)?{type:"component",value:e}:Us(e)?{type:"suspense",value:e}:Ws(e)?{type:"provider",value:e}:zs(e)?{type:"context",value:e}:{type:"none",value:e}}function ar(){if(!ro)throw new Error("[fluixi] server render ran before @fluixi/dom/server loaded");return ro}function lr(e){return e!=null&&e[ft]===!0?!0:typeof Node<"u"&&e instanceof Node}function Bs(e){return e!=null&&e[ft]===!0?e.nodeType===1:typeof Element<"u"&&e instanceof Element}function Ks(e){return e!=null&&e[ft]===!0?e.nodeType===3:typeof Text<"u"&&e instanceof Text}function Js(e){yo=e}function mo(){return yo}function no(e,t){return b.active&&t.parentNode===e}function go(e){let t=b.parents.lastIndexOf(e);t!==-1&&(b.parents.length=t),b.cursor=e.nextSibling}function bo(e){if(!b.active)return e();let t=b.cursor,r=b.parents;b.active=!1,b.parents=[];try{return e()}finally{b.active=!0,b.cursor=t,b.parents=r}}function vo(e){if(!b.active||e==null)return;let t=Array.isArray(e)?e[e.length-1]:e;t&&typeof t.nodeType=="number"&&go(t)}function te(e){if(!_e)for(let t of e)rt.has(t)||ur.has(t)||(rt.add(t),document.addEventListener(t,Gs))}function Gs(e){let t=`$$${e.type}`,r=e.composedPath&&e.composedPath()[0]||e.target;for(;r;){let n=r[t];if(n&&!r.disabled&&(n(e),e.cancelBubble))return;r=r.host&&r.host!==r&&r.host instanceof Element?r.host:r.parentNode}}function Ys(e,t,r){if(e[`$$${t}`]=r,ur.has(t)){let n=`__fx_${t}`;if(!e[n]){let o=i=>{e[`$$${t}`]?.(i)};e.addEventListener(t,o),e[n]=o}return}rt.has(t)||te([t])}function oo(e,t){delete e[`$$${t}`];let r=`__fx_${t}`,n=e[r];n&&(e.removeEventListener(t,n),delete e[r])}function X(e,t=!1){if(_e)return ar().createText(e);if(b.active&&!t){let r=mo()?.hydrateText(e);if(r)return r}return document.createTextNode(e)}function he(e,t=!1){if(_e)return ar().createElement(e,t);if(b.active){let r=mo()?.hydrateElement(e);if(r)return r}return t?document.createElementNS(sr,e):document.createElement(e)}function Qs(e,t,r,n,o){let i=n,a=new Map;return C(()=>{let s;if(B(e)&&!P(e)){if(!a.has(e)){U++;try{let l=e();a.set(e,l)}finally{U--}}for(s=a.get(e);typeof s=="function"&&P(s);)s=s()}else for(s=e();typeof s=="function"&&P(s);)s=s();{let l=0;for(;typeof s=="function"&&l++<50;)if(B(s)){if(!a.has(s)){let u=s;U++;try{let f=u();a.set(u,f)}finally{U--}}s=a.get(s)}else if(P(s))s=s();else if(s=s(),typeof s!="function"||!P(s)&&!B(s))break}U++;try{i=nt(t,s,r,i,a),o(i)}finally{U--}})}function F(e,t,r,n){if(U>Zs)return console.error("[insert] Exceeded max call depth — possible infinite loop."),()=>null;r!==void 0&&!r&&(r=X("",!0),e.appendChild(r));let o=n??null,i=l=>Array.isArray(l)&&l.some(u=>typeof u=="function"),a=l=>typeof l=="function"?l:()=>l;if(typeof t!="function"&&!i(t)){U++;try{o=nt(e,t,r,o)}finally{U--}return()=>o}let s=Qs(a(t),e,r,o,l=>{o=l});return()=>(s?.(),o)}function nt(e,t,r,n,o){if(t==null||typeof t=="boolean")return ee(e,n,r);if(typeof t=="function")for(;typeof t=="function";)t=t();if(t==null||typeof t=="boolean")return ee(e,n,r);if(tt(t)){let a=X("",!0);return Array.isArray(n)?n.length>0?(e.replaceChild(a,n[0]),ee(e,n.slice(1),r)):I(e,a,r):n?e.replaceChild(a,n):I(e,a,r),t.then(s=>{a.parentNode===e&&nt(e,s,a.nextSibling,a)}).catch(s=>{console.error("Error resolving promise in insertExpression:",s)}),a}let i=typeof t;if(i==="string"||i==="number"){if(i==="number"&&(t=String(t)),Array.isArray(n)){if(n.length===0){let s=X(t);return I(e,s,r),s}if(n.length===1&&n[0].nodeType===3)return n[0].data=t,n;n=ee(e,n,r)}if(n&&Ks(n))return n.data=t,n;let a=X(t);return n&&n.parentNode===e?e.replaceChild(a,n):no(e,a)||I(e,a,r),a}if(lr(t))return no(e,t)?(go(t),t):Array.isArray(n)?(n.length===0?I(e,t,r):n[0].parentNode===e?(e.replaceChild(t,n[0]),ee(e,n.slice(1),r)):I(e,t,r),t):(n?n!==t&&(n.parentNode===e?e.replaceChild(t,n):I(e,t,r)):I(e,t,r),t);if(Array.isArray(t)){let a=[],s=Array.isArray(n)?n:n?[n]:[],l=[];z(t,a,e,r,!0,o,l);let u=ea(e,s,a,r);for(let f of l){let c=F(e,f.sig,f.marker);x(()=>{ee(e,c()),f.marker.parentNode===e&&e.removeChild(f.marker)})}return u}if(i==="object"&&t!==null&&typeof t=="object"){let a=t;if("type"in a&&"props"in a){let s=a;if(typeof s.type=="function"){let l=s.type(s.props||{});return nt(e,l,r,n)}}}return ee(e,n,r)}function z(e,t,r,n,o=!0,i,a){for(let s=0;s<e.length;s++){let l=e[s];if(!(l==null||typeof l=="boolean")){for(;typeof l=="function"&&!tt(l)&&!P(l)&&!B(l)&&(l=l(),!(l==null||typeof l=="boolean")););if(!(l==null||typeof l=="boolean")){if(typeof l=="function"){let u;for(B(l)&&!P(l)?(i||(i=new Map),i.has(l)||i.set(l,l()),u=i.get(l)):u=l();typeof u=="function"&&!tt(u)&&!P(u)&&!B(u);)i||(i=new Map),i.has(u)||i.set(u,u()),u=i.get(u);if(u==null||typeof u=="boolean")continue;if(typeof u=="function"){if(P(u)){if(a){let c=X("",!0);t.push(c),a.push({marker:c,sig:u});continue}let f=u();for(;typeof f=="function"&&P(f);)f=f();if(f==null||typeof f=="boolean")continue;Array.isArray(f)?z(f,t,r,n,o,i):z([f],t,r,n,o,i);continue}continue}Array.isArray(u)?z(u,t,r,n,o,i,a):z([u],t,r,n,o,i,a);continue}if(tt(l)){let u=X("",!0);t.push(u),l.then(f=>{if(u.parentNode){let c=[];if(z([f],c,u.parentNode,void 0,!1,i),c.length>0){u.parentNode.replaceChild(c[0],u);for(let p=1;p<c.length;p++)u.parentNode?.insertBefore(c[p],c[p-1].nextSibling)}}}).catch(f=>console.error("Error resolving promise in array:",f));continue}if(Array.isArray(l)){z(l,t,r,n,o,i,a);continue}if(lr(l)){t.push(l);continue}if(typeof l=="object"&&l!==null&&"type"in l&&"props"in l){let u=l;if(typeof u.type=="function"){let f=u.type(u.props||{});Array.isArray(f)?z(f,t,r,n,!1,i):z([f],t,r,n,!1,i);continue}}if(typeof l=="string"||typeof l=="number"){let u=String(l);if(u.trim()===""&&u!==" ")continue;t.push(X(u));continue}t.push(X(String(l)))}}}}function ea(e,t,r,n){for(let c=0;c<r.length;c++){let p=r[c].parentNode;p!==null&&p!==e&&p.nodeType!==11&&(r=r.slice(),r[c]=r[c].cloneNode(!0))}let o=r.length,i=t.length,a=o,s=0,l=0,u=i>0?t[i-1].nextSibling??void 0:n,f=null;for(;s<i||l<a;){if(t[s]===r[l]){s++,l++;continue}for(;i>s&&a>l&&t[i-1]===r[a-1];)i--,a--;if(i===s){let c=a<o?l?r[l-1].nextSibling??void 0:r[a-l]:u;for(;l<a;)I(e,r[l++],c)}else if(a===l)for(;s<i;)(!f||!f.has(t[s]))&&t[s].parentNode===e&&e.removeChild(t[s]),s++;else if(t[s]===r[a-1]&&r[l]===t[i-1]){let c=t[--i].nextSibling;I(e,r[l++],t[s++].nextSibling),I(e,r[--a],c),t[i]=t[s-1]}else{if(!f){f=new Map;let p=l;for(;p<a;)f.set(r[p],p++)}let c=f.get(t[s]);if(c!=null)if(l<c&&c<a){let p=s,h=1;for(;++p<i&&p<a&&!(!f.has(t[p])||f.get(t[p])!==c+h);)h++;if(h>c-l){let d=t[s];for(;l<c;)I(e,r[l++],d)}else t[s].parentNode===e?e.replaceChild(r[l++],t[s++]):(I(e,r[l++],u),s++)}else s++;else t[s].parentNode===e&&e.removeChild(t[s]),s++}}return r}function ee(e,t,r){if(t)if(Array.isArray(t))for(let n=0;n<t.length;n++)t[n].parentNode===e&&e.removeChild(t[n]);else t.parentNode===e&&e.removeChild(t);return null}function I(e,t,r){b.active&&t.parentNode===e||(r&&r.parentNode===e?e.insertBefore(t,r):e.appendChild(t))}function de(e,t,r){r==null?delete e[t]:e[t]=r}function wo(e,t,r){let n=r,o;return Array.isArray(r)&&(n=r[0],o=r[1]),typeof n!="function"?()=>{}:(e.addEventListener(t,n,o),()=>e.removeEventListener(t,n,o))}function Ao(e,t){let r=(n,o)=>{typeof n=="function"&&n(e,o??(()=>{}))};if(typeof t=="function"){r(t);return}if(Array.isArray(t)){if(typeof t[0]=="function"){r(t[0],t[1]);return}for(let n of t)Array.isArray(n)?r(n[0],n[1]):r(n)}}function rr(e,t,r,n=!1){return typeof r!="function"?(T(e,t,r,n),()=>{}):C(()=>{let o=typeof r=="function"?r():r;T(e,t,o,n)})}function nr(e,t,r){return typeof r!="function"?(de(e,t,r),()=>{}):C(()=>{let n=typeof r=="function"?r():r;de(e,t,n)})}function xo(e,t,r){return typeof r!="function"?(T(e,t,!!r),()=>{}):C(()=>{let n=r();T(e,t,!!n)})}function ot(e,t){if(t==null){e.removeAttribute("class");return}if(typeof t=="function"){C(()=>ot(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 r=Object.keys(t).filter(n=>{let o=t[n];return typeof o=="function"?o():!!o}).join(" ");e.setAttribute("class",r);return}e.setAttribute("class",String(t))}function it(e,t,r){if(!(!t||typeof t!="object"))for(let n in t){let o=t[n],i=n.split(/\s+/).filter(Boolean);if(typeof o=="function"&&r)r.push(C(()=>{let a=!!o();for(let s of i)e.classList.toggle(s,a)}));else{let a=!!(typeof o=="function"?o():o);for(let s of i)e.classList.toggle(s,a)}}}function st(e,t){let r=t;for(;typeof r=="function";)r=r();if(r==null){e.removeAttribute("style");return}if(typeof r=="string"){e.style.cssText=r;return}if(typeof r=="object")for(let n in r){let o=r[n];o==null?e.style[n]="":e.style[n]=o}}function So(e){let{element:t,props:r,prevProps:n=Xs,isSVG:o=!1,skipChildren:i=!1}=e;if(!t||!Bs(t))return console.error("[spread] Error: element is not a DOM Element!"),()=>{};if(!r)return console.warn("[spread] Warning: props is undefined!"),()=>{};let a=o||t.namespaceURI===sr,s=[];for(let l in r){if(i&&l==="children")continue;let u=r[l],f=n[l];if(u===f)continue;if(l==="ref"){cr(u,t);continue}if(l==="use"){Ao(t,u);continue}if(l.startsWith("on:")){s.push(wo(t,l.slice(3),u));continue}if(l.startsWith("prop:")){s.push(nr(t,l.slice(5),u));continue}if(l.startsWith("attr:")){s.push(rr(t,l.slice(5),u,a));continue}if(l.startsWith("bool:")){s.push(xo(t,l.slice(5),u));continue}if(l==="class"||l==="className"){typeof u=="function"?s.push(C(()=>ot(t,u()))):ot(t,u);continue}if(l==="classList"){typeof u=="function"?s.push(C(()=>it(t,u()))):it(t,u,s);continue}if(l==="style"){typeof u=="function"?s.push(C(()=>st(t,u()))):st(t,u);continue}if(l.startsWith("on")){let p=l.slice(2).toLowerCase();f&&oo(t,p),u&&Ys(t,p,u);continue}let c=to.has(l)||!a&&l in t;typeof u=="function"?s.push(c?nr(t,l,u):rr(t,l,u,a)):s.push(C(()=>c?de(t,l,r[l]):T(t,l,r[l],a)))}for(let l in n)if(!(l in r))if(l.startsWith("on")){let u=l.slice(2).toLowerCase();oo(t,u)}else to.has(l)?de(t,l,null):t.removeAttribute(l);return()=>{s.forEach(l=>l())}}function ta(e,t,r=!1){for(let n in t){let o=t[n];if(n==="ref"){cr(o,e);continue}if(n!=="children"){if(n==="use"){Ao(e,o);continue}if(n.startsWith("on:")){wo(e,n.slice(3),o);continue}if(n.startsWith("prop:")){nr(e,n.slice(5),o);continue}if(n.startsWith("attr:")){rr(e,n.slice(5),o,r);continue}if(n.startsWith("bool:")){xo(e,n.slice(5),o);continue}if(n.startsWith("on")&&n.length>2){let i=n.slice(2).toLowerCase();if(typeof o=="function")if(ur.has(i)){e[`$$${i}`]=o;let a=`__fx_${i}`;if(!e[a]){let s=l=>{e[`$$${i}`]?.(l)};e.addEventListener(i,s),e[a]=s}}else e[`$$${i}`]=o,rt.has(i)||te([i]);continue}if(n==="class"||n==="className"){ot(e,o);continue}if(n==="classList"){typeof o=="function"?C(()=>it(e,o())):it(e,o);continue}if(n==="style"){typeof o=="function"?C(()=>st(e,o())):st(e,o);continue}if(n==="innerHTML"){if(typeof o=="function"){let i=S(()=>{let a=o();for(;typeof a=="function";)a=a();e.innerHTML=a});x(()=>i())}else e.innerHTML=o;continue}if(n==="value"&&(e.tagName==="INPUT"||e.tagName==="TEXTAREA")){if(typeof o=="function"){let i=S(()=>{let a=o();for(;typeof a=="function"&&a.length===0;)a=a();document.activeElement!==e&&(e.value=a??"")});x(()=>{i()})}else C(()=>{document.activeElement!==e&&(e.value=t[n]??"")});continue}if(n==="checked"&&e.tagName==="INPUT"){if(typeof o=="function"){let i=S(()=>{let a=o();for(;typeof a=="function"&&a.length===0;)a=a();document.activeElement!==e&&(e.checked=a??"")});x(()=>{i()})}else C(()=>{document.activeElement!==e&&(e.checked=t[n]??"")});continue}if(n==="value"&&e.tagName==="SELECT"){if(typeof o=="function"){let i=!0,a=S(()=>{let s=o();for(;typeof s=="function"&&s.length===0;)s=s();i?(i=!1,queueMicrotask(()=>{e.value=s??""})):e.value=s??""});x(()=>{a()})}else{let i=!0;C(()=>{let a=t[n];i?(i=!1,queueMicrotask(()=>{e.value=a??""})):e.value=a??""})}continue}if(typeof o=="function"){let i=S(()=>{let a=o();for(;typeof a=="function"&&a.length===0;)a=a();eo(e,n,a,r)});x(()=>{i()})}else C(()=>eo(e,n,t[n],r))}}}function cr(e,t){if(e){if(lr(e)){let r=t,n=e;if(!r)return;typeof r=="function"?r(n):typeof r=="object"&&"current"in r&&(r.current=n);return}typeof e=="function"?e(t):typeof e=="object"&&"current"in e&&(e.current=t)}}function ra(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 tt(e){return e!=null&&(typeof e=="object"||typeof e=="function")&&typeof e.then=="function"||e instanceof Promise}function fr(e,t,r){if(!t)throw new Error("Container element is required");let n,o,i=[];return D(a=>{_(()=>{b.active||(t.textContent=""),lt(t),ut(),F(t,e)}),o=a}),()=>{o?.(),n?.(),i.forEach(a=>a()),t.textContent=""}}function ko(e){or.fn=e}function G(e,t){return or.fn?or.fn(e,t):(()=>e(t))}function pr(){let e=globalThis.__FX_DATA__;if(e)return e;if(tr!==void 0)return tr;let t=null;if(typeof document<"u"){let r=document.getElementById(oa)?.textContent;if(r)try{t=JSON.parse(r)}catch{t=null}}return tr=t}function pt(){for(;;){for(;b.cursor&&b.cursor.nodeType===3&&b.cursor.data==="";)b.cursor=b.cursor.nextSibling;if(b.cursor!=null||!b.parents.length)return;b.cursor=b.parents.pop().nextSibling}}function ht(e,t){let r=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 ${r}. 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 sa(e){pt();let t=b.cursor;return t&&t.nodeType===1&&t.tagName.toLowerCase()===e.toLowerCase()?(ia.has(e.toLowerCase())?b.cursor=t.nextSibling:(b.parents.push(t),b.cursor=t.firstChild),t):(dt&&t&&ht(`<${e}>`,t),null)}function aa(e){pt();let t=b.cursor;return t&&t.nodeType===1&&t.tagName.toLowerCase()===e.toLowerCase()?(b.cursor=t.nextSibling,t):(dt&&t&&ht(`<${e}> (static)`,t),null)}function la(e){if(e===""){let r=b.cursor;return r&&r.nodeType===3&&r.data!==""?(b.cursor=r.nextSibling,r.data="",r):null}pt();let t=b.cursor;return t&&t.nodeType===3?(b.cursor=t.nextSibling,t.nodeValue!==e&&(t.nodeValue=e),t):(dt&&t&&ht(`text ${JSON.stringify(e.slice(0,24))}`,t),null)}function ua(e){pt();let t=b.cursor;return t&&t.nodeType===8&&t.data===e?(b.cursor=t.nextSibling,t):(dt&&t&&ht(`marker <!--${e.slice(0,24)}-->`,t),null)}function ca(){io||(io=!0,Js({hydrateElement:sa,hydrateText:la,hydrateMarker:ua,hydrateStatic:aa}))}function yt(e,t,r){ca(),b.active=!0,b.cursor=t.firstChild,b.parents=[];let n=pr(),o=r?.resourceNamespace,i=0;fn(()=>o?`${o}:r${i++}`:`r${i++}`),cn(n?a=>a in n?{value:n[a]}:void 0:null);try{return fr(e,t)}finally{b.active=!1,b.cursor=null,b.parents=[]}}function Oo(e,t={}){if(typeof e=="function")return G(e,t);if(typeof e!="string"||e.length===0)return null;let r=ra(e);if(_e)return ar().createElement(e,r);let n=r?document.createElementNS(sr,e):document.createElement(e);return ta(n,t,r),fa(n,t),n}function fa(e,t){if(!t||t.children===void 0)return;let r=Q(()=>t.children),n=o=>{F(e,o,typeof o=="function"?null:void 0)};Array.isArray(r)?r.forEach(n):n(r)}function pa(e){return typeof e=="function"?e:(()=>e)}function mt(e){return()=>{let t=e();return typeof t=="function"?t():t}}function da(e){return e!=null&&e!==!1}function ha(e){return!e||typeof e!="object"?!1:!!(typeof e._$litType$<"u"||typeof e._$litDirective$<"u"||Array.isArray(e.strings)&&Array.isArray(e.values))}function To(e){let t=mt(()=>e.when),r=g(t,void 0),n=g(r,void 0),o=$(),i=null,a=null,s=l=>{l!==a&&(i&&le(i),i=ae(o),a=l)};return g(()=>{let l=n();return s(l?"when":"fallback"),j(i,()=>{if(l){let u=e.children;return typeof u=="function"&&!ha(u)?typeof r=="function"?O(()=>O(r)?u(r()):e.fallback):u(r):u}return e.fallback})},void 0,{name:"show"})}function Co(e){let t=mt(()=>e.each),r=()=>e.fallback??null,n=(o,i)=>{let a=e.children,s=Array.isArray(a)?a.map(l=>typeof l=="function"?l(o,i):l):typeof a=="function"?a(o,i):a;return vo(s),s};return e.by?ln(t,e.by,(o,i)=>n(o,i),{fallback:r}):an(t,(o,i)=>n(o,i),{fallback:r})}function _o(e){let t=mt(()=>e.each);return un(t,(r,n)=>{let o=e.children(r,n);return vo(o),o},{fallback:()=>e.fallback??null})}function Po(e){return{[ir]:!0,when:mt(()=>e.when),get children(){return e.children}}}function Eo(e){let t=Array.isArray(e.children)?e.children:[e.children],r=$(),n=null,o=-1,i=a=>{a!==o&&(n&&le(n),n=ae(r),o=a)};return g(()=>{for(let a=0;a<t.length;a+=1){let s=t[a],l=0;for(;typeof s=="function"&&!s[ir]&&l++<10;)s=s();if(!s||typeof s!="object"||s[ir]!==!0)continue;let u=s.when();if(da(u))return i(a),j(n,()=>typeof s.children=="function"?s.children(u):s.children)}return i(-2),j(n,()=>e.fallback??null)})}function $o(e){let t=pa(e.component),{component:r,...n}=e,o=$(),i=null,a;return g(()=>{let s=t();return s!==a&&(i&&le(i),i=ae(o),a=s),s==null?null:typeof s=="string"?{tag:s,props:n}:j(i,()=>s(n))})}function jo(e){let t=()=>e.mount?typeof e.mount=="function"?e.mount():e.mount:document.body,r,n;return D(o=>{r=o,n=document.createElement("div"),n.style.display="contents",t().appendChild(n),F(n,e.children)&&cr(e.ref,n)}),x(()=>{r(),n.remove()}),null}function dr(e){if(_e)return e.fallback??null;let t=b.active,[r,n]=v(!t);return t&&queueMicrotask(()=>n(!0)),g(()=>r()?e.children:e.fallback??null,void 0,{name:"client-only"})}function No(e){let[t,r]=v(null),n=()=>r(null);return g(()=>{let o=t();if(o!==null)return typeof e.fallback=="function"?e.fallback(o,n):e.fallback;try{return typeof e.children=="function"?e.children():e.children}catch(i){return r(i),typeof e.fallback=="function"?e.fallback(i,n):e.fallback}})}function Mo(e){return g(()=>{let t=typeof e=="function"?e():e,r=[];for(let[n,o]of Object.entries(t))n&&(typeof o=="function"?o():o)&&r.push(n);return r.join(" ")})}function ya(e){return e.startsWith("--")?e:e.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`)}function Lo(e){return g(()=>{let t=typeof e=="function"?e():e,r=[];for(let[n,o]of Object.entries(t)){if(!n)continue;let i=typeof o=="function"?o():o;i!=null&&r.push(`${ya(n)}: ${i}`)}return r.join("; ")})}var sr,to,El,Is,q,_e,ft,ro,b,yo,Xs,rt,ur,U,Zs,na,or,oa,tr,ia,dt,io,ir,Ro,ma,M=N(()=>{"use strict";A();Qn();A();A();A();A();A();A();A();A();A();A();A();A();A();sr="http://www.w3.org/2000/svg";to=new Set(["className","value","checked","selected","innerHTML","innerText","textContent","indeterminate","htmlFor"]);El=typeof Symbol=="function"&&Symbol.for?Symbol.for("react.element"):60103;Is="1.0.0-alpha.76",q={dom:Is,reactive:Bn};_e=typeof document>"u",ft=Symbol.for("fluixi.server-node"),ro=null;b={active:!1,cursor:null,parents:[]},yo=null;Xs={},rt=new Set,ur=new Set(["scroll","focus","blur","load","error","resize","mouseenter","mouseleave","pointerenter","pointerleave","gotpointercapture","lostpointercapture"]);U=0,Zs=200;na="__fx_dom_create_component__",or=globalThis[na]??={fn:null};oa="__FX_DATA__";ia=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),dt=typeof process<"u"&&process.env&&!1;io=!1;ir=Symbol("match");Ro=dr;ma=ft});function yr(){return ga}function Io(){let e=$();if(!e)return null;if(!e[hr]){let t={mounts:[],effects:[],scheduled:!1};e[hr]=t}return e[hr]}function qo(e){if(e.scheduled)return;e.scheduled=!0;let t=$();queueMicrotask(()=>{if(tn(t)){e.mounts=[],e.effects=[];return}j(t,()=>{for(let r of e.mounts)try{let n=r();typeof n=="function"&&x(n)}catch(n){console.error("Error in onMount callback:",n)}for(let r of e.effects){let n;S(()=>{n&&n(),n=r()}),x(()=>{n&&n()})}e.mounts=[],e.effects=[]})})}function Y(e){ko(Ee)}function Ee(e,t){return gt(e,t)}function gt(e,t){let r=typeof e=="function"?O(()=>e(t)):e;if(r!=null&&(typeof r=="function"||typeof r=="object")&&!P(r)){try{r.$name=e.name}catch{}return ct(r)}return r}function bt(e,t=!0){let r=Io();if(r){if(!t){r.scheduled||e();return}r.mounts.push(e),qo(r)}else{if(!t){e();return}S(()=>{let n=O(e);typeof n=="function"&&x(n)})}}function vt(e){x(e)}function $e(e){let t=Io();if(t)t.effects.push(e),qo(t);else{let r;S(()=>{r&&r(),r=e()}),x(()=>{r&&r()})}}function wt(e){return g(e)}function At(e){let t={current:e};return x(()=>{t.current=null}),t}function xt(e,t){let[r,n]=v(t);return[r,i=>{n(e(r(),i))}]}function St(e,t,r,n){$e(()=>{let o=e&&"current"in e?e.current:e;if(o)return o.addEventListener(t,r,n),()=>{o.removeEventListener(t,r,n)}})}function kt(e){return e}function mr(){return Pe}function gr(e){Pe&&e()}var ga,Pe,hr,ye=N(()=>{"use strict";M();A();ga={context:null,owner:null};Pe=typeof process<"u"&&!1,hr=Symbol.for("fluixi-lifecycle")});function me(e,t){let r,n,o;function i(){return n||(n=e().then(s=>r=s.default)),n}t?.preload&&i();let a=(s=>{if(r){let l=r;return O(()=>l(s))}if(!o){let[l]=J(()=>i(),{transport:!1});if(o=l,l.error)throw l.error}return g(()=>{let l=o();return l?O(()=>l(s)):void 0},void 0,{name:"lazy"})});return a.preload=()=>i().then(()=>{}),a.$lazy=!0,a.loader=e,a}var Ot=N(()=>{"use strict";A()});function Aa(){Uo||(Uo=!0,!(typeof process<"u")&&console.warn("[fluixi] createProvider({ context, value, children }) reads `children` eagerly: the object literal materialises `children` BEFORE the context is stamped, so a routed <Outlet/> that has siblings inside the provider renders detached and its descendants see no context under SSR. Use the lazy form instead:\n createProvider(Context, value, props) // children stays a getter\n // or JSX: <Context.Provider value={…}>{props.children}</Context.Provider>"))}function Tt(e,t,r){let n=!!e?.Provider,o=n?e:e.context,i=n?t:e.value,a=n?!1:e.debug??!1;n||Aa();let s=typeof i=="function"?i():i,l=n?r:e;return o.Provider({value:s,get children(){return l?.children},debug:a})}function Bo(e){let t=be(e);return[t,n=>Tt(t,n.value,n)]}function vr(e,t){if(e.length===0)return Q(()=>t);let[r,n]=e[0],o=e.slice(1);return Tt(r,n,{get children(){return vr(o,t)}})}function Ko(e){return t=>{let r=ve(e);return t.children(r)}}function Jo(e,t){let r=ve(e);return r===e.defaultValue?t():r}function be(e){let t=W(e),r=n=>(n.debug,t.Provider({value:n.value,get children(){return n.children},debug:n.debug}));return typeof Symbol<"u"&&Symbol.for&&(r.$$typeof=Symbol.for("react.provider")),r.$$typeof=Symbol.for("react.provider"),{id:t.id,Provider:fo(r),defaultValue:e}}function ve(e){let t=H(e);return t!==void 0?t:e.defaultValue}var Uo,wr=N(()=>{"use strict";M();A();A();ye();Y("index");Uo=!1});function ri(){return ti}function Sr(e){ti=e}function ni(e,t){Ct.set(e,t)}function oi(e){return Ct.get(e)}function _a(){Ct.clear()}function ii(){if(typeof window>"u")return!1;let e=document.getElementById("__FLUIXI_HYDRATION__");if(!e||e.getAttribute("type")!=="application/json")return!1;try{let t=e.textContent||"{}",r=JSON.parse(t);for(let[n,o]of Object.entries(r))Ct.set(n,o);return!0}catch(t){return console.error("Failed to deserialize hydration data:",t),!1}}function kr(){if(typeof window>"u")return;let e=document.getElementById("__FLUIXI_HYDRATION__");e&&e.remove();let t=document.createTreeWalker(document.body,NodeFilter.SHOW_COMMENT,null),r=[],n;for(;n=t.nextNode();){let o=n,i=o.nodeValue||"";(i.startsWith("#")||i.startsWith("/"))&&r.push(o)}r.forEach(o=>o.remove()),_a()}function si(){return typeof window>"u"}var ti,Ct,Or=N(()=>{"use strict";ti=!1,Ct=new Map;typeof window<"u"&&window.addEventListener("load",()=>{setTimeout(kr,100)})});function Va(e,t,r){let n=new Uint8Array(t.length);e:for(let o=0;o<e.length;o++){for(let i=0;i<t.length;i++)if(!n[i]&&ne(e[o],t[i],r)){n[i]=1;continue e}return!1}return!0}var ne,li=N(()=>{"use strict";Vt();ne=(e,t,r={})=>{if(e===t)return!0;if(e==null||t==null||typeof e!=typeof t)return!1;let n=Array.isArray(e),o=Array.isArray(t);if(n!==o)return!1;if(n&&o)return e.length!==t.length?!1:r.unordered?Va(e,t,r):e.every((y,w)=>ne(y,t[w],r));if(typeof e!="object")return e===t;let i=e instanceof Date,a=t instanceof Date;if(i!==a)return!1;if(i)return e.getTime()===t.getTime();let s=e instanceof RegExp,l=t instanceof RegExp;if(s!==l)return!1;if(s)return e.toString()===t.toString();let u=e instanceof Map,f=t instanceof Map;if(u!==f)return!1;if(u){if(e.size!==t.size)return!1;for(let[y,w]of e)if(!t.has(y)||!ne(w,t.get(y),r))return!1;return!0}let c=e instanceof Set,p=t instanceof Set;if(c!==p)return!1;if(c){if(e.size!==t.size)return!1;let y=[...t],w=new Uint8Array(y.length);e:for(let k of e){for(let R=0;R<y.length;R++)if(!w[R]&&ne(k,y[R],r)){w[R]=1;continue e}return!1}return!0}if(!Be(e)||!Be(t))return!1;let h=Object.keys(e),d=Object.keys(t);if(h.length!==d.length)return!1;for(let y of h)if(!Object.prototype.hasOwnProperty.call(t,y)||!ne(e[y],t[y],r))return!1;return!0}});function Wa(e){return e.startsWith("//")?e.replace(/^\/+/,"/"):e}function we(e,t,r=!1){let n=[];if(e===t)return{params:{},path:t};if(!r&&e==="/"&&t.startsWith("/"))return{params:{},path:"/"};let o=e.replace(/:([a-zA-Z0-9_]+)/g,(l,u)=>(n.push(u),"([^/]+)")).replace(/\*([a-zA-Z0-9_]*)/g,(l,u)=>(u&&n.push(u),"(.*)"));o.startsWith("/")||(o="/"+o),o===""&&(o="/");let i=new RegExp(`^${o}${r?"$":"(?=/|$)"}`),a=t.match(i);if(!a)return null;let s={};return n.forEach((l,u)=>{s[l]=a[u+1]}),{params:s,path:a[0]}}function Er(e){let t=e.path.split("/").filter(Boolean);if(t.length===0)return 5;let r=0;for(let n of t)n.startsWith("*")?r+=1:n.startsWith(":")?r+=10:r+=100;return r}function ui(e){return[...e].sort((t,r)=>Er(r)-Er(t))}function oe(e,t){let r=t.length>1?t.replace(/\/+$/,"")||"/":t,n=ci(e,r);if(!n)return null;let o=[],i="",a={};for(let s of n.layers){i=Wa(za(i,s.consumed));let l={};for(let[u,f]of Object.entries(s.params))u in a||(l[u]=f),a[u]=f;o.push({route:s.route,component:s.route.component,params:l,pathname:i||"/"})}return{matched:o,params:a,pathname:t}}function ci(e,t){if(!e||e.length===0)return null;let r=ui(e);for(let n of r){let o=!!n.children&&n.children.length>0,i=we(n.path,t,!o);if(i){if(o){let a=ci(n.children,t);if(a)return{layers:[{route:n,params:i.params,consumed:i.path},...a.layers]};continue}return{layers:[{route:n,params:i.params,consumed:i.path}]}}}return null}function za(e,t){if(!e)return t;if(t===e)return e;if(t.startsWith(e))return t;let r=e.replace(/\/$/,""),n=t.replace(/^\//,"");return`${r}/${n}`}var $r=N(()=>{"use strict"});function jr(e){let t=e,r="",n=t.indexOf("#");n!==-1&&(r=t.slice(n),t=t.slice(0,n));let o="",i=t.indexOf("?");return i!==-1&&(o=t.slice(i),t=t.slice(0,i)),{pathname:t||"/",search:o,hash:r}}function Me(e="/"){let t=[{path:e,state:null}],r=0,n=new Set,o=()=>n.forEach(i=>i());return{get(){let{path:i,state:a}=t[r];return{...jr(i),state:a}},push(i,a=null){t=t.slice(0,r+1),t.push({path:i,state:a}),r=t.length-1,o()},replace(i,a=null){t[r]={path:i,state:a},o()},subscribe(i){return n.add(i),()=>n.delete(i)}}}function ie(){let e=typeof window<"u"?window:void 0,t=new Set,r=()=>t.forEach(n=>n());return e&&e.addEventListener("popstate",r),{get(){if(!e)return{pathname:"/",search:"",hash:"",state:null};let{pathname:n,search:o,hash:i}=e.location;return{pathname:n,search:o,hash:i,state:e.history.state??null}},push(n,o=null){e?.history.pushState(o,"",n),r()},replace(n,o=null){e?.history.replaceState(o,"",n),r()},subscribe(n){return t.add(n),()=>t.delete(n)}}}var Rr=N(()=>{"use strict"});function Ua(e){let t={};return e&&new URLSearchParams(e.startsWith("?")?e.slice(1):e).forEach((n,o)=>t[o]=n),t}function Ba(e,t){if(!t)return e||"/";let r=t.replace(/\/$/,"");return e===r?"/":e.startsWith(r+"/")?e.slice(r.length)||"/":e||"/"}function Ka(e,t){return!t||/^https?:\/\//.test(e)?e:`${t.replace(/\/$/,"")}${e.startsWith("/")?e:"/"+e}`}function Nr(e){let{routes:t,history:r,base:n}=e,o=new Set,i=()=>{let f=r.get();return{pathname:f.pathname,search:f.search,hash:f.hash,state:f.state,query:Ua(f.search)}},a=f=>oe(t,Ba(f,n)),s=(()=>{let f=i();return{location:f,match:a(f.pathname)}})(),l=()=>{let f=i();s={location:f,match:a(f.pathname)},o.forEach(c=>c(s))},u=r.subscribe(l);return{state(){return s},subscribe(f){return o.add(f),()=>o.delete(f)},navigate(f,c={}){let p=Ka(f,n);c.replace?r.replace(p,c.state??null):r.push(p,c.state??null)},match(f){return a(f)},destroy(){u(),o.clear()}}}var fi=N(()=>{"use strict";$r();Rr()});var Mr=N(()=>{"use strict";$r();Rr();fi()});function pi(e,t){return async(...r)=>{let n=t+":"+JSON.stringify(r);if(ri()||typeof window<"u"){let i=oi(n);if(i!==void 0)return i}if(De.has(n))return De.get(n);if(Le.has(n))return Le.get(n);let o=Promise.resolve(e(...r)).then(i=>(De.set(n,i),Le.delete(n),si()&&ni(n,i),i),i=>{throw Le.delete(n),i});return Le.set(n,o),o}}function di(e){let t=typeof e=="string"?r=>r.startsWith(e):e;for(let r of De.keys())t(r)&&(De.delete(r),Xa.add(r));Ja(r=>r+1)}function hi(e,t){let[r]=J(t||(()=>!0),e);return r}function yi(e){return Lr.has(e)||Lr.set(e,v(void 0)),Lr.get(e)}function Dr(e,t){let r=t||e.name||"action",n=async o=>{let[,i]=yi(r),a=()=>i(void 0),s=()=>n(o);i({input:o,pending:!0,clear:a,retry:s});try{let l=await e(o);return i({input:o,result:l,pending:!1,clear:a,retry:s}),l}catch(l){throw i({input:o,error:l,pending:!1,clear:a,retry:s}),l}};return n.url=r,n.with=o=>Dr((...i)=>e(o,...i),t),n}function mi(e){let[t]=yi(e.url);return t}function gi(e){return e}var De,Le,gf,Ja,Xa,Lr,Ga,bf,bi=N(()=>{"use strict";A();Or();wr();De=new Map,Le=new Map;[gf,Ja]=v(0),Xa=new Set;Lr=new Map;Ga=be(),bf=Ga.Provider});var Si={};Jr(Si,{A:()=>zr,Form:()=>al,Link:()=>$t,Outlet:()=>qr,Redirect:()=>Fr,Router:()=>Ir,action:()=>Dr,cache:()=>pi,createAsync:()=>hi,createBrowserHistory:()=>ie,createMemoryHistory:()=>Me,lazy:()=>me,matchPath:()=>we,matchRoutes:()=>oe,preloadRoutes:()=>ll,revalidate:()=>di,runWithOwner:()=>j,select:()=>nl,useAction:()=>gi,useLevelParams:()=>tl,useLinkNavigation:()=>ol,useLocation:()=>Fe,useMatch:()=>Vr,useNavigate:()=>Et,useParam:()=>Hr,useParamSelector:()=>rl,useParams:()=>qe,useRouteData:()=>il,useRouter:()=>Ae,useSearchParams:()=>Wr,useSubmission:()=>mi});function Ya(e,t,r){let n,o=e.route.data;if(typeof o=="function"){let f=!1;x(()=>{f=!0});let c=$(),[p]=J(()=>o({params:r.params,location:r.location},c,()=>f));n=p}let i=()=>Ai.Provider({value:n,get children(){return wi.Provider({value:e.params,get children(){return vi.Provider({value:{depth:t,...r},get children(){return G(e.component,{})}})}})}});if(!n)return i();let a=n,s=()=>a.loading,[l,u]=v(O(()=>!s()));return S(()=>u(!s())),g(()=>l()?i():null)}function xi(e){let t=e.depth+1,[r,n]=v(O(()=>e.matched()[t]?.component));return S(()=>{let o=e.matched()[t]?.component;n(()=>o)}),g(()=>{if(!r())return e.notFound?e.notFound():null;let i=O(()=>e.matched())[t];return Ya(i,t,{matched:e.matched,params:e.params,location:e.location})})}function Za(e){return e==null?Qa():typeof e=="function"?G(e,{}):e}function Qa(){let e=he("div");T(e,"class","fx-not-found"),T(e,"role","main"),T(e,"style","min-height:60vh;display:grid;place-content:center;gap:.25rem;text-align:center;font-family:system-ui,-apple-system,sans-serif");let t=he("h1");T(t,"style","margin:0;font-size:2.5rem;font-weight:700"),F(t,"404");let r=he("p");return T(r,"style","margin:0;opacity:.7"),F(r,"This page could not be found."),e.appendChild(t),e.appendChild(r),e}function Ir(e){let t=e.history??ie(),r=Nr({routes:e.routes,base:e.base,history:t}),[n,o]=v(r.state()),i=r.subscribe(o);x(()=>{i(),r.destroy()});let a=g(()=>(n().match?.matched??[]).filter(f=>f.component)),s={router:r,location:g(()=>n().location),params:g(()=>n().match?.params??{})},l={depth:-1,matched:a,params:s.params,location:s.location,notFound:()=>Za(e.notFound)},u;return Ie.Provider({value:s,get children(){return u??=xi(l)}})}function qr(){let e=H(vi);return e?xi(e):null}function Fr(e){let t=H(Ie);if(!t||typeof window>"u")return null;let r=!1;return x(()=>r=!0),queueMicrotask(()=>{r||t.router.navigate(e.to,{replace:e.replace!==!1})}),null}function Ae(){let e=H(Ie);if(e)return e;if(typeof window>"u")return el;throw new Error("[router-next] useRouter must be used within <Router>")}function qe(){let e=Ae().params;return g(()=>e(),{},{equals:(t,r)=>JSON.stringify(t)===JSON.stringify(r)})}function tl(){return H(wi)??{}}function Hr(e){let t=qe();return g(()=>t()[e])}function rl(e,t){let r=qe();return g(()=>e(r()),void 0,t?{equals:t}:void 0)}function Vr(e){let t=Fe();return g(()=>we(typeof e=="function"?e():e,t.pathname))}function Wr(){let e=Fe(),t=Et();return[g(()=>e.query),(o,i)=>{let a=new URLSearchParams(e.search);for(let[l,u]of Object.entries(o))u===null?a.delete(l):a.set(l,u);let s=a.toString();t(e.pathname+(s?`?${s}`:""),i)}]}function nl(e,t){let r=(n,o)=>ne(n,o);return t!==void 0?g(()=>Ue(e(),t),void 0,{equals:r}):g(e,void 0,{equals:r})}function Fe(){let{location:e}=Ae();return new Proxy({},{get:(t,r)=>e()[r],has:(t,r)=>r in e(),ownKeys:()=>Reflect.ownKeys(e()),getOwnPropertyDescriptor:(t,r)=>Object.getOwnPropertyDescriptor(e(),r)})}function ol(e={}){let t=H(Ie);return r=>{if(!t||r.defaultPrevented||r.button!==0||r.metaKey||r.ctrlKey||r.shiftKey||r.altKey)return;let o=r.target?.closest?.("a");if(!o||!o.getAttribute("href")||o.target&&o.target!=="_self"||o.hasAttribute("download")||/(^|\s)external(\s|$)/.test(o.getAttribute("rel")??""))return;let i=new URL(o.href);i.protocol!=="http:"&&i.protocol!=="https:"||i.origin===window.location.origin&&(i.hash&&i.pathname===window.location.pathname&&i.search===window.location.search||e.shouldNavigate&&!e.shouldNavigate(i,o)||(r.preventDefault(),t.router.navigate(i.pathname+i.search+i.hash,{replace:e.replace})))}}function Et(){let{router:e}=Ae();return(t,r)=>e.navigate(t,r)}function il(){return H(Ai)??(()=>{})}function $t(e){let t=H(Ie),r=typeof document>"u",n=()=>t?.router.navigate(K(e.href)??"",{replace:K(e.replace)}),o=he("a");T(o,"href",K(e.href)??""),e.slot&&T(o,"slot",K(e.slot));for(let a of Object.keys(e)){if(sl.has(a))continue;let s=e[a];s!=null&&typeof s!="function"&&T(o,a,String(s))}if(typeof o.addEventListener=="function")o.addEventListener("click",a=>{a.metaKey||a.ctrlKey||a.shiftKey||a.altKey||(a.preventDefault(),n())});else{let a=K(e.className??e.class)??"";a&&T(o,"class",a)}typeof o.addEventListener=="function"&&S(()=>{let a=K(e.href)??"";o.setAttribute("href",a);let s=K(e.className??e.class)??"",l=K(e.activeClass)??"",u=K(e.active)??t?.location().pathname===a;o.className=[s,u?l:""].filter(Boolean).join(" ")});let i=e.children;return i!=null&&F(o,i),o}function al(e){let t=e.action,r=e.className??e.class,n=t.url??"",o=he("form");T(o,"method","post"),n&&T(o,"action",n),r&&T(o,"class",r);for(let a of Object.keys(e)){if(a==="action"||a==="children"||a==="class"||a==="className")continue;let s=e[a];s!=null&&typeof s!="function"&&T(o,a,String(s))}typeof o.addEventListener=="function"&&o.addEventListener("submit",a=>{a.preventDefault();let s={};new FormData(o).forEach((l,u)=>{s[u]=l}),Promise.resolve(t(s)).catch(()=>{})});let i=e.children;return i!=null&&F(o,i),o}async function ll(e,t){let r=oe(e,t);if(!r)return;let n=[];for(let o of r.matched){let i=o.component;i&&typeof i.preload=="function"&&n.push(i.preload())}await Promise.all(n)}var Ie,vi,wi,Ai,el,K,sl,zr,Ur=N(()=>{"use strict";A();M();A();Vt();li();Mr();Mr();bi();Ot();A();Ie=W(),vi=W(),wi=W(),Ai=W();el={router:{navigate:()=>{}},location:()=>({pathname:"",search:"",hash:"",query:{}}),params:()=>({})};K=e=>typeof e=="function"?e():e,sl=new Set(["href","slot","class","className","active","activeClass","replace","children"]);zr=$t});var cl={};Jr(cl,{$component:()=>gt,A:()=>zr,ClientOnly:()=>dr,DEV:()=>Pe,Dynamic:()=>$o,ErrorBoundary:()=>No,FRAMEWORK_NAME:()=>ei,For:()=>Co,Fragment:()=>Ar,Index:()=>_o,Link:()=>$t,Match:()=>Po,NoSsr:()=>Ro,Outlet:()=>qr,Portal:()=>jo,Redirect:()=>Fr,Router:()=>Ir,Show:()=>To,Store:()=>Ye,Suspense:()=>je,Switch:()=>Eo,VERSION:()=>Qo,addClass:()=>so,batch:()=>_,classMap:()=>Mo,cleanupDelegation:()=>zo,composeProviders:()=>vr,createBrowserHistory:()=>ie,createComponent:()=>Ee,createComputed:()=>sn,createConsumer:()=>Ko,createContext:()=>be,createContextWithProvider:()=>Bo,createDebounce:()=>hn,createDeferred:()=>dn,createEffect:()=>S,createIsomorphicState:()=>Xo,createMemo:()=>g,createMemoryHistory:()=>Me,createProvider:()=>Tt,createRenderEffect:()=>C,createResource:()=>J,createRoot:()=>D,createSelector:()=>pn,createSignal:()=>v,createStore:()=>Jt,delegateEvents:()=>te,devOnly:()=>gr,getFrameworkInfo:()=>Ca,getOwner:()=>$,getSharedConfig:()=>yr,hydrate:()=>yt,initDelegation:()=>Wo,insert:()=>F,isDOMNode:()=>at,isDev:()=>mr,isLitTemplateResult:()=>uo,isRenderable:()=>Vo,jsx:()=>xr,jsxs:()=>Zo,lazy:()=>me,mount:()=>ki,onCleanup:()=>x,onMount:()=>bt,onUnmount:()=>vt,portal:()=>Ho,read:()=>xn,reduce:()=>An,removeClass:()=>ao,render:()=>ge,runWithOwner:()=>j,setAttribute:()=>T,setOwner:()=>nn,setProperty:()=>de,spread:()=>So,startClient:()=>Oi,styleMap:()=>Lo,toggleClass:()=>lo,untrack:()=>O,untrackStore:()=>Xt,useCallback:()=>kt,useContext:()=>ve,useEffect:()=>$e,useEventListener:()=>St,useLocation:()=>Fe,useMatch:()=>Vr,useMemo:()=>wt,useNavigate:()=>Et,useParam:()=>Hr,useParams:()=>qe,useProvide:()=>Jo,useReducer:()=>xt,useRef:()=>At,useRouter:()=>Ae,useSearchParams:()=>Wr});A();A();var is="__fluixi_signal_next_state__",ss=e=>{typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e)},E=globalThis[is]??={consumer:null,untracked:!1,owner:null,queue:[],scheduled:!1,flushing:!1,batchDepth:0,hostSchedule:ss,onSuspend:null,onError:null},bn=0,vn=1,Ke=2,as=class{constructor(){this.observers=null,this.watchers=null,this.version=0}updateIfNecessary(){}track(){if(E.untracked)return;let e=E.consumer;e&&((this.observers??=new Set).add(e),(e.sources??=new Set).add(this))}};var ls=class extends as{constructor(e,t){super(),this._threw=!1,this._initialized=!1,this.state=Ke,this.sources=null,this._fn=e,this._equals=t?.equals===!1?()=>!1:t?.equals??Object.is}get(){if(E.consumer===this)throw new Error("Signal.Computed cannot read itself");if(this.track(),this.updateIfNecessary(),this._threw)throw this._error;return this._value}updateIfNecessary(){if(this.state===vn&&this.sources){for(let e of this.sources)if(e.updateIfNecessary(),this.state===Ke)break}(this.state===Ke||!this._initialized)&&this.recompute(),this.state=bn}recompute(){if(this.sources){for(let a of this.sources)a.observers?.delete(this);this.sources.clear()}let e=E.consumer,t=E.untracked;E.consumer=this,E.untracked=!1;let r,n=!1,o;try{r=this._fn()}catch(a){n=!0,o=a,r=this._value}finally{E.consumer=e,E.untracked=t}let i=!this._initialized||this._threw!==n||(n?o!==this._error:!this._equals(this._value,r));if(this._initialized=!0,this._threw=n,this._error=o,this._value=r,i){if(this.version++,this.observers)for(let a of[...this.observers])a.markDirty(Ke);wn(this)}}markDirty(e){if(this.state>=e)return;let t=this.state===bn;if(this.state=e,t){if(this.observers)for(let r of[...this.observers])r.markDirty(vn);wn(this)}}peek(){if(this.updateIfNecessary(),this._threw)throw this._error;return this._value}};function wn(e){if(e.watchers)for(let t of[...e.watchers])t._notify(e)}function us(e){return E.onSuspend?(E.onSuspend(e,E.owner),!0):!1}function cs(){return E.owner}function fs(e,t){let r=E.owner;E.owner=e;try{return t()}finally{E.owner=r}}function ps(e){E.hostSchedule=e??(t=>{Promise.resolve().then(t)})}function ds(e){return!!e&&typeof e.then=="function"}ps(()=>{});var hs=Symbol.for("signal"),ys=Symbol.for("memo");function ms(e,t,r){let n=t,o=cs(),i=new ls(()=>fs(o,()=>{try{return n=e(n)}catch(s){if(ds(s))return us(s),n;throw s}}),{equals:r?.equals}),a=(()=>i.get());return Object.defineProperty(a,hs,{value:!0,enumerable:!0}),Object.defineProperty(a,ys,{value:!0,enumerable:!0}),a}function An(e,t,r,n){return ms(()=>e().reduce(t,r),void 0,n)}function xn(e){let t=e;for(;typeof t=="function";)t=t();return t}A();var zt=Symbol("store-raw"),Sn=Symbol("store-node"),kn=Symbol("store-has"),On=Symbol("store-self"),Tn=Symbol("store-track");var Cn=new WeakMap,_n=new WeakMap;function Rn(e){let[t,r]=v(e),n=t;return n.$=r,n}function Xe(e){let t=Cn.get(e);return t||Cn.set(e,t={keys:new Map}),t}function Pn(e,t,r){let n=e.keys.get(t);return n||e.keys.set(t,n=Rn(r)),n}function En(e){let t=Xe(e);(t.all||(t.all=Rn()))()}function $n(e,t){e.$(typeof t=="function"?()=>t:t)}function Nn(e){if(e==null||typeof e!="object")return!1;if(Array.isArray(e))return!0;let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}function Je(e){if(!Nn(e))return e;let t=_n.get(e);if(t)return t;let r=new Proxy(e,gs);return _n.set(e,r),r}var gs={get(e,t,r){if(t===zt||t===Sn)return e;if(t===ue)return r;if(t===kn)return a=>a in e;if(t==="__proxy")return!0;if(t===Tn||t===On)return En(e),r;let n=e[t];if(typeof n=="function"&&!Object.prototype.hasOwnProperty.call(e,t))return n;let o=Object.getOwnPropertyDescriptor(e,t);if(o&&o.get)return o.get.call(r);let i=Pn(Xe(e),t,n)();return Nn(i)?Je(i):i},set(){return!0},deleteProperty(e,t){return t in e&&Te(e,t,void 0),!0},has(e,t){return t===zt||t===ue||t===Sn||t===kn||t===On||t===Tn?!0:(Pn(Xe(e),t,e[t])(),t in e)},ownKeys(e){return En(e),Reflect.ownKeys(e)},getOwnPropertyDescriptor(e,t){return Reflect.getOwnPropertyDescriptor(e,t)}};function Te(e,t,r){if(e[t]===r&&(r!==void 0||t in e))return;let n=Array.isArray(e),o=n?e.length:0;r===void 0?delete e[t]:e[t]=r;let i=Xe(e),a=i.keys.get(t);if(a&&$n(a,r),n&&e.length!==o){let s=i.keys.get("length");s&&$n(s,e.length)}i.all&&i.all.$(void 0)}function jn(e,t){return typeof e=="function"?e(t):e}function Ut(e,t){for(let r of Object.keys(t)){let n=t[r],o=e[r];n&&typeof n=="object"&&!Array.isArray(n)&&o&&typeof o=="object"&&!Array.isArray(o)?Ut(o,n):Te(e,r,n)}}function Kt(e){let t=[],r=e.replace(/\[([^\]]*)\]/g,".$1");for(let n of r.split("."))n.length&&t.push(n);return t}function Mn(e,t,r){let n=t.length-1;for(let i=0;i<n;i++){let a=t[i];if(a==="*"){let l=t.slice(i+1);if(Array.isArray(e))for(let u=0;u<e.length;u++)Mn(e[u],l,r);return}let s=e[a];(s==null||typeof s!="object")&&(s=/^\d+$/.test(t[i+1])?[]:{},Te(e,a,s)),e=s}let o=t[n];if(o==="*"){if(Array.isArray(e))for(let i=0;i<e.length;i++)Te(e,i,jn(r,e[i]));return}Te(e,o,jn(r,e[o]))}function Wt(e,t,r){Mn(e,Kt(t),r)}function bs(e,t){let r=t[0];if(typeof r=="function"&&t.length===1){let n=r(e);n&&n!==e&&Ut(e,n);return}if(Array.isArray(r)&&t.length===1){for(let n of r)Array.isArray(n)&&Wt(e,n[0],n[1]);return}if(r&&typeof r=="object"&&!Array.isArray(r)&&t.length===1){Ut(e,r);return}if(Array.isArray(t[1])&&t.length>=3){Wt(e,`${r}.${t[1].join(".")}`,t[2]);return}Wt(e,String(r),t[1])}function Bt(e){if(e==null||typeof e!="object")return e;if(Array.isArray(e))return e.map(Bt);let t={};for(let r of Object.keys(e))t[r]=Bt(e[r]);return t}function ce(e,t){let r=e;for(let n of Kt(t)){if(r==null)return;r=r[n]}return r}var Ye=class{constructor(e,t={immutable:!0}){this.options=t,this.root=e,this.set=((...r)=>_(()=>bs(this.root,r)))}get state(){return Je(this.root)}get proxy(){return Je(this.root)}get accessor(){return(()=>Je(this.root))}unwrap(){return this.root}getNode(e){return this.root&&this.root[e]}get(e){if(e==null||e==="")return Ge(this.state);let t=this.state;for(let r of Kt(e)){if(t==null)return;t=t[r]}return Ge(t)}select(e){return g(()=>e(this.state))}subscribe(e){return S(()=>e(this.state))}watch(e,t){let r;return S(()=>{let n=e(this.state);Object.is(n,r)||(t(n,r),r=n)})}reactive(e){return g(()=>this.state[e])}produce(e){this.set((t=>{let r=Bt(t);return e(r),r}))}reconcile(e,t={}){this.set(e)}push(e,...t){let r=ce(this.root,e);this.set(e,r.concat(t))}pop(e){let t=ce(this.root,e).slice(),r=t.pop();return this.set(e,t),r}shift(e){let t=ce(this.root,e).slice(),r=t.shift();return this.set(e,t),r}splice(e,t,r,...n){let o=ce(this.root,e).slice(),i=o.splice(t,r,...n);return this.set(e,o),i}insert(e,t,r){let n=ce(this.root,e).slice();n.splice(t,0,r),this.set(e,n)}removeAt(e,t){let r=ce(this.root,e).slice(),n=r.splice(t,1);return this.set(e,r),n}toObservable(){let[e]=v(this.state);return e.toObservable()}dispose(){}},vs=["get","select","watch","subscribe","produce","reconcile","push","pop","shift","splice","insert","removeAt","unwrap","toObservable"];function ws(e,t){for(let r of vs)e[r]=t[r].bind(t);e.$=t.reactive.bind(t)}function Jt(e,t={immutable:!0}){let r=new Ye(e,t);return ws(r.set,r),[r.proxy,r.set]}function As(e,t={}){return new Ye(e,{...t,immutable:!1})}function Ge(e){if(e==null||typeof e!="object")return e;let t=e[zt];return t!==void 0?t:e}function Xt(e){return O(()=>Ge(e))}var Sl=Object.freeze({createStore:Jt,createMutableStore:As,batch:_,unwrap:Ge,untrackStore:Xt});A();M();var Do="1.0.0-alpha.76";M();co(Do);M();ye();ye();A();M();function Fo(e){return!!(e&&typeof e=="object"&&typeof e.then=="function"||e instanceof Promise)}var ba=W();function je(e){return G(va,e)}function va(e){let t=mn(),r=H(ba),n=r?r.register(t.inFallback):void 0;function o(c){return c==null||typeof c=="boolean"?null:typeof c=="function"&&B(c)&&!P(c)?c():c}let i=bo(()=>o(e.fallback??null)),a=Ft(t,()=>Q(()=>e.children)),s=(c,p)=>{if(!(p>8))if(Array.isArray(c))for(let h of c)s(h,p+1);else typeof c=="function"&&P(c)&&s(c(),p+1)};Ft(t,()=>{C(()=>s(a,0))});let[l,u]=v(void 0),f=Fo(a);return f&&(t.increment(),a.then(c=>{u(()=>c),t.decrement()},()=>t.decrement())),g(()=>{let c=n?n.showFallback():t.inFallback();return process.env.FX_DEBUG&&console.log("[s] output; showFallback:",c),c?i:f?l():a})}po(je);Object.defineProperty(je,"__suspense",{value:!0,enumerable:!0});Ot();Ot();var br=typeof window>"u";function ge(e,t,r={}){if(Y("render"),te(["click","input","change","submit"]),br)throw new Error("render() is for client-side only. Use renderToString() on server.");if(!t)throw new Error("Container element is required");let n;return D(o=>{n=o;let i=typeof e=="function"?e():e;t.textContent="",lt(t),ut(),F(t,()=>i)}),()=>{n&&(n(),n=void 0)}}function wa(e){return e&&typeof e=="object"&&(e._$litType$!==void 0||e._$litDirective$!==void 0)}function Ho(e,t,r={}){let n=document.createElement("div");n.setAttribute("data-portal","true"),t.appendChild(n);let o=ge(e,n,r);return()=>{o(),t.contains(n)&&t.removeChild(n)}}function Vo(e){return!!(e==null||typeof e=="function"||at(e)||wa(e)||Array.isArray(e)||typeof e=="string"||typeof e=="number"||typeof e=="boolean")}function Wo(){br||te(["click","input","change","submit"])}function zo(){}wr();A();M();var xa="__fluixi_iso_states__",Sa="__iso:";function ka(){return globalThis[xa]??=new Map}function Oa(e){if(typeof window>"u")return;let t=pr();return t?t[Sa+e]:void 0}function Xo(e,t){let r=Oa(e),n=r!==void 0?r:typeof window<"u"&&t.client?t.client():t.fallback,[o,i]=v(n);return ka().set(e,{server:t.server,set:i}),{value:o,set:i,key:e}}M();M();M();M();M();A();var Ar=Symbol.for("fluixi.fragment"),Go=typeof window>"u";function Yo(e){return e==null||e===!1?null:Array.isArray(e)?e.map(Yo).flat():e}function xr(e,t,r){if(e==null)return null;let n=t||{};if(r!==void 0&&(n.key=r),e===Ar)return g(()=>ct(Yo(n.children)));if(typeof e=="function"){let{type:o}=ho(e);return e.$$typeof===Symbol.for("react.provider")||o==="provider"?e(n):Go?{type:e,props:n}:g(()=>G(e,n),void 0,{name:"jsx component"})}return typeof e=="string"&&e.trim().length>0?Ta(e,n):null}var Zo=xr;function Ta(e,t){return Go?{type:e,props:t||{}}:Oo(e,t)}ye();var Qo="0.0.1",ei="Fluixi";function Ca(){return{name:ei,version:Qo,features:{ssr:!0,hydration:!0,jsx:!0,litHtml:!0,signals:!0,fineGrained:!0,lazy:!0,hooks:!0,devMode:!0}}}Y("index");M();Or();ye();A();function re(e){return typeof e=="function"?e():e}function Pa(e){if(typeof e=="string")return e;let t=[];return t.push(e.index===!1?"noindex":"index"),t.push(e.follow===!1?"nofollow":"follow"),e.noarchive&&t.push("noarchive"),e.nosnippet&&t.push("nosnippet"),e.noimageindex&&t.push("noimageindex"),e.maxSnippet!=null&&t.push(`max-snippet:${e.maxSnippet}`),e.maxImagePreview&&t.push(`max-image-preview:${e.maxImagePreview}`),e.maxVideoPreview!=null&&t.push(`max-video-preview:${e.maxVideoPreview}`),t.join(", ")}function Tr(){let e=[],[t,r]=v(0);return{sources:e,version:t,push(n){return e.push(n),r(o=>o+1),()=>{let o=e.indexOf(n);o!==-1&&(e.splice(o,1),r(i=>i+1))}}}}var Ea=null;function Cr(e){Ea=e}function _t(e){let t=5381;for(let r=0;r<e.length;r++)t=t*33^e.charCodeAt(r);return(t>>>0).toString(36)}function $a(e){return e.charset!=null?"meta:charset":e.property?"meta:property:"+e.property:e.name?"meta:name:"+e.name:e["http-equiv"]?"meta:http-equiv:"+e["http-equiv"]:"meta:"+_t(JSON.stringify(e))}function ja(e,t){let r=typeof t=="string"?{url:t}:t;e.push({tag:"meta",key:"meta:property:og:image:"+r.url,attrs:{property:"og:image",content:r.url}}),r.secureUrl&&e.push({tag:"meta",key:"meta:property:og:image:secure:"+r.url,attrs:{property:"og:image:secure_url",content:r.secureUrl}}),r.type&&e.push({tag:"meta",key:"meta:property:og:image:type:"+r.url,attrs:{property:"og:image:type",content:r.type}}),r.width!=null&&e.push({tag:"meta",key:"meta:property:og:image:width:"+r.url,attrs:{property:"og:image:width",content:String(r.width)}}),r.height!=null&&e.push({tag:"meta",key:"meta:property:og:image:height:"+r.url,attrs:{property:"og:image:height",content:String(r.height)}}),r.alt&&e.push({tag:"meta",key:"meta:property:og:image:alt:"+r.url,attrs:{property:"og:image:alt",content:r.alt}})}function Ra(e,t){let r=(n,o)=>{o!=null&&t.push({tag:"meta",key:"meta:property:og:"+n,attrs:{property:"og:"+n,content:o}})};r("title",e.title),r("description",e.description),r("type",e.type),r("url",e.url),r("site_name",e.siteName),r("locale",e.locale);for(let n of e.localeAlternate??[])t.push({tag:"meta",key:"meta:property:og:locale:alt:"+n,attrs:{property:"og:locale:alternate",content:n}});if(e.image!=null){let n=Array.isArray(e.image)?e.image:[e.image];for(let o of n)ja(t,o)}if(e.video){let n=typeof e.video=="string"?{url:e.video}:e.video;r("video",n.url),"type"in n&&n.type&&r("video:type",n.type),"width"in n&&n.width!=null&&r("video:width",String(n.width)),"height"in n&&n.height!=null&&r("video:height",String(n.height))}if(e.audio){let n=typeof e.audio=="string"?{url:e.audio}:e.audio;r("audio",n.url),"type"in n&&n.type&&r("audio:type",n.type)}if(e.article){let n=e.article;r("article:published_time",n.publishedTime),r("article:modified_time",n.modifiedTime),r("article:expiration_time",n.expirationTime),r("article:section",n.section);for(let o of[].concat(n.author??[]))t.push({tag:"meta",key:"meta:property:og:article:author:"+o,attrs:{property:"article:author",content:o}});for(let o of[].concat(n.tag??[]))t.push({tag:"meta",key:"meta:property:og:article:tag:"+o,attrs:{property:"article:tag",content:o}})}if(e.book){let n=e.book;r("book:isbn",n.isbn),r("book:release_date",n.releaseDate);for(let o of[].concat(n.author??[]))t.push({tag:"meta",key:"meta:property:og:book:author:"+o,attrs:{property:"book:author",content:o}});for(let o of[].concat(n.tag??[]))t.push({tag:"meta",key:"meta:property:og:book:tag:"+o,attrs:{property:"book:tag",content:o}})}if(e.profile){let n=e.profile;r("profile:first_name",n.firstName),r("profile:last_name",n.lastName),r("profile:username",n.username),r("profile:gender",n.gender)}}function Na(e,t){let r=(n,o)=>{o!=null&&t.push({tag:"meta",key:"meta:name:twitter:"+n,attrs:{name:"twitter:"+n,content:o}})};r("card",e.card),r("site",e.site),r("creator",e.creator),r("title",e.title),r("description",e.description),r("image",e.image),r("image:alt",e.imageAlt),r("player",e.player),e.playerWidth!=null&&r("player:width",String(e.playerWidth)),e.playerHeight!=null&&r("player:height",String(e.playerHeight)),e.app&&(r("app:name:iphone",e.app.name),r("app:id:iphone",e.app.idIphone),r("app:id:ipad",e.app.idIpad),r("app:id:googleplay",e.app.idGooglePlay))}function Ma(e,t){let r=(n,o)=>t.push({tag:"link",key:n,attrs:o});if(e.icon!=null){let n=typeof e.icon=="string"?[{url:e.icon}]:e.icon;for(let o of n)r("link:icon:"+o.url,{rel:"icon",href:o.url,...o.type?{type:o.type}:{},...o.sizes?{sizes:o.sizes}:{}})}if(e.apple!=null){let n=typeof e.apple=="string"?[{url:e.apple}]:e.apple;for(let o of n)r("link:apple-touch-icon:"+o.url,{rel:"apple-touch-icon",href:o.url,...o.sizes?{sizes:o.sizes}:{}})}e.mask&&r("link:mask-icon",{rel:"mask-icon",href:e.mask.url,...e.mask.color?{color:e.mask.color}:{}}),e.shortcut&&r("link:shortcut",{rel:"shortcut icon",href:e.shortcut}),e.msTileImage&&t.push({tag:"meta",key:"meta:name:msapplication-TileImage",attrs:{name:"msapplication-TileImage",content:e.msTileImage}}),e.msTileColor&&t.push({tag:"meta",key:"meta:name:msapplication-TileColor",attrs:{name:"msapplication-TileColor",content:e.msTileColor}})}function La(e,t,r){let n=(c,p)=>t.push({tag:"meta",key:c,attrs:p}),o=re(e.title);o!==void 0&&(r.title=o),e.titleTemplate!==void 0&&(r.template=e.titleTemplate);let i=re(e.lang);i!==void 0&&t.push({tag:"htmlAttr",key:"html:lang",name:"lang",value:i}),e.charset!==void 0&&n("meta:charset",{charset:e.charset}),e.viewport!==void 0&&n("meta:name:viewport",{name:"viewport",content:e.viewport});let a=re(e.description);a!==void 0&&n("meta:name:description",{name:"description",content:a});let s=re(e.keywords);s!==void 0&&n("meta:name:keywords",{name:"keywords",content:Array.isArray(s)?s.join(", "):s}),e.author!==void 0&&n("meta:name:author",{name:"author",content:e.author}),e.robots!==void 0&&n("meta:name:robots",{name:"robots",content:Pa(e.robots)}),e.generator!==void 0&&n("meta:name:generator",{name:"generator",content:e.generator}),e.applicationName!==void 0&&n("meta:name:application-name",{name:"application-name",content:e.applicationName}),e.referrer!==void 0&&n("meta:name:referrer",{name:"referrer",content:e.referrer}),e.colorScheme!==void 0&&n("meta:name:color-scheme",{name:"color-scheme",content:e.colorScheme});let l=re(e.themeColor);l!==void 0&&n("meta:name:theme-color",{name:"theme-color",content:l});let u=re(e.canonical);if(u!==void 0&&t.push({tag:"link",key:"link:rel:canonical",attrs:{rel:"canonical",href:u}}),e.manifest!==void 0&&t.push({tag:"link",key:"link:rel:manifest",attrs:{rel:"manifest",href:e.manifest}}),e.base!==void 0&&t.push({tag:"base",key:"base",attrs:{href:e.base}}),e.verification){let c={google:"google-site-verification",bing:"msvalidate.01",yandex:"yandex-verification",pinterest:"p:domain_verify"};for(let[p,h]of Object.entries(e.verification)){if(h==null)continue;let d=c[p]??p;n("meta:name:"+d,{name:d,content:h})}}for(let c of e.alternates??[])t.push({tag:"link",key:"link:alternate:hreflang:"+c.hreflang,attrs:{rel:"alternate",hreflang:c.hreflang,href:c.href}});for(let c of e.feeds??[])t.push({tag:"link",key:"link:alternate:feed:"+c.href,attrs:{rel:"alternate",type:c.type??"application/rss+xml",href:c.href,...c.title?{title:c.title}:{}}});e.og&&Ra(e.og,t),e.twitter&&Na(e.twitter,t),e.icons&&Ma(e.icons,t);let f=re(e.jsonLd);if(f!==void 0){let c=Array.isArray(f)?f:[f];for(let p of c){let h=JSON.stringify(p);t.push({tag:"script",key:"script:ldjson:"+_t(h),attrs:{type:"application/ld+json"},children:h})}}for(let c of e.meta??[]){let p={};for(let[h,d]of Object.entries(c))d!=null&&(p[h==="httpEquiv"?"http-equiv":h]=d);t.push({tag:"meta",key:$a(p),attrs:p})}for(let c of e.link??[]){let p={};for(let[h,d]of Object.entries(c))d!=null&&(p[h]=d);t.push({tag:"link",key:"link:"+(p.rel??"")+":"+(p.href??_t(JSON.stringify(p))),attrs:p})}for(let c of e.script??[]){let p={},h;for(let[d,y]of Object.entries(c))y!=null&&(d==="children"?h=y:p[d]=y);t.push({tag:"script",key:"script:"+(p.src??_t((h??"")+JSON.stringify(p))),attrs:p,children:h})}}function Da(e,t){return typeof e=="function"?e(t):e.includes("%s")?e.replace("%s",t):e}function Pt(e){let t=[],r={};for(let i of e.sources){let a=typeof i=="function"?i():i;La(a,t,r)}r.title!==void 0&&t.push({tag:"title",key:"title",children:r.template?Da(r.template,r.title):r.title});let n=new Map,o={};for(let i of t){if(i.tag==="htmlAttr"){o[i.name]=i.value;continue}n.set(i.key,i)}return{tags:[...n.values()],htmlAttrs:o}}var Re="data-fh",Ne="data-fh-key";function _r(e){for(let t=e.firstChild;t;t=t.nextSibling)if(t.nodeType===8&&t.data.startsWith("fh:")){t.parentNode?.removeChild(t);return}}A();function ai(e,t){for(let r of Array.from(e.attributes))r.name===Re||r.name===Ne||r.name in t||e.removeAttribute(r.name);for(let[r,n]of Object.entries(t))e.getAttribute(r)!==n&&e.setAttribute(r,n)}function Ia(e){let t=document.createElement(e.tag);return ai(t,e.attrs),t.setAttribute(Re,""),t.setAttribute(Ne,e.key),e.tag==="script"&&e.children!=null&&(t.textContent=e.children),t}function qa(e,t){let r=document.head,n=new Map;for(let a of Array.from(r.querySelectorAll(`[${Re}]`))){let s=a.getAttribute(Ne);a.tagName!=="TITLE"&&s&&n.set(s,a)}let o=null,i=new Set;for(let a of e){if(a.tag==="title"){o=a.children;continue}if(a.tag==="htmlAttr")continue;i.add(a.key);let s=n.get(a.key);s&&s.tagName===a.tag.toUpperCase()?(ai(s,a.attrs),a.tag==="script"&&(s.textContent??"")!==(a.children??"")&&(s.textContent=a.children??"")):(s&&s.remove(),r.appendChild(Ia(a)))}for(let[a,s]of n)i.has(a)||s.remove();o!=null&&document.title!==o&&(document.title=o);for(let[a,s]of Object.entries(t))document.documentElement.getAttribute(a)!==s&&document.documentElement.setAttribute(a,s)}function Pr(e){return D(t=>(S(()=>{e.version();let{tags:r,htmlAttrs:n}=Pt(e);qa(r,n)}),x(()=>{}),t))}Y("client index");function ki(e,t){if(!t)throw new Error("Container element not found for mount()");fr(()=>e(),t)}async function Oi(e,t={}){let r=typeof t.root=="string"?document.querySelector(t.root):t.root??document.querySelector("#app");if(!r)throw new Error(`[Fluixi] Mount container not found: ${t.root??"#app"}`);let n=!!document.getElementById("__FLUIXI_HYDRATION__")||!!t.routes&&r.firstElementChild!=null,o=t.hydrate??n,i=Tr();if(Cr(i),_r(r),o){if(t.routes&&t.routes.length){let{preloadRoutes:a}=await Promise.resolve().then(()=>(Ur(),Si));await a(t.routes,window.location.pathname)}ii(),Sr(!0),yt(()=>e(),r),ul(),setTimeout(()=>{Sr(!1),kr()},100)}else ge(()=>e(),r);Pr(i)}function ul(){if(typeof window>"u")return;let e=window;typeof e.__FX_REPLAY_STOP__=="function"&&e.__FX_REPLAY_STOP__();let t=e.__FX_REPLAY__;if(e.__FX_REPLAY__=void 0,e.__FX_REPLAY_STOP__=void 0,!(!Array.isArray(t)||t.length===0))for(let r of t){let n=r&&r.target;if(!n||n.isConnected===!1||typeof n.dispatchEvent!="function")continue;let o=r.type,i=o==="click"?new MouseEvent(o,{bubbles:!0,cancelable:!0}):new Event(o,{bubbles:!0,cancelable:!0});n.dispatchEvent(i)}}Ur();return $i(cl);})();
|
|
1
|
+
"use strict";var Fluixi=(()=>{var jt=Object.defineProperty;var Ci=Object.getOwnPropertyDescriptor;var _i=Object.getOwnPropertyNames;var Pi=Object.prototype.hasOwnProperty;var N=(e,t)=>()=>(e&&(t=e(e=0)),t);var Jr=(e,t)=>{for(var r in t)jt(e,r,{get:t[r],enumerable:!0})},Ei=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of _i(t))!Pi.call(e,o)&&o!==r&&jt(e,o,{get:()=>t[o],enumerable:!(n=Ci(t,o))||n.enumerable});return e};var $i=e=>Ei(jt({},"__esModule",{value:!0}),e);function Nt(e){if(e.watchers)for(let t of[...e.watchers])t._notify(e)}function Li(e){if(m.untracked)return e();m.untracked=!0;try{return e()}finally{m.untracked=!1}}function ae(e){let t=Oe(e);return e&&(e.owned??=[]).push(t),t}function le(e,t=!0){ke(e,t)}function tn(e){return!!e&&e.disposed===!0}function Oe(e){return{cleanups:null,owned:null,parent:e,contexts:null}}function W(e){let t=Symbol("context");return{id:t,defaultValue:e,Provider:r=>{let n=m.owner,o=Oe(n);(o.contexts=new Map).set(t,r.value),n&&(n.owned??=[]).push(o),m.owner=o;try{return r.children}finally{m.owner=n}}}}function H(e){let t=m.owner;for(;t;){if(t.contexts&&t.contexts.has(e.id))return t.contexts.get(e.id);t=t.parent}return e.defaultValue}function rn(e,t){let r=e;for(;r;){if(r.contexts&&r.contexts.has(t.id))return r.contexts.get(t.id);r=r.parent}return t.defaultValue}function Di(e,t,r){let n=Oe(m.owner);(n.contexts=new Map).set(e.id,t),m.owner&&(m.owner.owned??=[]).push(n);let o=m.owner;m.owner=n;try{return r()}finally{m.owner=o}}function Ii(e){m.onSuspend=e}function qi(e){return m.onSuspend?(m.onSuspend(e,m.owner),!0):!1}function Fi(e){m.onError=e}function $(){return m.owner}function nn(e){let t=m.owner;return m.owner=e,t}function j(e,t){let r=m.owner;m.owner=e;try{return t()}finally{m.owner=r}}function x(e){if(m.owner){if(m.owner.disposed){e();return}(m.owner.cleanups??=[]).push(e)}}function ke(e,t=!0){if(!e.disposed){if(e.owned){for(let r=e.owned.length-1;r>=0;r--)ke(e.owned[r]);e.owned=null}if(e.cleanups){for(let r=e.cleanups.length-1;r>=0;r--)e.cleanups[r]();e.cleanups=null}t&&(e.disposed=!0)}}function D(e){let t=Oe(m.owner);m.owner&&(m.owner.owned??=[]).push(t);let r=m.owner;m.owner=t;try{return e(()=>ke(t))}finally{m.owner=r}}function Hi(e){m.hostSchedule=e??(t=>{Promise.resolve().then(t)})}function Vi(e){e.queued||(e.queued=!0,m.queue.push(e),!m.scheduled&&m.batchDepth===0&&(m.scheduled=!0,m.hostSchedule(It)))}function It(){if(m.scheduled=!1,m.flushing)return;m.flushing=!0;let e=0;try{for(;m.queue.length;){if(++e>1e5)throw new Error("[fluixi] effect flush did not settle (cycle?)");let t=m.queue;m.queue=[];for(let r of t)r.queued=!1,r.disposed||r.run()}}finally{m.flushing=!1}}function Wi(){m.batchDepth===0&&It()}function zi(e){m.batchDepth++;try{return e()}finally{--m.batchDepth===0&&It()}}function qt(e){let t=new Ui(e);return()=>t.dispose()}function Bi(e){return!!e&&typeof e.then=="function"}function v(e,t){let r=new Ni(e,{equals:t?.equals}),n=(()=>r.get()),o=(i=>{let a=typeof i=="function"?i(r.peek()):i;return r.set(a),Wi(),a});return Object.defineProperty(n,on,{value:!0,enumerable:!0}),Object.defineProperty(n,Ji,{value:{get value(){return r.peek()},get version(){return r.version}},enumerable:!1}),[n,o]}function g(e,t,r){let n=t,o=$(),i=new en(()=>j(o,()=>{try{return n=e(n)}catch(s){if(Bi(s))return qi(s),n;throw s}}),{equals:r?.equals}),a=(()=>i.get());return Object.defineProperty(a,on,{value:!0,enumerable:!0}),Object.defineProperty(a,Ki,{value:!0,enumerable:!0}),a}function S(e,t){let r=t;return qt(()=>{r=e(r)})}function sn(e,t){let r=t;qt(()=>{r=e(r)})}function C(e,t){let r=t;return qt(()=>{r=e(r)})}function _(e){return zi(e)}function O(e){return Li(e)}function an(e,t,r){let n=[];return x(()=>{for(let o of n)o.dispose();n=[]}),g(()=>{let o=e()||[];return O(()=>{if(o.length===0){for(let l of n)l.dispose();return n=[],r?.fallback?r.fallback():[]}let i=new Map;for(let l of n)i.has(l.item)||i.set(l.item,l);let a=[],s=new Set;for(let l=0;l<o.length;l++){let u=o[l],f=i.get(u);if(f&&!s.has(f))f.setIndex(l),a.push(f),s.add(f);else{let c,p,h;D(y=>{h=y;let[w,k]=v(l);p=k,c=t(u,w)});let d={item:u,rendered:c,dispose:h,setIndex:p};a.push(d),s.add(d)}}for(let l of n)s.has(l)||l.dispose();return n=a,a.map(l=>l.rendered)})})}function ln(e,t,r,n){let o=[],i=[];return x(()=>{for(let a of i)a.dispose();o=[],i=[]}),g(()=>{let a=e()||[];return O(()=>{if(a.length===0){for(let c of i)c.dispose();return o=[],i=[],n?.fallback?n.fallback():[]}let s=new Map;for(let c=0;c<o.length;c++)s.set(o[c],i[c]);let l=[],u=[],f=new Set;for(let c=0;c<a.length;c++){let p=t(a[c]),h=s.get(p);if(h&&!f.has(p))h.setIndex(c),l.push(h);else{let d,y,w;D(k=>{w=k;let[R,xe]=v(c);y=xe;let He=g(se=>(e()||[])[R()]??se,a[c]);d=r(He,R)}),l.push({rendered:d,dispose:w,setIndex:y})}u.push(p),f.add(p)}for(let[c,p]of s)f.has(c)||p.dispose();return o=u,i=l,l.map(c=>c.rendered)})})}function un(e,t,r){let n=[];return x(()=>{for(let o of n)o.dispose();n=[]}),g(()=>{let o=e()||[];return O(()=>{if(o.length===0){for(let l of n)l.dispose();return n=[],r?.fallback?r.fallback():[]}let i=n.length,a=o.length;for(let l=i;l<a;l++){let u,f,c,p=o[l];D(h=>{c=h;let[d,y]=v(p);f=y,u=t(d,l)}),n.push({rendered:u,setItem:f,dispose:c})}for(let l=a;l<i;l++)n[l].dispose();a<i&&(n=n.slice(0,a));let s=Math.min(i,a);for(let l=0;l<s;l++)n[l].setItem(o[l]);return n.map(l=>l.rendered)})})}function P(e){return typeof e=="function"&&e[Xi]===!0}function Gi(e){Yr&&Yr(e)}function cn(e){Mt=e}function Yi(e){return Mt?Mt(e):void 0}function fn(e){Lt=e}function Zi(){return Lt?Lt():void 0}function Qi(e,t){Zr&&Zr(e,t)}function pn(e,t=(r,n)=>r===n){let r=new Map;return S(()=>{let n=e();for(let[o,i]of r){let[a,s]=i,l=t(o,n);a()!==l&&s(l)}}),n=>{let o=r.get(n);if(!o){let[i,a]=v(!1);o=[i,a],r.set(n,o);let s=e();a(t(n,s))}return o[0]()}}function dn(e,t){let[r,n]=v(e(),t);return S(()=>{let o=e();t?.timeoutMs?setTimeout(()=>n(()=>o),t.timeoutMs):typeof requestIdleCallback=="function"?requestIdleCallback(()=>n(()=>o)):Promise.resolve().then(()=>n(()=>o))}),r}function hn(e,t){let r,n=(...o)=>{r!==void 0&&clearTimeout(r),r=setTimeout(()=>{r=void 0,e(...o)},t)};return x(()=>{r!==void 0&&clearTimeout(r)}),n}function es(e){return!!e&&typeof e.then=="function"}function J(e,t,r={}){let n,o;typeof t=="function"?(n=typeof e=="function"?e:()=>e,o=t):(n=()=>!0,o=e,t&&typeof t=="object"&&(r=t));let i=r.transport===!1?void 0:Zi(),a=i!==void 0?Yi(i):void 0,s=a!==void 0,[l,u]=v(a!==void 0?a.value:r.initialValue,{equals:!1}),[f,c]=v(void 0,{equals:!1}),[p,h]=v(a!==void 0||r.initialValue!==void 0?"ready":"unresolved",{equals:!1}),[d,y]=v(void 0,{equals:!1}),[w,k]=v(void 0,{equals:!1}),R=Rt,xe=!1;S(()=>{let L=n();if(w(),L===!1||L===null||L===void 0){R=Rt,_(()=>{h("unresolved"),y(void 0),c(void 0)});return}let Ve=xe;if(xe=!1,R!==Rt&&L===R&&!Ve)return;if(R=L,s){s=!1;return}let We=!1;x(()=>We=!0);let Br=O(p),Ti=O(l),Kr=Br==="ready"||Br==="refreshing";_(()=>{h(Kr?"refreshing":"pending"),c(void 0)});try{let Z=o(L,{value:Ti,refetching:Kr});es(Z)?(y(Z),Gi(Z),Z.then(ze=>{We||(i!==void 0&&Qi(i,ze),_(()=>{u(()=>ze),h("ready"),y(void 0)}))},ze=>{We||_(()=>{c(ze),h("errored"),y(void 0)})})):_(()=>{u(()=>Z),h("ready"),y(void 0)})}catch(Z){if(We)return;_(()=>{c(Z),h("errored"),y(void 0)})}});let He=()=>{let L=p();return L==="pending"||L==="refreshing"},se=(()=>{let L=f();if(L)throw L;if(He()){let Ve=d();if(Ve)throw Ve}return l()});return Object.defineProperties(se,{state:{get:p},loading:{get:He},error:{get:f},latest:{get:l}}),Object.defineProperty(se,Symbol.for("resource"),{value:!0,enumerable:!0}),Object.defineProperty(se,Symbol.for("signal"),{value:!0,enumerable:!0}),[se,{mutate:u,refetch:()=>{xe=!0,k(void 0)}}]}function Dt(e){if(typeof e=="function"&&!e.length){let t=e();return P(t)?t:Dt(t)}if(Array.isArray(e)){let t=[];for(let r=0;r<e.length;r++){let n=Dt(e[r]);Array.isArray(n)?t.push.apply(t,n):t.push(n)}return t}return e}function Q(e){let t=g(e);return g(()=>Dt(t()))}function mn(){let[e,t]=v(0),r=0;return{increment:()=>t(r+=1),decrement:()=>t(r-=1),inFallback:()=>e()>0}}function Ft(e,t){return Di(yn,e,t)}var ji,Ri,m,Xr,Gr,Se,Qr,Ni,en,Mi,Ui,on,Ki,Ji,Xi,Yr,Mt,Lt,Zr,Rt,yn,ts,ue,A=N(()=>{"use strict";ji="__fluixi_signal_next_state__",Ri=e=>{typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e)},m=globalThis[ji]??={consumer:null,untracked:!1,owner:null,queue:[],scheduled:!1,flushing:!1,batchDepth:0,hostSchedule:Ri,onSuspend:null,onError:null},Xr=0,Gr=1,Se=2,Qr=class{constructor(){this.observers=null,this.watchers=null,this.version=0}updateIfNecessary(){}track(){if(m.untracked)return;let e=m.consumer;e&&((this.observers??=new Set).add(e),(e.sources??=new Set).add(this))}},Ni=class extends Qr{constructor(e,t){super(),this._value=e,this._equals=t?.equals===!1?()=>!1:t?.equals??Object.is}get(){return this.track(),this._value}set(e){if(!this._equals(this._value,e)){if(this._value=e,this.version++,this.observers)for(let t of[...this.observers])t.markDirty(Se);Nt(this)}}peek(){return this._value}},en=class extends Qr{constructor(e,t){super(),this._threw=!1,this._initialized=!1,this.state=Se,this.sources=null,this._fn=e,this._equals=t?.equals===!1?()=>!1:t?.equals??Object.is}get(){if(m.consumer===this)throw new Error("Signal.Computed cannot read itself");if(this.track(),this.updateIfNecessary(),this._threw)throw this._error;return this._value}updateIfNecessary(){if(this.state===Gr&&this.sources){for(let e of this.sources)if(e.updateIfNecessary(),this.state===Se)break}(this.state===Se||!this._initialized)&&this.recompute(),this.state=Xr}recompute(){if(this.sources){for(let a of this.sources)a.observers?.delete(this);this.sources.clear()}let e=m.consumer,t=m.untracked;m.consumer=this,m.untracked=!1;let r,n=!1,o;try{r=this._fn()}catch(a){n=!0,o=a,r=this._value}finally{m.consumer=e,m.untracked=t}let i=!this._initialized||this._threw!==n||(n?o!==this._error:!this._equals(this._value,r));if(this._initialized=!0,this._threw=n,this._error=o,this._value=r,i){if(this.version++,this.observers)for(let a of[...this.observers])a.markDirty(Se);Nt(this)}}markDirty(e){if(this.state>=e)return;let t=this.state===Xr;if(this.state=e,t){if(this.observers)for(let r of[...this.observers])r.markDirty(Gr);Nt(this)}}peek(){if(this.updateIfNecessary(),this._threw)throw this._error;return this._value}};Mi=class{constructor(e){this._watched=new Set,this._pending=new Set,this._notifyFn=e}watch(...e){for(let t of e)this._watched.add(t),(t.watchers??=new Set).add(this)}unwatch(...e){for(let t of e)this._watched.delete(t),t.watchers?.delete(this),this._pending.delete(t)}getPending(){let e=[...this._pending];return this._pending.clear(),e}_notify(e){if(!this._watched.has(e)||this._pending.has(e))return;let t=this._pending.size===0;this._pending.add(e),t&&this._notifyFn()}};Ui=class{constructor(e){this.queued=!1,this.disposed=!1,this.owner=Oe(m.owner),m.owner&&(m.owner.cleanups??=[]).push(()=>this.dispose()),this.computed=new en(()=>{ke(this.owner,!1),j(this.owner,()=>{let t=e();typeof t=="function"&&(this.owner.cleanups??=[]).push(t)})}),this.watcher=new Mi(()=>Vi(this)),this.run(),this.watcher.watch(this.computed)}run(){if(!this.disposed){this.watcher.getPending();try{this.computed.get()}catch(e){if(e&&typeof e.then=="function"&&m.onSuspend){m.onSuspend(e,this.owner);return}if(m.onError&&m.onError(e,this.owner))return;throw e}}}dispose(){this.disposed||(this.disposed=!0,this.watcher.unwatch(this.computed),ke(this.owner))}};Hi(()=>{});on=Symbol.for("signal"),Ki=Symbol.for("memo"),Ji=Symbol.for("signal-node");Xi=Symbol.for("signal");Yr=null;Mt=null;Lt=null;Zr=null;Rt=Symbol();yn=W();Ii((e,t)=>{let r=rn(t,yn);r&&(r.increment(),e.finally(()=>r.decrement()))});ts=W();Fi((e,t)=>{let r=rn(t,ts);return r?(r.setError(e),!0):!1});ue=Symbol.for("fluixi-proxy")});function Ue(e,t,r={}){let{preserveStructure:n,multiple:o,throwOnError:i=!1,defaultValue:a,maxDepth:s=20}=r;if(!e||typeof e!="object")return a;if(!t)return e;if(Array.isArray(t))if(n){let f={};for(let c of t){let p=Ue(e,c,{...r,preserveStructure:!1});p!==void 0&&ns(f,c,p)}return f}else return t.map(f=>Ue(e,f,{...r,preserveStructure:!1}));let l=Ht(t,{...r,throwOnError:i});if(l.length===0)return e;if(typeof n>"u"||n===!1){let f=os(e,t);return o===!1&&Array.isArray(f)?f[0]:f===void 0&&a!==void 0?a:f}let u=V(e,l,0,s);return u===void 0&&a!==void 0?a:u}function os(e,t,r={}){let{createMissing:n=!1,add:o=!1,debug:i=!1}=r,a=Ht(t),s=e,l=!1,u="",f=t;if(typeof s=="object"&&!Array.isArray(s)&&f.length>0&&s[f])return s=s[f],s;for(let c=0;c<a.length;c++){let p=a[c],h=a.length>1?c===a.length-1:!1;if(s===null&&!n)return;let d=a[c+1];switch(p.type){case"property":if(s&&typeof s=="object")if(Array.isArray(s)){if(typeof p.value=="number"){let y=p.value;if(n&&y>=s.length)for(let w=s.length;w<=y;w++)s.push(void 0);if(n&&(s[y]===null||s[y]===void 0)&&(!h||l)&&(d?s[y]=d.type==="index"||d.type==="slice"||d.type==="union"||d.type==="wildcard"?[]:{}:s[y]=null,l=!1),s=s[y],d){l=!0;continue}}else o?s.push({[String(p.value)]:null}):s=s.map(y=>y[String(p.value)]);if(d)continue;return gn(s)}else{if(s[u]&&u.split(".").length>=2){s=s[u];continue}if(n&&(s[String(p.value)]===null||s[String(p.value)]===void 0)&&(!h||l)&&(d?s[String(p.value)]=d.type==="index"||d.type==="slice"||d.type==="union"||d.type==="wildcard"?[]:{}:s[String(p.value)]=null,l=!1,s=s[String(p.value)],d)){l=!0;continue}if(s?(!s[String(p.value)]&&n&&(s[String(p.value)]=null),s=s[String(p.value)]):s={[String(p.value)]:null},d)continue}else if(n)s={},s[String(p.value)]=d.type==="index"||d.type==="slice"||d.type==="union"||d.type==="wildcard"||r.type==="array"?[]:{},s=s[String(p.value)];else return;break;case"index":case"wildcard":if(Array.isArray(s)){if(p.type==="index"){let y=p.value;if(y<0){s=s[s.length-Math.abs(y)];continue}if(n&&(y>=s.length||s[y]==null||s[y]==null)&&!h){for(let w=s.length;w<=y;w++)s.push(void 0);d&&(s[y]=d.type==="index"||d.type==="slice"||d.type==="union"||d.type==="wildcard"?[]:{})}s=s[y]}else if(!h)continue}else if(n){let y=a[c+1];s=[];let w=p.value;for(let k=0;k<=w;k++)s.push(void 0);s[w]=y.type==="index"||y.type==="slice"||y.type==="union"||y.type==="wildcard"||r.type==="array"?[]:{},s=s[w]}else{if(p.type==="index"&&typeof s=="object"&&s&&s[String(p.value)]!==void 0){s=s[String(p.value)];continue}if(typeof s=="object"){s=Object.values(s);continue}return}break;default:return}}return gn(s)}function gn(e){return Array.isArray(e)?e.filter(t=>typeof t<"u"):e}var Be,V,Ht,rs,ns,Vt=N(()=>{"use strict";Be=e=>e==null||Array.isArray(e)||typeof e=="function"||e instanceof Date||e instanceof RegExp||e instanceof Map||e instanceof Set||e instanceof Error?!1:typeof e=="object",V=(e,t,r,n)=>{if(r>n)return;if(t.length===0)return e;let o=t[0],i=t.slice(1);if(o.type==="descendant"){let a=V(e,i,r+1,n);if(a!==void 0)return a;if(e&&typeof e=="object")if(Array.isArray(e)){let s=[];for(let l=0;l<e.length;l++){let u=V(e[l],t,r+1,n);u!==void 0&&(s[l]=u)}return s.length>0?s:void 0}else{let s={};for(let l in e)if(e.hasOwnProperty(l)){let u=V(e[l],t,r+1,n);u!==void 0&&(s[l]=u)}return Object.keys(s).length>0?s:void 0}return}switch(o.type){case"property":if(Be(e)&&o.value&&String(o.value)in e){let a=e[String(o.value)],s=V(a,i,r+1,n);if(s!==void 0)return{[String(o.value)]:s}}break;case"index":if(Array.isArray(e)){let a=o.value;if(a>=0&&a<e.length){let s=V(e[a],i,r+1,n);if(s!==void 0){let l=new Array(e.length).filter(u=>u!==void 0);return l[a]=s,l}}}else if(e&&typeof e=="object"){let a=String(o.value);if(a in e){let s=V(e[a],i,r+1,n);if(s!==void 0)return{[a]:s}}}break;case"wildcard":if(e&&typeof e=="object")if(Array.isArray(e)){let a=[],s=!1;for(let l=0;l<e.length;l++){let u=V(e[l],i,r+1,n);u!==void 0&&(a[l]=u,s=!0)}return s?a:void 0}else{let a={},s=!1;for(let l in e)if(e.hasOwnProperty(l)){let u=V(e[l],i,r+1,n);u!==void 0&&(a[l]=u,s=!0)}return s?a:void 0}break;case"slice":if(Array.isArray(e)){let[a,s]=o.value,l=Math.max(0,a),u=Math.min(e.length,s===1/0?e.length:s),f=[],c=!1;for(let p=l;p<u;p++){let h=V(e[p],i,r+1,n);h!==void 0&&(f[p]=h,c=!0)}return c?f:void 0}break;case"union":if(Array.isArray(e)){let a=o.value,s=[],l=!1;for(let u of a)if(u>=0&&u<e.length){let f=V(e[u],i,r+1,n);f!==void 0&&(s[u]=f,l=!0)}return l?s:void 0}break;case"filter":if(Array.isArray(e)){let a=o.value,s=[],l=!1;for(let u=0;u<e.length;u++)if(a(e[u])){let f=V(e[u],i,r+1,n);f!==void 0&&(s[u]=f,l=!0)}return l?s:void 0}break}},Ht=(e,t={})=>{let{type:r="auto",throwOnError:n=!1}=t;if(!e||typeof e!="string")return[];let o=[],i="",a=!1,s=!1,l="",u="",f=0,c=r==="auto"?(h=>h.includes("..")?"descendant":h.includes("[?(")?"filter":h.includes("[:")||h.includes("[0:")?"slice":h.includes("[,")||h.includes("[0,1]")?"union":h.includes("[*]")||h.includes(".*.")?"wildcard":h.includes("[]")?"array-wildcard":h.includes("[")&&h.includes("]")?"bracket":"dot")(e):r,p=h=>{let d=h.trim();if(d==="*"||d==="")return{type:"wildcard",value:d===""?"[]":"*",raw:d===""?"[]":h};if(d==="[]")return{type:"wildcard",value:"[]",raw:h};if(/^-?\d+$/.test(d))return{type:"index",value:parseInt(d,10),raw:h};if(d.includes(":")){let y=d.split(":").map(R=>R.trim()),w=y[0]===""?0:parseInt(y[0],10),k=y[1]===""?1/0:parseInt(y[1],10);if(isNaN(w)||isNaN(k)){if(n)throw new Error(`Invalid slice notation: ${h}`);return{type:"wildcard",value:"*",raw:h}}return{type:"slice",value:[w,k],raw:h}}if(d.includes(",")){let y=d.split(",").map(w=>{let k=parseInt(w.trim(),10);return isNaN(k)?-1:k}).filter(w=>w>=0);if(y.length===0){if(n)throw new Error(`Invalid union notation: ${h}`);return{type:"wildcard",value:"*",raw:h}}return{type:"union",value:y,raw:h}}if(d.startsWith("?(")&&d.endsWith(")")){let y=d.slice(2,-1);try{return{type:"filter",value:rs(y),raw:h}}catch(w){if(n)throw w;return{type:"wildcard",value:"*",raw:h}}}return d.startsWith('"')&&d.endsWith('"')||d.startsWith("'")&&d.endsWith("'")?{type:"property",value:d.slice(1,-1),raw:h}:{type:"property",value:d,raw:h}};for(let h=0;h<e.length;h++){let d=e[h],y=e[h+1];if((d==='"'||d==="'")&&!s){s=!0,l=d;continue}else if(d===l&&s){s=!1,l="",d==='"'||d==="'"||(a?u+=d:i+=d);continue}if(s){a?u+=d:i+=d;continue}if(d==="["&&!a){i&&(o.push({type:"property",value:i,raw:i}),i=""),a=!0,u="";continue}if(d==="]"&&a&&!s){a=!1;let k=p(u);o.push(k);continue}let w=o.length>0?o[o.length-1]:null;if(d==="."&&!a&&!s){if(y==="."){let k=e.split("..")[0];o.push({type:"property",value:k,raw:k}),o.push({type:"descendant",value:"..",raw:".."}),h++}else i&&(i==="*"?o.push({type:"wildcard",value:i,raw:i}):o.push({type:"property",value:i,raw:i}),i="");continue}if(a)u+=d;else if(w&&w.type!=="descendant")i+=d;else{let k=e.split(w?.raw)[1];k!==void 0?i=k:i+=d}}return i&&o.push({type:"property",value:i,raw:i}),o.map(h=>{if(h.type==="property"&&typeof h.value=="string"&&/^-?\d+$/.test(h.value)){let d=parseInt(h.value,10);if(!isNaN(d))return{...h,type:"index",value:d}}return h})},rs=e=>{let t=e.replace(/@\.([a-zA-Z_$][\w$]*)/g,(r,n)=>`item.${n}`).replace(/@/g,"item");try{return new Function("item",`return ${t}`)}catch{throw new Error(`Invalid filter expression: ${e}`)}},ns=(e,t,r)=>{let n=Ht(t),o=e;for(let i=0;i<n.length;i++){let a=n[i],s=i===n.length-1;switch(a.type){case"property":if(s)o[String(a.value)]=r;else{if(!o[String(a.value)]){let u=n[i+1];o[String(a.value)]=u.type==="index"||u.type==="slice"||u.type==="union"||u.type==="wildcard"?[]:{}}o=o[String(a.value)]}break;case"index":Array.isArray(o)||(o=[]);let l=a.value;if(s){if(l>=o.length)for(let u=o.length;u<=l;u++)o.push(void 0);o[l]=r}else{if(!o[l]){let u=n[i+1];o[l]=u.type==="index"||u.type==="slice"||u.type==="union"||u.type==="wildcard"?[]:{}}o=o[l]}break;case"wildcard":if(Array.isArray(o))if(s)for(let u=0;u<o.length;u++)o[u]=r;else{let u=n[i+1];for(let f=0;f<o.length;f++)o[f]||(o[f]=u.type==="index"||u.type==="slice"||u.type==="union"||u.type==="wildcard"?[]:{});o.length>0&&(o=o[0])}break}}}});function ks(e){return{cleanups:null,owned:null,parent:e,contexts:null}}function Kn(e){let t=Symbol("context");return{id:t,defaultValue:e,Provider:r=>{let n=pe.owner,o=ks(n);(o.contexts=new Map).set(t,r.value),n&&(n.owned??=[]).push(o),pe.owner=o;try{return r.children}finally{pe.owner=n}}}}function Jn(e,t){let r=e;for(;r;){if(r.contexts&&r.contexts.has(t.id))return r.contexts.get(t.id);r=r.parent}return t.defaultValue}function Os(e){pe.onSuspend=e}function Ts(e){pe.onError=e}function Cs(e){pe.hostSchedule=e??(t=>{Promise.resolve().then(t)})}function Xn(e){let[t,r]=v(e),n=t;return n.$=r,n}function Qe(e){let t=Fn.get(e);return t||Fn.set(e,t={keys:new Map}),t}function Vn(e,t,r){let n=e.keys.get(t);return n||e.keys.set(t,n=Xn(r)),n}function Wn(e){let t=Qe(e);(t.all||(t.all=Xn()))()}function zn(e,t){e.$(typeof t=="function"?()=>t:t)}function Gn(e){if(e==null||typeof e!="object")return!1;if(Array.isArray(e))return!0;let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}function Ze(e){if(!Gn(e))return e;let t=Hn.get(e);if(t)return t;let r=new Proxy(e,Es);return Hn.set(e,r),r}function Ce(e,t,r){if(e[t]===r&&(r!==void 0||t in e))return;let n=Array.isArray(e),o=n?e.length:0;r===void 0?delete e[t]:e[t]=r;let i=Qe(e),a=i.keys.get(t);if(a&&zn(a,r),n&&e.length!==o){let s=i.keys.get("length");s&&zn(s,e.length)}i.all&&i.all.$(void 0)}function Un(e,t){return typeof e=="function"?e(t):e}function Zt(e,t){for(let r of Object.keys(t)){let n=t[r],o=e[r];n&&typeof n=="object"&&!Array.isArray(n)&&o&&typeof o=="object"&&!Array.isArray(o)?Zt(o,n):Ce(e,r,n)}}function er(e){let t=[],r=e.replace(/\[([^\]]*)\]/g,".$1");for(let n of r.split("."))n.length&&t.push(n);return t}function Yn(e,t,r){let n=t.length-1;for(let i=0;i<n;i++){let a=t[i];if(a==="*"){let l=t.slice(i+1);if(Array.isArray(e))for(let u=0;u<e.length;u++)Yn(e[u],l,r);return}let s=e[a];(s==null||typeof s!="object")&&(s=/^\d+$/.test(t[i+1])?[]:{},Ce(e,a,s)),e=s}let o=t[n];if(o==="*"){if(Array.isArray(e))for(let i=0;i<e.length;i++)Ce(e,i,Un(r,e[i]));return}Ce(e,o,Un(r,e[o]))}function Gt(e,t,r){Yn(e,er(t),r)}function $s(e,t){let r=t[0];if(typeof r=="function"&&t.length===1){let n=r(e);n&&n!==e&&Zt(e,n);return}if(Array.isArray(r)&&t.length===1){for(let n of r)Array.isArray(n)&&Gt(e,n[0],n[1]);return}if(r&&typeof r=="object"&&!Array.isArray(r)&&t.length===1){Zt(e,r);return}if(Array.isArray(t[1])&&t.length>=3){Gt(e,`${r}.${t[1].join(".")}`,t[2]);return}Gt(e,String(r),t[1])}function Qt(e){if(e==null||typeof e!="object")return e;if(Array.isArray(e))return e.map(Qt);let t={};for(let r of Object.keys(e))t[r]=Qt(e[r]);return t}function fe(e,t){let r=e;for(let n of er(t)){if(r==null)return;r=r[n]}return r}function Rs(e,t){for(let r of js)e[r]=t[r].bind(t);e.$=t.reactive.bind(t)}function Ns(e,t={immutable:!0}){let r=new Zn(e,t);return Rs(r.set,r),[r.proxy,r.set]}function Ms(e,t={}){return new Zn(e,{...t,immutable:!1})}function et(e){if(e==null||typeof e!="object")return e;let t=e[Yt];return t!==void 0?t:e}function Ls(e){return O(()=>et(e))}var Bn,xs,Ss,pe,_s,Ps,Yt,Ln,Dn,In,qn,Fn,Hn,Es,Zn,js,Cl,Qn=N(()=>{"use strict";A();Bn="1.0.0-alpha.77",xs="__fluixi_signal_next_state__",Ss=e=>{typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e)},pe=globalThis[xs]??={consumer:null,untracked:!1,owner:null,queue:[],scheduled:!1,flushing:!1,batchDepth:0,hostSchedule:Ss,onSuspend:null,onError:null};Cs(()=>{});_s=Kn();Os((e,t)=>{let r=Jn(t,_s);r&&(r.increment(),e.finally(()=>r.decrement()))});Ps=Kn();Ts((e,t)=>{let r=Jn(t,Ps);return r?(r.setError(e),!0):!1});Yt=Symbol("store-raw"),Ln=Symbol("store-node"),Dn=Symbol("store-has"),In=Symbol("store-self"),qn=Symbol("store-track"),Fn=new WeakMap,Hn=new WeakMap;Es={get(e,t,r){if(t===Yt||t===Ln)return e;if(t===ue)return r;if(t===Dn)return a=>a in e;if(t==="__proxy")return!0;if(t===qn||t===In)return Wn(e),r;let n=e[t];if(typeof n=="function"&&!Object.prototype.hasOwnProperty.call(e,t))return n;let o=Object.getOwnPropertyDescriptor(e,t);if(o&&o.get)return o.get.call(r);let i=Vn(Qe(e),t,n)();return Gn(i)?Ze(i):i},set(){return!0},deleteProperty(e,t){return t in e&&Ce(e,t,void 0),!0},has(e,t){return t===Yt||t===ue||t===Ln||t===Dn||t===In||t===qn?!0:(Vn(Qe(e),t,e[t])(),t in e)},ownKeys(e){return Wn(e),Reflect.ownKeys(e)},getOwnPropertyDescriptor(e,t){return Reflect.getOwnPropertyDescriptor(e,t)}};Zn=class{constructor(e,t={immutable:!0}){this.options=t,this.root=e,this.set=((...r)=>_(()=>$s(this.root,r)))}get state(){return Ze(this.root)}get proxy(){return Ze(this.root)}get accessor(){return(()=>Ze(this.root))}unwrap(){return this.root}getNode(e){return this.root&&this.root[e]}get(e){if(e==null||e==="")return et(this.state);let t=this.state;for(let r of er(e)){if(t==null)return;t=t[r]}return et(t)}select(e){return g(()=>e(this.state))}subscribe(e){return S(()=>e(this.state))}watch(e,t){let r;return S(()=>{let n=e(this.state);Object.is(n,r)||(t(n,r),r=n)})}reactive(e){return g(()=>this.state[e])}produce(e){this.set((t=>{let r=Qt(t);return e(r),r}))}reconcile(e,t={}){this.set(e)}push(e,...t){let r=fe(this.root,e);this.set(e,r.concat(t))}pop(e){let t=fe(this.root,e).slice(),r=t.pop();return this.set(e,t),r}shift(e){let t=fe(this.root,e).slice(),r=t.shift();return this.set(e,t),r}splice(e,t,r,...n){let o=fe(this.root,e).slice(),i=o.splice(t,r,...n);return this.set(e,o),i}insert(e,t,r){let n=fe(this.root,e).slice();n.splice(t,0,r),this.set(e,n)}removeAt(e,t){let r=fe(this.root,e).slice(),n=r.splice(t,1);return this.set(e,r),n}toObservable(){let[e]=v(this.state);return e.toObservable()}dispose(){}},js=["get","select","watch","subscribe","produce","reconcile","push","pop","shift","splice","insert","removeAt","unwrap","toObservable"];Cl=Object.freeze({createStore:Ns,createMutableStore:Ms,batch:_,unwrap:et,untrackStore:Ls})});function Ds(e){return e.localName.includes("-")}function eo(e,t,r,n=!1){if(r==null){e.removeAttribute(t);return}if(Ds(e)){e[t]=r;return}T(e,t,r,n)}function so(e,...t){e.classList.add(...t)}function ao(e,...t){e.classList.remove(...t)}function lo(e,...t){t.forEach(r=>e.classList.toggle(r))}function T(e,t,r,n=!1){if(r==null||r===!1){e.removeAttribute(t);return}if(r===!0){e.setAttribute(t,"");return}if(typeof r=="object"){e.setAttribute(t,JSON.stringify(r));return}e.setAttribute(t,String(r))}function uo(e){return e&&typeof e=="object"&&e.strings&&Array.isArray(e.strings)&&e.values&&Array.isArray(e.values)}function at(e){return e instanceof Node}function co(e){q.core=e}function lt(e){q.core&&e.setAttribute("fluixi",q.core),e.setAttribute("fx-dom",q.dom),e.setAttribute("fx-reactive",q.reactive),typeof globalThis<"u"&&(globalThis.Fluixi=q)}function ut(){let e=[q.core,q.dom,q.reactive].filter(t=>t!==void 0);new Set(e).size<=1||console.warn(`[fluixi] package versions disagree — core ${q.core??"(absent)"}, dom ${q.dom}, reactive ${q.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-provider"),{value:!0,enumerable:!0}),e}function ct(e){return typeof e!="function"||Object.defineProperty(e,Symbol.for("fluixi-component"),{value:!0,enumerable:!0}),e}function po(e){return Object.defineProperty(e,Symbol.for("fluixi-suspense"),{value:!0,enumerable:!0}),e}function qs(e){return typeof e=="function"&&e[Symbol.for("fluixi-router")]===!0}function Fs(e){return typeof e=="function"&&e[Symbol.for("fluixi-routes")]===!0}function Hs(e){return typeof e=="function"&&e[Symbol.for("fluixi-route")]===!0}function Vs(e){return typeof e=="function"&&e[Symbol.for("fluixi-outlet")]===!0}function Ws(e){return typeof e=="function"&&e[Symbol.for("fluixi-provider")]===!0}function zs(e){return typeof e=="function"&&e[Symbol.for("fluixi-context")]===!0}function B(e){return typeof e=="function"&&e[Symbol.for("fluixi-component")]===!0}function Us(e){return typeof e=="function"&&e[Symbol.for("fluixi-suspense")]===!0}function ho(e){return qs(e)?{type:"router",value:e}:Hs(e)?{type:"route",value:e}:Fs(e)?{type:"routes",value:e}:Vs(e)?{type:"outlet",value:e}:B(e)?{type:"component",value:e}:Us(e)?{type:"suspense",value:e}:Ws(e)?{type:"provider",value:e}:zs(e)?{type:"context",value:e}:{type:"none",value:e}}function ar(){if(!ro)throw new Error("[fluixi] server render ran before @fluixi/dom/server loaded");return ro}function lr(e){return e!=null&&e[ft]===!0?!0:typeof Node<"u"&&e instanceof Node}function Bs(e){return e!=null&&e[ft]===!0?e.nodeType===1:typeof Element<"u"&&e instanceof Element}function Ks(e){return e!=null&&e[ft]===!0?e.nodeType===3:typeof Text<"u"&&e instanceof Text}function Js(e){yo=e}function mo(){return yo}function no(e,t){return b.active&&t.parentNode===e}function go(e){let t=b.parents.lastIndexOf(e);t!==-1&&(b.parents.length=t),b.cursor=e.nextSibling}function bo(e){if(!b.active)return e();let t=b.cursor,r=b.parents;b.active=!1,b.parents=[];try{return e()}finally{b.active=!0,b.cursor=t,b.parents=r}}function vo(e){if(!b.active||e==null)return;let t=Array.isArray(e)?e[e.length-1]:e;t&&typeof t.nodeType=="number"&&go(t)}function te(e){if(!_e)for(let t of e)rt.has(t)||ur.has(t)||(rt.add(t),document.addEventListener(t,Gs))}function Gs(e){let t=`$$${e.type}`,r=e.composedPath&&e.composedPath()[0]||e.target;for(;r;){let n=r[t];if(n&&!r.disabled&&(n(e),e.cancelBubble))return;r=r.host&&r.host!==r&&r.host instanceof Element?r.host:r.parentNode}}function Ys(e,t,r){if(e[`$$${t}`]=r,ur.has(t)){let n=`__fx_${t}`;if(!e[n]){let o=i=>{e[`$$${t}`]?.(i)};e.addEventListener(t,o),e[n]=o}return}rt.has(t)||te([t])}function oo(e,t){delete e[`$$${t}`];let r=`__fx_${t}`,n=e[r];n&&(e.removeEventListener(t,n),delete e[r])}function X(e,t=!1){if(_e)return ar().createText(e);if(b.active&&!t){let r=mo()?.hydrateText(e);if(r)return r}return document.createTextNode(e)}function he(e,t=!1){if(_e)return ar().createElement(e,t);if(b.active){let r=mo()?.hydrateElement(e);if(r)return r}return t?document.createElementNS(sr,e):document.createElement(e)}function Qs(e,t,r,n,o){let i=n,a=new Map;return C(()=>{let s;if(B(e)&&!P(e)){if(!a.has(e)){U++;try{let l=e();a.set(e,l)}finally{U--}}for(s=a.get(e);typeof s=="function"&&P(s);)s=s()}else for(s=e();typeof s=="function"&&P(s);)s=s();{let l=0;for(;typeof s=="function"&&l++<50;)if(B(s)){if(!a.has(s)){let u=s;U++;try{let f=u();a.set(u,f)}finally{U--}}s=a.get(s)}else if(P(s))s=s();else if(s=s(),typeof s!="function"||!P(s)&&!B(s))break}U++;try{i=nt(t,s,r,i,a),o(i)}finally{U--}})}function F(e,t,r,n){if(U>Zs)return console.error("[insert] Exceeded max call depth — possible infinite loop."),()=>null;r!==void 0&&!r&&(r=X("",!0),e.appendChild(r));let o=n??null,i=l=>Array.isArray(l)&&l.some(u=>typeof u=="function"),a=l=>typeof l=="function"?l:()=>l;if(typeof t!="function"&&!i(t)){U++;try{o=nt(e,t,r,o)}finally{U--}return()=>o}let s=Qs(a(t),e,r,o,l=>{o=l});return()=>(s?.(),o)}function nt(e,t,r,n,o){if(t==null||typeof t=="boolean")return ee(e,n,r);if(typeof t=="function")for(;typeof t=="function";)t=t();if(t==null||typeof t=="boolean")return ee(e,n,r);if(tt(t)){let a=X("",!0);return Array.isArray(n)?n.length>0?(e.replaceChild(a,n[0]),ee(e,n.slice(1),r)):I(e,a,r):n?e.replaceChild(a,n):I(e,a,r),t.then(s=>{a.parentNode===e&&nt(e,s,a.nextSibling,a)}).catch(s=>{console.error("Error resolving promise in insertExpression:",s)}),a}let i=typeof t;if(i==="string"||i==="number"){if(i==="number"&&(t=String(t)),Array.isArray(n)){if(n.length===0){let s=X(t);return I(e,s,r),s}if(n.length===1&&n[0].nodeType===3)return n[0].data=t,n;n=ee(e,n,r)}if(n&&Ks(n))return n.data=t,n;let a=X(t);return n&&n.parentNode===e?e.replaceChild(a,n):no(e,a)||I(e,a,r),a}if(lr(t))return no(e,t)?(go(t),t):Array.isArray(n)?(n.length===0?I(e,t,r):n[0].parentNode===e?(e.replaceChild(t,n[0]),ee(e,n.slice(1),r)):I(e,t,r),t):(n?n!==t&&(n.parentNode===e?e.replaceChild(t,n):I(e,t,r)):I(e,t,r),t);if(Array.isArray(t)){let a=[],s=Array.isArray(n)?n:n?[n]:[],l=[];z(t,a,e,r,!0,o,l);let u=ea(e,s,a,r);for(let f of l){let c=F(e,f.sig,f.marker);x(()=>{ee(e,c()),f.marker.parentNode===e&&e.removeChild(f.marker)})}return u}if(i==="object"&&t!==null&&typeof t=="object"){let a=t;if("type"in a&&"props"in a){let s=a;if(typeof s.type=="function"){let l=s.type(s.props||{});return nt(e,l,r,n)}}}return ee(e,n,r)}function z(e,t,r,n,o=!0,i,a){for(let s=0;s<e.length;s++){let l=e[s];if(!(l==null||typeof l=="boolean")){for(;typeof l=="function"&&!tt(l)&&!P(l)&&!B(l)&&(l=l(),!(l==null||typeof l=="boolean")););if(!(l==null||typeof l=="boolean")){if(typeof l=="function"){let u;for(B(l)&&!P(l)?(i||(i=new Map),i.has(l)||i.set(l,l()),u=i.get(l)):u=l();typeof u=="function"&&!tt(u)&&!P(u)&&!B(u);)i||(i=new Map),i.has(u)||i.set(u,u()),u=i.get(u);if(u==null||typeof u=="boolean")continue;if(typeof u=="function"){if(P(u)){if(a){let c=X("",!0);t.push(c),a.push({marker:c,sig:u});continue}let f=u();for(;typeof f=="function"&&P(f);)f=f();if(f==null||typeof f=="boolean")continue;Array.isArray(f)?z(f,t,r,n,o,i):z([f],t,r,n,o,i);continue}continue}Array.isArray(u)?z(u,t,r,n,o,i,a):z([u],t,r,n,o,i,a);continue}if(tt(l)){let u=X("",!0);t.push(u),l.then(f=>{if(u.parentNode){let c=[];if(z([f],c,u.parentNode,void 0,!1,i),c.length>0){u.parentNode.replaceChild(c[0],u);for(let p=1;p<c.length;p++)u.parentNode?.insertBefore(c[p],c[p-1].nextSibling)}}}).catch(f=>console.error("Error resolving promise in array:",f));continue}if(Array.isArray(l)){z(l,t,r,n,o,i,a);continue}if(lr(l)){t.push(l);continue}if(typeof l=="object"&&l!==null&&"type"in l&&"props"in l){let u=l;if(typeof u.type=="function"){let f=u.type(u.props||{});Array.isArray(f)?z(f,t,r,n,!1,i):z([f],t,r,n,!1,i);continue}}if(typeof l=="string"||typeof l=="number"){let u=String(l);if(u.trim()===""&&u!==" ")continue;t.push(X(u));continue}t.push(X(String(l)))}}}}function ea(e,t,r,n){for(let c=0;c<r.length;c++){let p=r[c].parentNode;p!==null&&p!==e&&p.nodeType!==11&&(r=r.slice(),r[c]=r[c].cloneNode(!0))}let o=r.length,i=t.length,a=o,s=0,l=0,u=i>0?t[i-1].nextSibling??void 0:n,f=null;for(;s<i||l<a;){if(t[s]===r[l]){s++,l++;continue}for(;i>s&&a>l&&t[i-1]===r[a-1];)i--,a--;if(i===s){let c=a<o?l?r[l-1].nextSibling??void 0:r[a-l]:u;for(;l<a;)I(e,r[l++],c)}else if(a===l)for(;s<i;)(!f||!f.has(t[s]))&&t[s].parentNode===e&&e.removeChild(t[s]),s++;else if(t[s]===r[a-1]&&r[l]===t[i-1]){let c=t[--i].nextSibling;I(e,r[l++],t[s++].nextSibling),I(e,r[--a],c),t[i]=t[s-1]}else{if(!f){f=new Map;let p=l;for(;p<a;)f.set(r[p],p++)}let c=f.get(t[s]);if(c!=null)if(l<c&&c<a){let p=s,h=1;for(;++p<i&&p<a&&!(!f.has(t[p])||f.get(t[p])!==c+h);)h++;if(h>c-l){let d=t[s];for(;l<c;)I(e,r[l++],d)}else t[s].parentNode===e?e.replaceChild(r[l++],t[s++]):(I(e,r[l++],u),s++)}else s++;else t[s].parentNode===e&&e.removeChild(t[s]),s++}}return r}function ee(e,t,r){if(t)if(Array.isArray(t))for(let n=0;n<t.length;n++)t[n].parentNode===e&&e.removeChild(t[n]);else t.parentNode===e&&e.removeChild(t);return null}function I(e,t,r){b.active&&t.parentNode===e||(r&&r.parentNode===e?e.insertBefore(t,r):e.appendChild(t))}function de(e,t,r){r==null?delete e[t]:e[t]=r}function wo(e,t,r){let n=r,o;return Array.isArray(r)&&(n=r[0],o=r[1]),typeof n!="function"?()=>{}:(e.addEventListener(t,n,o),()=>e.removeEventListener(t,n,o))}function Ao(e,t){let r=(n,o)=>{typeof n=="function"&&n(e,o??(()=>{}))};if(typeof t=="function"){r(t);return}if(Array.isArray(t)){if(typeof t[0]=="function"){r(t[0],t[1]);return}for(let n of t)Array.isArray(n)?r(n[0],n[1]):r(n)}}function rr(e,t,r,n=!1){return typeof r!="function"?(T(e,t,r,n),()=>{}):C(()=>{let o=typeof r=="function"?r():r;T(e,t,o,n)})}function nr(e,t,r){return typeof r!="function"?(de(e,t,r),()=>{}):C(()=>{let n=typeof r=="function"?r():r;de(e,t,n)})}function xo(e,t,r){return typeof r!="function"?(T(e,t,!!r),()=>{}):C(()=>{let n=r();T(e,t,!!n)})}function ot(e,t){if(t==null){e.removeAttribute("class");return}if(typeof t=="function"){C(()=>ot(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 r=Object.keys(t).filter(n=>{let o=t[n];return typeof o=="function"?o():!!o}).join(" ");e.setAttribute("class",r);return}e.setAttribute("class",String(t))}function it(e,t,r){if(!(!t||typeof t!="object"))for(let n in t){let o=t[n],i=n.split(/\s+/).filter(Boolean);if(typeof o=="function"&&r)r.push(C(()=>{let a=!!o();for(let s of i)e.classList.toggle(s,a)}));else{let a=!!(typeof o=="function"?o():o);for(let s of i)e.classList.toggle(s,a)}}}function st(e,t){let r=t;for(;typeof r=="function";)r=r();if(r==null){e.removeAttribute("style");return}if(typeof r=="string"){e.style.cssText=r;return}if(typeof r=="object")for(let n in r){let o=r[n];o==null?e.style[n]="":e.style[n]=o}}function So(e){let{element:t,props:r,prevProps:n=Xs,isSVG:o=!1,skipChildren:i=!1}=e;if(!t||!Bs(t))return console.error("[spread] Error: element is not a DOM Element!"),()=>{};if(!r)return console.warn("[spread] Warning: props is undefined!"),()=>{};let a=o||t.namespaceURI===sr,s=[];for(let l in r){if(i&&l==="children")continue;let u=r[l],f=n[l];if(u===f)continue;if(l==="ref"){cr(u,t);continue}if(l==="use"){Ao(t,u);continue}if(l.startsWith("on:")){s.push(wo(t,l.slice(3),u));continue}if(l.startsWith("prop:")){s.push(nr(t,l.slice(5),u));continue}if(l.startsWith("attr:")){s.push(rr(t,l.slice(5),u,a));continue}if(l.startsWith("bool:")){s.push(xo(t,l.slice(5),u));continue}if(l==="class"||l==="className"){typeof u=="function"?s.push(C(()=>ot(t,u()))):ot(t,u);continue}if(l==="classList"){typeof u=="function"?s.push(C(()=>it(t,u()))):it(t,u,s);continue}if(l==="style"){typeof u=="function"?s.push(C(()=>st(t,u()))):st(t,u);continue}if(l.startsWith("on")){let p=l.slice(2).toLowerCase();f&&oo(t,p),u&&Ys(t,p,u);continue}let c=to.has(l)||!a&&l in t;typeof u=="function"?s.push(c?nr(t,l,u):rr(t,l,u,a)):s.push(C(()=>c?de(t,l,r[l]):T(t,l,r[l],a)))}for(let l in n)if(!(l in r))if(l.startsWith("on")){let u=l.slice(2).toLowerCase();oo(t,u)}else to.has(l)?de(t,l,null):t.removeAttribute(l);return()=>{s.forEach(l=>l())}}function ta(e,t,r=!1){for(let n in t){let o=t[n];if(n==="ref"){cr(o,e);continue}if(n!=="children"){if(n==="use"){Ao(e,o);continue}if(n.startsWith("on:")){wo(e,n.slice(3),o);continue}if(n.startsWith("prop:")){nr(e,n.slice(5),o);continue}if(n.startsWith("attr:")){rr(e,n.slice(5),o,r);continue}if(n.startsWith("bool:")){xo(e,n.slice(5),o);continue}if(n.startsWith("on")&&n.length>2){let i=n.slice(2).toLowerCase();if(typeof o=="function")if(ur.has(i)){e[`$$${i}`]=o;let a=`__fx_${i}`;if(!e[a]){let s=l=>{e[`$$${i}`]?.(l)};e.addEventListener(i,s),e[a]=s}}else e[`$$${i}`]=o,rt.has(i)||te([i]);continue}if(n==="class"||n==="className"){ot(e,o);continue}if(n==="classList"){typeof o=="function"?C(()=>it(e,o())):it(e,o);continue}if(n==="style"){typeof o=="function"?C(()=>st(e,o())):st(e,o);continue}if(n==="innerHTML"){if(typeof o=="function"){let i=S(()=>{let a=o();for(;typeof a=="function";)a=a();e.innerHTML=a});x(()=>i())}else e.innerHTML=o;continue}if(n==="value"&&(e.tagName==="INPUT"||e.tagName==="TEXTAREA")){if(typeof o=="function"){let i=S(()=>{let a=o();for(;typeof a=="function"&&a.length===0;)a=a();document.activeElement!==e&&(e.value=a??"")});x(()=>{i()})}else C(()=>{document.activeElement!==e&&(e.value=t[n]??"")});continue}if(n==="checked"&&e.tagName==="INPUT"){if(typeof o=="function"){let i=S(()=>{let a=o();for(;typeof a=="function"&&a.length===0;)a=a();document.activeElement!==e&&(e.checked=a??"")});x(()=>{i()})}else C(()=>{document.activeElement!==e&&(e.checked=t[n]??"")});continue}if(n==="value"&&e.tagName==="SELECT"){if(typeof o=="function"){let i=!0,a=S(()=>{let s=o();for(;typeof s=="function"&&s.length===0;)s=s();i?(i=!1,queueMicrotask(()=>{e.value=s??""})):e.value=s??""});x(()=>{a()})}else{let i=!0;C(()=>{let a=t[n];i?(i=!1,queueMicrotask(()=>{e.value=a??""})):e.value=a??""})}continue}if(typeof o=="function"){let i=S(()=>{let a=o();for(;typeof a=="function"&&a.length===0;)a=a();eo(e,n,a,r)});x(()=>{i()})}else C(()=>eo(e,n,t[n],r))}}}function cr(e,t){if(e){if(lr(e)){let r=t,n=e;if(!r)return;typeof r=="function"?r(n):typeof r=="object"&&"current"in r&&(r.current=n);return}typeof e=="function"?e(t):typeof e=="object"&&"current"in e&&(e.current=t)}}function ra(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 tt(e){return e!=null&&(typeof e=="object"||typeof e=="function")&&typeof e.then=="function"||e instanceof Promise}function fr(e,t,r){if(!t)throw new Error("Container element is required");let n,o,i=[];return D(a=>{_(()=>{b.active||(t.textContent=""),lt(t),ut(),F(t,e)}),o=a}),()=>{o?.(),n?.(),i.forEach(a=>a()),t.textContent=""}}function ko(e){or.fn=e}function G(e,t){return or.fn?or.fn(e,t):(()=>e(t))}function pr(){let e=globalThis.__FX_DATA__;if(e)return e;if(tr!==void 0)return tr;let t=null;if(typeof document<"u"){let r=document.getElementById(oa)?.textContent;if(r)try{t=JSON.parse(r)}catch{t=null}}return tr=t}function pt(){for(;;){for(;b.cursor&&b.cursor.nodeType===3&&b.cursor.data==="";)b.cursor=b.cursor.nextSibling;if(b.cursor!=null||!b.parents.length)return;b.cursor=b.parents.pop().nextSibling}}function ht(e,t){let r=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 ${r}. 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 sa(e){pt();let t=b.cursor;return t&&t.nodeType===1&&t.tagName.toLowerCase()===e.toLowerCase()?(ia.has(e.toLowerCase())?b.cursor=t.nextSibling:(b.parents.push(t),b.cursor=t.firstChild),t):(dt&&t&&ht(`<${e}>`,t),null)}function aa(e){pt();let t=b.cursor;return t&&t.nodeType===1&&t.tagName.toLowerCase()===e.toLowerCase()?(b.cursor=t.nextSibling,t):(dt&&t&&ht(`<${e}> (static)`,t),null)}function la(e){if(e===""){let r=b.cursor;return r&&r.nodeType===3&&r.data!==""?(b.cursor=r.nextSibling,r.data="",r):null}pt();let t=b.cursor;return t&&t.nodeType===3?(b.cursor=t.nextSibling,t.nodeValue!==e&&(t.nodeValue=e),t):(dt&&t&&ht(`text ${JSON.stringify(e.slice(0,24))}`,t),null)}function ua(e){pt();let t=b.cursor;return t&&t.nodeType===8&&t.data===e?(b.cursor=t.nextSibling,t):(dt&&t&&ht(`marker <!--${e.slice(0,24)}-->`,t),null)}function ca(){io||(io=!0,Js({hydrateElement:sa,hydrateText:la,hydrateMarker:ua,hydrateStatic:aa}))}function yt(e,t,r){ca(),b.active=!0,b.cursor=t.firstChild,b.parents=[];let n=pr(),o=r?.resourceNamespace,i=0;fn(()=>o?`${o}:r${i++}`:`r${i++}`),cn(n?a=>a in n?{value:n[a]}:void 0:null);try{return fr(e,t)}finally{b.active=!1,b.cursor=null,b.parents=[]}}function Oo(e,t={}){if(typeof e=="function")return G(e,t);if(typeof e!="string"||e.length===0)return null;let r=ra(e);if(_e)return ar().createElement(e,r);let n=r?document.createElementNS(sr,e):document.createElement(e);return ta(n,t,r),fa(n,t),n}function fa(e,t){if(!t||t.children===void 0)return;let r=Q(()=>t.children),n=o=>{F(e,o,typeof o=="function"?null:void 0)};Array.isArray(r)?r.forEach(n):n(r)}function pa(e){return typeof e=="function"?e:(()=>e)}function mt(e){return()=>{let t=e();return typeof t=="function"?t():t}}function da(e){return e!=null&&e!==!1}function ha(e){return!e||typeof e!="object"?!1:!!(typeof e._$litType$<"u"||typeof e._$litDirective$<"u"||Array.isArray(e.strings)&&Array.isArray(e.values))}function To(e){let t=mt(()=>e.when),r=g(t,void 0),n=g(r,void 0),o=$(),i=null,a=null,s=l=>{l!==a&&(i&&le(i),i=ae(o),a=l)};return g(()=>{let l=n();return s(l?"when":"fallback"),j(i,()=>{if(l){let u=e.children;return typeof u=="function"&&!ha(u)?typeof r=="function"?O(()=>O(r)?u(r()):e.fallback):u(r):u}return e.fallback})},void 0,{name:"show"})}function Co(e){let t=mt(()=>e.each),r=()=>e.fallback??null,n=(o,i)=>{let a=e.children,s=Array.isArray(a)?a.map(l=>typeof l=="function"?l(o,i):l):typeof a=="function"?a(o,i):a;return vo(s),s};return e.by?ln(t,e.by,(o,i)=>n(o,i),{fallback:r}):an(t,(o,i)=>n(o,i),{fallback:r})}function _o(e){let t=mt(()=>e.each);return un(t,(r,n)=>{let o=e.children(r,n);return vo(o),o},{fallback:()=>e.fallback??null})}function Po(e){return{[ir]:!0,when:mt(()=>e.when),get children(){return e.children}}}function Eo(e){let t=Array.isArray(e.children)?e.children:[e.children],r=$(),n=null,o=-1,i=a=>{a!==o&&(n&&le(n),n=ae(r),o=a)};return g(()=>{for(let a=0;a<t.length;a+=1){let s=t[a],l=0;for(;typeof s=="function"&&!s[ir]&&l++<10;)s=s();if(!s||typeof s!="object"||s[ir]!==!0)continue;let u=s.when();if(da(u))return i(a),j(n,()=>typeof s.children=="function"?s.children(u):s.children)}return i(-2),j(n,()=>e.fallback??null)})}function $o(e){let t=pa(e.component),{component:r,...n}=e,o=$(),i=null,a;return g(()=>{let s=t();return s!==a&&(i&&le(i),i=ae(o),a=s),s==null?null:typeof s=="string"?{tag:s,props:n}:j(i,()=>s(n))})}function jo(e){let t=()=>e.mount?typeof e.mount=="function"?e.mount():e.mount:document.body,r,n;return D(o=>{r=o,n=document.createElement("div"),n.style.display="contents",t().appendChild(n),F(n,e.children)&&cr(e.ref,n)}),x(()=>{r(),n.remove()}),null}function dr(e){if(_e)return e.fallback??null;let t=b.active,[r,n]=v(!t);return t&&queueMicrotask(()=>n(!0)),g(()=>r()?e.children:e.fallback??null,void 0,{name:"client-only"})}function No(e){let[t,r]=v(null),n=()=>r(null);return g(()=>{let o=t();if(o!==null)return typeof e.fallback=="function"?e.fallback(o,n):e.fallback;try{return typeof e.children=="function"?e.children():e.children}catch(i){return r(i),typeof e.fallback=="function"?e.fallback(i,n):e.fallback}})}function Mo(e){return g(()=>{let t=typeof e=="function"?e():e,r=[];for(let[n,o]of Object.entries(t))n&&(typeof o=="function"?o():o)&&r.push(n);return r.join(" ")})}function ya(e){return e.startsWith("--")?e:e.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`)}function Lo(e){return g(()=>{let t=typeof e=="function"?e():e,r=[];for(let[n,o]of Object.entries(t)){if(!n)continue;let i=typeof o=="function"?o():o;i!=null&&r.push(`${ya(n)}: ${i}`)}return r.join("; ")})}var sr,to,El,Is,q,_e,ft,ro,b,yo,Xs,rt,ur,U,Zs,na,or,oa,tr,ia,dt,io,ir,Ro,ma,M=N(()=>{"use strict";A();Qn();A();A();A();A();A();A();A();A();A();A();A();A();A();sr="http://www.w3.org/2000/svg";to=new Set(["className","value","checked","selected","innerHTML","innerText","textContent","indeterminate","htmlFor"]);El=typeof Symbol=="function"&&Symbol.for?Symbol.for("react.element"):60103;Is="1.0.0-alpha.77",q={dom:Is,reactive:Bn};_e=typeof document>"u",ft=Symbol.for("fluixi.server-node"),ro=null;b={active:!1,cursor:null,parents:[]},yo=null;Xs={},rt=new Set,ur=new Set(["scroll","focus","blur","load","error","resize","mouseenter","mouseleave","pointerenter","pointerleave","gotpointercapture","lostpointercapture"]);U=0,Zs=200;na="__fx_dom_create_component__",or=globalThis[na]??={fn:null};oa="__FX_DATA__";ia=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),dt=typeof process<"u"&&process.env&&!1;io=!1;ir=Symbol("match");Ro=dr;ma=ft});function yr(){return ga}function Io(){let e=$();if(!e)return null;if(!e[hr]){let t={mounts:[],effects:[],scheduled:!1};e[hr]=t}return e[hr]}function qo(e){if(e.scheduled)return;e.scheduled=!0;let t=$();queueMicrotask(()=>{if(tn(t)){e.mounts=[],e.effects=[];return}j(t,()=>{for(let r of e.mounts)try{let n=r();typeof n=="function"&&x(n)}catch(n){console.error("Error in onMount callback:",n)}for(let r of e.effects){let n;S(()=>{n&&n(),n=r()}),x(()=>{n&&n()})}e.mounts=[],e.effects=[]})})}function Y(e){ko(Ee)}function Ee(e,t){return gt(e,t)}function gt(e,t){let r=typeof e=="function"?O(()=>e(t)):e;if(r!=null&&(typeof r=="function"||typeof r=="object")&&!P(r)){try{r.$name=e.name}catch{}return ct(r)}return r}function bt(e,t=!0){let r=Io();if(r){if(!t){r.scheduled||e();return}r.mounts.push(e),qo(r)}else{if(!t){e();return}S(()=>{let n=O(e);typeof n=="function"&&x(n)})}}function vt(e){x(e)}function $e(e){let t=Io();if(t)t.effects.push(e),qo(t);else{let r;S(()=>{r&&r(),r=e()}),x(()=>{r&&r()})}}function wt(e){return g(e)}function At(e){let t={current:e};return x(()=>{t.current=null}),t}function xt(e,t){let[r,n]=v(t);return[r,i=>{n(e(r(),i))}]}function St(e,t,r,n){$e(()=>{let o=e&&"current"in e?e.current:e;if(o)return o.addEventListener(t,r,n),()=>{o.removeEventListener(t,r,n)}})}function kt(e){return e}function mr(){return Pe}function gr(e){Pe&&e()}var ga,Pe,hr,ye=N(()=>{"use strict";M();A();ga={context:null,owner:null};Pe=typeof process<"u"&&!1,hr=Symbol.for("fluixi-lifecycle")});function me(e,t){let r,n,o;function i(){return n||(n=e().then(s=>r=s.default)),n}t?.preload&&i();let a=(s=>{if(r){let l=r;return O(()=>l(s))}if(!o){let[l]=J(()=>i(),{transport:!1});if(o=l,l.error)throw l.error}return g(()=>{let l=o();return l?O(()=>l(s)):void 0},void 0,{name:"lazy"})});return a.preload=()=>i().then(()=>{}),a.$lazy=!0,a.loader=e,a}var Ot=N(()=>{"use strict";A()});function Aa(){Uo||(Uo=!0,!(typeof process<"u")&&console.warn("[fluixi] createProvider({ context, value, children }) reads `children` eagerly: the object literal materialises `children` BEFORE the context is stamped, so a routed <Outlet/> that has siblings inside the provider renders detached and its descendants see no context under SSR. Use the lazy form instead:\n createProvider(Context, value, props) // children stays a getter\n // or JSX: <Context.Provider value={…}>{props.children}</Context.Provider>"))}function Tt(e,t,r){let n=!!e?.Provider,o=n?e:e.context,i=n?t:e.value,a=n?!1:e.debug??!1;n||Aa();let s=typeof i=="function"?i():i,l=n?r:e;return o.Provider({value:s,get children(){return l?.children},debug:a})}function Bo(e){let t=be(e);return[t,n=>Tt(t,n.value,n)]}function vr(e,t){if(e.length===0)return Q(()=>t);let[r,n]=e[0],o=e.slice(1);return Tt(r,n,{get children(){return vr(o,t)}})}function Ko(e){return t=>{let r=ve(e);return t.children(r)}}function Jo(e,t){let r=ve(e);return r===e.defaultValue?t():r}function be(e){let t=W(e),r=n=>(n.debug,t.Provider({value:n.value,get children(){return n.children},debug:n.debug}));return typeof Symbol<"u"&&Symbol.for&&(r.$$typeof=Symbol.for("react.provider")),r.$$typeof=Symbol.for("react.provider"),{id:t.id,Provider:fo(r),defaultValue:e}}function ve(e){let t=H(e);return t!==void 0?t:e.defaultValue}var Uo,wr=N(()=>{"use strict";M();A();A();ye();Y("index");Uo=!1});function ri(){return ti}function Sr(e){ti=e}function ni(e,t){Ct.set(e,t)}function oi(e){return Ct.get(e)}function _a(){Ct.clear()}function ii(){if(typeof window>"u")return!1;let e=document.getElementById("__FLUIXI_HYDRATION__");if(!e||e.getAttribute("type")!=="application/json")return!1;try{let t=e.textContent||"{}",r=JSON.parse(t);for(let[n,o]of Object.entries(r))Ct.set(n,o);return!0}catch(t){return console.error("Failed to deserialize hydration data:",t),!1}}function kr(){if(typeof window>"u")return;let e=document.getElementById("__FLUIXI_HYDRATION__");e&&e.remove();let t=document.createTreeWalker(document.body,NodeFilter.SHOW_COMMENT,null),r=[],n;for(;n=t.nextNode();){let o=n,i=o.nodeValue||"";(i.startsWith("#")||i.startsWith("/"))&&r.push(o)}r.forEach(o=>o.remove()),_a()}function si(){return typeof window>"u"}var ti,Ct,Or=N(()=>{"use strict";ti=!1,Ct=new Map;typeof window<"u"&&window.addEventListener("load",()=>{setTimeout(kr,100)})});function Va(e,t,r){let n=new Uint8Array(t.length);e:for(let o=0;o<e.length;o++){for(let i=0;i<t.length;i++)if(!n[i]&&ne(e[o],t[i],r)){n[i]=1;continue e}return!1}return!0}var ne,li=N(()=>{"use strict";Vt();ne=(e,t,r={})=>{if(e===t)return!0;if(e==null||t==null||typeof e!=typeof t)return!1;let n=Array.isArray(e),o=Array.isArray(t);if(n!==o)return!1;if(n&&o)return e.length!==t.length?!1:r.unordered?Va(e,t,r):e.every((y,w)=>ne(y,t[w],r));if(typeof e!="object")return e===t;let i=e instanceof Date,a=t instanceof Date;if(i!==a)return!1;if(i)return e.getTime()===t.getTime();let s=e instanceof RegExp,l=t instanceof RegExp;if(s!==l)return!1;if(s)return e.toString()===t.toString();let u=e instanceof Map,f=t instanceof Map;if(u!==f)return!1;if(u){if(e.size!==t.size)return!1;for(let[y,w]of e)if(!t.has(y)||!ne(w,t.get(y),r))return!1;return!0}let c=e instanceof Set,p=t instanceof Set;if(c!==p)return!1;if(c){if(e.size!==t.size)return!1;let y=[...t],w=new Uint8Array(y.length);e:for(let k of e){for(let R=0;R<y.length;R++)if(!w[R]&&ne(k,y[R],r)){w[R]=1;continue e}return!1}return!0}if(!Be(e)||!Be(t))return!1;let h=Object.keys(e),d=Object.keys(t);if(h.length!==d.length)return!1;for(let y of h)if(!Object.prototype.hasOwnProperty.call(t,y)||!ne(e[y],t[y],r))return!1;return!0}});function Wa(e){return e.startsWith("//")?e.replace(/^\/+/,"/"):e}function we(e,t,r=!1){let n=[];if(e===t)return{params:{},path:t};if(!r&&e==="/"&&t.startsWith("/"))return{params:{},path:"/"};let o=e.replace(/:([a-zA-Z0-9_]+)/g,(l,u)=>(n.push(u),"([^/]+)")).replace(/\*([a-zA-Z0-9_]*)/g,(l,u)=>(u&&n.push(u),"(.*)"));o.startsWith("/")||(o="/"+o),o===""&&(o="/");let i=new RegExp(`^${o}${r?"$":"(?=/|$)"}`),a=t.match(i);if(!a)return null;let s={};return n.forEach((l,u)=>{s[l]=a[u+1]}),{params:s,path:a[0]}}function Er(e){let t=e.path.split("/").filter(Boolean);if(t.length===0)return 5;let r=0;for(let n of t)n.startsWith("*")?r+=1:n.startsWith(":")?r+=10:r+=100;return r}function ui(e){return[...e].sort((t,r)=>Er(r)-Er(t))}function oe(e,t){let r=t.length>1?t.replace(/\/+$/,"")||"/":t,n=ci(e,r);if(!n)return null;let o=[],i="",a={};for(let s of n.layers){i=Wa(za(i,s.consumed));let l={};for(let[u,f]of Object.entries(s.params))u in a||(l[u]=f),a[u]=f;o.push({route:s.route,component:s.route.component,params:l,pathname:i||"/"})}return{matched:o,params:a,pathname:t}}function ci(e,t){if(!e||e.length===0)return null;let r=ui(e);for(let n of r){let o=!!n.children&&n.children.length>0,i=we(n.path,t,!o);if(i){if(o){let a=ci(n.children,t);if(a)return{layers:[{route:n,params:i.params,consumed:i.path},...a.layers]};continue}return{layers:[{route:n,params:i.params,consumed:i.path}]}}}return null}function za(e,t){if(!e)return t;if(t===e)return e;if(t.startsWith(e))return t;let r=e.replace(/\/$/,""),n=t.replace(/^\//,"");return`${r}/${n}`}var $r=N(()=>{"use strict"});function jr(e){let t=e,r="",n=t.indexOf("#");n!==-1&&(r=t.slice(n),t=t.slice(0,n));let o="",i=t.indexOf("?");return i!==-1&&(o=t.slice(i),t=t.slice(0,i)),{pathname:t||"/",search:o,hash:r}}function Me(e="/"){let t=[{path:e,state:null}],r=0,n=new Set,o=()=>n.forEach(i=>i());return{get(){let{path:i,state:a}=t[r];return{...jr(i),state:a}},push(i,a=null){t=t.slice(0,r+1),t.push({path:i,state:a}),r=t.length-1,o()},replace(i,a=null){t[r]={path:i,state:a},o()},subscribe(i){return n.add(i),()=>n.delete(i)}}}function ie(){let e=typeof window<"u"?window:void 0,t=new Set,r=()=>t.forEach(n=>n());return e&&e.addEventListener("popstate",r),{get(){if(!e)return{pathname:"/",search:"",hash:"",state:null};let{pathname:n,search:o,hash:i}=e.location;return{pathname:n,search:o,hash:i,state:e.history.state??null}},push(n,o=null){e?.history.pushState(o,"",n),r()},replace(n,o=null){e?.history.replaceState(o,"",n),r()},subscribe(n){return t.add(n),()=>t.delete(n)}}}var Rr=N(()=>{"use strict"});function Ua(e){let t={};return e&&new URLSearchParams(e.startsWith("?")?e.slice(1):e).forEach((n,o)=>t[o]=n),t}function Ba(e,t){if(!t)return e||"/";let r=t.replace(/\/$/,"");return e===r?"/":e.startsWith(r+"/")?e.slice(r.length)||"/":e||"/"}function Ka(e,t){return!t||/^https?:\/\//.test(e)?e:`${t.replace(/\/$/,"")}${e.startsWith("/")?e:"/"+e}`}function Nr(e){let{routes:t,history:r,base:n}=e,o=new Set,i=()=>{let f=r.get();return{pathname:f.pathname,search:f.search,hash:f.hash,state:f.state,query:Ua(f.search)}},a=f=>oe(t,Ba(f,n)),s=(()=>{let f=i();return{location:f,match:a(f.pathname)}})(),l=()=>{let f=i();s={location:f,match:a(f.pathname)},o.forEach(c=>c(s))},u=r.subscribe(l);return{state(){return s},subscribe(f){return o.add(f),()=>o.delete(f)},navigate(f,c={}){let p=Ka(f,n);c.replace?r.replace(p,c.state??null):r.push(p,c.state??null)},match(f){return a(f)},destroy(){u(),o.clear()}}}var fi=N(()=>{"use strict";$r();Rr()});var Mr=N(()=>{"use strict";$r();Rr();fi()});function pi(e,t){return async(...r)=>{let n=t+":"+JSON.stringify(r);if(ri()||typeof window<"u"){let i=oi(n);if(i!==void 0)return i}if(De.has(n))return De.get(n);if(Le.has(n))return Le.get(n);let o=Promise.resolve(e(...r)).then(i=>(De.set(n,i),Le.delete(n),si()&&ni(n,i),i),i=>{throw Le.delete(n),i});return Le.set(n,o),o}}function di(e){let t=typeof e=="string"?r=>r.startsWith(e):e;for(let r of De.keys())t(r)&&(De.delete(r),Xa.add(r));Ja(r=>r+1)}function hi(e,t){let[r]=J(t||(()=>!0),e);return r}function yi(e){return Lr.has(e)||Lr.set(e,v(void 0)),Lr.get(e)}function Dr(e,t){let r=t||e.name||"action",n=async o=>{let[,i]=yi(r),a=()=>i(void 0),s=()=>n(o);i({input:o,pending:!0,clear:a,retry:s});try{let l=await e(o);return i({input:o,result:l,pending:!1,clear:a,retry:s}),l}catch(l){throw i({input:o,error:l,pending:!1,clear:a,retry:s}),l}};return n.url=r,n.with=o=>Dr((...i)=>e(o,...i),t),n}function mi(e){let[t]=yi(e.url);return t}function gi(e){return e}var De,Le,gf,Ja,Xa,Lr,Ga,bf,bi=N(()=>{"use strict";A();Or();wr();De=new Map,Le=new Map;[gf,Ja]=v(0),Xa=new Set;Lr=new Map;Ga=be(),bf=Ga.Provider});var Si={};Jr(Si,{A:()=>zr,Form:()=>al,Link:()=>$t,Outlet:()=>qr,Redirect:()=>Fr,Router:()=>Ir,action:()=>Dr,cache:()=>pi,createAsync:()=>hi,createBrowserHistory:()=>ie,createMemoryHistory:()=>Me,lazy:()=>me,matchPath:()=>we,matchRoutes:()=>oe,preloadRoutes:()=>ll,revalidate:()=>di,runWithOwner:()=>j,select:()=>nl,useAction:()=>gi,useLevelParams:()=>tl,useLinkNavigation:()=>ol,useLocation:()=>Fe,useMatch:()=>Vr,useNavigate:()=>Et,useParam:()=>Hr,useParamSelector:()=>rl,useParams:()=>qe,useRouteData:()=>il,useRouter:()=>Ae,useSearchParams:()=>Wr,useSubmission:()=>mi});function Ya(e,t,r){let n,o=e.route.data;if(typeof o=="function"){let f=!1;x(()=>{f=!0});let c=$(),[p]=J(()=>o({params:r.params,location:r.location},c,()=>f));n=p}let i=()=>Ai.Provider({value:n,get children(){return wi.Provider({value:e.params,get children(){return vi.Provider({value:{depth:t,...r},get children(){return G(e.component,{})}})}})}});if(!n)return i();let a=n,s=()=>a.loading,[l,u]=v(O(()=>!s()));return S(()=>u(!s())),g(()=>l()?i():null)}function xi(e){let t=e.depth+1,[r,n]=v(O(()=>e.matched()[t]?.component));return S(()=>{let o=e.matched()[t]?.component;n(()=>o)}),g(()=>{if(!r())return e.notFound?e.notFound():null;let i=O(()=>e.matched())[t];return Ya(i,t,{matched:e.matched,params:e.params,location:e.location})})}function Za(e){return e==null?Qa():typeof e=="function"?G(e,{}):e}function Qa(){let e=he("div");T(e,"class","fx-not-found"),T(e,"role","main"),T(e,"style","min-height:60vh;display:grid;place-content:center;gap:.25rem;text-align:center;font-family:system-ui,-apple-system,sans-serif");let t=he("h1");T(t,"style","margin:0;font-size:2.5rem;font-weight:700"),F(t,"404");let r=he("p");return T(r,"style","margin:0;opacity:.7"),F(r,"This page could not be found."),e.appendChild(t),e.appendChild(r),e}function Ir(e){let t=e.history??ie(),r=Nr({routes:e.routes,base:e.base,history:t}),[n,o]=v(r.state()),i=r.subscribe(o);x(()=>{i(),r.destroy()});let a=g(()=>(n().match?.matched??[]).filter(f=>f.component)),s={router:r,location:g(()=>n().location),params:g(()=>n().match?.params??{})},l={depth:-1,matched:a,params:s.params,location:s.location,notFound:()=>Za(e.notFound)},u;return Ie.Provider({value:s,get children(){return u??=xi(l)}})}function qr(){let e=H(vi);return e?xi(e):null}function Fr(e){let t=H(Ie);if(!t||typeof window>"u")return null;let r=!1;return x(()=>r=!0),queueMicrotask(()=>{r||t.router.navigate(e.to,{replace:e.replace!==!1})}),null}function Ae(){let e=H(Ie);if(e)return e;if(typeof window>"u")return el;throw new Error("[router-next] useRouter must be used within <Router>")}function qe(){let e=Ae().params;return g(()=>e(),{},{equals:(t,r)=>JSON.stringify(t)===JSON.stringify(r)})}function tl(){return H(wi)??{}}function Hr(e){let t=qe();return g(()=>t()[e])}function rl(e,t){let r=qe();return g(()=>e(r()),void 0,t?{equals:t}:void 0)}function Vr(e){let t=Fe();return g(()=>we(typeof e=="function"?e():e,t.pathname))}function Wr(){let e=Fe(),t=Et();return[g(()=>e.query),(o,i)=>{let a=new URLSearchParams(e.search);for(let[l,u]of Object.entries(o))u===null?a.delete(l):a.set(l,u);let s=a.toString();t(e.pathname+(s?`?${s}`:""),i)}]}function nl(e,t){let r=(n,o)=>ne(n,o);return t!==void 0?g(()=>Ue(e(),t),void 0,{equals:r}):g(e,void 0,{equals:r})}function Fe(){let{location:e}=Ae();return new Proxy({},{get:(t,r)=>e()[r],has:(t,r)=>r in e(),ownKeys:()=>Reflect.ownKeys(e()),getOwnPropertyDescriptor:(t,r)=>Object.getOwnPropertyDescriptor(e(),r)})}function ol(e={}){let t=H(Ie);return r=>{if(!t||r.defaultPrevented||r.button!==0||r.metaKey||r.ctrlKey||r.shiftKey||r.altKey)return;let o=r.target?.closest?.("a");if(!o||!o.getAttribute("href")||o.target&&o.target!=="_self"||o.hasAttribute("download")||/(^|\s)external(\s|$)/.test(o.getAttribute("rel")??""))return;let i=new URL(o.href);i.protocol!=="http:"&&i.protocol!=="https:"||i.origin===window.location.origin&&(i.hash&&i.pathname===window.location.pathname&&i.search===window.location.search||e.shouldNavigate&&!e.shouldNavigate(i,o)||(r.preventDefault(),t.router.navigate(i.pathname+i.search+i.hash,{replace:e.replace})))}}function Et(){let{router:e}=Ae();return(t,r)=>e.navigate(t,r)}function il(){return H(Ai)??(()=>{})}function $t(e){let t=H(Ie),r=typeof document>"u",n=()=>t?.router.navigate(K(e.href)??"",{replace:K(e.replace)}),o=he("a");T(o,"href",K(e.href)??""),e.slot&&T(o,"slot",K(e.slot));for(let a of Object.keys(e)){if(sl.has(a))continue;let s=e[a];s!=null&&typeof s!="function"&&T(o,a,String(s))}if(typeof o.addEventListener=="function")o.addEventListener("click",a=>{a.metaKey||a.ctrlKey||a.shiftKey||a.altKey||(a.preventDefault(),n())});else{let a=K(e.className??e.class)??"";a&&T(o,"class",a)}typeof o.addEventListener=="function"&&S(()=>{let a=K(e.href)??"";o.setAttribute("href",a);let s=K(e.className??e.class)??"",l=K(e.activeClass)??"",u=K(e.active)??t?.location().pathname===a;o.className=[s,u?l:""].filter(Boolean).join(" ")});let i=e.children;return i!=null&&F(o,i),o}function al(e){let t=e.action,r=e.className??e.class,n=t.url??"",o=he("form");T(o,"method","post"),n&&T(o,"action",n),r&&T(o,"class",r);for(let a of Object.keys(e)){if(a==="action"||a==="children"||a==="class"||a==="className")continue;let s=e[a];s!=null&&typeof s!="function"&&T(o,a,String(s))}typeof o.addEventListener=="function"&&o.addEventListener("submit",a=>{a.preventDefault();let s={};new FormData(o).forEach((l,u)=>{s[u]=l}),Promise.resolve(t(s)).catch(()=>{})});let i=e.children;return i!=null&&F(o,i),o}async function ll(e,t){let r=oe(e,t);if(!r)return;let n=[];for(let o of r.matched){let i=o.component;i&&typeof i.preload=="function"&&n.push(i.preload())}await Promise.all(n)}var Ie,vi,wi,Ai,el,K,sl,zr,Ur=N(()=>{"use strict";A();M();A();Vt();li();Mr();Mr();bi();Ot();A();Ie=W(),vi=W(),wi=W(),Ai=W();el={router:{navigate:()=>{}},location:()=>({pathname:"",search:"",hash:"",query:{}}),params:()=>({})};K=e=>typeof e=="function"?e():e,sl=new Set(["href","slot","class","className","active","activeClass","replace","children"]);zr=$t});var cl={};Jr(cl,{$component:()=>gt,A:()=>zr,ClientOnly:()=>dr,DEV:()=>Pe,Dynamic:()=>$o,ErrorBoundary:()=>No,FRAMEWORK_NAME:()=>ei,For:()=>Co,Fragment:()=>Ar,Index:()=>_o,Link:()=>$t,Match:()=>Po,NoSsr:()=>Ro,Outlet:()=>qr,Portal:()=>jo,Redirect:()=>Fr,Router:()=>Ir,Show:()=>To,Store:()=>Ye,Suspense:()=>je,Switch:()=>Eo,VERSION:()=>Qo,addClass:()=>so,batch:()=>_,classMap:()=>Mo,cleanupDelegation:()=>zo,composeProviders:()=>vr,createBrowserHistory:()=>ie,createComponent:()=>Ee,createComputed:()=>sn,createConsumer:()=>Ko,createContext:()=>be,createContextWithProvider:()=>Bo,createDebounce:()=>hn,createDeferred:()=>dn,createEffect:()=>S,createIsomorphicState:()=>Xo,createMemo:()=>g,createMemoryHistory:()=>Me,createProvider:()=>Tt,createRenderEffect:()=>C,createResource:()=>J,createRoot:()=>D,createSelector:()=>pn,createSignal:()=>v,createStore:()=>Jt,delegateEvents:()=>te,devOnly:()=>gr,getFrameworkInfo:()=>Ca,getOwner:()=>$,getSharedConfig:()=>yr,hydrate:()=>yt,initDelegation:()=>Wo,insert:()=>F,isDOMNode:()=>at,isDev:()=>mr,isLitTemplateResult:()=>uo,isRenderable:()=>Vo,jsx:()=>xr,jsxs:()=>Zo,lazy:()=>me,mount:()=>ki,onCleanup:()=>x,onMount:()=>bt,onUnmount:()=>vt,portal:()=>Ho,read:()=>xn,reduce:()=>An,removeClass:()=>ao,render:()=>ge,runWithOwner:()=>j,setAttribute:()=>T,setOwner:()=>nn,setProperty:()=>de,spread:()=>So,startClient:()=>Oi,styleMap:()=>Lo,toggleClass:()=>lo,untrack:()=>O,untrackStore:()=>Xt,useCallback:()=>kt,useContext:()=>ve,useEffect:()=>$e,useEventListener:()=>St,useLocation:()=>Fe,useMatch:()=>Vr,useMemo:()=>wt,useNavigate:()=>Et,useParam:()=>Hr,useParams:()=>qe,useProvide:()=>Jo,useReducer:()=>xt,useRef:()=>At,useRouter:()=>Ae,useSearchParams:()=>Wr});A();A();var is="__fluixi_signal_next_state__",ss=e=>{typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e)},E=globalThis[is]??={consumer:null,untracked:!1,owner:null,queue:[],scheduled:!1,flushing:!1,batchDepth:0,hostSchedule:ss,onSuspend:null,onError:null},bn=0,vn=1,Ke=2,as=class{constructor(){this.observers=null,this.watchers=null,this.version=0}updateIfNecessary(){}track(){if(E.untracked)return;let e=E.consumer;e&&((this.observers??=new Set).add(e),(e.sources??=new Set).add(this))}};var ls=class extends as{constructor(e,t){super(),this._threw=!1,this._initialized=!1,this.state=Ke,this.sources=null,this._fn=e,this._equals=t?.equals===!1?()=>!1:t?.equals??Object.is}get(){if(E.consumer===this)throw new Error("Signal.Computed cannot read itself");if(this.track(),this.updateIfNecessary(),this._threw)throw this._error;return this._value}updateIfNecessary(){if(this.state===vn&&this.sources){for(let e of this.sources)if(e.updateIfNecessary(),this.state===Ke)break}(this.state===Ke||!this._initialized)&&this.recompute(),this.state=bn}recompute(){if(this.sources){for(let a of this.sources)a.observers?.delete(this);this.sources.clear()}let e=E.consumer,t=E.untracked;E.consumer=this,E.untracked=!1;let r,n=!1,o;try{r=this._fn()}catch(a){n=!0,o=a,r=this._value}finally{E.consumer=e,E.untracked=t}let i=!this._initialized||this._threw!==n||(n?o!==this._error:!this._equals(this._value,r));if(this._initialized=!0,this._threw=n,this._error=o,this._value=r,i){if(this.version++,this.observers)for(let a of[...this.observers])a.markDirty(Ke);wn(this)}}markDirty(e){if(this.state>=e)return;let t=this.state===bn;if(this.state=e,t){if(this.observers)for(let r of[...this.observers])r.markDirty(vn);wn(this)}}peek(){if(this.updateIfNecessary(),this._threw)throw this._error;return this._value}};function wn(e){if(e.watchers)for(let t of[...e.watchers])t._notify(e)}function us(e){return E.onSuspend?(E.onSuspend(e,E.owner),!0):!1}function cs(){return E.owner}function fs(e,t){let r=E.owner;E.owner=e;try{return t()}finally{E.owner=r}}function ps(e){E.hostSchedule=e??(t=>{Promise.resolve().then(t)})}function ds(e){return!!e&&typeof e.then=="function"}ps(()=>{});var hs=Symbol.for("signal"),ys=Symbol.for("memo");function ms(e,t,r){let n=t,o=cs(),i=new ls(()=>fs(o,()=>{try{return n=e(n)}catch(s){if(ds(s))return us(s),n;throw s}}),{equals:r?.equals}),a=(()=>i.get());return Object.defineProperty(a,hs,{value:!0,enumerable:!0}),Object.defineProperty(a,ys,{value:!0,enumerable:!0}),a}function An(e,t,r,n){return ms(()=>e().reduce(t,r),void 0,n)}function xn(e){let t=e;for(;typeof t=="function";)t=t();return t}A();var zt=Symbol("store-raw"),Sn=Symbol("store-node"),kn=Symbol("store-has"),On=Symbol("store-self"),Tn=Symbol("store-track");var Cn=new WeakMap,_n=new WeakMap;function Rn(e){let[t,r]=v(e),n=t;return n.$=r,n}function Xe(e){let t=Cn.get(e);return t||Cn.set(e,t={keys:new Map}),t}function Pn(e,t,r){let n=e.keys.get(t);return n||e.keys.set(t,n=Rn(r)),n}function En(e){let t=Xe(e);(t.all||(t.all=Rn()))()}function $n(e,t){e.$(typeof t=="function"?()=>t:t)}function Nn(e){if(e==null||typeof e!="object")return!1;if(Array.isArray(e))return!0;let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}function Je(e){if(!Nn(e))return e;let t=_n.get(e);if(t)return t;let r=new Proxy(e,gs);return _n.set(e,r),r}var gs={get(e,t,r){if(t===zt||t===Sn)return e;if(t===ue)return r;if(t===kn)return a=>a in e;if(t==="__proxy")return!0;if(t===Tn||t===On)return En(e),r;let n=e[t];if(typeof n=="function"&&!Object.prototype.hasOwnProperty.call(e,t))return n;let o=Object.getOwnPropertyDescriptor(e,t);if(o&&o.get)return o.get.call(r);let i=Pn(Xe(e),t,n)();return Nn(i)?Je(i):i},set(){return!0},deleteProperty(e,t){return t in e&&Te(e,t,void 0),!0},has(e,t){return t===zt||t===ue||t===Sn||t===kn||t===On||t===Tn?!0:(Pn(Xe(e),t,e[t])(),t in e)},ownKeys(e){return En(e),Reflect.ownKeys(e)},getOwnPropertyDescriptor(e,t){return Reflect.getOwnPropertyDescriptor(e,t)}};function Te(e,t,r){if(e[t]===r&&(r!==void 0||t in e))return;let n=Array.isArray(e),o=n?e.length:0;r===void 0?delete e[t]:e[t]=r;let i=Xe(e),a=i.keys.get(t);if(a&&$n(a,r),n&&e.length!==o){let s=i.keys.get("length");s&&$n(s,e.length)}i.all&&i.all.$(void 0)}function jn(e,t){return typeof e=="function"?e(t):e}function Ut(e,t){for(let r of Object.keys(t)){let n=t[r],o=e[r];n&&typeof n=="object"&&!Array.isArray(n)&&o&&typeof o=="object"&&!Array.isArray(o)?Ut(o,n):Te(e,r,n)}}function Kt(e){let t=[],r=e.replace(/\[([^\]]*)\]/g,".$1");for(let n of r.split("."))n.length&&t.push(n);return t}function Mn(e,t,r){let n=t.length-1;for(let i=0;i<n;i++){let a=t[i];if(a==="*"){let l=t.slice(i+1);if(Array.isArray(e))for(let u=0;u<e.length;u++)Mn(e[u],l,r);return}let s=e[a];(s==null||typeof s!="object")&&(s=/^\d+$/.test(t[i+1])?[]:{},Te(e,a,s)),e=s}let o=t[n];if(o==="*"){if(Array.isArray(e))for(let i=0;i<e.length;i++)Te(e,i,jn(r,e[i]));return}Te(e,o,jn(r,e[o]))}function Wt(e,t,r){Mn(e,Kt(t),r)}function bs(e,t){let r=t[0];if(typeof r=="function"&&t.length===1){let n=r(e);n&&n!==e&&Ut(e,n);return}if(Array.isArray(r)&&t.length===1){for(let n of r)Array.isArray(n)&&Wt(e,n[0],n[1]);return}if(r&&typeof r=="object"&&!Array.isArray(r)&&t.length===1){Ut(e,r);return}if(Array.isArray(t[1])&&t.length>=3){Wt(e,`${r}.${t[1].join(".")}`,t[2]);return}Wt(e,String(r),t[1])}function Bt(e){if(e==null||typeof e!="object")return e;if(Array.isArray(e))return e.map(Bt);let t={};for(let r of Object.keys(e))t[r]=Bt(e[r]);return t}function ce(e,t){let r=e;for(let n of Kt(t)){if(r==null)return;r=r[n]}return r}var Ye=class{constructor(e,t={immutable:!0}){this.options=t,this.root=e,this.set=((...r)=>_(()=>bs(this.root,r)))}get state(){return Je(this.root)}get proxy(){return Je(this.root)}get accessor(){return(()=>Je(this.root))}unwrap(){return this.root}getNode(e){return this.root&&this.root[e]}get(e){if(e==null||e==="")return Ge(this.state);let t=this.state;for(let r of Kt(e)){if(t==null)return;t=t[r]}return Ge(t)}select(e){return g(()=>e(this.state))}subscribe(e){return S(()=>e(this.state))}watch(e,t){let r;return S(()=>{let n=e(this.state);Object.is(n,r)||(t(n,r),r=n)})}reactive(e){return g(()=>this.state[e])}produce(e){this.set((t=>{let r=Bt(t);return e(r),r}))}reconcile(e,t={}){this.set(e)}push(e,...t){let r=ce(this.root,e);this.set(e,r.concat(t))}pop(e){let t=ce(this.root,e).slice(),r=t.pop();return this.set(e,t),r}shift(e){let t=ce(this.root,e).slice(),r=t.shift();return this.set(e,t),r}splice(e,t,r,...n){let o=ce(this.root,e).slice(),i=o.splice(t,r,...n);return this.set(e,o),i}insert(e,t,r){let n=ce(this.root,e).slice();n.splice(t,0,r),this.set(e,n)}removeAt(e,t){let r=ce(this.root,e).slice(),n=r.splice(t,1);return this.set(e,r),n}toObservable(){let[e]=v(this.state);return e.toObservable()}dispose(){}},vs=["get","select","watch","subscribe","produce","reconcile","push","pop","shift","splice","insert","removeAt","unwrap","toObservable"];function ws(e,t){for(let r of vs)e[r]=t[r].bind(t);e.$=t.reactive.bind(t)}function Jt(e,t={immutable:!0}){let r=new Ye(e,t);return ws(r.set,r),[r.proxy,r.set]}function As(e,t={}){return new Ye(e,{...t,immutable:!1})}function Ge(e){if(e==null||typeof e!="object")return e;let t=e[zt];return t!==void 0?t:e}function Xt(e){return O(()=>Ge(e))}var Sl=Object.freeze({createStore:Jt,createMutableStore:As,batch:_,unwrap:Ge,untrackStore:Xt});A();M();var Do="1.0.0-alpha.77";M();co(Do);M();ye();ye();A();M();function Fo(e){return!!(e&&typeof e=="object"&&typeof e.then=="function"||e instanceof Promise)}var ba=W();function je(e){return G(va,e)}function va(e){let t=mn(),r=H(ba),n=r?r.register(t.inFallback):void 0;function o(c){return c==null||typeof c=="boolean"?null:typeof c=="function"&&B(c)&&!P(c)?c():c}let i=bo(()=>o(e.fallback??null)),a=Ft(t,()=>Q(()=>e.children)),s=(c,p)=>{if(!(p>8))if(Array.isArray(c))for(let h of c)s(h,p+1);else typeof c=="function"&&P(c)&&s(c(),p+1)};Ft(t,()=>{C(()=>s(a,0))});let[l,u]=v(void 0),f=Fo(a);return f&&(t.increment(),a.then(c=>{u(()=>c),t.decrement()},()=>t.decrement())),g(()=>{let c=n?n.showFallback():t.inFallback();return process.env.FX_DEBUG&&console.log("[s] output; showFallback:",c),c?i:f?l():a})}po(je);Object.defineProperty(je,"__suspense",{value:!0,enumerable:!0});Ot();Ot();var br=typeof window>"u";function ge(e,t,r={}){if(Y("render"),te(["click","input","change","submit"]),br)throw new Error("render() is for client-side only. Use renderToString() on server.");if(!t)throw new Error("Container element is required");let n;return D(o=>{n=o;let i=typeof e=="function"?e():e;t.textContent="",lt(t),ut(),F(t,()=>i)}),()=>{n&&(n(),n=void 0)}}function wa(e){return e&&typeof e=="object"&&(e._$litType$!==void 0||e._$litDirective$!==void 0)}function Ho(e,t,r={}){let n=document.createElement("div");n.setAttribute("data-portal","true"),t.appendChild(n);let o=ge(e,n,r);return()=>{o(),t.contains(n)&&t.removeChild(n)}}function Vo(e){return!!(e==null||typeof e=="function"||at(e)||wa(e)||Array.isArray(e)||typeof e=="string"||typeof e=="number"||typeof e=="boolean")}function Wo(){br||te(["click","input","change","submit"])}function zo(){}wr();A();M();var xa="__fluixi_iso_states__",Sa="__iso:";function ka(){return globalThis[xa]??=new Map}function Oa(e){if(typeof window>"u")return;let t=pr();return t?t[Sa+e]:void 0}function Xo(e,t){let r=Oa(e),n=r!==void 0?r:typeof window<"u"&&t.client?t.client():t.fallback,[o,i]=v(n);return ka().set(e,{server:t.server,set:i}),{value:o,set:i,key:e}}M();M();M();M();M();A();var Ar=Symbol.for("fluixi.fragment"),Go=typeof window>"u";function Yo(e){return e==null||e===!1?null:Array.isArray(e)?e.map(Yo).flat():e}function xr(e,t,r){if(e==null)return null;let n=t||{};if(r!==void 0&&(n.key=r),e===Ar)return g(()=>ct(Yo(n.children)));if(typeof e=="function"){let{type:o}=ho(e);return e.$$typeof===Symbol.for("react.provider")||o==="provider"?e(n):Go?{type:e,props:n}:g(()=>G(e,n),void 0,{name:"jsx component"})}return typeof e=="string"&&e.trim().length>0?Ta(e,n):null}var Zo=xr;function Ta(e,t){return Go?{type:e,props:t||{}}:Oo(e,t)}ye();var Qo="0.0.1",ei="Fluixi";function Ca(){return{name:ei,version:Qo,features:{ssr:!0,hydration:!0,jsx:!0,litHtml:!0,signals:!0,fineGrained:!0,lazy:!0,hooks:!0,devMode:!0}}}Y("index");M();Or();ye();A();function re(e){return typeof e=="function"?e():e}function Pa(e){if(typeof e=="string")return e;let t=[];return t.push(e.index===!1?"noindex":"index"),t.push(e.follow===!1?"nofollow":"follow"),e.noarchive&&t.push("noarchive"),e.nosnippet&&t.push("nosnippet"),e.noimageindex&&t.push("noimageindex"),e.maxSnippet!=null&&t.push(`max-snippet:${e.maxSnippet}`),e.maxImagePreview&&t.push(`max-image-preview:${e.maxImagePreview}`),e.maxVideoPreview!=null&&t.push(`max-video-preview:${e.maxVideoPreview}`),t.join(", ")}function Tr(){let e=[],[t,r]=v(0);return{sources:e,version:t,push(n){return e.push(n),r(o=>o+1),()=>{let o=e.indexOf(n);o!==-1&&(e.splice(o,1),r(i=>i+1))}}}}var Ea=null;function Cr(e){Ea=e}function _t(e){let t=5381;for(let r=0;r<e.length;r++)t=t*33^e.charCodeAt(r);return(t>>>0).toString(36)}function $a(e){return e.charset!=null?"meta:charset":e.property?"meta:property:"+e.property:e.name?"meta:name:"+e.name:e["http-equiv"]?"meta:http-equiv:"+e["http-equiv"]:"meta:"+_t(JSON.stringify(e))}function ja(e,t){let r=typeof t=="string"?{url:t}:t;e.push({tag:"meta",key:"meta:property:og:image:"+r.url,attrs:{property:"og:image",content:r.url}}),r.secureUrl&&e.push({tag:"meta",key:"meta:property:og:image:secure:"+r.url,attrs:{property:"og:image:secure_url",content:r.secureUrl}}),r.type&&e.push({tag:"meta",key:"meta:property:og:image:type:"+r.url,attrs:{property:"og:image:type",content:r.type}}),r.width!=null&&e.push({tag:"meta",key:"meta:property:og:image:width:"+r.url,attrs:{property:"og:image:width",content:String(r.width)}}),r.height!=null&&e.push({tag:"meta",key:"meta:property:og:image:height:"+r.url,attrs:{property:"og:image:height",content:String(r.height)}}),r.alt&&e.push({tag:"meta",key:"meta:property:og:image:alt:"+r.url,attrs:{property:"og:image:alt",content:r.alt}})}function Ra(e,t){let r=(n,o)=>{o!=null&&t.push({tag:"meta",key:"meta:property:og:"+n,attrs:{property:"og:"+n,content:o}})};r("title",e.title),r("description",e.description),r("type",e.type),r("url",e.url),r("site_name",e.siteName),r("locale",e.locale);for(let n of e.localeAlternate??[])t.push({tag:"meta",key:"meta:property:og:locale:alt:"+n,attrs:{property:"og:locale:alternate",content:n}});if(e.image!=null){let n=Array.isArray(e.image)?e.image:[e.image];for(let o of n)ja(t,o)}if(e.video){let n=typeof e.video=="string"?{url:e.video}:e.video;r("video",n.url),"type"in n&&n.type&&r("video:type",n.type),"width"in n&&n.width!=null&&r("video:width",String(n.width)),"height"in n&&n.height!=null&&r("video:height",String(n.height))}if(e.audio){let n=typeof e.audio=="string"?{url:e.audio}:e.audio;r("audio",n.url),"type"in n&&n.type&&r("audio:type",n.type)}if(e.article){let n=e.article;r("article:published_time",n.publishedTime),r("article:modified_time",n.modifiedTime),r("article:expiration_time",n.expirationTime),r("article:section",n.section);for(let o of[].concat(n.author??[]))t.push({tag:"meta",key:"meta:property:og:article:author:"+o,attrs:{property:"article:author",content:o}});for(let o of[].concat(n.tag??[]))t.push({tag:"meta",key:"meta:property:og:article:tag:"+o,attrs:{property:"article:tag",content:o}})}if(e.book){let n=e.book;r("book:isbn",n.isbn),r("book:release_date",n.releaseDate);for(let o of[].concat(n.author??[]))t.push({tag:"meta",key:"meta:property:og:book:author:"+o,attrs:{property:"book:author",content:o}});for(let o of[].concat(n.tag??[]))t.push({tag:"meta",key:"meta:property:og:book:tag:"+o,attrs:{property:"book:tag",content:o}})}if(e.profile){let n=e.profile;r("profile:first_name",n.firstName),r("profile:last_name",n.lastName),r("profile:username",n.username),r("profile:gender",n.gender)}}function Na(e,t){let r=(n,o)=>{o!=null&&t.push({tag:"meta",key:"meta:name:twitter:"+n,attrs:{name:"twitter:"+n,content:o}})};r("card",e.card),r("site",e.site),r("creator",e.creator),r("title",e.title),r("description",e.description),r("image",e.image),r("image:alt",e.imageAlt),r("player",e.player),e.playerWidth!=null&&r("player:width",String(e.playerWidth)),e.playerHeight!=null&&r("player:height",String(e.playerHeight)),e.app&&(r("app:name:iphone",e.app.name),r("app:id:iphone",e.app.idIphone),r("app:id:ipad",e.app.idIpad),r("app:id:googleplay",e.app.idGooglePlay))}function Ma(e,t){let r=(n,o)=>t.push({tag:"link",key:n,attrs:o});if(e.icon!=null){let n=typeof e.icon=="string"?[{url:e.icon}]:e.icon;for(let o of n)r("link:icon:"+o.url,{rel:"icon",href:o.url,...o.type?{type:o.type}:{},...o.sizes?{sizes:o.sizes}:{}})}if(e.apple!=null){let n=typeof e.apple=="string"?[{url:e.apple}]:e.apple;for(let o of n)r("link:apple-touch-icon:"+o.url,{rel:"apple-touch-icon",href:o.url,...o.sizes?{sizes:o.sizes}:{}})}e.mask&&r("link:mask-icon",{rel:"mask-icon",href:e.mask.url,...e.mask.color?{color:e.mask.color}:{}}),e.shortcut&&r("link:shortcut",{rel:"shortcut icon",href:e.shortcut}),e.msTileImage&&t.push({tag:"meta",key:"meta:name:msapplication-TileImage",attrs:{name:"msapplication-TileImage",content:e.msTileImage}}),e.msTileColor&&t.push({tag:"meta",key:"meta:name:msapplication-TileColor",attrs:{name:"msapplication-TileColor",content:e.msTileColor}})}function La(e,t,r){let n=(c,p)=>t.push({tag:"meta",key:c,attrs:p}),o=re(e.title);o!==void 0&&(r.title=o),e.titleTemplate!==void 0&&(r.template=e.titleTemplate);let i=re(e.lang);i!==void 0&&t.push({tag:"htmlAttr",key:"html:lang",name:"lang",value:i}),e.charset!==void 0&&n("meta:charset",{charset:e.charset}),e.viewport!==void 0&&n("meta:name:viewport",{name:"viewport",content:e.viewport});let a=re(e.description);a!==void 0&&n("meta:name:description",{name:"description",content:a});let s=re(e.keywords);s!==void 0&&n("meta:name:keywords",{name:"keywords",content:Array.isArray(s)?s.join(", "):s}),e.author!==void 0&&n("meta:name:author",{name:"author",content:e.author}),e.robots!==void 0&&n("meta:name:robots",{name:"robots",content:Pa(e.robots)}),e.generator!==void 0&&n("meta:name:generator",{name:"generator",content:e.generator}),e.applicationName!==void 0&&n("meta:name:application-name",{name:"application-name",content:e.applicationName}),e.referrer!==void 0&&n("meta:name:referrer",{name:"referrer",content:e.referrer}),e.colorScheme!==void 0&&n("meta:name:color-scheme",{name:"color-scheme",content:e.colorScheme});let l=re(e.themeColor);l!==void 0&&n("meta:name:theme-color",{name:"theme-color",content:l});let u=re(e.canonical);if(u!==void 0&&t.push({tag:"link",key:"link:rel:canonical",attrs:{rel:"canonical",href:u}}),e.manifest!==void 0&&t.push({tag:"link",key:"link:rel:manifest",attrs:{rel:"manifest",href:e.manifest}}),e.base!==void 0&&t.push({tag:"base",key:"base",attrs:{href:e.base}}),e.verification){let c={google:"google-site-verification",bing:"msvalidate.01",yandex:"yandex-verification",pinterest:"p:domain_verify"};for(let[p,h]of Object.entries(e.verification)){if(h==null)continue;let d=c[p]??p;n("meta:name:"+d,{name:d,content:h})}}for(let c of e.alternates??[])t.push({tag:"link",key:"link:alternate:hreflang:"+c.hreflang,attrs:{rel:"alternate",hreflang:c.hreflang,href:c.href}});for(let c of e.feeds??[])t.push({tag:"link",key:"link:alternate:feed:"+c.href,attrs:{rel:"alternate",type:c.type??"application/rss+xml",href:c.href,...c.title?{title:c.title}:{}}});e.og&&Ra(e.og,t),e.twitter&&Na(e.twitter,t),e.icons&&Ma(e.icons,t);let f=re(e.jsonLd);if(f!==void 0){let c=Array.isArray(f)?f:[f];for(let p of c){let h=JSON.stringify(p);t.push({tag:"script",key:"script:ldjson:"+_t(h),attrs:{type:"application/ld+json"},children:h})}}for(let c of e.meta??[]){let p={};for(let[h,d]of Object.entries(c))d!=null&&(p[h==="httpEquiv"?"http-equiv":h]=d);t.push({tag:"meta",key:$a(p),attrs:p})}for(let c of e.link??[]){let p={};for(let[h,d]of Object.entries(c))d!=null&&(p[h]=d);t.push({tag:"link",key:"link:"+(p.rel??"")+":"+(p.href??_t(JSON.stringify(p))),attrs:p})}for(let c of e.script??[]){let p={},h;for(let[d,y]of Object.entries(c))y!=null&&(d==="children"?h=y:p[d]=y);t.push({tag:"script",key:"script:"+(p.src??_t((h??"")+JSON.stringify(p))),attrs:p,children:h})}}function Da(e,t){return typeof e=="function"?e(t):e.includes("%s")?e.replace("%s",t):e}function Pt(e){let t=[],r={};for(let i of e.sources){let a=typeof i=="function"?i():i;La(a,t,r)}r.title!==void 0&&t.push({tag:"title",key:"title",children:r.template?Da(r.template,r.title):r.title});let n=new Map,o={};for(let i of t){if(i.tag==="htmlAttr"){o[i.name]=i.value;continue}n.set(i.key,i)}return{tags:[...n.values()],htmlAttrs:o}}var Re="data-fh",Ne="data-fh-key";function _r(e){for(let t=e.firstChild;t;t=t.nextSibling)if(t.nodeType===8&&t.data.startsWith("fh:")){t.parentNode?.removeChild(t);return}}A();function ai(e,t){for(let r of Array.from(e.attributes))r.name===Re||r.name===Ne||r.name in t||e.removeAttribute(r.name);for(let[r,n]of Object.entries(t))e.getAttribute(r)!==n&&e.setAttribute(r,n)}function Ia(e){let t=document.createElement(e.tag);return ai(t,e.attrs),t.setAttribute(Re,""),t.setAttribute(Ne,e.key),e.tag==="script"&&e.children!=null&&(t.textContent=e.children),t}function qa(e,t){let r=document.head,n=new Map;for(let a of Array.from(r.querySelectorAll(`[${Re}]`))){let s=a.getAttribute(Ne);a.tagName!=="TITLE"&&s&&n.set(s,a)}let o=null,i=new Set;for(let a of e){if(a.tag==="title"){o=a.children;continue}if(a.tag==="htmlAttr")continue;i.add(a.key);let s=n.get(a.key);s&&s.tagName===a.tag.toUpperCase()?(ai(s,a.attrs),a.tag==="script"&&(s.textContent??"")!==(a.children??"")&&(s.textContent=a.children??"")):(s&&s.remove(),r.appendChild(Ia(a)))}for(let[a,s]of n)i.has(a)||s.remove();o!=null&&document.title!==o&&(document.title=o);for(let[a,s]of Object.entries(t))document.documentElement.getAttribute(a)!==s&&document.documentElement.setAttribute(a,s)}function Pr(e){return D(t=>(S(()=>{e.version();let{tags:r,htmlAttrs:n}=Pt(e);qa(r,n)}),x(()=>{}),t))}Y("client index");function ki(e,t){if(!t)throw new Error("Container element not found for mount()");fr(()=>e(),t)}async function Oi(e,t={}){let r=typeof t.root=="string"?document.querySelector(t.root):t.root??document.querySelector("#app");if(!r)throw new Error(`[Fluixi] Mount container not found: ${t.root??"#app"}`);let n=!!document.getElementById("__FLUIXI_HYDRATION__")||!!t.routes&&r.firstElementChild!=null,o=t.hydrate??n,i=Tr();if(Cr(i),_r(r),o){if(t.routes&&t.routes.length){let{preloadRoutes:a}=await Promise.resolve().then(()=>(Ur(),Si));await a(t.routes,window.location.pathname)}ii(),Sr(!0),yt(()=>e(),r),ul(),setTimeout(()=>{Sr(!1),kr()},100)}else ge(()=>e(),r);Pr(i)}function ul(){if(typeof window>"u")return;let e=window;typeof e.__FX_REPLAY_STOP__=="function"&&e.__FX_REPLAY_STOP__();let t=e.__FX_REPLAY__;if(e.__FX_REPLAY__=void 0,e.__FX_REPLAY_STOP__=void 0,!(!Array.isArray(t)||t.length===0))for(let r of t){let n=r&&r.target;if(!n||n.isConnected===!1||typeof n.dispatchEvent!="function")continue;let o=r.type,i=o==="click"?new MouseEvent(o,{bubbles:!0,cancelable:!0}):new Event(o,{bubbles:!0,cancelable:!0});n.dispatchEvent(i)}}Ur();return $i(cl);})();
|
package/dist/src/cdn/core.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var ge=Object.defineProperty;var Lt=Object.getOwnPropertyDescriptor;var _t=Object.getOwnPropertyNames;var Mt=Object.prototype.hasOwnProperty;var L=(e,t)=>()=>(e&&(t=e(e=0)),t);var He=(e,t)=>{for(var n in t)ge(e,n,{get:t[n],enumerable:!0})},me=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of _t(t))!Mt.call(e,o)&&o!==n&&ge(e,o,{get:()=>t[o],enumerable:!(r=Lt(t,o))||r.enumerable});return e},je=(e,t,n)=>(me(e,t,"default"),n&&me(n,t,"default"));var Dt=e=>me(ge({},"__esModule",{value:!0}),e);function xe(){return It}function Ue(){let e=(0,c.getOwner)();if(!e)return null;if(!e[he]){let t={mounts:[],effects:[],scheduled:!1};e[he]=t}return e[he]}function $e(e){if(e.scheduled)return;e.scheduled=!0;let t=(0,c.getOwner)();queueMicrotask(()=>{if((0,c.isOwnerDisposed)(t)){e.mounts=[],e.effects=[];return}(0,c.runWithOwner)(t,()=>{for(let n of e.mounts)try{let r=n();typeof r=="function"&&(0,c.onCleanup)(r)}catch(r){console.error("Error in onMount callback:",r)}for(let n of e.effects){let r;(0,c.createEffect)(()=>{r&&r(),r=n()}),(0,c.onCleanup)(()=>{r&&r()})}e.mounts=[],e.effects=[]})})}function b(e){(0,Y.registerCreateComponent)(K)}function K(e,t){return G(e,t)}function G(e,t){let n=typeof e=="function"?(0,c.untrack)(()=>e(t)):e;if(n!=null&&(typeof n=="function"||typeof n=="object")&&!(0,c.isSignal)(n)){try{n.$name=e.name}catch{}return(0,Y.asComponent)(n)}return n}function Q(e,t=!0){let n=Ue();if(n){if(!t){n.scheduled||e();return}n.mounts.push(e),$e(n)}else{if(!t){e();return}(0,c.createEffect)(()=>{let r=(0,c.untrack)(e);typeof r=="function"&&(0,c.onCleanup)(r)})}}function Z(e){(0,c.onCleanup)(e)}function U(e){let t=Ue();if(t)t.effects.push(e),$e(t);else{let n;(0,c.createEffect)(()=>{n&&n(),n=e()}),(0,c.onCleanup)(()=>{n&&n()})}}function ee(e){return(0,c.createMemo)(e)}function te(e){let t={current:e};return(0,c.onCleanup)(()=>{t.current=null}),t}function ne(e,t){let[n,r]=(0,c.createSignal)(t);return[n,s=>{r(e(n(),s))}]}function re(e,t,n,r){U(()=>{let o=e&&"current"in e?e.current:e;if(o)return o.addEventListener(t,n,r),()=>{o.removeEventListener(t,n,r)}})}function oe(e){return e}function ve(){return V}function Te(e){V&&e()}var Y,c,It,V,he,_=L(()=>{"use strict";Y=require("@fluixi/dom"),c=require("@fluixi/reactive/signal"),It={context:null,owner:null};V=typeof process<"u"&&!1,he=Symbol.for("fluixi-lifecycle")});function M(e,t){let n,r,o;function s(){return r||(r=e().then(i=>n=i.default)),r}t?.preload&&s();let a=(i=>{if(n){let d=n;return(0,E.untrack)(()=>d(i))}if(!o){let[d]=(0,E.createResource)(()=>s(),{transport:!1});if(o=d,d.error)throw d.error}return(0,E.createMemo)(()=>{let d=o();return d?(0,E.untrack)(()=>d(i)):void 0},void 0,{name:"lazy"})});return a.preload=()=>s().then(()=>{}),a.$lazy=!0,a.loader=e,a}var E,se=L(()=>{"use strict";E=require("@fluixi/reactive/signal")});function Kt(){Ge||(Ge=!0,!(typeof process<"u")&&console.warn("[fluixi] createProvider({ context, value, children }) reads `children` eagerly: the object literal materialises `children` BEFORE the context is stamped, so a routed <Outlet/> that has siblings inside the provider renders detached and its descendants see no context under SSR. Use the lazy form instead:\n createProvider(Context, value, props) // children stays a getter\n // or JSX: <Context.Provider value={…}>{props.children}</Context.Provider>"))}function ie(e,t,n){let r=!!e?.Provider,o=r?e:e.context,s=r?t:e.value,a=r?!1:e.debug??!1;r||Kt();let i=typeof s=="function"?s():s,d=r?n:e;return o.Provider({value:i,get children(){return d?.children},debug:a})}function et(e){let t=I(e);return[t,r=>ie(t,r.value,r)]}function be(e,t){if(e.length===0)return(0,Ze.readChildren)(()=>t);let[n,r]=e[0],o=e.slice(1);return ie(n,r,{get children(){return be(o,t)}})}function tt(e){return t=>{let n=N(e);return t.children(n)}}function nt(e,t){let n=N(e);return n===e.defaultValue?t():n}function I(e){let t=(0,ae.createContext)(e),n=r=>(r.debug,t.Provider({value:r.value,get children(){return r.children},debug:r.debug}));return typeof Symbol<"u"&&Symbol.for&&(n.$$typeof=Symbol.for("react.provider")),n.$$typeof=Symbol.for("react.provider"),{id:t.id,Provider:(0,Qe.asProvider)(n),defaultValue:e}}function N(e){let t=(0,ae.useContext)(e);return t!==void 0?t:e.defaultValue}var Qe,ae,Ze,Ge,Se=L(()=>{"use strict";Qe=require("@fluixi/dom"),ae=require("@fluixi/reactive/signal"),Ze=require("@fluixi/reactive/signal");_();b("index");Ge=!1});function ct(){return it}function Pe(e){it=e}function ut(e,t){fe.set(e,t)}function dt(e){return fe.get(e)}function qt(){fe.clear()}function ft(){if(typeof window>"u")return!1;let e=document.getElementById("__FLUIXI_HYDRATION__");if(!e||e.getAttribute("type")!=="application/json")return!1;try{let t=e.textContent||"{}",n=JSON.parse(t);for(let[r,o]of Object.entries(n))fe.set(r,o);return!0}catch(t){return console.error("Failed to deserialize hydration data:",t),!1}}function Re(){if(typeof window>"u")return;let e=document.getElementById("__FLUIXI_HYDRATION__");e&&e.remove();let t=document.createTreeWalker(document.body,NodeFilter.SHOW_COMMENT,null),n=[],r;for(;r=t.nextNode();){let o=r,s=o.nodeValue||"";(s.startsWith("#")||s.startsWith("/"))&&n.push(o)}n.forEach(o=>o.remove()),qt()}function lt(){return typeof window>"u"}var it,fe,Ae=L(()=>{"use strict";it=!1,fe=new Map;typeof window<"u"&&window.addEventListener("load",()=>{setTimeout(Re,100)})});function pt(e,t){return async(...n)=>{let r=t+":"+JSON.stringify(n);if(ct()||typeof window<"u"){let s=dt(r);if(s!==void 0)return s}if(W.has(r))return W.get(r);if(z.has(r))return z.get(r);let o=Promise.resolve(e(...n)).then(s=>(W.set(r,s),z.delete(r),lt()&&ut(r,s),s),s=>{throw z.delete(r),s});return z.set(r,o),o}}function yt(e){let t=typeof e=="string"?n=>n.startsWith(e):e;for(let n of W.keys())t(n)&&(W.delete(n),Jt.add(n));Bt(n=>n+1)}function mt(e,t){let[n]=(0,X.createResource)(t||(()=>!0),e);return n}function gt(e){return Ee.has(e)||Ee.set(e,(0,X.createSignal)(void 0)),Ee.get(e)}function ke(e,t){let n=t||e.name||"action",r=async o=>{let[,s]=gt(n),a=()=>s(void 0),i=()=>r(o);s({input:o,pending:!0,clear:a,retry:i});try{let d=await e(o);return s({input:o,result:d,pending:!1,clear:a,retry:i}),d}catch(d){throw s({input:o,error:d,pending:!1,clear:a,retry:i}),d}};return r.url=n,r.with=o=>ke((...s)=>e(o,...s),t),r}function ht(e){let[t]=gt(e.url);return t}function xt(e){return e}var X,W,z,mr,Bt,Jt,Ee,Yt,gr,vt=L(()=>{"use strict";X=require("@fluixi/reactive/signal");Ae();Se();W=new Map,z=new Map;[mr,Bt]=(0,X.createSignal)(0),Jt=new Set;Ee=new Map;Yt=I(),gr=Yt.Provider});var Rt={};He(Rt,{A:()=>Ne,Form:()=>cn,Link:()=>pe,Outlet:()=>Le,Redirect:()=>_e,Router:()=>Oe,action:()=>ke,cache:()=>pt,createAsync:()=>mt,createBrowserHistory:()=>v.createBrowserHistory,createMemoryHistory:()=>v.createMemoryHistory,lazy:()=>M,matchPath:()=>v.matchPath,matchRoutes:()=>v.matchRoutes,preloadRoutes:()=>un,revalidate:()=>yt,runWithOwner:()=>At.runWithOwner,select:()=>rn,useAction:()=>xt,useLevelParams:()=>tn,useLinkNavigation:()=>on,useLocation:()=>J,useMatch:()=>De,useNavigate:()=>le,useParam:()=>Me,useParamSelector:()=>nn,useParams:()=>B,useRouteData:()=>sn,useRouter:()=>H,useSearchParams:()=>Ie,useSubmission:()=>ht});function Gt(e,t,n){let r,o=e.route.data;if(typeof o=="function"){let R=!1;(0,u.onCleanup)(()=>{R=!0});let m=(0,u.getOwner)(),[j]=(0,u.createResource)(()=>o({params:n.params,location:n.location},m,()=>R));r=j}let s=()=>wt.Provider({value:r,get children(){return St.Provider({value:e.params,get children(){return bt.Provider({value:{depth:t,...n},get children(){return(0,l.createComponent)(e.component,{})}})}})}});if(!r)return s();let a=r,i=()=>a.loading,[d,x]=(0,u.createSignal)((0,u.untrack)(()=>!i()));return(0,u.createEffect)(()=>x(!i())),(0,u.createMemo)(()=>d()?s():null)}function Pt(e){let t=e.depth+1,[n,r]=(0,u.createSignal)((0,u.untrack)(()=>e.matched()[t]?.component));return(0,u.createEffect)(()=>{let o=e.matched()[t]?.component;r(()=>o)}),(0,u.createMemo)(()=>{if(!n())return e.notFound?e.notFound():null;let s=(0,u.untrack)(()=>e.matched())[t];return Gt(s,t,{matched:e.matched,params:e.params,location:e.location})})}function Qt(e){return e==null?Zt():typeof e=="function"?(0,l.createComponent)(e,{}):e}function Zt(){let e=(0,l.createNativeElement)("div");(0,l.setAttribute)(e,"class","fx-not-found"),(0,l.setAttribute)(e,"role","main"),(0,l.setAttribute)(e,"style","min-height:60vh;display:grid;place-content:center;gap:.25rem;text-align:center;font-family:system-ui,-apple-system,sans-serif");let t=(0,l.createNativeElement)("h1");(0,l.setAttribute)(t,"style","margin:0;font-size:2.5rem;font-weight:700"),(0,l.insert)(t,"404");let n=(0,l.createNativeElement)("p");return(0,l.setAttribute)(n,"style","margin:0;opacity:.7"),(0,l.insert)(n,"This page could not be found."),e.appendChild(t),e.appendChild(n),e}function Oe(e){let t=e.history??(0,w.createBrowserHistory)(),n=(0,w.createRouter)({routes:e.routes,base:e.base,history:t}),[r,o]=(0,u.createSignal)(n.state()),s=n.subscribe(o);(0,u.onCleanup)(()=>{s(),n.destroy()});let a=(0,u.createMemo)(()=>(r().match?.matched??[]).filter(R=>R.component)),i={router:n,location:(0,u.createMemo)(()=>r().location),params:(0,u.createMemo)(()=>r().match?.params??{})},d={depth:-1,matched:a,params:i.params,location:i.location,notFound:()=>Qt(e.notFound)},x;return q.Provider({value:i,get children(){return x??=Pt(d)}})}function Le(){let e=(0,h.useContext)(bt);return e?Pt(e):null}function _e(e){let t=(0,h.useContext)(q);if(!t||typeof window>"u")return null;let n=!1;return(0,u.onCleanup)(()=>n=!0),queueMicrotask(()=>{n||t.router.navigate(e.to,{replace:e.replace!==!1})}),null}function H(){let e=(0,h.useContext)(q);if(e)return e;if(typeof window>"u")return en;throw new Error("[router-next] useRouter must be used within <Router>")}function B(){let e=H().params;return(0,u.createMemo)(()=>e(),{},{equals:(t,n)=>JSON.stringify(t)===JSON.stringify(n)})}function tn(){return(0,h.useContext)(St)??{}}function Me(e){let t=B();return(0,u.createMemo)(()=>t()[e])}function nn(e,t){let n=B();return(0,u.createMemo)(()=>e(n()),void 0,t?{equals:t}:void 0)}function De(e){let t=J();return(0,u.createMemo)(()=>(0,w.matchPath)(typeof e=="function"?e():e,t.pathname))}function Ie(){let e=J(),t=le();return[(0,u.createMemo)(()=>e.query),(o,s)=>{let a=new URLSearchParams(e.search);for(let[d,x]of Object.entries(o))x===null?a.delete(d):a.set(d,x);let i=a.toString();t(e.pathname+(i?`?${i}`:""),s)}]}function rn(e,t){let n=(r,o)=>(0,Ct.deepEqual)(r,o);return t!==void 0?(0,u.createMemo)(()=>(0,Tt.get)(e(),t),void 0,{equals:n}):(0,u.createMemo)(e,void 0,{equals:n})}function J(){let{location:e}=H();return new Proxy({},{get:(t,n)=>e()[n],has:(t,n)=>n in e(),ownKeys:()=>Reflect.ownKeys(e()),getOwnPropertyDescriptor:(t,n)=>Object.getOwnPropertyDescriptor(e(),n)})}function on(e={}){let t=(0,h.useContext)(q);return n=>{if(!t||n.defaultPrevented||n.button!==0||n.metaKey||n.ctrlKey||n.shiftKey||n.altKey)return;let o=n.target?.closest?.("a");if(!o||!o.getAttribute("href")||o.target&&o.target!=="_self"||o.hasAttribute("download")||/(^|\s)external(\s|$)/.test(o.getAttribute("rel")??""))return;let s=new URL(o.href);s.protocol!=="http:"&&s.protocol!=="https:"||s.origin===window.location.origin&&(s.hash&&s.pathname===window.location.pathname&&s.search===window.location.search||e.shouldNavigate&&!e.shouldNavigate(s,o)||(n.preventDefault(),t.router.navigate(s.pathname+s.search+s.hash,{replace:e.replace})))}}function le(){let{router:e}=H();return(t,n)=>e.navigate(t,n)}function sn(){return(0,h.useContext)(wt)??(()=>{})}function pe(e){let t=(0,h.useContext)(q),n=typeof document>"u",r=()=>t?.router.navigate(C(e.href)??"",{replace:C(e.replace)}),o=(0,l.createNativeElement)("a");(0,l.setAttribute)(o,"href",C(e.href)??""),e.slot&&(0,l.setAttribute)(o,"slot",C(e.slot));for(let a of Object.keys(e)){if(an.has(a))continue;let i=e[a];i!=null&&typeof i!="function"&&(0,l.setAttribute)(o,a,String(i))}if(typeof o.addEventListener=="function")o.addEventListener("click",a=>{a.metaKey||a.ctrlKey||a.shiftKey||a.altKey||(a.preventDefault(),r())});else{let a=C(e.className??e.class)??"";a&&(0,l.setAttribute)(o,"class",a)}typeof o.addEventListener=="function"&&(0,u.createEffect)(()=>{let a=C(e.href)??"";o.setAttribute("href",a);let i=C(e.className??e.class)??"",d=C(e.activeClass)??"",x=C(e.active)??t?.location().pathname===a;o.className=[i,x?d:""].filter(Boolean).join(" ")});let s=e.children;return s!=null&&(0,l.insert)(o,s),o}function cn(e){let t=e.action,n=e.className??e.class,r=t.url??"",o=(0,l.createNativeElement)("form");(0,l.setAttribute)(o,"method","post"),r&&(0,l.setAttribute)(o,"action",r),n&&(0,l.setAttribute)(o,"class",n);for(let a of Object.keys(e)){if(a==="action"||a==="children"||a==="class"||a==="className")continue;let i=e[a];i!=null&&typeof i!="function"&&(0,l.setAttribute)(o,a,String(i))}typeof o.addEventListener=="function"&&o.addEventListener("submit",a=>{a.preventDefault();let i={};new FormData(o).forEach((d,x)=>{i[x]=d}),Promise.resolve(t(i)).catch(()=>{})});let s=e.children;return s!=null&&(0,l.insert)(o,s),o}async function un(e,t){let n=(0,w.matchRoutes)(e,t);if(!n)return;let r=[];for(let o of n.matched){let s=o.component;s&&typeof s.preload=="function"&&r.push(s.preload())}await Promise.all(r)}var u,l,h,Tt,Ct,w,v,At,q,bt,St,wt,en,C,an,Ne,Fe=L(()=>{"use strict";u=require("@fluixi/reactive/signal"),l=require("@fluixi/dom"),h=require("@fluixi/reactive/signal"),Tt=require("@fluixi/utils/object"),Ct=require("@fluixi/utils/compare"),w=require("@fluixi/router"),v=require("@fluixi/router");vt();se();At=require("@fluixi/reactive/signal"),q=(0,h.createContext)(),bt=(0,h.createContext)(),St=(0,h.createContext)(),wt=(0,h.createContext)();en={router:{navigate:()=>{}},location:()=>({pathname:"",search:"",hash:"",query:{}}),params:()=>({})};C=e=>typeof e=="function"?e():e,an=new Set(["href","slot","class","className","active","activeClass","replace","children"]);Ne=pe});var ln={};He(ln,{$component:()=>G,A:()=>Ne,ClientOnly:()=>g.ClientOnly,DEV:()=>V,Dynamic:()=>g.Dynamic,ErrorBoundary:()=>g.ErrorBoundary,FRAMEWORK_NAME:()=>at,For:()=>g.For,Fragment:()=>T.Fragment,Index:()=>g.Index,Link:()=>pe,Match:()=>g.Match,NoSsr:()=>g.NoSsr,Outlet:()=>Le,Portal:()=>g.Portal,Redirect:()=>_e,Router:()=>Oe,Show:()=>g.Show,Store:()=>F.Store,Suspense:()=>$,Switch:()=>g.Switch,VERSION:()=>st,addClass:()=>p.addClass,batch:()=>f.batch,classMap:()=>de.classMap,cleanupDelegation:()=>Ye,composeProviders:()=>be,createBrowserHistory:()=>v.createBrowserHistory,createComponent:()=>K,createComputed:()=>f.createComputed,createConsumer:()=>tt,createContext:()=>I,createContextWithProvider:()=>et,createDebounce:()=>ce.createDebounce,createDeferred:()=>f.createDeferred,createEffect:()=>f.createEffect,createIsomorphicState:()=>ot,createMemo:()=>f.createMemo,createMemoryHistory:()=>v.createMemoryHistory,createProvider:()=>ie,createRenderEffect:()=>f.createRenderEffect,createResource:()=>f.createResource,createRoot:()=>f.createRoot,createSelector:()=>ce.createSelector,createSignal:()=>f.createSignal,createStore:()=>F.createStore,delegateEvents:()=>p.delegateEvents,devOnly:()=>Te,getFrameworkInfo:()=>Xt,getOwner:()=>f.getOwner,getSharedConfig:()=>xe,hydrate:()=>p.hydrate,initDelegation:()=>Je,insert:()=>p.insert,isDOMNode:()=>p.isDOMNode,isDev:()=>ve,isLitTemplateResult:()=>p.isLitTemplateResult,isRenderable:()=>Be,jsx:()=>T.jsx,jsxs:()=>T.jsxs,lazy:()=>M,mount:()=>Et,onCleanup:()=>f.onCleanup,onMount:()=>Q,onUnmount:()=>Z,portal:()=>qe,read:()=>ue.readSignal,reduce:()=>ue.reduceSignal,removeClass:()=>p.removeClass,render:()=>D,runWithOwner:()=>f.runWithOwner,setAttribute:()=>p.setAttribute,setOwner:()=>f.setOwner,setProperty:()=>p.setProperty,spread:()=>p.spread,startClient:()=>kt,styleMap:()=>de.styleMap,toggleClass:()=>p.toggleClass,untrack:()=>f.untrack,untrackStore:()=>F.untrackStore,useCallback:()=>oe,useContext:()=>N,useEffect:()=>U,useEventListener:()=>re,useLocation:()=>J,useMatch:()=>De,useMemo:()=>ee,useNavigate:()=>le,useParam:()=>Me,useParams:()=>B,useProvide:()=>nt,useReducer:()=>ne,useRef:()=>te,useRouter:()=>H,useSearchParams:()=>Ie});module.exports=Dt(ln);var f=require("@fluixi/reactive/signal"),ce=require("@fluixi/reactive/signal"),ue=require("@fluixi/reactive/operators"),F=require("@fluixi/reactive/store");var Xe=require("@fluixi/reactive/signal");var Ke=require("@fluixi/dom");var Ve="1.0.0-alpha.76";var A=require("@fluixi/dom");(0,Ke.registerCoreVersion)(Ve);var k=require("@fluixi/dom");_();_();var y=require("@fluixi/reactive/signal"),S=require("@fluixi/dom");function ze(e){return!!(e&&typeof e=="object"&&typeof e.then=="function"||e instanceof Promise)}var Nt=(0,y.createContext)();function $(e){return(0,S.createComponent)(Ft,e)}function Ft(e){let t=(0,y.createSuspenseBoundary)(),n=(0,y.useContext)(Nt),r=n?n.register(t.inFallback):void 0;function o(m){return m==null||typeof m=="boolean"?null:typeof m=="function"&&(0,S.isComponent)(m)&&!(0,y.isSignal)(m)?m():m}let s=(0,S.runWithoutHydration)(()=>o(e.fallback??null)),a=(0,y.provideSuspense)(t,()=>(0,y.readChildren)(()=>e.children)),i=(m,j)=>{if(!(j>8))if(Array.isArray(m))for(let Ot of m)i(Ot,j+1);else typeof m=="function"&&(0,y.isSignal)(m)&&i(m(),j+1)};(0,y.provideSuspense)(t,()=>{(0,y.createRenderEffect)(()=>i(a,0))});let[d,x]=(0,y.createSignal)(void 0),R=ze(a);return R&&(t.increment(),a.then(m=>{x(()=>m),t.decrement()},()=>t.decrement())),(0,y.createMemo)(()=>{let m=r?r.showFallback():t.inFallback();return process.env.FX_DEBUG&&console.log("[s] output; showFallback:",m),m?s:R?d():a})}(0,S.asSuspense)($);Object.defineProperty($,"__suspense",{value:!0,enumerable:!0});se();var We=require("@fluixi/reactive/signal"),Ht=require("@fluixi/dom/utils");se();var jt=require("@fluixi/reactive/signal");var Ce=typeof window>"u";function D(e,t,n={}){if(b("render"),(0,k.delegateEvents)(["click","input","change","submit"]),Ce)throw new Error("render() is for client-side only. Use renderToString() on server.");if(!t)throw new Error("Container element is required");let r;return(0,Xe.createRoot)(o=>{r=o;let s=typeof e=="function"?e():e;t.textContent="",(0,A.stampVersions)(t),(0,A.warnOnVersionSkew)(),(0,k.insert)(t,()=>s)}),()=>{r&&(r(),r=void 0)}}function Vt(e){return e&&typeof e=="object"&&(e._$litType$!==void 0||e._$litDirective$!==void 0)}function qe(e,t,n={}){let r=document.createElement("div");r.setAttribute("data-portal","true"),t.appendChild(r);let o=D(e,r,n);return()=>{o(),t.contains(r)&&t.removeChild(r)}}function Be(e){return!!(e==null||typeof e=="function"||(0,k.isDOMNode)(e)||Vt(e)||Array.isArray(e)||typeof e=="string"||typeof e=="number"||typeof e=="boolean")}function Je(){Ce||(0,k.delegateEvents)(["click","input","change","submit"])}function Ye(){}Se();var we=require("@fluixi/reactive/signal"),rt=require("@fluixi/dom"),Ut="__fluixi_iso_states__",$t="__iso:";function zt(){return globalThis[Ut]??=new Map}function Wt(e){if(typeof window>"u")return;let t=(0,rt.getServerData)();return t?t[$t+e]:void 0}function ot(e,t){let n=Wt(e),r=n!==void 0?n:typeof window<"u"&&t.client?t.client():t.fallback,[o,s]=(0,we.createSignal)(r);return zt().set(e,{server:t.server,set:s}),{value:o,set:s,key:e}}var de=require("@fluixi/dom");var g=require("@fluixi/dom");var p=require("@fluixi/dom");var T={};je(T,require("@fluixi/jsx/jsx-runtime"));var O=require("@fluixi/reactive/signal");_();var st="0.0.1",at="Fluixi";function Xt(){return{name:at,version:st,features:{ssr:!0,hydration:!0,jsx:!0,litHtml:!0,signals:!0,fineGrained:!0,lazy:!0,hooks:!0,devMode:!0}}}b("index");var ye=require("@fluixi/dom");Ae();_();var P=require("@fluixi/head"),fn=require("@fluixi/dom");b("client index");function Et(e,t){if(!t)throw new Error("Container element not found for mount()");(0,ye.render)(()=>e(),t)}async function kt(e,t={}){let n=typeof t.root=="string"?document.querySelector(t.root):t.root??document.querySelector("#app");if(!n)throw new Error(`[Fluixi] Mount container not found: ${t.root??"#app"}`);let r=!!document.getElementById("__FLUIXI_HYDRATION__")||!!t.routes&&n.firstElementChild!=null,o=t.hydrate??r,s=(0,P.createHead)();if((0,P.setActiveHead)(s),(0,P.stripHeadMarker)(n),o){if(t.routes&&t.routes.length){let{preloadRoutes:a}=await Promise.resolve().then(()=>(Fe(),Rt));await a(t.routes,window.location.pathname)}ft(),Pe(!0),(0,ye.hydrate)(()=>e(),n),dn(),setTimeout(()=>{Pe(!1),Re()},100)}else D(()=>e(),n);(0,P.mountHead)(s)}function dn(){if(typeof window>"u")return;let e=window;typeof e.__FX_REPLAY_STOP__=="function"&&e.__FX_REPLAY_STOP__();let t=e.__FX_REPLAY__;if(e.__FX_REPLAY__=void 0,e.__FX_REPLAY_STOP__=void 0,!(!Array.isArray(t)||t.length===0))for(let n of t){let r=n&&n.target;if(!r||r.isConnected===!1||typeof r.dispatchEvent!="function")continue;let o=n.type,s=o==="click"?new MouseEvent(o,{bubbles:!0,cancelable:!0}):new Event(o,{bubbles:!0,cancelable:!0});r.dispatchEvent(s)}}Fe();
|
|
1
|
+
"use strict";var ge=Object.defineProperty;var Lt=Object.getOwnPropertyDescriptor;var _t=Object.getOwnPropertyNames;var Mt=Object.prototype.hasOwnProperty;var L=(e,t)=>()=>(e&&(t=e(e=0)),t);var He=(e,t)=>{for(var n in t)ge(e,n,{get:t[n],enumerable:!0})},me=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of _t(t))!Mt.call(e,o)&&o!==n&&ge(e,o,{get:()=>t[o],enumerable:!(r=Lt(t,o))||r.enumerable});return e},je=(e,t,n)=>(me(e,t,"default"),n&&me(n,t,"default"));var Dt=e=>me(ge({},"__esModule",{value:!0}),e);function xe(){return It}function Ue(){let e=(0,c.getOwner)();if(!e)return null;if(!e[he]){let t={mounts:[],effects:[],scheduled:!1};e[he]=t}return e[he]}function $e(e){if(e.scheduled)return;e.scheduled=!0;let t=(0,c.getOwner)();queueMicrotask(()=>{if((0,c.isOwnerDisposed)(t)){e.mounts=[],e.effects=[];return}(0,c.runWithOwner)(t,()=>{for(let n of e.mounts)try{let r=n();typeof r=="function"&&(0,c.onCleanup)(r)}catch(r){console.error("Error in onMount callback:",r)}for(let n of e.effects){let r;(0,c.createEffect)(()=>{r&&r(),r=n()}),(0,c.onCleanup)(()=>{r&&r()})}e.mounts=[],e.effects=[]})})}function b(e){(0,Y.registerCreateComponent)(K)}function K(e,t){return G(e,t)}function G(e,t){let n=typeof e=="function"?(0,c.untrack)(()=>e(t)):e;if(n!=null&&(typeof n=="function"||typeof n=="object")&&!(0,c.isSignal)(n)){try{n.$name=e.name}catch{}return(0,Y.asComponent)(n)}return n}function Q(e,t=!0){let n=Ue();if(n){if(!t){n.scheduled||e();return}n.mounts.push(e),$e(n)}else{if(!t){e();return}(0,c.createEffect)(()=>{let r=(0,c.untrack)(e);typeof r=="function"&&(0,c.onCleanup)(r)})}}function Z(e){(0,c.onCleanup)(e)}function U(e){let t=Ue();if(t)t.effects.push(e),$e(t);else{let n;(0,c.createEffect)(()=>{n&&n(),n=e()}),(0,c.onCleanup)(()=>{n&&n()})}}function ee(e){return(0,c.createMemo)(e)}function te(e){let t={current:e};return(0,c.onCleanup)(()=>{t.current=null}),t}function ne(e,t){let[n,r]=(0,c.createSignal)(t);return[n,s=>{r(e(n(),s))}]}function re(e,t,n,r){U(()=>{let o=e&&"current"in e?e.current:e;if(o)return o.addEventListener(t,n,r),()=>{o.removeEventListener(t,n,r)}})}function oe(e){return e}function ve(){return V}function Te(e){V&&e()}var Y,c,It,V,he,_=L(()=>{"use strict";Y=require("@fluixi/dom"),c=require("@fluixi/reactive/signal"),It={context:null,owner:null};V=typeof process<"u"&&!1,he=Symbol.for("fluixi-lifecycle")});function M(e,t){let n,r,o;function s(){return r||(r=e().then(i=>n=i.default)),r}t?.preload&&s();let a=(i=>{if(n){let d=n;return(0,E.untrack)(()=>d(i))}if(!o){let[d]=(0,E.createResource)(()=>s(),{transport:!1});if(o=d,d.error)throw d.error}return(0,E.createMemo)(()=>{let d=o();return d?(0,E.untrack)(()=>d(i)):void 0},void 0,{name:"lazy"})});return a.preload=()=>s().then(()=>{}),a.$lazy=!0,a.loader=e,a}var E,se=L(()=>{"use strict";E=require("@fluixi/reactive/signal")});function Kt(){Ge||(Ge=!0,!(typeof process<"u")&&console.warn("[fluixi] createProvider({ context, value, children }) reads `children` eagerly: the object literal materialises `children` BEFORE the context is stamped, so a routed <Outlet/> that has siblings inside the provider renders detached and its descendants see no context under SSR. Use the lazy form instead:\n createProvider(Context, value, props) // children stays a getter\n // or JSX: <Context.Provider value={…}>{props.children}</Context.Provider>"))}function ie(e,t,n){let r=!!e?.Provider,o=r?e:e.context,s=r?t:e.value,a=r?!1:e.debug??!1;r||Kt();let i=typeof s=="function"?s():s,d=r?n:e;return o.Provider({value:i,get children(){return d?.children},debug:a})}function et(e){let t=I(e);return[t,r=>ie(t,r.value,r)]}function be(e,t){if(e.length===0)return(0,Ze.readChildren)(()=>t);let[n,r]=e[0],o=e.slice(1);return ie(n,r,{get children(){return be(o,t)}})}function tt(e){return t=>{let n=N(e);return t.children(n)}}function nt(e,t){let n=N(e);return n===e.defaultValue?t():n}function I(e){let t=(0,ae.createContext)(e),n=r=>(r.debug,t.Provider({value:r.value,get children(){return r.children},debug:r.debug}));return typeof Symbol<"u"&&Symbol.for&&(n.$$typeof=Symbol.for("react.provider")),n.$$typeof=Symbol.for("react.provider"),{id:t.id,Provider:(0,Qe.asProvider)(n),defaultValue:e}}function N(e){let t=(0,ae.useContext)(e);return t!==void 0?t:e.defaultValue}var Qe,ae,Ze,Ge,Se=L(()=>{"use strict";Qe=require("@fluixi/dom"),ae=require("@fluixi/reactive/signal"),Ze=require("@fluixi/reactive/signal");_();b("index");Ge=!1});function ct(){return it}function Pe(e){it=e}function ut(e,t){fe.set(e,t)}function dt(e){return fe.get(e)}function qt(){fe.clear()}function ft(){if(typeof window>"u")return!1;let e=document.getElementById("__FLUIXI_HYDRATION__");if(!e||e.getAttribute("type")!=="application/json")return!1;try{let t=e.textContent||"{}",n=JSON.parse(t);for(let[r,o]of Object.entries(n))fe.set(r,o);return!0}catch(t){return console.error("Failed to deserialize hydration data:",t),!1}}function Re(){if(typeof window>"u")return;let e=document.getElementById("__FLUIXI_HYDRATION__");e&&e.remove();let t=document.createTreeWalker(document.body,NodeFilter.SHOW_COMMENT,null),n=[],r;for(;r=t.nextNode();){let o=r,s=o.nodeValue||"";(s.startsWith("#")||s.startsWith("/"))&&n.push(o)}n.forEach(o=>o.remove()),qt()}function lt(){return typeof window>"u"}var it,fe,Ae=L(()=>{"use strict";it=!1,fe=new Map;typeof window<"u"&&window.addEventListener("load",()=>{setTimeout(Re,100)})});function pt(e,t){return async(...n)=>{let r=t+":"+JSON.stringify(n);if(ct()||typeof window<"u"){let s=dt(r);if(s!==void 0)return s}if(W.has(r))return W.get(r);if(z.has(r))return z.get(r);let o=Promise.resolve(e(...n)).then(s=>(W.set(r,s),z.delete(r),lt()&&ut(r,s),s),s=>{throw z.delete(r),s});return z.set(r,o),o}}function yt(e){let t=typeof e=="string"?n=>n.startsWith(e):e;for(let n of W.keys())t(n)&&(W.delete(n),Jt.add(n));Bt(n=>n+1)}function mt(e,t){let[n]=(0,X.createResource)(t||(()=>!0),e);return n}function gt(e){return Ee.has(e)||Ee.set(e,(0,X.createSignal)(void 0)),Ee.get(e)}function ke(e,t){let n=t||e.name||"action",r=async o=>{let[,s]=gt(n),a=()=>s(void 0),i=()=>r(o);s({input:o,pending:!0,clear:a,retry:i});try{let d=await e(o);return s({input:o,result:d,pending:!1,clear:a,retry:i}),d}catch(d){throw s({input:o,error:d,pending:!1,clear:a,retry:i}),d}};return r.url=n,r.with=o=>ke((...s)=>e(o,...s),t),r}function ht(e){let[t]=gt(e.url);return t}function xt(e){return e}var X,W,z,mr,Bt,Jt,Ee,Yt,gr,vt=L(()=>{"use strict";X=require("@fluixi/reactive/signal");Ae();Se();W=new Map,z=new Map;[mr,Bt]=(0,X.createSignal)(0),Jt=new Set;Ee=new Map;Yt=I(),gr=Yt.Provider});var Rt={};He(Rt,{A:()=>Ne,Form:()=>cn,Link:()=>pe,Outlet:()=>Le,Redirect:()=>_e,Router:()=>Oe,action:()=>ke,cache:()=>pt,createAsync:()=>mt,createBrowserHistory:()=>v.createBrowserHistory,createMemoryHistory:()=>v.createMemoryHistory,lazy:()=>M,matchPath:()=>v.matchPath,matchRoutes:()=>v.matchRoutes,preloadRoutes:()=>un,revalidate:()=>yt,runWithOwner:()=>At.runWithOwner,select:()=>rn,useAction:()=>xt,useLevelParams:()=>tn,useLinkNavigation:()=>on,useLocation:()=>J,useMatch:()=>De,useNavigate:()=>le,useParam:()=>Me,useParamSelector:()=>nn,useParams:()=>B,useRouteData:()=>sn,useRouter:()=>H,useSearchParams:()=>Ie,useSubmission:()=>ht});function Gt(e,t,n){let r,o=e.route.data;if(typeof o=="function"){let R=!1;(0,u.onCleanup)(()=>{R=!0});let m=(0,u.getOwner)(),[j]=(0,u.createResource)(()=>o({params:n.params,location:n.location},m,()=>R));r=j}let s=()=>wt.Provider({value:r,get children(){return St.Provider({value:e.params,get children(){return bt.Provider({value:{depth:t,...n},get children(){return(0,l.createComponent)(e.component,{})}})}})}});if(!r)return s();let a=r,i=()=>a.loading,[d,x]=(0,u.createSignal)((0,u.untrack)(()=>!i()));return(0,u.createEffect)(()=>x(!i())),(0,u.createMemo)(()=>d()?s():null)}function Pt(e){let t=e.depth+1,[n,r]=(0,u.createSignal)((0,u.untrack)(()=>e.matched()[t]?.component));return(0,u.createEffect)(()=>{let o=e.matched()[t]?.component;r(()=>o)}),(0,u.createMemo)(()=>{if(!n())return e.notFound?e.notFound():null;let s=(0,u.untrack)(()=>e.matched())[t];return Gt(s,t,{matched:e.matched,params:e.params,location:e.location})})}function Qt(e){return e==null?Zt():typeof e=="function"?(0,l.createComponent)(e,{}):e}function Zt(){let e=(0,l.createNativeElement)("div");(0,l.setAttribute)(e,"class","fx-not-found"),(0,l.setAttribute)(e,"role","main"),(0,l.setAttribute)(e,"style","min-height:60vh;display:grid;place-content:center;gap:.25rem;text-align:center;font-family:system-ui,-apple-system,sans-serif");let t=(0,l.createNativeElement)("h1");(0,l.setAttribute)(t,"style","margin:0;font-size:2.5rem;font-weight:700"),(0,l.insert)(t,"404");let n=(0,l.createNativeElement)("p");return(0,l.setAttribute)(n,"style","margin:0;opacity:.7"),(0,l.insert)(n,"This page could not be found."),e.appendChild(t),e.appendChild(n),e}function Oe(e){let t=e.history??(0,w.createBrowserHistory)(),n=(0,w.createRouter)({routes:e.routes,base:e.base,history:t}),[r,o]=(0,u.createSignal)(n.state()),s=n.subscribe(o);(0,u.onCleanup)(()=>{s(),n.destroy()});let a=(0,u.createMemo)(()=>(r().match?.matched??[]).filter(R=>R.component)),i={router:n,location:(0,u.createMemo)(()=>r().location),params:(0,u.createMemo)(()=>r().match?.params??{})},d={depth:-1,matched:a,params:i.params,location:i.location,notFound:()=>Qt(e.notFound)},x;return q.Provider({value:i,get children(){return x??=Pt(d)}})}function Le(){let e=(0,h.useContext)(bt);return e?Pt(e):null}function _e(e){let t=(0,h.useContext)(q);if(!t||typeof window>"u")return null;let n=!1;return(0,u.onCleanup)(()=>n=!0),queueMicrotask(()=>{n||t.router.navigate(e.to,{replace:e.replace!==!1})}),null}function H(){let e=(0,h.useContext)(q);if(e)return e;if(typeof window>"u")return en;throw new Error("[router-next] useRouter must be used within <Router>")}function B(){let e=H().params;return(0,u.createMemo)(()=>e(),{},{equals:(t,n)=>JSON.stringify(t)===JSON.stringify(n)})}function tn(){return(0,h.useContext)(St)??{}}function Me(e){let t=B();return(0,u.createMemo)(()=>t()[e])}function nn(e,t){let n=B();return(0,u.createMemo)(()=>e(n()),void 0,t?{equals:t}:void 0)}function De(e){let t=J();return(0,u.createMemo)(()=>(0,w.matchPath)(typeof e=="function"?e():e,t.pathname))}function Ie(){let e=J(),t=le();return[(0,u.createMemo)(()=>e.query),(o,s)=>{let a=new URLSearchParams(e.search);for(let[d,x]of Object.entries(o))x===null?a.delete(d):a.set(d,x);let i=a.toString();t(e.pathname+(i?`?${i}`:""),s)}]}function rn(e,t){let n=(r,o)=>(0,Ct.deepEqual)(r,o);return t!==void 0?(0,u.createMemo)(()=>(0,Tt.get)(e(),t),void 0,{equals:n}):(0,u.createMemo)(e,void 0,{equals:n})}function J(){let{location:e}=H();return new Proxy({},{get:(t,n)=>e()[n],has:(t,n)=>n in e(),ownKeys:()=>Reflect.ownKeys(e()),getOwnPropertyDescriptor:(t,n)=>Object.getOwnPropertyDescriptor(e(),n)})}function on(e={}){let t=(0,h.useContext)(q);return n=>{if(!t||n.defaultPrevented||n.button!==0||n.metaKey||n.ctrlKey||n.shiftKey||n.altKey)return;let o=n.target?.closest?.("a");if(!o||!o.getAttribute("href")||o.target&&o.target!=="_self"||o.hasAttribute("download")||/(^|\s)external(\s|$)/.test(o.getAttribute("rel")??""))return;let s=new URL(o.href);s.protocol!=="http:"&&s.protocol!=="https:"||s.origin===window.location.origin&&(s.hash&&s.pathname===window.location.pathname&&s.search===window.location.search||e.shouldNavigate&&!e.shouldNavigate(s,o)||(n.preventDefault(),t.router.navigate(s.pathname+s.search+s.hash,{replace:e.replace})))}}function le(){let{router:e}=H();return(t,n)=>e.navigate(t,n)}function sn(){return(0,h.useContext)(wt)??(()=>{})}function pe(e){let t=(0,h.useContext)(q),n=typeof document>"u",r=()=>t?.router.navigate(C(e.href)??"",{replace:C(e.replace)}),o=(0,l.createNativeElement)("a");(0,l.setAttribute)(o,"href",C(e.href)??""),e.slot&&(0,l.setAttribute)(o,"slot",C(e.slot));for(let a of Object.keys(e)){if(an.has(a))continue;let i=e[a];i!=null&&typeof i!="function"&&(0,l.setAttribute)(o,a,String(i))}if(typeof o.addEventListener=="function")o.addEventListener("click",a=>{a.metaKey||a.ctrlKey||a.shiftKey||a.altKey||(a.preventDefault(),r())});else{let a=C(e.className??e.class)??"";a&&(0,l.setAttribute)(o,"class",a)}typeof o.addEventListener=="function"&&(0,u.createEffect)(()=>{let a=C(e.href)??"";o.setAttribute("href",a);let i=C(e.className??e.class)??"",d=C(e.activeClass)??"",x=C(e.active)??t?.location().pathname===a;o.className=[i,x?d:""].filter(Boolean).join(" ")});let s=e.children;return s!=null&&(0,l.insert)(o,s),o}function cn(e){let t=e.action,n=e.className??e.class,r=t.url??"",o=(0,l.createNativeElement)("form");(0,l.setAttribute)(o,"method","post"),r&&(0,l.setAttribute)(o,"action",r),n&&(0,l.setAttribute)(o,"class",n);for(let a of Object.keys(e)){if(a==="action"||a==="children"||a==="class"||a==="className")continue;let i=e[a];i!=null&&typeof i!="function"&&(0,l.setAttribute)(o,a,String(i))}typeof o.addEventListener=="function"&&o.addEventListener("submit",a=>{a.preventDefault();let i={};new FormData(o).forEach((d,x)=>{i[x]=d}),Promise.resolve(t(i)).catch(()=>{})});let s=e.children;return s!=null&&(0,l.insert)(o,s),o}async function un(e,t){let n=(0,w.matchRoutes)(e,t);if(!n)return;let r=[];for(let o of n.matched){let s=o.component;s&&typeof s.preload=="function"&&r.push(s.preload())}await Promise.all(r)}var u,l,h,Tt,Ct,w,v,At,q,bt,St,wt,en,C,an,Ne,Fe=L(()=>{"use strict";u=require("@fluixi/reactive/signal"),l=require("@fluixi/dom"),h=require("@fluixi/reactive/signal"),Tt=require("@fluixi/utils/object"),Ct=require("@fluixi/utils/compare"),w=require("@fluixi/router"),v=require("@fluixi/router");vt();se();At=require("@fluixi/reactive/signal"),q=(0,h.createContext)(),bt=(0,h.createContext)(),St=(0,h.createContext)(),wt=(0,h.createContext)();en={router:{navigate:()=>{}},location:()=>({pathname:"",search:"",hash:"",query:{}}),params:()=>({})};C=e=>typeof e=="function"?e():e,an=new Set(["href","slot","class","className","active","activeClass","replace","children"]);Ne=pe});var ln={};He(ln,{$component:()=>G,A:()=>Ne,ClientOnly:()=>g.ClientOnly,DEV:()=>V,Dynamic:()=>g.Dynamic,ErrorBoundary:()=>g.ErrorBoundary,FRAMEWORK_NAME:()=>at,For:()=>g.For,Fragment:()=>T.Fragment,Index:()=>g.Index,Link:()=>pe,Match:()=>g.Match,NoSsr:()=>g.NoSsr,Outlet:()=>Le,Portal:()=>g.Portal,Redirect:()=>_e,Router:()=>Oe,Show:()=>g.Show,Store:()=>F.Store,Suspense:()=>$,Switch:()=>g.Switch,VERSION:()=>st,addClass:()=>p.addClass,batch:()=>f.batch,classMap:()=>de.classMap,cleanupDelegation:()=>Ye,composeProviders:()=>be,createBrowserHistory:()=>v.createBrowserHistory,createComponent:()=>K,createComputed:()=>f.createComputed,createConsumer:()=>tt,createContext:()=>I,createContextWithProvider:()=>et,createDebounce:()=>ce.createDebounce,createDeferred:()=>f.createDeferred,createEffect:()=>f.createEffect,createIsomorphicState:()=>ot,createMemo:()=>f.createMemo,createMemoryHistory:()=>v.createMemoryHistory,createProvider:()=>ie,createRenderEffect:()=>f.createRenderEffect,createResource:()=>f.createResource,createRoot:()=>f.createRoot,createSelector:()=>ce.createSelector,createSignal:()=>f.createSignal,createStore:()=>F.createStore,delegateEvents:()=>p.delegateEvents,devOnly:()=>Te,getFrameworkInfo:()=>Xt,getOwner:()=>f.getOwner,getSharedConfig:()=>xe,hydrate:()=>p.hydrate,initDelegation:()=>Je,insert:()=>p.insert,isDOMNode:()=>p.isDOMNode,isDev:()=>ve,isLitTemplateResult:()=>p.isLitTemplateResult,isRenderable:()=>Be,jsx:()=>T.jsx,jsxs:()=>T.jsxs,lazy:()=>M,mount:()=>Et,onCleanup:()=>f.onCleanup,onMount:()=>Q,onUnmount:()=>Z,portal:()=>qe,read:()=>ue.readSignal,reduce:()=>ue.reduceSignal,removeClass:()=>p.removeClass,render:()=>D,runWithOwner:()=>f.runWithOwner,setAttribute:()=>p.setAttribute,setOwner:()=>f.setOwner,setProperty:()=>p.setProperty,spread:()=>p.spread,startClient:()=>kt,styleMap:()=>de.styleMap,toggleClass:()=>p.toggleClass,untrack:()=>f.untrack,untrackStore:()=>F.untrackStore,useCallback:()=>oe,useContext:()=>N,useEffect:()=>U,useEventListener:()=>re,useLocation:()=>J,useMatch:()=>De,useMemo:()=>ee,useNavigate:()=>le,useParam:()=>Me,useParams:()=>B,useProvide:()=>nt,useReducer:()=>ne,useRef:()=>te,useRouter:()=>H,useSearchParams:()=>Ie});module.exports=Dt(ln);var f=require("@fluixi/reactive/signal"),ce=require("@fluixi/reactive/signal"),ue=require("@fluixi/reactive/operators"),F=require("@fluixi/reactive/store");var Xe=require("@fluixi/reactive/signal");var Ke=require("@fluixi/dom");var Ve="1.0.0-alpha.77";var A=require("@fluixi/dom");(0,Ke.registerCoreVersion)(Ve);var k=require("@fluixi/dom");_();_();var y=require("@fluixi/reactive/signal"),S=require("@fluixi/dom");function ze(e){return!!(e&&typeof e=="object"&&typeof e.then=="function"||e instanceof Promise)}var Nt=(0,y.createContext)();function $(e){return(0,S.createComponent)(Ft,e)}function Ft(e){let t=(0,y.createSuspenseBoundary)(),n=(0,y.useContext)(Nt),r=n?n.register(t.inFallback):void 0;function o(m){return m==null||typeof m=="boolean"?null:typeof m=="function"&&(0,S.isComponent)(m)&&!(0,y.isSignal)(m)?m():m}let s=(0,S.runWithoutHydration)(()=>o(e.fallback??null)),a=(0,y.provideSuspense)(t,()=>(0,y.readChildren)(()=>e.children)),i=(m,j)=>{if(!(j>8))if(Array.isArray(m))for(let Ot of m)i(Ot,j+1);else typeof m=="function"&&(0,y.isSignal)(m)&&i(m(),j+1)};(0,y.provideSuspense)(t,()=>{(0,y.createRenderEffect)(()=>i(a,0))});let[d,x]=(0,y.createSignal)(void 0),R=ze(a);return R&&(t.increment(),a.then(m=>{x(()=>m),t.decrement()},()=>t.decrement())),(0,y.createMemo)(()=>{let m=r?r.showFallback():t.inFallback();return process.env.FX_DEBUG&&console.log("[s] output; showFallback:",m),m?s:R?d():a})}(0,S.asSuspense)($);Object.defineProperty($,"__suspense",{value:!0,enumerable:!0});se();var We=require("@fluixi/reactive/signal"),Ht=require("@fluixi/dom/utils");se();var jt=require("@fluixi/reactive/signal");var Ce=typeof window>"u";function D(e,t,n={}){if(b("render"),(0,k.delegateEvents)(["click","input","change","submit"]),Ce)throw new Error("render() is for client-side only. Use renderToString() on server.");if(!t)throw new Error("Container element is required");let r;return(0,Xe.createRoot)(o=>{r=o;let s=typeof e=="function"?e():e;t.textContent="",(0,A.stampVersions)(t),(0,A.warnOnVersionSkew)(),(0,k.insert)(t,()=>s)}),()=>{r&&(r(),r=void 0)}}function Vt(e){return e&&typeof e=="object"&&(e._$litType$!==void 0||e._$litDirective$!==void 0)}function qe(e,t,n={}){let r=document.createElement("div");r.setAttribute("data-portal","true"),t.appendChild(r);let o=D(e,r,n);return()=>{o(),t.contains(r)&&t.removeChild(r)}}function Be(e){return!!(e==null||typeof e=="function"||(0,k.isDOMNode)(e)||Vt(e)||Array.isArray(e)||typeof e=="string"||typeof e=="number"||typeof e=="boolean")}function Je(){Ce||(0,k.delegateEvents)(["click","input","change","submit"])}function Ye(){}Se();var we=require("@fluixi/reactive/signal"),rt=require("@fluixi/dom"),Ut="__fluixi_iso_states__",$t="__iso:";function zt(){return globalThis[Ut]??=new Map}function Wt(e){if(typeof window>"u")return;let t=(0,rt.getServerData)();return t?t[$t+e]:void 0}function ot(e,t){let n=Wt(e),r=n!==void 0?n:typeof window<"u"&&t.client?t.client():t.fallback,[o,s]=(0,we.createSignal)(r);return zt().set(e,{server:t.server,set:s}),{value:o,set:s,key:e}}var de=require("@fluixi/dom");var g=require("@fluixi/dom");var p=require("@fluixi/dom");var T={};je(T,require("@fluixi/jsx/jsx-runtime"));var O=require("@fluixi/reactive/signal");_();var st="0.0.1",at="Fluixi";function Xt(){return{name:at,version:st,features:{ssr:!0,hydration:!0,jsx:!0,litHtml:!0,signals:!0,fineGrained:!0,lazy:!0,hooks:!0,devMode:!0}}}b("index");var ye=require("@fluixi/dom");Ae();_();var P=require("@fluixi/head"),fn=require("@fluixi/dom");b("client index");function Et(e,t){if(!t)throw new Error("Container element not found for mount()");(0,ye.render)(()=>e(),t)}async function kt(e,t={}){let n=typeof t.root=="string"?document.querySelector(t.root):t.root??document.querySelector("#app");if(!n)throw new Error(`[Fluixi] Mount container not found: ${t.root??"#app"}`);let r=!!document.getElementById("__FLUIXI_HYDRATION__")||!!t.routes&&n.firstElementChild!=null,o=t.hydrate??r,s=(0,P.createHead)();if((0,P.setActiveHead)(s),(0,P.stripHeadMarker)(n),o){if(t.routes&&t.routes.length){let{preloadRoutes:a}=await Promise.resolve().then(()=>(Fe(),Rt));await a(t.routes,window.location.pathname)}ft(),Pe(!0),(0,ye.hydrate)(()=>e(),n),dn(),setTimeout(()=>{Pe(!1),Re()},100)}else D(()=>e(),n);(0,P.mountHead)(s)}function dn(){if(typeof window>"u")return;let e=window;typeof e.__FX_REPLAY_STOP__=="function"&&e.__FX_REPLAY_STOP__();let t=e.__FX_REPLAY__;if(e.__FX_REPLAY__=void 0,e.__FX_REPLAY_STOP__=void 0,!(!Array.isArray(t)||t.length===0))for(let n of t){let r=n&&n.target;if(!r||r.isConnected===!1||typeof r.dispatchEvent!="function")continue;let o=n.type,s=o==="click"?new MouseEvent(o,{bubbles:!0,cancelable:!0}):new Event(o,{bubbles:!0,cancelable:!0});r.dispatchEvent(s)}}Fe();
|