@stacksjs/stx 0.2.574 → 0.2.576

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (175) hide show
  1. package/README.md +3 -0
  2. package/dist/chunk-08a98yqt.js +2 -0
  3. package/dist/chunk-181m21rg.js +2 -0
  4. package/dist/{chunk-nxw03sy9.js → chunk-1edvsndv.js} +2 -2
  5. package/dist/chunk-1nbn56jw.js +2 -0
  6. package/dist/{chunk-a3w3jc0t.js → chunk-1w9ngqpv.js} +3 -3
  7. package/dist/{chunk-ta50ym5j.js → chunk-1wkpxa58.js} +2 -2
  8. package/dist/{chunk-6z57saf5.js → chunk-2ry2pfpe.js} +1 -1
  9. package/dist/{chunk-ss4h5ch3.js → chunk-32gycb72.js} +1 -1
  10. package/dist/{chunk-g8dx2jew.js → chunk-34fajf1n.js} +100 -99
  11. package/dist/chunk-3bj1w990.js +2 -0
  12. package/dist/{chunk-kcq2ed1d.js → chunk-3gqrv02t.js} +2 -2
  13. package/dist/chunk-4a12azrb.js +2 -0
  14. package/dist/{chunk-e7pjsrfc.js → chunk-4z21afpp.js} +2 -2
  15. package/dist/{chunk-r5ce7mkg.js → chunk-5dm4k229.js} +2 -2
  16. package/dist/chunk-6fpynp8q.js +2 -0
  17. package/dist/{chunk-ytf3qkaw.js → chunk-6q3yszw9.js} +1 -1
  18. package/dist/{chunk-crj0yqc6.js → chunk-6rfm6b1c.js} +1 -1
  19. package/dist/chunk-6ryab0yy.js +2 -0
  20. package/dist/{chunk-3pr388w5.js → chunk-6sasxbv9.js} +1 -1
  21. package/dist/chunk-6w9km7qb.js +2 -0
  22. package/dist/{chunk-4k6cb5fg.js → chunk-6wz6f8d5.js} +3 -3
  23. package/dist/{chunk-cp5903cg.js → chunk-7j9m4d7x.js} +1 -1
  24. package/dist/{chunk-7gxn7mvd.js → chunk-7y73q42g.js} +2 -2
  25. package/dist/chunk-98r9jk2b.js +2 -0
  26. package/dist/chunk-9dgygz8d.js +2 -0
  27. package/dist/chunk-a51f04an.js +2 -0
  28. package/dist/chunk-aa52jhak.js +2 -0
  29. package/dist/chunk-agk478t4.js +3 -0
  30. package/dist/chunk-ambynnzb.js +2 -0
  31. package/dist/chunk-asbq9cgs.js +2 -0
  32. package/dist/{chunk-1n9bxdnh.js → chunk-bbdg3sqq.js} +2 -2
  33. package/dist/{chunk-69k5t6pj.js → chunk-bctjmaxg.js} +53 -53
  34. package/dist/{chunk-9yht5n7g.js → chunk-bks1fe5e.js} +1 -1
  35. package/dist/chunk-bmtsb5mr.js +2 -0
  36. package/dist/chunk-c8rd3573.js +2 -0
  37. package/dist/chunk-d4b8cgvt.js +2 -0
  38. package/dist/chunk-d7skqhrc.js +2 -0
  39. package/dist/{chunk-hqda3vcw.js → chunk-d8ek63nc.js} +1 -1
  40. package/dist/chunk-f2y8bwdd.js +2 -0
  41. package/dist/{chunk-0px2ab3m.js → chunk-fkbthywg.js} +5 -5
  42. package/dist/chunk-g9vtny6q.js +2 -0
  43. package/dist/{chunk-f0mbj8w9.js → chunk-gjp2jxrp.js} +1 -1
  44. package/dist/{chunk-gh0q6jrm.js → chunk-gpb22a8n.js} +2 -2
  45. package/dist/{chunk-anjm087t.js → chunk-h1n43e5n.js} +2 -2
  46. package/dist/{chunk-gdxhe7ae.js → chunk-h72befy4.js} +2 -2
  47. package/dist/chunk-haeb904b.js +3 -0
  48. package/dist/chunk-hcsrj8z6.js +3 -0
  49. package/dist/chunk-hj1bntaa.js +2 -0
  50. package/dist/chunk-hwy3aw5v.js +2 -0
  51. package/dist/chunk-hyafyqy6.js +2 -0
  52. package/dist/{chunk-e27njk86.js → chunk-j4zyq2ap.js} +8 -8
  53. package/dist/chunk-j75hqvgt.js +2 -0
  54. package/dist/chunk-j83ax407.js +2 -0
  55. package/dist/{chunk-e40qpeg5.js → chunk-je0cttam.js} +1 -1
  56. package/dist/{chunk-jwe7yq8m.js → chunk-jgrtvs81.js} +2 -2
  57. package/dist/chunk-k3hfwve1.js +2 -0
  58. package/dist/{chunk-3kc7af8c.js → chunk-kskyfss0.js} +2 -2
  59. package/dist/{chunk-sej3ng5k.js → chunk-mp99h8wh.js} +3 -3
  60. package/dist/{chunk-svvavwp2.js → chunk-n0kw3q6p.js} +1 -1
  61. package/dist/{chunk-0gt7e1ns.js → chunk-n829xbbq.js} +1 -1
  62. package/dist/chunk-nd3qttxh.js +2 -0
  63. package/dist/{chunk-myhh1zsm.js → chunk-ndc1bmj7.js} +1 -1
  64. package/dist/chunk-nn462qm9.js +2 -0
  65. package/dist/chunk-nr07vxm2.js +2 -0
  66. package/dist/{chunk-yhqhv8mp.js → chunk-nskvepjv.js} +414 -162
  67. package/dist/{chunk-8hp6722y.js → chunk-pqkb1m5x.js} +3 -3
  68. package/dist/chunk-q7a5pwaz.js +2 -0
  69. package/dist/{chunk-yf90vn5t.js → chunk-qfb34r6k.js} +3 -3
  70. package/dist/chunk-r51vyhms.js +2 -0
  71. package/dist/{chunk-k5rrp1bt.js → chunk-s68bqf62.js} +1 -1
  72. package/dist/{chunk-32pxa1r0.js → chunk-sf7z2ar9.js} +3 -3
  73. package/dist/{chunk-825m59jr.js → chunk-sn3htx1z.js} +1 -1
  74. package/dist/chunk-svavrmxb.js +2 -0
  75. package/dist/chunk-sw7mvg9p.js +2 -0
  76. package/dist/{chunk-06hx32h4.js → chunk-szfkkbve.js} +1 -1
  77. package/dist/{chunk-c0ewddb3.js → chunk-tasjpnbf.js} +2 -2
  78. package/dist/{chunk-3dr757vb.js → chunk-tybk9hw9.js} +7 -7
  79. package/dist/chunk-tz40t18m.js +2 -0
  80. package/dist/chunk-v1k0bdsg.js +2 -0
  81. package/dist/chunk-vd10tty0.js +2 -0
  82. package/dist/{chunk-501h1mer.js → chunk-vmetcczm.js} +4 -4
  83. package/dist/{chunk-vnh550b5.js → chunk-vnsby98n.js} +1 -1
  84. package/dist/{chunk-zfw39q56.js → chunk-vqkzhd19.js} +1 -1
  85. package/dist/{chunk-bb5a8adb.js → chunk-vw1rmevt.js} +3 -3
  86. package/dist/{chunk-71zwgxws.js → chunk-w1yft5gg.js} +1 -1
  87. package/dist/chunk-w6sa921x.js +2 -0
  88. package/dist/{chunk-1x2x3xgc.js → chunk-wvk932dp.js} +1 -1
  89. package/dist/{chunk-nc0ba89b.js → chunk-x5xwe5nr.js} +6 -6
  90. package/dist/{chunk-76437eb4.js → chunk-xh0808cd.js} +1 -1
  91. package/dist/{chunk-b10n7cpe.js → chunk-xk2v20xe.js} +2 -2
  92. package/dist/{chunk-0ppzstqj.js → chunk-xsxh7h8z.js} +2 -2
  93. package/dist/{chunk-n8hnrgen.js → chunk-y120qq1a.js} +4 -4
  94. package/dist/{chunk-byhsfnkc.js → chunk-zak5xare.js} +1 -1
  95. package/dist/chunk-zcw74jmk.js +2 -0
  96. package/dist/chunk-zxvndwaz.js +2 -0
  97. package/dist/cli.js +58 -58
  98. package/dist/client/signals-context-runtime.js +200 -0
  99. package/dist/client/signals-effect-runtime.js +12 -1
  100. package/dist/client/signals-globals-runtime.js +3 -1
  101. package/dist/client/signals-kept-runtime.d.ts +1 -1
  102. package/dist/client/signals-kept-runtime.js +8 -3
  103. package/dist/client/signals-public-api-runtime.js +2 -0
  104. package/dist/client/signals-reactive-runtime.js +0 -1
  105. package/dist/client/signals-state-runtime.js +53 -20
  106. package/dist/composables/index.d.ts +2 -0
  107. package/dist/composables/index.js +1 -0
  108. package/dist/composables/use-cached-query.js +2 -1
  109. package/dist/craft-entry.js +2 -2
  110. package/dist/craft.js +2 -2
  111. package/dist/includes.js +10 -1
  112. package/dist/index.d.ts +2 -0
  113. package/dist/index.js +1 -0
  114. package/dist/native/runtime/craft-bridge.js +31 -9
  115. package/dist/native/runtime/craft.d.ts +3 -2
  116. package/dist/native/testing.d.ts +115 -0
  117. package/dist/native/testing.js +421 -0
  118. package/dist/offline/query-cache.d.ts +2 -0
  119. package/dist/offline/query-cache.js +43 -33
  120. package/dist/pwa.js +3 -3
  121. package/dist/reactivity.d.ts +36 -1
  122. package/dist/reactivity.js +33 -9
  123. package/dist/runtime-globals.js +2 -0
  124. package/dist/shared-request.d.ts +46 -0
  125. package/dist/shared-request.js +56 -0
  126. package/dist/signals-api.d.ts +32 -6
  127. package/dist/signals-api.js +42 -18
  128. package/dist/signals.js +2 -1
  129. package/dist/ssg.js +3 -3
  130. package/dist/stx-module.d.ts +2 -0
  131. package/package.json +9 -5
  132. package/stx-module.d.ts +2 -0
  133. package/stx.d.ts +54 -4
  134. package/dist/chunk-1m5pagp3.js +0 -2
  135. package/dist/chunk-27ja2rpd.js +0 -2
  136. package/dist/chunk-2b0p7am3.js +0 -2
  137. package/dist/chunk-3k6q1481.js +0 -2
  138. package/dist/chunk-42h0kvng.js +0 -2
  139. package/dist/chunk-4eff1v2p.js +0 -2
  140. package/dist/chunk-5n2v9g2c.js +0 -2
  141. package/dist/chunk-68ygpbta.js +0 -2
  142. package/dist/chunk-6gjfres0.js +0 -2
  143. package/dist/chunk-7debnvz9.js +0 -2
  144. package/dist/chunk-a77gbp9x.js +0 -2
  145. package/dist/chunk-bgbz0wzq.js +0 -2
  146. package/dist/chunk-bgr7fqhs.js +0 -2
  147. package/dist/chunk-bjfrwcfh.js +0 -2
  148. package/dist/chunk-c6jyp7ss.js +0 -3
  149. package/dist/chunk-cdt5pg28.js +0 -2
  150. package/dist/chunk-cfh798k7.js +0 -2
  151. package/dist/chunk-dax3zkmm.js +0 -2
  152. package/dist/chunk-dn676tdp.js +0 -2
  153. package/dist/chunk-dtbj816p.js +0 -2
  154. package/dist/chunk-e23cg45k.js +0 -2
  155. package/dist/chunk-ecwpsjpd.js +0 -2
  156. package/dist/chunk-h8vk3q9n.js +0 -2
  157. package/dist/chunk-hq8vxds5.js +0 -3
  158. package/dist/chunk-j8pamkbh.js +0 -2
  159. package/dist/chunk-mfm7ezh6.js +0 -2
  160. package/dist/chunk-mp16jxcg.js +0 -2
  161. package/dist/chunk-n1c9j5qv.js +0 -2
  162. package/dist/chunk-n61v7e3s.js +0 -2
  163. package/dist/chunk-nf63pk4s.js +0 -2
  164. package/dist/chunk-p5cry5s7.js +0 -2
  165. package/dist/chunk-r8qhex33.js +0 -2
  166. package/dist/chunk-rqvn1s52.js +0 -2
  167. package/dist/chunk-sjsant53.js +0 -2
  168. package/dist/chunk-snzh9z3g.js +0 -3
  169. package/dist/chunk-ty8g61y9.js +0 -2
  170. package/dist/chunk-v1k6w4z5.js +0 -2
  171. package/dist/chunk-vm7zv0gc.js +0 -2
  172. package/dist/chunk-vnxc48en.js +0 -2
  173. package/dist/chunk-y7vbwhh7.js +0 -2
  174. package/dist/chunk-yvyypd92.js +0 -2
  175. package/dist/chunk-zpm02e15.js +0 -2
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{Wi,qi,Gi}from"./chunk-hq8vxds5.js";import{W,Bn,Zt,Wr,qr,Fn,Qt,en,Gr,zn}from"./chunk-c6jyp7ss.js";function K(t,s,i,a,c){let y=!0,h=new Set,f=(l)=>a.get?a.get(l):l,d=()=>f(t());return Object.defineProperty(d,"_isSignal",{value:!0}),Object.defineProperty(d,"modifiers",{get:s}),d.set=(l)=>{if(!y)return;let v=s(),g=a.set?a.set(l,v):l;if(v.trim&&typeof g==="string")g=g.trim();if(v.number&&typeof g==="string"&&g!==""){let n=Number(g);if(!Number.isNaN(n))g=n}if(Object.is(t(),g))return;t.set(g),i(g)},d.update=(l)=>d.set(l(d())),d.input=(l)=>{if(!s().lazy)d.set(l)},d.change=(l)=>{if(s().lazy)d.set(l)},d.subscribe=(l)=>{if(!y)return()=>{};let v=t.subscribe((g,n)=>l(f(g),f(n)));return h.add(v),()=>{v(),h.delete(v)}},Object.defineProperty(d,"value",{get:d,set:d.set}),c(()=>{y=!1,h.forEach((l)=>l()),h.clear()}),d}function z(t,s=!0,i){if(!s||!t||typeof window>"u")return;let a=window;if(!a.__STX_DATA__){let y=document.querySelector("script[data-stx-server-data]");try{let h=JSON.parse(y?.textContent||"{}");a.__STX_DATA__=h&&typeof h==="object"&&!Array.isArray(h)?h:{}}catch{a.__STX_DATA__={}}}let c=a.__STX_DATA__;if(c&&Object.prototype.hasOwnProperty.call(c,t))try{return{data:i?i(c[t]):c[t]}}catch(y){return{data:null,error:y instanceof Error?y:Error(String(y))}}return}function X(t){if(typeof window>"u")return;let s=window;if(t===void 0)s.__STX_DATA__={};else{if(!s.__STX_DATA__)try{let i=JSON.parse(document.querySelector("script[data-stx-server-data]")?.textContent||"{}");s.__STX_DATA__=i&&typeof i==="object"&&!Array.isArray(i)?i:{}}catch{s.__STX_DATA__={}}if(s.__STX_DATA__)delete s.__STX_DATA__[t]}}function Q(t){let s=null;try{s=typeof indexedDB<"u"?indexedDB:null}catch{s=null}if(!s)return null;let i=s,a=t||"stx-kept",c=null,y=()=>{if(!c)c=new Promise((f,d)=>{let l=i.open(a,1);l.onupgradeneeded=()=>{l.result.createObjectStore("kv")},l.onsuccess=()=>f(l.result),l.onerror=()=>d(l.error),l.onblocked=()=>d(Error("blocked"))}),c.catch(()=>{c=null});return c},h=(f,d)=>y().then((l)=>new Promise((v,g)=>{let n=l.transaction("kv",f),o=d(n.objectStore("kv"));n.oncomplete=()=>v(o?o.result:void 0),n.onerror=()=>g(n.error),n.onabort=()=>g(n.error)}));return{get:(f)=>h("readonly",(d)=>d.get(f)),set:(f,d)=>h("readwrite",(l)=>{l.put(d,f)}),remove:(f)=>h("readwrite",(d)=>{d.delete(f)}),removePrefix:(f)=>h("readwrite",(d)=>{d.delete(IDBKeyRange.bound(f,`${f}\uFFFF`))})}}function Y(t,s){let i=t||{},a=null;if(i.storage!==void 0)a=i.storage;else try{a=typeof localStorage<"u"?localStorage:null}catch{a=null}let c=null,y=i.backend!==void 0;if(y)c=i.backend||null;let h=()=>{if(y)return c;y=!0;try{c=s?s():null}catch{c=null}if(c){let e=c;e.get("__stx_probe__").catch(()=>{if(c===e)c=null})}return c},f=i.limit||32768,d=i.defer||((e)=>{let r=typeof requestIdleCallback==="function"?requestIdleCallback:null;if(r)r(e,{timeout:200});else setTimeout(e,16)}),l=new Map,v=new Set,g=new Map,n=!1,o=Promise.resolve(),m=(e)=>{try{return JSON.parse(e)}catch{return e}},p=(e,r)=>{if(!a)return!1;try{return a.setItem(e,r),!0}catch{return!1}},T=(e)=>{try{if(a)a.removeItem(e)}catch{}},k=()=>{if(n=!1,!g.size)return o;let e=Array.from(g.entries());return g.clear(),o=o.then(()=>Promise.all(e.map(([r,u])=>{if(!c){v.delete(r);try{p(r,JSON.stringify(u===void 0?null:u))}catch{}return}let x;try{return x={v:u},c.set(r,x).catch(()=>{let w;try{w=JSON.stringify(u)}catch{return}return c?c.set(r,{j:w}).catch(()=>{p(r,w)}):void 0})}catch{return}}))).then(()=>{}),o},C=(e,r)=>{if(g.set(e,r),v.add(e),n)return;n=!0,d(()=>{k()})},O=(e)=>{if(!e||typeof e!=="object")return;let r=e;if("v"in r)return{value:r.v};if(typeof r.j==="string")return{value:m(r.j)};return},E={peek(e){if(l.has(e))return{value:l.get(e)};let r=null;try{r=a?a.getItem(e):null}catch{r=null}if(r===null||r===void 0)return;let u=m(r);return l.set(e,u),{value:u}},load(e){let r=E.peek(e),u=r?null:h();if(r||!u)return Promise.resolve(r);return u.get(e).then((x)=>{if(l.has(e))return{value:l.get(e)};let w=O(x);if(w)l.set(e,w.value),v.add(e);return w},()=>{return})},set(e,r){if(l.set(e,r),c&&v.has(e)){C(e,r);return}let u;try{u=JSON.stringify(r===void 0?null:r)}catch{return}if(u.length<=f&&p(e,u))return;if(!h()){if(u.length>f)p(e,u);return}T(e),C(e,r)},forget(e){for(let u of Array.from(l.keys()))if(u.indexOf(e)===0)l.delete(u);for(let u of Array.from(g.keys()))if(u.indexOf(e)===0)g.delete(u);for(let u of Array.from(v))if(u.indexOf(e)===0)v.delete(u);try{if(a)for(let u=a.length-1;u>=0;u--){let x=a.key(u);if(x&&x.indexOf(e)===0)a.removeItem(x)}}catch{}let r=h();if(!r)return o;return o=o.then(()=>r.removePrefix(e)).catch(()=>{}),o},flush(){return k()}};try{if(typeof document<"u"&&document.addEventListener)document.addEventListener("visibilitychange",()=>{if(document.visibilityState==="hidden")k()});if(typeof addEventListener==="function")addEventListener("pagehide",()=>{k()})}catch{}return E}function J(t,s){if(!t)return!1;if(t===s.key)return!0;if(!s.url)return!1;if(t===s.url)return!0;try{let i=typeof location<"u"&&location.origin&&location.origin!=="null"?location.origin:"http://localhost",a=new URL(t,i),c=new URL(s.url,i);if(a.origin!==c.origin||a.pathname!==c.pathname)return!1;return!a.search||a.search===c.search}catch{return!1}}function Z(t){let s=t.prefix||"stx:kept:",i=t.matches||((n,o)=>n===o.key||n===o.url),a=new Set,c=new Map,y,h=(n)=>n===void 0?y:n,f=(n,o)=>{let m=h(o);if(m===!1||m===null||m==="")return null;return`${s}${m===void 0?"":`${m}:`}query:${n}`},d=(n)=>{let o=n&&n.value;if(!o||typeof o!=="object"||!("d"in o))return;return{data:o.d,at:Number(o.at)||0}},l=()=>{let n=globalThis;return n.__stx_outboxes instanceof Map?n.__stx_outboxes:null},v={setScope(n){y=n},scope:()=>y,keyFor:f,seed(n,o){let m=f(n,o);return m?d(t.kept.peek(m)):void 0},restore(n,o){let m=f(n,o);return m?t.kept.load(m).then(d):Promise.resolve(void 0)},persist(n,o,m){let p=f(n,m);if(p)t.kept.set(p,{d:o,at:Date.now()})},overlay(n,o,m){let p=l();if(!p||!p.size)return o;let T=o;return p.forEach((k)=>{try{T=k.overlay(n,T,m)}catch{}}),T},watch(n){return a.add(n),()=>{a.delete(n)}},cachedQuery(n,o){let m=c.get(n);if(m){if(o&&m.__options)m.__options(o);return m}let p=o||{},T=p.initial===void 0?null:p.initial,k=()=>typeof p.scope==="function"?p.scope():p.scope,C=()=>(typeof p.url==="function"?p.url():p.url)||null,O=()=>({key:n,url:C()}),E=k(),e=T,r=0,u=null,x=v.seed(n,E);if(x)e=x.data;let w=t.state(v.overlay(O(),e)),V=t.state(!1),U=t.state(!1),j=t.state(null),M=t.state(x?x.at:0),I=0,P=()=>{w.set(v.overlay(O(),e))},G=(b)=>{let _=I;v.restore(n,b).then((N)=>{if(!N||_!==I||r)return;e=N.data,M.set(N.at),P()})};if(!x)G(E);let vt=()=>{let b=k();if(b===E)return;E=b,I++,u=null,r=0;let _=v.seed(n,E);if(e=_?_.data:T,M.set(_?_.at:0),P(),!_)G(E)},yt=(b)=>{let _=C(),N=p.timeoutMs||15000,A=typeof AbortController<"u"?new AbortController:null,S=null,bt=new Promise((R,L)=>{S=setTimeout(()=>{if(A)A.abort();L(Error("The request took too long."))},N)}),B;if(p.load)B=p.load({force:b,url:_,signal:A?A.signal:void 0});else if(_){let R=p.fetch||((D,F)=>fetch(D,F)),L={method:"GET",headers:{Accept:"application/json"}};if(b)L.cache="no-cache";if(A)L.signal=A.signal;B=R(_,L).then((D)=>{if(!D.ok)return D.json().catch(()=>null).then((F)=>{throw Error(F&&(F.error||F.message)||`Request failed (${D.status})`)});return D.json()})}else return Promise.resolve(w());return Promise.race([B,bt]).then((R)=>{if(S)clearTimeout(S);return p.transform?p.transform(R):R},(R)=>{if(S)clearTimeout(S);throw R})},q=(b)=>{if(u)return u;let _=I;if(U.set(!0),r===0&&!M())V.set(!0);let N=()=>{if(_!==I)return;u=null,U.set(!1),V.set(!1)},A=yt(b).then((S)=>{if(_!==I)return w();return e=S,r=Date.now(),M.set(r),j.set(null),v.persist(n,S,E),P(),N(),w()},(S)=>{if(_===I)j.set(S&&S.message?S.message:"Could not load.");return N(),w()});return u=A,A},H={data:w,loading:V,isFetching:U,error:j,updatedAt:M,get key(){return n},load(b){if(vt(),!b&&r&&Date.now()-r<(p.staleTime||0))return Promise.resolve(w());return q(!!b)},refresh(){return H.load(!0)},set(b){e=typeof b==="function"?b(e):b,v.persist(n,e,E),P()},invalidate(){r=0},__options(b){p={...p,...b}}};if(a.add({target:O,updated:()=>{if(r||M())q(!1)},outbox:(b)=>{if(b)e=v.overlay(O(),e,b.id),r=0,q(!0);P()}}),c.set(n,H),p.immediate)H.load();return H}},g=typeof window<"u"?window:typeof addEventListener==="function"?globalThis:null;if(t.listen!==!1&&g&&typeof g.addEventListener==="function")g.addEventListener("stx:updated",(n)=>{let o=n.detail||{};if(o.kind!=="api"||typeof o.url!=="string")return;a.forEach((m)=>{if(i(o.url,m.target()))m.updated()})}),g.addEventListener("stx:outbox",(n)=>{let o=n.detail||{},m=o.sent&&typeof o.sent.id==="string"?o.sent:null;a.forEach((p)=>{if(m){let T=Array.isArray(m.affects)?m.affects:[],k=p.target();if(!T.some((C)=>i(C,k)))return}p.outbox(m)})});return v}var ee=` function useColorMode(options) {
2
+ import{Wi,qi,Gi}from"./chunk-haeb904b.js";import{W,Zt,Qt,Wr,qr,Fn,en,tn,Gr,zn}from"./chunk-agk478t4.js";function X(e,a,i,o,u){let y=!0,s=new Set,h=(l)=>o.get?o.get(l):l,r=()=>h(e());return Object.defineProperty(r,"_isSignal",{value:!0}),Object.defineProperty(r,"modifiers",{get:a}),r.set=(l)=>{if(!y)return;let m=a(),d=o.set?o.set(l,m):l;if(m.trim&&typeof d==="string")d=d.trim();if(m.number&&typeof d==="string"&&d!==""){let n=Number(d);if(!Number.isNaN(n))d=n}if(Object.is(e(),d))return;e.set(d),i(d)},r.update=(l)=>r.set(l(r())),r.input=(l)=>{if(!a().lazy)r.set(l)},r.change=(l)=>{if(a().lazy)r.set(l)},r.subscribe=(l)=>{if(!y)return()=>{};let m=e.subscribe((d,n)=>l(h(d),h(n)));return s.add(m),()=>{m(),s.delete(m)}},Object.defineProperty(r,"value",{get:r,set:r.set}),u(()=>{y=!1,s.forEach((l)=>l()),s.clear()}),r}function Q(e,a=!0,i){if(!a||!e||typeof window>"u")return;let o=window;if(!o.__STX_DATA__){let y=document.querySelector("script[data-stx-server-data]");try{let s=JSON.parse(y?.textContent||"{}");o.__STX_DATA__=s&&typeof s==="object"&&!Array.isArray(s)?s:{}}catch{o.__STX_DATA__={}}}let u=o.__STX_DATA__;if(u&&Object.prototype.hasOwnProperty.call(u,e))try{return{data:i?i(u[e]):u[e]}}catch(y){return{data:null,error:y instanceof Error?y:Error(String(y))}}return}function Y(e){if(typeof window>"u")return;let a=window;if(e===void 0)a.__STX_DATA__={};else{if(!a.__STX_DATA__)try{let i=JSON.parse(document.querySelector("script[data-stx-server-data]")?.textContent||"{}");a.__STX_DATA__=i&&typeof i==="object"&&!Array.isArray(i)?i:{}}catch{a.__STX_DATA__={}}if(a.__STX_DATA__)delete a.__STX_DATA__[e]}}function J(e){let a=null;try{a=typeof indexedDB<"u"?indexedDB:null}catch{a=null}if(!a)return null;let i=a,o=e||"stx-kept",u=null,y=()=>{if(!u)u=new Promise((h,r)=>{let l=i.open(o,1);l.onupgradeneeded=()=>{l.result.createObjectStore("kv")},l.onsuccess=()=>h(l.result),l.onerror=()=>r(l.error),l.onblocked=()=>r(Error("blocked"))}),u.catch(()=>{u=null});return u},s=(h,r)=>y().then((l)=>new Promise((m,d)=>{let n=l.transaction("kv",h),p=r(n.objectStore("kv"));n.oncomplete=()=>m(p?p.result:void 0),n.onerror=()=>d(n.error),n.onabort=()=>d(n.error)}));return{get:(h)=>s("readonly",(r)=>r.get(h)),set:(h,r)=>s("readwrite",(l)=>{l.put(r,h)}),remove:(h)=>s("readwrite",(r)=>{r.delete(h)}),removePrefix:(h)=>s("readwrite",(r)=>{r.delete(IDBKeyRange.bound(h,`${h}\uFFFF`))})}}function Z(e,a){let i=e||{},o=null;if(i.storage!==void 0)o=i.storage;else try{o=typeof localStorage<"u"?localStorage:null}catch{o=null}let u=null,y=i.backend!==void 0;if(y)u=i.backend||null;let s=()=>{if(y)return u;y=!0;try{u=a?a():null}catch{u=null}if(u){let t=u;t.get("__stx_probe__").catch(()=>{if(u===t)u=null})}return u},h=i.limit||32768,r=i.defer||((t)=>{let c=typeof requestIdleCallback==="function"?requestIdleCallback:null;if(c)c(t,{timeout:200});else setTimeout(t,16)}),l=new Map,m=new Set,d=new Map,n=!1,p=Promise.resolve(),v=(t)=>{try{return JSON.parse(t)}catch{return t}},f=(t,c)=>{if(!o)return!1;try{return o.setItem(t,c),!0}catch{return!1}},E=(t)=>{try{if(o)o.removeItem(t)}catch{}},S=()=>{if(n=!1,!d.size)return p;let t=Array.from(d.entries());return d.clear(),p=p.then(()=>Promise.all(t.map(([c,g])=>{if(!u){m.delete(c);try{f(c,JSON.stringify(g===void 0?null:g))}catch{}return}let _;try{return _={v:g},u.set(c,_).catch(()=>{let x;try{x=JSON.stringify(g)}catch{return}return u?u.set(c,{j:x}).catch(()=>{f(c,x)}):void 0})}catch{return}}))).then(()=>{}),p},N=(t,c)=>{if(d.set(t,c),m.add(t),n)return;n=!0,r(()=>{S()})},D=(t)=>{if(!t||typeof t!=="object")return;let c=t;if("v"in c)return{value:c.v};if(typeof c.j==="string")return{value:v(c.j)};return},k={peek(t){if(l.has(t))return{value:l.get(t)};let c=null;try{c=o?o.getItem(t):null}catch{c=null}if(c===null||c===void 0)return;let g=v(c);return l.set(t,g),{value:g}},load(t){let c=k.peek(t),g=c?null:s();if(c||!g)return Promise.resolve(c);return g.get(t).then((_)=>{if(l.has(t))return{value:l.get(t)};let x=D(_);if(x)l.set(t,x.value),m.add(t);return x},()=>{return})},set(t,c){if(l.set(t,c),u&&m.has(t)){N(t,c);return}let g;try{g=JSON.stringify(c===void 0?null:c)}catch{return}if(g.length<=h&&f(t,g))return;if(!s()){if(g.length>h)f(t,g);return}E(t),N(t,c)},forget(t){for(let g of Array.from(l.keys()))if(g.indexOf(t)===0)l.delete(g);for(let g of Array.from(d.keys()))if(g.indexOf(t)===0)d.delete(g);for(let g of Array.from(m))if(g.indexOf(t)===0)m.delete(g);try{if(o)for(let g=o.length-1;g>=0;g--){let _=o.key(g);if(_&&_.indexOf(t)===0)o.removeItem(_)}}catch{}let c=s();if(!c)return p;return p=p.then(()=>c.removePrefix(t)).catch(()=>{}),p},flush(){return S()}};try{if(typeof document<"u"&&document.addEventListener)document.addEventListener("visibilitychange",()=>{if(document.visibilityState==="hidden")S()});if(typeof addEventListener==="function")addEventListener("pagehide",()=>{S()})}catch{}return k}function ee(e,a){if(!e)return!1;if(e===a.key)return!0;if(!a.url)return!1;if(e===a.url)return!0;try{let i=typeof location<"u"&&location.origin&&location.origin!=="null"?location.origin:"http://localhost",o=new URL(e,i),u=new URL(a.url,i);if(o.origin!==u.origin||o.pathname!==u.pathname)return!1;return!o.search||o.search===u.search}catch{return!1}}function te(e){let a=e.prefix||"stx:kept:",i=e.matches||((n,p)=>n===p.key||n===p.url),o=new Set,u=new Map,y,s=(n)=>n===void 0?y:n,h=(n,p)=>{let v=s(p);if(v===!1||v===null||v==="")return null;return`${a}${v===void 0?"":`${v}:`}query:${n}`},r=(n)=>{let p=n&&n.value;if(!p||typeof p!=="object"||!("d"in p))return;return{data:p.d,at:Number(p.at)||0}},l=()=>{let n=globalThis;return n.__stx_outboxes instanceof Map?n.__stx_outboxes:null},m={setScope(n){y=n},scope:()=>y,keyFor:h,seed(n,p){let v=h(n,p);return v?r(e.kept.peek(v)):void 0},restore(n,p){let v=h(n,p);return v?e.kept.load(v).then(r):Promise.resolve(void 0)},persist(n,p,v){let f=h(n,v);if(f)e.kept.set(f,{d:p,at:Date.now()})},overlay(n,p,v){let f=l();if(!f||!f.size)return p;let E=p;return f.forEach((S)=>{try{E=S.overlay(n,E,v)}catch{}}),E},watch(n){return o.add(n),()=>{o.delete(n)}},cachedQuery(n,p){let v=u.get(n);if(v){if(p&&v.__options)v.__options(p);return v}let f=p||{},E=f.initial===void 0?null:f.initial,S=()=>typeof f.scope==="function"?f.scope():f.scope,N=()=>(typeof f.url==="function"?f.url():f.url)||null,D=()=>({key:n,url:N()}),k=S(),t=E,c=0,g=e.sharedRequest(),_=0,x=m.seed(n,k);if(x)t=x.data;let I=e.state(m.overlay(D(),t)),U=e.state(!1),q=e.state(!1),K=e.state(null),P=e.state(x?x.at:0),R=0,F=()=>{I.set(m.overlay(D(),t))},z=(b)=>{let w=R;m.restore(n,b).then((T)=>{if(!T||w!==R||c)return;t=T.data,P.set(T.at),F()})};if(!x)z(k);let wt=()=>{let b=S();if(b===k)return;k=b,R++,_=0,q.set(!1),U.set(!1),c=0;let w=m.seed(n,k);if(t=w?w.data:E,P.set(w?w.at:0),F(),!w)z(k)},_t=(b,w)=>{let T=f.timeoutMs||15000,C=typeof AbortController<"u"?new AbortController:null,O=null,j=new Promise((M,V)=>{O=setTimeout(()=>{if(C)C.abort();V(Error("The request took too long."))},T)}),A;if(f.load)A=f.load({force:b,url:w,signal:C?C.signal:void 0});else if(w){let M=f.fetch||((L,H)=>fetch(L,H)),V={method:"GET",headers:{Accept:"application/json"}};if(b)V.cache="no-cache";if(C)V.signal=C.signal;A=M(w,V).then((L)=>{if(!L.ok)return L.json().catch(()=>null).then((H)=>{throw Error(H&&(H.error||H.message)||`Request failed (${L.status})`)});return L.json()})}else return Promise.resolve(I());return Promise.race([A,j]).then((M)=>{if(O)clearTimeout(O);return f.transform?f.transform(M):M},(M)=>{if(O)clearTimeout(O);throw M})},G=(b)=>{let w=R,T=N(),C=()=>{if(w!==R)return Promise.resolve(I());if(_++,q.set(!0),c===0&&!P())U.set(!0);let j=()=>{if(w!==R)return;if(_=Math.max(0,_-1),!_)q.set(!1),U.set(!1)};return _t(b,T).then((A)=>{if(w!==R||T!==N())return j(),I();return t=A,c=Date.now(),P.set(c),K.set(null),m.persist(n,A,k),F(),j(),I()},(A)=>{if(w===R&&T===N())K.set(A&&A.message?A.message:"Could not load.");return j(),I()})},O=`${w} ${T||""}`;return b?g.fresh(O,C):g.run(O,C)},B={data:I,loading:U,isFetching:q,error:K,updatedAt:P,get key(){return n},load(b){if(wt(),!b&&c&&Date.now()-c<(f.staleTime||0))return Promise.resolve(I());return G(!!b)},refresh(){return B.load(!0)},set(b){t=typeof b==="function"?b(t):b,m.persist(n,t,k),F()},invalidate(){c=0},__options(b){f={...f,...b}}};if(o.add({target:D,updated:()=>{if(c||P())G(!1)},outbox:(b)=>{if(b)t=m.overlay(D(),t,b.id),c=0,G(!0);F()}}),u.set(n,B),f.immediate)B.load();return B}},d=typeof window<"u"?window:typeof addEventListener==="function"?globalThis:null;if(e.listen!==!1&&d&&typeof d.addEventListener==="function")d.addEventListener("stx:updated",(n)=>{let p=n.detail||{};if(p.kind!=="api"||typeof p.url!=="string")return;o.forEach((v)=>{if(i(p.url,v.target()))v.updated()})}),d.addEventListener("stx:outbox",(n)=>{let p=n.detail||{},v=p.sent&&typeof p.sent.id==="string"?p.sent:null;o.forEach((f)=>{if(v){let E=Array.isArray(v.affects)?v.affects:[],S=f.target();if(!E.some((N)=>i(N,S)))return}f.outbox(v)})});return m}function ne(e){let a=e&&e.covers||((s,h)=>Object.is(s,h)),i=[],o=[],u=0,y=(s,h)=>{let r;try{r=Promise.resolve(h())}catch(d){r=Promise.reject(d)}let l={key:s,promise:r};i.push(l);let m=()=>{let d=i.indexOf(l);if(d!==-1)i.splice(d,1)};return r.then(m,m),r};return{run(s,h){for(let r of i)if(a(r.key,s))return r.promise;for(let r of o)if(a(r.key,s))return r.promise;return y(s,h)},fresh(s,h){for(let d of o)if(a(d.key,s))return d.promise;let r=i.filter((d)=>a(d.key,s)).map((d)=>d.promise);if(!r.length)return y(s,h);let l={key:s,promise:null},m=()=>{};return l.promise=Promise.all(r.map((d)=>d.then(m,m))).then(()=>{let d=o.indexOf(l);if(d!==-1)o.splice(d,1);return y(s,h)}),o.push(l),l.promise},latest(){let s=++u;return()=>s===u},get busy(){return i.length>0||o.length>0}}}var re=` function useColorMode(options) {
3
3
  options = options || {};
4
4
  // The pre-paint boot script (stacksjs/stx#1794) publishes the app's
5
5
  // configured options here. Reading them makes a bare useColorMode() agree
@@ -281,7 +281,7 @@ catch (e) {} }
281
281
  function usePreferredLight() { return useMediaQuery('(prefers-color-scheme: light)'); }
282
282
  function usePreferredReducedMotion() { return useMediaQuery('(prefers-reduced-motion: reduce)'); }
283
283
  function usePreferredContrast() { return useMediaQuery('(prefers-contrast: more)'); }
284
- `;function te(t){return` var __stxGeneratedIdCounter = 0;
284
+ `;function oe(e){return` var __stxGeneratedIdCounter = 0;
285
285
 
286
286
  // Stable, scope-aware DOM ids for component authoring. A component setup
287
287
  // runs with window.__STX_CURRENT_ELEMENT__ pointing at its compiled root, so
@@ -305,7 +305,7 @@ catch (e) {} }
305
305
  return normalizedPrefix + '-' + __stxGeneratedIdCounter;
306
306
  }
307
307
 
308
- var createModelSignal = ${t};
308
+ var createModelSignal = ${e};
309
309
  function useModel(name, options) {
310
310
  if (typeof name !== 'string') { options = name || {}; name = 'modelValue'; }
311
311
  options = options || {};
@@ -465,7 +465,7 @@ catch (e) {} }
465
465
  target.addEventListener(event, handler, opts);
466
466
  onDestroy(function() { target.removeEventListener(event, handler, opts); });
467
467
  }
468
- `}var ne=` // Minimal attribute-only pass for the host element of a deferred subtree.
468
+ `}var se=` // Minimal attribute-only pass for the host element of a deferred subtree.
469
469
  // The full walk happens on children via processElement.
470
470
  function processAttributesOnly(el, scope) {
471
471
  // Just call processElement but mark it as already visited to prevent
@@ -594,7 +594,7 @@ catch (e) {} }
594
594
  if (!Object.is(peek(function() { return propSignal(); }), value))
595
595
  propSignal.set(value);
596
596
  }
597
- `;var re=`
597
+ `;var ae=`
598
598
  // STX Signals Runtime (Development Build)
599
599
  console.log('[stx] signals runtime loading');
600
600
  // Pre-initialization shim: capture onMount/onDestroy calls made before the runtime IIFE runs
@@ -607,7 +607,7 @@ console.log('[stx] entering IIFE');
607
607
  (function() {
608
608
  'use strict';
609
609
 
610
- `,oe=` // Inject x-cloak CSS to prevent FOUC (Flash of Unstyled Content)
610
+ `,ie=` // Inject x-cloak CSS to prevent FOUC (Flash of Unstyled Content)
611
611
  // Elements with x-cloak are hidden until the runtime removes the attribute after mount
612
612
  var cloakStyle = document.getElementById ? document.getElementById('stx-cloak-style') : null;
613
613
  if (!cloakStyle) {
@@ -617,7 +617,7 @@ console.log('[stx] entering IIFE');
617
617
  document.head.appendChild(cloakStyle);
618
618
  }
619
619
 
620
- `;var se=` function bindClass(el, expr, passedScope = componentScope, isVisible) {
620
+ `;var le=` function bindClass(el, expr, passedScope = componentScope, isVisible) {
621
621
  const originalClasses = el.className;
622
622
  const capturedScope = { ...globalHelpers, ...passedScope, ...(findElementScope(el) || {}) };
623
623
  const keys = Object.keys(capturedScope);
@@ -685,7 +685,7 @@ else {
685
685
  }
686
686
  });
687
687
  }
688
- `;var ae=` // ==========================================================================
688
+ `;var ce=` // ==========================================================================
689
689
  // Public API
690
690
  // ==========================================================================
691
691
 
@@ -712,6 +712,206 @@ else {
712
712
  });
713
713
  }
714
714
 
715
+ // watch(source, callback, options): the module watch's contract (Vue's).
716
+ // source is a signal, a derived, a getter, a reactive object, or an array of
717
+ // those. callback(next, previous, onCleanup) runs when the value changes
718
+ // (Object.is; structurally with deep), not when the watch is created unless
719
+ // immediate is set, and returns a stop function. once stops after the first
720
+ // call. flush: 'post' (the default, as in the module) calls back after the
721
+ // next render (nextTick), 'pre' on a microtask, 'sync' inside the change;
722
+ // changes before a deferred call land as one, with the latest value. The
723
+ // immediate first call is made at the same timing. The callback is
724
+ // untracked: what it reads does not become something the watch follows, and
725
+ // a callback that throws is reported without stopping the watch.
726
+ //
727
+ // It used to be $watch, which with a getter called back once with the getter
728
+ // itself, and with a signal called back at once with no previous value and
729
+ // again for every write, equal or not. $watch is kept as it was.
730
+ function __stxWatchRead(s) {
731
+ if (typeof s === 'function') return s();
732
+ if (s && typeof s === 'object' && 'value' in s && !Array.isArray(s)) return s.value;
733
+ return s;
734
+ }
735
+ function __stxWatchTraverse(value, seen) {
736
+ if (!value || typeof value !== 'object') return value;
737
+ if (seen.has(value)) return value;
738
+ seen.add(value);
739
+ if (Array.isArray(value)) {
740
+ for (var i = 0; i < value.length; i++) __stxWatchTraverse(value[i], seen);
741
+ }
742
+ else if (value instanceof Map || value instanceof Set) {
743
+ value.forEach(function(v) { __stxWatchTraverse(v, seen); });
744
+ }
745
+ else {
746
+ for (var k in value) __stxWatchTraverse(value[k], seen);
747
+ }
748
+ return value;
749
+ }
750
+ // A copy to compare the next value with: plain objects, arrays, Maps, Sets
751
+ // and Dates are copied, anything else (a DOM node, a class instance) is kept.
752
+ function __stxWatchCopy(value, seen) {
753
+ if (!value || typeof value !== 'object') return value;
754
+ if (seen.has(value)) return seen.get(value);
755
+ var out;
756
+ if (Array.isArray(value)) {
757
+ out = [];
758
+ seen.set(value, out);
759
+ for (var i = 0; i < value.length; i++) out.push(__stxWatchCopy(value[i], seen));
760
+ return out;
761
+ }
762
+ if (value instanceof Date) return new Date(value.getTime());
763
+ if (value instanceof Map) {
764
+ out = new Map();
765
+ seen.set(value, out);
766
+ value.forEach(function(v, k) { out.set(k, __stxWatchCopy(v, seen)); });
767
+ return out;
768
+ }
769
+ if (value instanceof Set) {
770
+ out = new Set();
771
+ seen.set(value, out);
772
+ value.forEach(function(v) { out.add(__stxWatchCopy(v, seen)); });
773
+ return out;
774
+ }
775
+ var proto = Object.getPrototypeOf(value);
776
+ if (proto !== Object.prototype && proto !== null) return value;
777
+ out = {};
778
+ seen.set(value, out);
779
+ for (var k in value) out[k] = __stxWatchCopy(value[k], seen);
780
+ return out;
781
+ }
782
+ function __stxWatchEqual(a, b, seen) {
783
+ if (Object.is(a, b)) return true;
784
+ if (!a || !b || typeof a !== 'object' || typeof b !== 'object') return false;
785
+ if (seen.has(a)) return seen.get(a) === b;
786
+ seen.set(a, b);
787
+ if (Array.isArray(a) !== Array.isArray(b)) return false;
788
+ if (a instanceof Date || b instanceof Date) return a instanceof Date && b instanceof Date && a.getTime() === b.getTime();
789
+ if (a instanceof Map || b instanceof Map) {
790
+ if (!(a instanceof Map && b instanceof Map) || a.size !== b.size) return false;
791
+ var same = true;
792
+ a.forEach(function(v, k) { if (same && (!b.has(k) || !__stxWatchEqual(v, b.get(k), seen))) same = false; });
793
+ return same;
794
+ }
795
+ if (a instanceof Set || b instanceof Set) {
796
+ if (!(a instanceof Set && b instanceof Set) || a.size !== b.size) return false;
797
+ var all = true;
798
+ a.forEach(function(v) { if (all && !b.has(v)) all = false; });
799
+ return all;
800
+ }
801
+ var ka = Object.keys(a);
802
+ var kb = Object.keys(b);
803
+ if (ka.length !== kb.length) return false;
804
+ for (var i = 0; i < ka.length; i++) {
805
+ if (!Object.prototype.hasOwnProperty.call(b, ka[i]) || !__stxWatchEqual(a[ka[i]], b[ka[i]], seen)) return false;
806
+ }
807
+ return true;
808
+ }
809
+
810
+ function watch(source, callback, options) {
811
+ options = options || {};
812
+ var flush = options.flush || 'post';
813
+ var multi = Array.isArray(source);
814
+ var deep = !!options.deep;
815
+ var getter;
816
+ if (multi) getter = function() { return source.map(__stxWatchRead); };
817
+ else if (typeof source === 'function') getter = source;
818
+ else if (source && typeof source === 'object' && 'value' in source) getter = function() { return source.value; };
819
+ else if (source && typeof source === 'object') {
820
+ // A reactive object: what changes is inside it, so it is watched deeply.
821
+ getter = function() { return source; };
822
+ deep = options.deep !== false;
823
+ }
824
+ else {
825
+ console.warn('[stx] watch() needs a signal, a getter, a reactive object or an array of those; got', source);
826
+ getter = function() { return source; };
827
+ }
828
+
829
+ var oldValue;
830
+ var first = true;
831
+ var stopped = false;
832
+ var cleanup;
833
+ var queued = false;
834
+ var forceNext = false;
835
+ var latest;
836
+
837
+ function snapshot(value) {
838
+ return deep ? __stxWatchCopy(value, new Map()) : (multi ? value.slice() : value);
839
+ }
840
+ function changed(next, prev) {
841
+ if (deep) return !__stxWatchEqual(next, prev, new Map());
842
+ if (multi) {
843
+ if (!prev || prev.length !== next.length) return true;
844
+ for (var i = 0; i < next.length; i++) if (!Object.is(next[i], prev[i])) return true;
845
+ return false;
846
+ }
847
+ return !Object.is(next, prev);
848
+ }
849
+ function onCleanup(fn) { cleanup = fn; }
850
+ function fire(next) {
851
+ var prev = oldValue;
852
+ oldValue = snapshot(next);
853
+ if (cleanup) {
854
+ var pending = cleanup;
855
+ cleanup = undefined;
856
+ try { pending(); }
857
+ catch (e) { console.error('[stx] watch cleanup error:', e); }
858
+ }
859
+ peek(function() {
860
+ try { callback(next, prev, onCleanup); }
861
+ catch (e) { console.error('[stx] watch callback error:', e); }
862
+ });
863
+ if (options.once) stop();
864
+ }
865
+ function job() {
866
+ queued = false;
867
+ var force = forceNext;
868
+ forceNext = false;
869
+ if (stopped || (!force && !changed(latest, oldValue))) return;
870
+ fire(latest);
871
+ }
872
+ function schedule(next) {
873
+ latest = next;
874
+ if (queued) return;
875
+ queued = true;
876
+ if (flush === 'post') nextTick(job);
877
+ else Promise.resolve().then(job);
878
+ }
879
+
880
+ var dispose = effect(function() {
881
+ var next = getter();
882
+ if (deep) __stxWatchTraverse(next, new Set());
883
+ if (stopped) return;
884
+ if (first) {
885
+ first = false;
886
+ if (!options.immediate) oldValue = snapshot(next);
887
+ else if (flush === 'sync') fire(next);
888
+ else {
889
+ forceNext = true;
890
+ schedule(next);
891
+ }
892
+ return;
893
+ }
894
+ if (flush !== 'sync') schedule(next);
895
+ else if (changed(next, oldValue)) fire(next);
896
+ });
897
+
898
+ // once with immediate stops inside the first run, before dispose exists.
899
+ if (stopped) dispose();
900
+
901
+ function stop() {
902
+ if (stopped) return;
903
+ stopped = true;
904
+ if (dispose) dispose();
905
+ if (cleanup) {
906
+ var pending = cleanup;
907
+ cleanup = undefined;
908
+ try { pending(); }
909
+ catch (e) { console.error('[stx] watch cleanup error:', e); }
910
+ }
911
+ }
912
+ return stop;
913
+ }
914
+
715
915
  // provide() \u2014 share values across components (like Vue's provide/inject)
716
916
  // Usage: provide('Modal', Modal) \u2014 makes Modal accessible in all components
717
917
  //
@@ -732,7 +932,7 @@ else {
732
932
  if (name in window) return window[name];
733
933
  return defaultValue;
734
934
  }
735
- `;var ie=` function bindParentComponentProps(el, callerScope) {
935
+ `;var de=` function bindParentComponentProps(el, callerScope) {
736
936
  if (!el || !el.getAttribute || el.__stx_parent_props_bound) return;
737
937
  var names = (el.getAttribute('data-stx-parent-bindings') || '').split(/\\s+/).filter(Boolean);
738
938
  if (!names.length) return;
@@ -821,7 +1021,7 @@ else {
821
1021
  });
822
1022
  return resolved;
823
1023
  }
824
- `;var le=` function hydrateComponentScopes(nodes, callerScope) {
1024
+ `;var ue=` function hydrateComponentScopes(nodes, callerScope) {
825
1025
  var roots = [];
826
1026
  var scripts = [];
827
1027
  forEachGroupElement(nodes, function(node, insideTemplateContent) {
@@ -967,7 +1167,7 @@ else {
967
1167
  }
968
1168
  });
969
1169
  }
970
- `;var ce=` // Component composition API (Phase 4)
1170
+ `;var pe=` // Component composition API (Phase 4)
971
1171
  defineProps: function(definitions) {
972
1172
  var props = window.__STX_CURRENT_PROPS__ || {};
973
1173
  if (!definitions) return props;
@@ -1023,7 +1223,7 @@ else {
1023
1223
  // implementation behind it (#1804).
1024
1224
  useSlots: function() {
1025
1225
  return window.__STX_CURRENT_SLOTS__ || {};
1026
- },`;var de=` var __bindIfCounter = 0;
1226
+ },`;var he=` var __bindIfCounter = 0;
1027
1227
  // \u2500\u2500 x-else / x-else-if chain support (stacksjs/stx#1734) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500
1028
1228
  // Returns { name, terminal } for an else/else-if attribute present on el,
1029
1229
  // or null. terminal=true for the catch-all x-else (no further siblings
@@ -1061,7 +1261,7 @@ else {
1061
1261
  }
1062
1262
  return chain;
1063
1263
  }
1064
- `;var ue=` // A false :if detaches its subtree before the DOMContentLoaded scope walk
1264
+ `;var fe=` // A false :if detaches its subtree before the DOMContentLoaded scope walk
1065
1265
  // reaches nested components. Capture and bind their caller-owned props while
1066
1266
  // the ancestor chain is still connected, otherwise resolveComponentCallerScope
1067
1267
  // can no longer see the component that declared expressions such as
@@ -1142,7 +1342,7 @@ else {
1142
1342
  }
1143
1343
  return scripts;
1144
1344
  }
1145
- `;var pe=` // ==========================================================================
1345
+ `;var me=` // ==========================================================================
1146
1346
  // Container Cleanup (for SPA navigation)
1147
1347
  // ==========================================================================
1148
1348
 
@@ -1183,7 +1383,7 @@ else {
1183
1383
  // querySelectorAll. Without this the registry grew every navigation (#1775).
1184
1384
  sweepOrphanedScopes();
1185
1385
  }
1186
- `;var he=` // Reactive cookie binding. Mirrors useLocalStorage's shape: returns a string-
1386
+ `;var ge=` // Reactive cookie binding. Mirrors useLocalStorage's shape: returns a string-
1187
1387
  // valued signal, writes on .set(), and respects cookie attributes via opts.
1188
1388
  // Setting the signal to '' deletes the cookie (max-age=0). Cookies don't fire
1189
1389
  // a 'storage' event, so cross-tab updates aren't auto-reflected; consumers
@@ -1238,7 +1438,7 @@ else {
1238
1438
  });
1239
1439
  return s;
1240
1440
  }
1241
- `;var fe=` // \u2500\u2500 Alert & Confirm dialogs \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500
1441
+ `;var ve=` // \u2500\u2500 Alert & Confirm dialogs \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500
1242
1442
  // Styled replacements for window.alert() and window.confirm().
1243
1443
  // Both return Promises and render into a temporary modal overlay.
1244
1444
 
@@ -1432,7 +1632,7 @@ else {
1432
1632
  function stxConfirm(message, options) {
1433
1633
  return _createDialog(message, options, true);
1434
1634
  }
1435
- `;var me=` // ==========================================================================
1635
+ `;var ye=` // ==========================================================================
1436
1636
  // DevTools introspection (stacksjs/stx#1747, Phase 1)
1437
1637
  // ==========================================================================
1438
1638
  // A read-only, console-usable inspector wired to the live runtime \u2014 no manual
@@ -1567,7 +1767,7 @@ else {
1567
1767
  return s ? __stxDevtoolsClassify(s) : null;
1568
1768
  },
1569
1769
  };
1570
- `;var ge=` // ==========================================================================
1770
+ `;var be=` // ==========================================================================
1571
1771
  // Auto-initialization
1572
1772
  // ==========================================================================
1573
1773
 
@@ -1878,7 +2078,7 @@ catch (e) {
1878
2078
  window.__stxDomReadyHandler = stxDomReadyHandler;
1879
2079
  console.log('[stx] registering DOMContentLoaded handler');
1880
2080
  document.addEventListener('DOMContentLoaded', stxDomReadyHandler);
1881
- `;var ve=` // \u2500\u2500 Drawer system \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500
2081
+ `;var we=` // \u2500\u2500 Drawer system \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500
1882
2082
  // Same pattern as modal but slides from a side
1883
2083
  var drawer = {
1884
2084
  open: function(id) {
@@ -1916,7 +2116,7 @@ catch (e) {
1916
2116
  else drawer.open(id);
1917
2117
  }
1918
2118
  };
1919
- `;var ye=` // ==========================================================================
2119
+ `;var _e=` // ==========================================================================
1920
2120
  // Effect
1921
2121
  // ==========================================================================
1922
2122
 
@@ -2058,8 +2258,19 @@ catch (e) { console.warn('[stx] dispose error:', e); } });
2058
2258
  return typeof v === 'function' && v._isDerived === true;
2059
2259
  }
2060
2260
 
2261
+ // Read a signal (or derived) without subscribing the effect running now: an
2262
+ // effect that calls untrack(count) does not run again when count changes.
2263
+ // Anything else is returned as it is.
2061
2264
  function untrack(v) {
2062
- return isSignal(v) || (typeof v === 'function' && v._isDerived) ? v() : v;
2265
+ if (!(isSignal(v) || (typeof v === 'function' && v._isDerived))) return v;
2266
+ const prev = activeEffect;
2267
+ activeEffect = null;
2268
+ try {
2269
+ return v();
2270
+ }
2271
+ finally {
2272
+ activeEffect = prev;
2273
+ }
2063
2274
  }
2064
2275
 
2065
2276
  function peek(fn) {
@@ -2072,7 +2283,7 @@ finally {
2072
2283
  activeEffect = prev;
2073
2284
  }
2074
2285
  }
2075
- `;var be=` // ==========================================================================
2286
+ `;var xe=` // ==========================================================================
2076
2287
  // Event Handler Shorthand (Feature #8)
2077
2288
  // ==========================================================================
2078
2289
 
@@ -2159,7 +2370,7 @@ finally {
2159
2370
 
2160
2371
  return null;
2161
2372
  }
2162
- `;var we=` // Compiled expression functions, by parameter list and body. A binding was
2373
+ `;var Se=` // Compiled expression functions, by parameter list and body. A binding was
2163
2374
  // compiled with new Function on every evaluation: a page with a few hundred
2164
2375
  // names in scope rebuilt a function of a few hundred parameters for every
2165
2376
  // binding of every row, every time a row re-rendered. Opening a 386-message
@@ -2217,7 +2428,7 @@ finally {
2217
2428
  for (let i = 0; i < keys.length; i++) args[i] = scope[keys[i]];
2218
2429
  return args;
2219
2430
  }
2220
- `;var _e=` let componentScope = { $refs: {} };
2431
+ `;var ke=` let componentScope = { $refs: {} };
2221
2432
 
2222
2433
  // Current element being processed (for scope lookup)
2223
2434
  let currentElement = null;
@@ -2283,7 +2494,7 @@ catch (e) {
2283
2494
  return '';
2284
2495
  }
2285
2496
  }
2286
- `;var xe=` // Short, ref-free repr of a value for the mutation log (so the buffer holds no
2497
+ `;var Ee=` // Short, ref-free repr of a value for the mutation log (so the buffer holds no
2287
2498
  // live references and big objects don't bloat it).
2288
2499
  function __stxShort(v) {
2289
2500
  try {
@@ -2498,12 +2709,12 @@ catch (e) {
2498
2709
  }
2499
2710
  throw e;
2500
2711
  }
2501
- }`;function Se(t,s){return` // ==========================================================================
2712
+ }`;function Te(e,a){return` // ==========================================================================
2502
2713
  // Declarative Data Fetching (Feature #6 - useFetch)
2503
2714
  // ==========================================================================
2504
2715
 
2505
- var readHydratedData = ${t};
2506
- var clearServerData = ${s};
2716
+ var readHydratedData = ${e};
2717
+ var clearServerData = ${a};
2507
2718
 
2508
2719
  function useFetch(urlOrFn, options = {}) {
2509
2720
  const hydrated = readHydratedData(options.key, options.hydrate !== false, options.transform);
@@ -2639,7 +2850,7 @@ else if (immediate) {
2639
2850
  get isEmpty() { return !loading() && !data(); }
2640
2851
  };
2641
2852
  }
2642
- `}var ke=` function bindFor(el, passedScope = componentScope, attrName = '@for') {
2853
+ `}var Ae=` function bindFor(el, passedScope = componentScope, attrName = '@for') {
2643
2854
  if (el.__stx_for_bound) return;
2644
2855
  el.__stx_for_bound = true;
2645
2856
  const expr = el.getAttribute(attrName);
@@ -3285,9 +3496,10 @@ catch (e) {
3285
3496
  if (tgIsGroup) parent.__stx_tg_init = true;
3286
3497
  });
3287
3498
  }
3288
- `;var Ee=` // Also expose globally for convenience
3499
+ `;var Ce=` // Also expose globally for convenience
3289
3500
  window.state = state;
3290
3501
  window.derived = derived;
3502
+ window.memo = memo;
3291
3503
  window.effect = effect;
3292
3504
  window.batch = batch;
3293
3505
  window.onMount = onMount;
@@ -3328,6 +3540,7 @@ catch (e) {
3328
3540
  window.setKeptScope = setKeptScope;
3329
3541
  window.flushKeptState = flushKeptState;
3330
3542
  window.cachedQuery = cachedQuery;
3543
+ window.sharedRequest = sharedRequest;
3331
3544
  window.useEventListener = useEventListener;
3332
3545
  window.useWebSocket = useWebSocket;
3333
3546
  window.useColorMode = useColorMode;
@@ -3344,13 +3557,13 @@ catch (e) {
3344
3557
  window.ref = state;
3345
3558
  window.reactive = reactive;
3346
3559
  window.computed = derived;
3347
- window.watch = $watch;
3560
+ window.watch = watch;
3348
3561
  window.watchEffect = function(fn) { return effect(fn); };
3349
3562
 
3350
3563
  // Note: SPA Router and View Transitions CSS are provided by the canonical
3351
3564
  // router script (packages/router/src/client.ts) which is injected alongside
3352
3565
  // the signals runtime or via the @stxRouter directive.
3353
- `;var Te=` function expressionUsesSignalApi(expression, name) {
3566
+ `;var Ie=` function expressionUsesSignalApi(expression, name) {
3354
3567
  var escapedName = name.replace(/[-/\\\\^$*+?.()|[\\]{}]/g, '\\\\$&');
3355
3568
  return expressionUsesSignalMethod(expression, name)
3356
3569
  || expressionUsesSignalValue(expression, name);
@@ -3429,7 +3642,7 @@ catch (e) {
3429
3642
  console.warn('[STX] Handler error:', expr, e);
3430
3643
  }
3431
3644
  }
3432
- `;var Ae=` // ==========================================================================
3645
+ `;var Re=` // ==========================================================================
3433
3646
  // Client-side useHead / useSeoMeta
3434
3647
  // ==========================================================================
3435
3648
 
@@ -3520,7 +3733,7 @@ catch (e) {
3520
3733
  if (config.canonical) meta.push({ property: 'og:url', content: config.canonical });
3521
3734
  useHead({ title: config.title || config.ogTitle, meta: meta });
3522
3735
  }
3523
- `;var Ce=` // ==========================================================================
3736
+ `;var Oe=` // ==========================================================================
3524
3737
  // Global Helpers (Feature #5)
3525
3738
  // ==========================================================================
3526
3739
 
@@ -3649,7 +3862,7 @@ catch (e) {
3649
3862
  const deps = depsMap.get(key);
3650
3863
  if (deps) notifySubscribers(deps);
3651
3864
  }
3652
- `;var Ie=` // \u2500\u2500 Host \u2500\u2500
3865
+ `;var Me=` // \u2500\u2500 Host \u2500\u2500
3653
3866
  //
3654
3867
  // The tree this runtime mutates. Every write the binding layer makes to a
3655
3868
  // node goes through here, so the same runtime can drive something that is not
@@ -3780,7 +3993,7 @@ catch (e) {
3780
3993
  return ids;
3781
3994
  }
3782
3995
  };
3783
- `;var Re=` // Hydrate a subtree inserted AFTER initial load \u2014 e.g. a streamed suspense
3996
+ `;var De=` // Hydrate a subtree inserted AFTER initial load \u2014 e.g. a streamed suspense
3784
3997
  // boundary (#1746 Phase 3). Mirrors the SPA re-init pass, scoped to the
3785
3998
  // container: (1) executes the subtree's scoped setup scripts (inert when
3786
3999
  // inserted via innerHTML, so they're cloned into fresh script elements to
@@ -3831,7 +4044,7 @@ catch (e) {
3831
4044
  }
3832
4045
  window.dispatchEvent(new CustomEvent('stx:hydrated', { detail: { el: container, trigger: 'stream' } }));
3833
4046
  }
3834
- `;var Oe=` // ==========================================================================
4047
+ `;var Pe=` // ==========================================================================
3835
4048
  // Post-hydration invariant sweep (stacksjs/stx#1773)
3836
4049
  // ==========================================================================
3837
4050
  //
@@ -4039,7 +4252,7 @@ catch (e) {
4039
4252
  _exprFailureCount = 0;
4040
4253
  }
4041
4254
  }
4042
- `;var Me=` // Reactive if/else-if/else chain. A single effect drives mutual exclusion:
4255
+ `;var Le=` // Reactive if/else-if/else chain. A single effect drives mutual exclusion:
4043
4256
  // on each run it picks the first branch whose condition is truthy (the
4044
4257
  // trailing x-else always matches), inserts that branch, and removes
4045
4258
  // whichever branch was previously shown. One effect for the whole chain
@@ -4321,7 +4534,7 @@ catch (e) { /* a disposer of its own is not this branch's problem */ }
4321
4534
  // Shown branches whose deferred bind found them off the page: an enclosing
4322
4535
  // :if, bound later in the same pass, hid them between the queue and the run.
4323
4536
  // Their own condition has not changed, so their effect never runs again to
4324
- // retry; each resumes here when an enclosing branch puts it back.`;var De=` const detachedBranches = new Set();
4537
+ // retry; each resumes here when an enclosing branch puts it back.`;var Fe=` const detachedBranches = new Set();
4325
4538
  function resumeDetachedBranches() {
4326
4539
  if (!detachedBranches.size) return;
4327
4540
  Array.from(detachedBranches).forEach(function(resume) {
@@ -4666,7 +4879,12 @@ else if (!value && isInserted) {
4666
4879
  }
4667
4880
  });
4668
4881
  }
4669
- `;function Pe(t,s,i,a){return` // A value kept between visits, for a phone app between launches: the tab a
4882
+ `;function je(e,a,i,o,u){return` // One request for every caller that wants the same answer: run joins one
4883
+ // in flight, fresh waits one out and asks again, latest replaces a request
4884
+ // counter. See shared-request.ts; cached queries are built on it.
4885
+ var sharedRequest = (${u});
4886
+
4887
+ // A value kept between visits, for a phone app between launches: the tab a
4670
4888
  // user opens right after starting the app draws last time's data at once
4671
4889
  // and the fresh answer replaces it. Kept under stx:kept:, in a scope such as
4672
4890
  // the signed-in account, so one person's data is never shown to another. A
@@ -4680,8 +4898,8 @@ else if (!value && isInserted) {
4680
4898
  // off the critical path and read back asynchronously. Values kept before it
4681
4899
  // are read where they are.
4682
4900
  var STX_KEPT_PREFIX = 'stx:kept:';
4683
- var __stxKept = (${t})(undefined, ${s});
4684
- var __stxQueries = (${i})({ state: state, kept: __stxKept, prefix: STX_KEPT_PREFIX, matches: ${a} });
4901
+ var __stxKept = (${e})(undefined, ${a});
4902
+ var __stxQueries = (${i})({ state: state, kept: __stxKept, prefix: STX_KEPT_PREFIX, matches: ${o}, sharedRequest: sharedRequest });
4685
4903
  function stxKeptPrefix(scope) {
4686
4904
  return STX_KEPT_PREFIX + (scope === undefined || scope === null || scope === '' ? '' : String(scope) + ':');
4687
4905
  }
@@ -4725,7 +4943,7 @@ else if (!value && isInserted) {
4725
4943
  function cachedQuery(key, options) {
4726
4944
  return __stxQueries.cachedQuery(key, options);
4727
4945
  }
4728
- `}var Le=` // Lazy hydration: defer processElement for subtrees marked with stx-hydrate.
4946
+ `}var Ve=` // Lazy hydration: defer processElement for subtrees marked with stx-hydrate.
4729
4947
  // Triggers: "visible" (IntersectionObserver), "idle" (requestIdleCallback),
4730
4948
  // "interaction" (mouseenter/click/focus), "media:<query>" (matchMedia).
4731
4949
  function deferHydration(el, trigger, scope) {
@@ -4857,7 +5075,7 @@ else if (!value && isInserted) {
4857
5075
  run();
4858
5076
  }
4859
5077
  }
4860
- `;var Fe=` // ==========================================================================
5078
+ `;var He=` // ==========================================================================
4861
5079
  // Lifecycle
4862
5080
  // ==========================================================================
4863
5081
 
@@ -4970,7 +5188,7 @@ else if (!value && isInserted) {
4970
5188
  // Drain any early mount/destroy calls captured by the pre-initialization shim
4971
5189
  if (window.__stx_early_mounts) { window.__stx_early_mounts.forEach(function(fn) { mountCallbacks.push(fn); }); window.__stx_early_mounts = null; }
4972
5190
  if (window.__stx_early_destroys) { window.__stx_early_destroys.forEach(function(fn) { destroyCallbacks.push(fn); }); window.__stx_early_destroys = null; }
4973
- `;var He=` var __forComponentScopeCounter = 0;
5191
+ `;var Ue=` var __forComponentScopeCounter = 0;
4974
5192
  var __forComponentSetupFactories = new Map();
4975
5193
 
4976
5194
  function forEachGroupElement(nodes, callback) {
@@ -5035,7 +5253,7 @@ else if (!value && isInserted) {
5035
5253
  }
5036
5254
  });
5037
5255
  }
5038
- `;var Ve=` // A :for row is a clone of its template, so a conditional element in the row
5256
+ `;var qe=` // A :for row is a clone of its template, so a conditional element in the row
5039
5257
  // is built for every row whether or not its condition ever holds; :if then
5040
5258
  // parks the false ones. In WebKit a <video> or <audio> sets up a media player
5041
5259
  // as it is created: a message list with one media slot per attachment took
@@ -5082,7 +5300,7 @@ else if (!value && isInserted) {
5082
5300
  holder.content.appendChild(el);
5083
5301
  }
5084
5302
  }
5085
- `;var Ue=` // A loop row binds in its own iteration scope, and only its loop puts it
5303
+ `;var Be=` // A loop row binds in its own iteration scope, and only its loop puts it
5086
5304
  // there. A walk from further out (an enclosing :if hydrating the branch it
5087
5305
  // shows) carries no item, so it used to bind whatever in the row was still
5088
5306
  // unbound -- a conditional's children, waiting for their own deferred pass
@@ -5122,7 +5340,7 @@ else if (!value && isInserted) {
5122
5340
  }
5123
5341
  return now;
5124
5342
  }
5125
- `;var je=` /**
5343
+ `;var Ke=` /**
5126
5344
  * Bind what the server said carries a binding, instead of looking for it.
5127
5345
  *
5128
5346
  * The walk exists because the runtime does not know where the bindings are.
@@ -5203,7 +5421,7 @@ else if (!value && isInserted) {
5203
5421
  }
5204
5422
  };
5205
5423
  }
5206
- `;var qe=` function bindModel(el, expr, passedScope = componentScope, attrName = '@model') {
5424
+ `;var Ge=` function bindModel(el, expr, passedScope = componentScope, attrName = '@model') {
5207
5425
  if (el.__stx_model_bound) return;
5208
5426
  el.__stx_model_bound = true;
5209
5427
  const tag = el.tagName.toLowerCase();
@@ -5358,7 +5576,7 @@ else {
5358
5576
 
5359
5577
  el.removeAttribute(attrName);
5360
5578
  }
5361
- `;var Be=` mountEl: function(selector, setupFn) {
5579
+ `;var $e=` mountEl: function(selector, setupFn) {
5362
5580
  function doMount() {
5363
5581
  var root = document.querySelector(selector);
5364
5582
  if (!root) { console.warn('[stx] mountEl: element not found:', selector); return; }
@@ -5588,7 +5806,7 @@ else {
5588
5806
  else {
5589
5807
  doMount();
5590
5808
  }
5591
- }`;var Ge=` // ==========================================================================
5809
+ }`;var We=` // ==========================================================================
5592
5810
  // Navigation API
5593
5811
  // ==========================================================================
5594
5812
 
@@ -5785,7 +6003,7 @@ else {
5785
6003
  }
5786
6004
  };
5787
6005
  }
5788
- `;var Ke=` // ==========================================================================
6006
+ `;var ze=` // ==========================================================================
5789
6007
  // Optimistic State (useOptimistic) \u2014 stacksjs/stx#1742
5790
6008
  // ==========================================================================
5791
6009
  // Mirrors signals-api.ts useOptimistic. Shows base + pending actions while an
@@ -5818,7 +6036,7 @@ else {
5818
6036
  }
5819
6037
  return [optimistic, addOptimistic];
5820
6038
  }
5821
- `;var $e=` // \u2500\u2500 Overlay stack \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500
6039
+ `;var Xe=` // \u2500\u2500 Overlay stack \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500
5822
6040
  //
5823
6041
  // One stack for everything that takes over the page: stxAlert/stxConfirm,
5824
6042
  // the runtime modal and drawer, @stacksjs/components' Dialog and Drawer, and
@@ -6169,7 +6387,7 @@ else {
6169
6387
  else modal.open(id);
6170
6388
  }
6171
6389
  };
6172
- `;var ze=` // ==========================================================================
6390
+ `;var Qe=` // ==========================================================================
6173
6391
  // Advanced Data Fetching (useQuery / useMutation)
6174
6392
  // ==========================================================================
6175
6393
 
@@ -6519,7 +6737,7 @@ finally {
6519
6737
  reset: function() { data.set(null); error.set(null); loading.set(false); }
6520
6738
  };
6521
6739
  }
6522
- `;var We=` // ==========================================================================
6740
+ `;var Ye=` // ==========================================================================
6523
6741
  // Notify
6524
6742
  // ==========================================================================
6525
6743
 
@@ -6544,16 +6762,16 @@ finally {
6544
6762
  collectSubscribers(subscribers, reached);
6545
6763
  reached.forEach(function(e) { e(); });
6546
6764
  }
6547
- `;function Xe(t,s,i){return`${t} // ==========================================================================
6765
+ `;function Je(e,a,i){return`${e} // ==========================================================================
6548
6766
  // Reactive Core
6549
6767
  // ==========================================================================
6550
6768
 
6551
- ${s}
6769
+ ${a}
6552
6770
  let activeEffect = null;
6553
6771
  const effectStack = [];
6554
6772
  const pendingEffects = new Set();
6555
6773
  let isBatching = false;
6556
- ${We}
6774
+ ${Ye}
6557
6775
 
6558
6776
  // DevTools Phase 2 (#1747): dev-mode reactivity instrumentation. OFF by
6559
6777
  // default \u2014 even in the dev runtime \u2014 so set()/effect-run stay zero-overhead
@@ -6572,7 +6790,7 @@ ${We}
6572
6790
  function __stxDevtoolsRecordQuery(rec) { if (!__stxDevtoolsTracking) return; __stxDevtoolsQueries.push(rec); if (__stxDevtoolsQueries.length > 100) __stxDevtoolsQueries.shift(); }
6573
6791
  ${i}
6574
6792
  let activeDisposers = null; // Array | null \u2014 when non-null, effects auto-register their dispose fn
6575
- const targetMap = new WeakMap();`}var Qe=` // Vue-compat aliases
6793
+ const targetMap = new WeakMap();`}var Ze=` // Vue-compat aliases
6576
6794
  var ref = state;
6577
6795
 
6578
6796
  // reactive() used to be a bare alias of state(), which made it the most
@@ -6637,8 +6855,7 @@ ${i}
6637
6855
  return proxy;
6638
6856
  }
6639
6857
  var computed = derived;
6640
- var watch = $watch;
6641
- var watchEffect = function(fn) { return effect(fn); };`;var Ye=` // ==========================================================================
6858
+ var watchEffect = function(fn) { return effect(fn); };`;var et=` // ==========================================================================
6642
6859
  // Pipe Syntax Support (Feature #2)
6643
6860
  // ==========================================================================
6644
6861
 
@@ -6814,7 +7031,7 @@ else {
6814
7031
 
6815
7032
  return value;
6816
7033
  }
6817
- `;function Je(t,s,i){return` // skipChildren: this element's bindings only, because something else already
7034
+ `;function tt(e,a,i){return` // skipChildren: this element's bindings only, because something else already
6818
7035
  // knows where the rest are. The manifest path passes it for every entry, so
6819
7036
  // the tree is never walked; see processFromManifest.
6820
7037
  function processElement(el, scope = componentScope, skipChildren) {
@@ -7084,7 +7301,7 @@ catch (e2) {
7084
7301
  };
7085
7302
 
7086
7303
  // Known directive names to exclude from generic :attr binding
7087
- var DIRECTIVE_NAMES = ${t};
7304
+ var DIRECTIVE_NAMES = ${e};
7088
7305
 
7089
7306
  // A bound value cannot introduce a URL scheme the page did not ask for.
7090
7307
  // This is the client half of url-safety.ts: the server refuses a scheme
@@ -7119,7 +7336,7 @@ catch (e2) {
7119
7336
  // a dead duplicate attribute and the real viewBox never updates.
7120
7337
  var SVG_ATTR_CASE = {attributename:'attributeName', attributetype:'attributeType', basefrequency:'baseFrequency', baseprofile:'baseProfile', calcmode:'calcMode', clippathunits:'clipPathUnits', diffuseconstant:'diffuseConstant', edgemode:'edgeMode', filterunits:'filterUnits', glyphref:'glyphRef', gradienttransform:'gradientTransform', gradientunits:'gradientUnits', kernelmatrix:'kernelMatrix', kernelunitlength:'kernelUnitLength', keypoints:'keyPoints', keysplines:'keySplines', keytimes:'keyTimes', lengthadjust:'lengthAdjust', limitingconeangle:'limitingConeAngle', markerheight:'markerHeight', markerunits:'markerUnits', markerwidth:'markerWidth', maskcontentunits:'maskContentUnits', maskunits:'maskUnits', numoctaves:'numOctaves', pathlength:'pathLength', patterncontentunits:'patternContentUnits', patterntransform:'patternTransform', patternunits:'patternUnits', pointsatx:'pointsAtX', pointsaty:'pointsAtY', pointsatz:'pointsAtZ', preservealpha:'preserveAlpha', preserveaspectratio:'preserveAspectRatio', primitiveunits:'primitiveUnits', refx:'refX', refy:'refY', repeatcount:'repeatCount', repeatdur:'repeatDur', requiredextensions:'requiredExtensions', requiredfeatures:'requiredFeatures', specularconstant:'specularConstant', specularexponent:'specularExponent', spreadmethod:'spreadMethod', startoffset:'startOffset', stddeviation:'stdDeviation', stitchtiles:'stitchTiles', surfacescale:'surfaceScale', systemlanguage:'systemLanguage', tablevalues:'tableValues', targetx:'targetX', targety:'targetY', textlength:'textLength', viewbox:'viewBox', viewtarget:'viewTarget', xchannelselector:'xChannelSelector', ychannelselector:'yChannelSelector', zoomandpan:'zoomAndPan'};
7121
7338
  var SVG_NS = 'http://www.w3.org/2000/svg';
7122
- var EVENT_RE = ${s};
7339
+ var EVENT_RE = ${a};
7123
7340
  var KEY_MAP = {enter:'Enter', tab:'Tab', escape:'Escape', space:' ', up:'ArrowUp', down:'ArrowDown', left:'ArrowLeft', right:'ArrowRight', 'delete':'Delete', backspace:'Backspace'};
7124
7341
 
7125
7342
  // Handle attributes
@@ -7511,7 +7728,7 @@ catch (e) {
7511
7728
  processElement(child, scope);
7512
7729
  });
7513
7730
  }
7514
- }`}var Ze=` // ==========================================================================
7731
+ }`}var nt=` // ==========================================================================
7515
7732
  // Auto-unwrap Signals (Feature #1)
7516
7733
  // ==========================================================================
7517
7734
 
@@ -7588,7 +7805,7 @@ catch (e) {
7588
7805
  },
7589
7806
  });
7590
7807
  }
7591
- `;function et(t){return` // Component mount system
7808
+ `;function rt(e){return` // Component mount system
7592
7809
  var mountQueue = [];
7593
7810
 
7594
7811
  // MERGE, never replace (#1804). Three client bundles assign window.stx and
@@ -7601,6 +7818,7 @@ catch (e) {
7601
7818
  hydrateHost,
7602
7819
  state,
7603
7820
  derived,
7821
+ memo,
7604
7822
  effect,
7605
7823
  batch,
7606
7824
  isSignal,
@@ -7662,6 +7880,7 @@ catch (e) {
7662
7880
  setKeptScope,
7663
7881
  flushKeptState,
7664
7882
  cachedQuery,
7883
+ sharedRequest,
7665
7884
  useCookie,
7666
7885
  useId,
7667
7886
  useReactiveProp,
@@ -7693,7 +7912,7 @@ catch (e) {
7693
7912
  confirm: stxConfirm,
7694
7913
  helpers: globalHelpers,
7695
7914
 
7696
- ${t}
7915
+ ${e}
7697
7916
 
7698
7917
  _mountCallbacks: mountCallbacks,
7699
7918
  _destroyCallbacks: destroyCallbacks,
@@ -7705,7 +7924,7 @@ ${t}
7705
7924
  _scopes: {}, // Component-level scopes
7706
7925
  _scopeCounter: 0, // Counter for generating unique scope IDs during SPA navigation
7707
7926
  _latestSetup: window.__stx_latestSetup || null, // Latest SFC setup function (including scripts parsed before the runtime)
7708
- _stores: new Map(), // Global store registry \u2014 survives SPA navigation`}var tt=` // ==========================================================================
7927
+ _stores: new Map(), // Global store registry \u2014 survives SPA navigation`}var ot=` // ==========================================================================
7709
7928
  // Template Refs (useRef)
7710
7929
  // ==========================================================================
7711
7930
 
@@ -7737,7 +7956,7 @@ ${t}
7737
7956
  Object.defineProperty(read, 'value', { get: read, enumerable: true });
7738
7957
  return read;
7739
7958
  }
7740
- `;var nt=` // ==========================================================================
7959
+ `;var st=` // ==========================================================================
7741
7960
  // Scope Disposal
7742
7961
  // ==========================================================================
7743
7962
 
@@ -7931,7 +8150,7 @@ ${t}
7931
8150
  delete scopes[id];
7932
8151
  }
7933
8152
  }
7934
- `;var rt=` // Helper to process elements while skipping already-processed scoped containers
8153
+ `;var at=` // Helper to process elements while skipping already-processed scoped containers
7935
8154
  function processElementSkipScopes(el, processedScopes) {
7936
8155
  if (processedScopes.has(el)) return;
7937
8156
  if (el.nodeType === Node.TEXT_NODE) {
@@ -7972,7 +8191,7 @@ ${t}
7972
8191
  if (el.tagName !== 'SCRIPT' && el.tagName !== 'STYLE') {
7973
8192
  Array.from(el.childNodes).forEach(child => processElementSkipScopes(child, processedScopes));
7974
8193
  }
7975
- }`;var ot=` function bindShow(el, expr, passedScope = componentScope, attrName = '@show') {
8194
+ }`;var it=` function bindShow(el, expr, passedScope = componentScope, attrName = '@show') {
7976
8195
  if (el.__stx_show_bound) return;
7977
8196
  el.__stx_show_bound = true;
7978
8197
 
@@ -8025,7 +8244,7 @@ ${t}
8025
8244
  }
8026
8245
  el.removeAttribute(attrName);
8027
8246
  }
8028
- `;var st=` // Re-initialize components after SPA content swap.
8247
+ `;var lt=` // Re-initialize components after SPA content swap.
8029
8248
  // Debounce to handle rapid re-fires (HMR triggers navigate which triggers stx:load again).
8030
8249
  var _stxLoadTimer = null;
8031
8250
  if (window.__stxLoadHandler) {
@@ -8066,7 +8285,7 @@ ${t}
8066
8285
  var departingDestroys = null;
8067
8286
  function beginSwap() {
8068
8287
  departingDestroys = (departingDestroys || []).concat(destroyCallbacks.splice(0));
8069
- }`;var at=` function _handleStxLoad() {
8288
+ }`;var ct=` function _handleStxLoad() {
8070
8289
  _stxLoadTimer = null;
8071
8290
  console.log('[stx:load] START. mountQueue:', mountQueue.length, '_latestSetup:', !!window.stx._latestSetup);
8072
8291
 
@@ -8252,7 +8471,7 @@ catch (e) { console.warn('[stx] destroy callback error:', e); }
8252
8471
  // Everything that should have hydrated has now had its chance (#1773).
8253
8472
  auditHydration(container, 'stx:load');
8254
8473
  }
8255
- `;var it=` // ==========================================================================
8474
+ `;var dt=` // ==========================================================================
8256
8475
  // State Signal
8257
8476
  // ==========================================================================
8258
8477
 
@@ -8320,42 +8539,69 @@ catch (e) { console.warn('[stx] destroy callback error:', e); }
8320
8539
  // Derived Signal
8321
8540
  // ==========================================================================
8322
8541
 
8323
- function derived(compute) {
8542
+ // derived(compute, { equals }): with equals, a change upstream recomputes
8543
+ // the value at once (when anything reads it) and passes the change on only
8544
+ // when equals(previous, next) is false, so an effect over
8545
+ // derived(() => user().id) does not run again for a new user object with the
8546
+ // same id. Without it the value is lazy and every upstream change is passed
8547
+ // on, as before. memo(compute, equals) is the short form.
8548
+ function derived(compute, options) {
8324
8549
  let cached;
8325
8550
  let isDirty = true;
8551
+ let hasValue = false;
8326
8552
  const effects = new Set();
8553
+ const equals = options && typeof options.equals === 'function' ? options.equals : null;
8554
+
8555
+ function recompute() {
8556
+ const prev = activeEffect;
8557
+ activeEffect = markDirty;
8558
+ effectStack.push(markDirty);
8559
+ try {
8560
+ cached = compute();
8561
+ hasValue = true;
8562
+ }
8563
+ finally {
8564
+ effectStack.pop();
8565
+ activeEffect = prev;
8566
+ }
8567
+ isDirty = false;
8568
+ }
8569
+
8570
+ // Recompute now and say whether the value changed. A compute that throws
8571
+ // counts as a change: the reader recomputes and sees the error.
8572
+ function changedNow() {
8573
+ const before = cached;
8574
+ const had = hasValue;
8575
+ try { recompute(); }
8576
+ catch (e) { isDirty = true; return true; }
8577
+ return !had || !equals(before, cached);
8578
+ }
8327
8579
 
8328
8580
  // Passes a change on to what read this value. A signal's notification
8329
8581
  // collects through it (_stxCollect) instead of calling it, so an effect
8330
8582
  // reached both directly and through here still runs once.
8331
8583
  const markDirty = () => {
8332
- if (!isDirty) {
8333
- isDirty = true;
8334
- notifySubscribers(effects);
8584
+ if (isDirty) return;
8585
+ if (equals && effects.size) {
8586
+ if (changedNow()) notifySubscribers(effects);
8587
+ return;
8335
8588
  }
8589
+ isDirty = true;
8590
+ notifySubscribers(effects);
8336
8591
  };
8337
8592
  markDirty._stxCollect = (into) => {
8338
- if (!isDirty) {
8339
- isDirty = true;
8340
- collectSubscribers(effects, into);
8593
+ if (isDirty) return;
8594
+ if (equals && effects.size) {
8595
+ if (changedNow()) collectSubscribers(effects, into);
8596
+ return;
8341
8597
  }
8598
+ isDirty = true;
8599
+ collectSubscribers(effects, into);
8342
8600
  };
8343
8601
 
8344
8602
  const signal = () => {
8345
8603
  if (activeEffect) effects.add(activeEffect);
8346
- if (isDirty) {
8347
- const prev = activeEffect;
8348
- activeEffect = markDirty;
8349
- effectStack.push(markDirty);
8350
- try {
8351
- cached = compute();
8352
- }
8353
- finally {
8354
- effectStack.pop();
8355
- activeEffect = prev;
8356
- }
8357
- isDirty = false;
8358
- }
8604
+ if (isDirty) recompute();
8359
8605
  return cached;
8360
8606
  };
8361
8607
 
@@ -8370,7 +8616,13 @@ finally {
8370
8616
 
8371
8617
  return signal;
8372
8618
  }
8373
- `;var lt=` // \u2500\u2500 Store System \u2500\u2500
8619
+
8620
+ // A derived value that passes a change on only when it is a different value
8621
+ // (Object.is, or the equals given).
8622
+ function memo(compute, equals) {
8623
+ return derived(compute, { equals: typeof equals === 'function' ? equals : Object.is });
8624
+ }
8625
+ `;var ut=` // \u2500\u2500 Store System \u2500\u2500
8374
8626
  // Pinia-inspired, signals-based. Stores survive SPA navigation.
8375
8627
 
8376
8628
  defineStore: function(id, setupOrOptions, storeOptions) {
@@ -8830,7 +9082,7 @@ finally {
8830
9082
  }
8831
9083
  console.log('[stx:store] useStore:', id);
8832
9084
  return store;
8833
- },`;var ct=` // Storage access is guarded end to end (stacksjs/stx#1793). Every one of
9085
+ },`;var pt=` // Storage access is guarded end to end (stacksjs/stx#1793). Every one of
8834
9086
  // these can throw, and each throw took down the whole client script for the
8835
9087
  // page rather than just the composable:
8836
9088
  //
@@ -8908,7 +9160,7 @@ finally {
8908
9160
  window.addEventListener('storage', handler);
8909
9161
  onDestroy(function() { window.removeEventListener('storage', handler); });
8910
9162
  return s;
8911
- }`;var dt=` function bindStyle(el, expr, passedScope = componentScope, isVisible) {
9163
+ }`;var ht=` function bindStyle(el, expr, passedScope = componentScope, isVisible) {
8912
9164
  // Capture scope at setup time - use passed scope to preserve context
8913
9165
  const capturedScope = { ...globalHelpers, ...passedScope, ...(findElementScope(el) || {}) };
8914
9166
 
@@ -8942,7 +9194,7 @@ catch (e2) {
8942
9194
  stxHost.setStyle(el, value);
8943
9195
  });
8944
9196
  }
8945
- `;var ut=` // <Suspense> boundary (#1742). Aggregates the loading/error state of every
9197
+ `;var ft=` // <Suspense> boundary (#1742). Aggregates the loading/error state of every
8946
9198
  // descendant suspense query (useQuery/useFetch with { suspense: true }) for
8947
9199
  // which this is the nearest [data-stx-suspense] ancestor, and toggles three
8948
9200
  // regions accordingly: [data-stx-suspense-fallback] while any query is loading,
@@ -9000,7 +9252,7 @@ catch (e2) {
9000
9252
  var contentRoot = (contentEl === el) ? el : contentEl;
9001
9253
  Array.from(contentRoot.childNodes).forEach(function(child) { processElement(child, scope); });
9002
9254
  }
9003
- `;var pt=` // ==========================================================================
9255
+ `;var mt=` // ==========================================================================
9004
9256
  // Timer & Utility Composables
9005
9257
  // ==========================================================================
9006
9258
 
@@ -9377,7 +9629,7 @@ else if (timer === null) {
9377
9629
  }
9378
9630
  };
9379
9631
  }
9380
- `;var ht=` // \u2500\u2500 Tooltip runtime \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500
9632
+ `;var gt=` // \u2500\u2500 Tooltip runtime \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500
9381
9633
  (function() {
9382
9634
  var tip = null;
9383
9635
  function createTip() {
@@ -9416,7 +9668,7 @@ else if (timer === null) {
9416
9668
  document.addEventListener('focusin', function(e) { var el = e.target.closest('[x-tooltip]'); if (el) show(el); });
9417
9669
  document.addEventListener('focusout', function(e) { var el = e.target.closest('[x-tooltip]'); if (el) hide(); });
9418
9670
  })();
9419
- `;var ft=` // ==========================================================================
9671
+ `;var vt=` // ==========================================================================
9420
9672
  // Toast notification system
9421
9673
  // ==========================================================================
9422
9674
 
@@ -9621,7 +9873,7 @@ else if (timer === null) {
9621
9873
  removeToast(tid);
9622
9874
  }
9623
9875
  }
9624
- };`;var mt=` // \u2500\u2500 <TransitionGroup> support (#1742) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500
9876
+ };`;var yt=` // \u2500\u2500 <TransitionGroup> support (#1742) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500
9625
9877
  // Class-driven enter/leave + FLIP move animations for keyed :for lists whose
9626
9878
  // parent is a [data-stx-transition-group]. All helpers are self-contained and
9627
9879
  // guarded (no-ops off the happy path), and every transition has a timeout
@@ -9712,7 +9964,7 @@ else if (timer === null) {
9712
9964
  });
9713
9965
  });
9714
9966
  }
9715
- `;var gt=` // ==========================================================================
9967
+ `;var bt=` // ==========================================================================
9716
9968
  // WebSocket Composable
9717
9969
  // ==========================================================================
9718
9970
 
@@ -9849,83 +10101,83 @@ else if (timer === null) {
9849
10101
  subscribe: subscribe
9850
10102
  };
9851
10103
  }
9852
- `;function Ne(){let t=wt(Yt());try{let i=new Bun.Transpiler({loader:"js",minifyWhitespace:!0}).transformSync(t);return i=i.replace(/\}(var |let |const |function )/g,"};$1"),i}catch{return t}}function wt(t){let s=[],i=0,a="console.log(";while(i<t.length){let c=t.indexOf(a,i);if(c===-1){s.push(t.slice(i));break}s.push(t.slice(i,c));let y=1,h=c+a.length;while(h<t.length&&y>0){let f=t[h];if(f==='"'||f==="'"||f==="`"){let d=f;h++;while(h<t.length&&t[h]!==d){if(t[h]==="\\")h++;h++}h++;continue}if(f==="(")y++;else if(f===")")y--;h++}s.push("0"),i=h}return s.join("")}function Yt(){return`${re}${Ie}
9853
- ${Xe(oe,we,xe)}
10104
+ `;function Ne(){let e=xt(Yt());try{let i=new Bun.Transpiler({loader:"js",minifyWhitespace:!0}).transformSync(e);return i=i.replace(/\}(var |let |const |function )/g,"};$1"),i}catch{return e}}function xt(e){let a=[],i=0,o="console.log(";while(i<e.length){let u=e.indexOf(o,i);if(u===-1){a.push(e.slice(i));break}a.push(e.slice(i,u));let y=1,s=u+o.length;while(s<e.length&&y>0){let h=e[s];if(h==='"'||h==="'"||h==="`"){let r=h;s++;while(s<e.length&&e[s]!==r){if(e[s]==="\\")s++;s++}s++;continue}if(h==="(")y++;else if(h===")")y--;s++}a.push("0"),i=s}return a.join("")}function Yt(){return`${ae}${Me}
10105
+ ${Je(ie,Se,Ee)}
9854
10106
 
9855
- ${Ce}
9856
- ${Ze}
9857
- ${Ye}
9858
- ${it}
9859
- ${ye}
9860
- ${Fe}
9861
- ${gt}
9862
- ${Se(z.toString(),X.toString())}
9863
- ${tt}
9864
- ${Ge}
10107
+ ${Oe}
10108
+ ${nt}
10109
+ ${et}
10110
+ ${dt}
10111
+ ${_e}
10112
+ ${He}
10113
+ ${bt}
10114
+ ${Te(Q.toString(),Y.toString())}
10115
+ ${ot}
10116
+ ${We}
10117
+ ${Qe}
9865
10118
  ${ze}
9866
- ${Ke}
9867
10119
  // ==========================================================================
9868
10120
  // Template Binding
9869
10121
  // ==========================================================================
9870
10122
 
9871
- ${_e}
9872
- ${be}
9873
- ${Te}
9874
- ${Le}
9875
- ${ne}
9876
- ${ie}
9877
- ${ue}
9878
- ${je}
9879
- ${Je(qi(),Gi(),Wi())}
9880
-
9881
- ${ut}
9882
- ${ot}
9883
- ${qe}
9884
- ${se}
9885
- ${dt}
9886
- ${mt}
9887
- ${He}
9888
- ${le}
9889
- ${Ue}
9890
10123
  ${ke}
10124
+ ${xe}
10125
+ ${Ie}
9891
10126
  ${Ve}
10127
+ ${se}
9892
10128
  ${de}
9893
- ${Me}
9894
- ${De}
9895
- ${ae}
9896
- ${pt}
9897
- ${ee}
9898
- ${Qe}
9899
-
9900
- ${ct}
10129
+ ${fe}
10130
+ ${Ke}
10131
+ ${tt(qi(),Gi(),Wi())}
9901
10132
 
9902
- ${Pe(Y.toString(),Q.toString(),Z.toString(),J.toString())}
9903
- ${he}
9904
- ${te(K.toString())}
9905
- ${Ae}
9906
10133
  ${ft}
9907
-
9908
- ${$e}
9909
- ${fe}
9910
- ${ve}
10134
+ ${it}
10135
+ ${Ge}
10136
+ ${le}
9911
10137
  ${ht}
10138
+ ${yt}
10139
+ ${Ue}
10140
+ ${ue}
10141
+ ${Be}
10142
+ ${Ae}
10143
+ ${qe}
10144
+ ${he}
10145
+ ${Le}
10146
+ ${Fe}
10147
+ ${ce}
10148
+ ${mt}
10149
+ ${re}
10150
+ ${Ze}
10151
+
10152
+ ${pt}
10153
+
10154
+ ${je(Z.toString(),J.toString(),te.toString(),ee.toString(),ne.toString())}
10155
+ ${ge}
10156
+ ${oe(X.toString())}
9912
10157
  ${Re}
9913
- ${et(ce)}
10158
+ ${vt}
9914
10159
 
9915
- ${lt}
10160
+ ${Xe}
10161
+ ${ve}
10162
+ ${we}
10163
+ ${gt}
10164
+ ${De}
10165
+ ${rt(pe)}
9916
10166
 
9917
- ${Be}
10167
+ ${ut}
10168
+
10169
+ ${$e}
9918
10170
  });
9919
10171
 
9920
- ${Ee}
9921
- ${me}
9922
- ${ge}
9923
- ${nt}
9924
- ${Oe}
9925
- ${pe}
10172
+ ${Ce}
10173
+ ${ye}
10174
+ ${be}
9926
10175
  ${st}
10176
+ ${Pe}
10177
+ ${me}
10178
+ ${lt}
10179
+ ${ct}
9927
10180
  ${at}
9928
- ${rt}
9929
10181
  })();
9930
- `}var pd={state:W,derived:Bn,effect:Zt,batch:Wr,onMount:qr,onDestroy:Fn,isSignal:Qt,isDerived:en,untrack:Gr,peek:zn,generateSignalsRuntime:Ne,generateSignalsRuntimeDev:Yt};
10182
+ `}var pd={state:W,derived:Zt,effect:Qt,batch:Wr,onMount:qr,onDestroy:Fn,isSignal:en,isDerived:tn,untrack:Gr,peek:zn,generateSignalsRuntime:Ne,generateSignalsRuntimeDev:Yt};
9931
10183
  export{Ne,Yt,pd};