@stacksjs/stx 0.2.794 → 0.2.795

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 (239) hide show
  1. package/dist/chunk-027hdpgv.js +2 -0
  2. package/dist/chunk-054h7ktz.js +2 -0
  3. package/dist/chunk-09nyt9c5.js +2 -0
  4. package/dist/chunk-0d3ncyqh.js +2 -0
  5. package/dist/{chunk-2gqhfge6.js → chunk-12jjf2me.js} +2 -2
  6. package/dist/{chunk-jdj1358b.js → chunk-1hq3y7ss.js} +2 -2
  7. package/dist/{chunk-b4r7d6me.js → chunk-1q16p7t2.js} +5 -5
  8. package/dist/chunk-1yew6rw9.js +2 -0
  9. package/dist/chunk-211kxm18.js +2 -0
  10. package/dist/chunk-26y92p8r.js +2 -0
  11. package/dist/{chunk-ssh2gycr.js → chunk-2bvaakcv.js} +3 -3
  12. package/dist/{chunk-vav9ktgm.js → chunk-2e5tvryz.js} +1 -1
  13. package/dist/{chunk-15ckxpq7.js → chunk-2xprqx2v.js} +5 -5
  14. package/dist/{chunk-dhqp3z4w.js → chunk-3em44jbm.js} +2 -2
  15. package/dist/chunk-3ep9h16p.js +2 -0
  16. package/dist/{chunk-ne69yaak.js → chunk-3f8w1x6w.js} +10 -10
  17. package/dist/{chunk-14ft0zc7.js → chunk-3vpgr6nk.js} +6 -6
  18. package/dist/{chunk-8nb8b0nf.js → chunk-427mhgje.js} +1 -1
  19. package/dist/chunk-49tn6yst.js +2 -0
  20. package/dist/chunk-4b7dwwn6.js +2 -0
  21. package/dist/chunk-4ncbq4bx.js +2 -0
  22. package/dist/{chunk-985afhhy.js → chunk-4p5g7v9g.js} +2 -2
  23. package/dist/{chunk-7pk3t82j.js → chunk-4s0ye933.js} +2 -2
  24. package/dist/chunk-4srnxp3b.js +2 -0
  25. package/dist/chunk-538d185r.js +3 -0
  26. package/dist/{chunk-605b93pe.js → chunk-53v4cby3.js} +4 -4
  27. package/dist/{chunk-94gyfwpz.js → chunk-624xpap6.js} +12 -12
  28. package/dist/{chunk-kr8qdg0r.js → chunk-6s9bk98p.js} +2 -2
  29. package/dist/{chunk-q14d714d.js → chunk-6wpwpk3c.js} +4 -4
  30. package/dist/chunk-6z4bza9z.js +2 -0
  31. package/dist/chunk-75y9heas.js +2 -0
  32. package/dist/chunk-7ckdvsmj.js +3 -0
  33. package/dist/{chunk-rrb9m2q2.js → chunk-7k6hd10j.js} +5 -5
  34. package/dist/{chunk-1y9ez7nz.js → chunk-7s1kerhs.js} +2 -2
  35. package/dist/{chunk-k4bdf0dw.js → chunk-7xs45trj.js} +2 -2
  36. package/dist/{chunk-kce6pzmj.js → chunk-7y29q1ng.js} +3 -3
  37. package/dist/{chunk-t3ptzpfc.js → chunk-7y73txmp.js} +1 -1
  38. package/dist/{chunk-j6255z7f.js → chunk-88acqv2r.js} +4 -4
  39. package/dist/{chunk-efrc97by.js → chunk-8t8e75xm.js} +4 -4
  40. package/dist/chunk-8w1wxr96.js +2 -0
  41. package/dist/{chunk-7gdwvnwc.js → chunk-8zf87cc5.js} +2 -2
  42. package/dist/{chunk-gv3bfkdm.js → chunk-90zswh9v.js} +5 -5
  43. package/dist/chunk-98kjk52z.js +2 -0
  44. package/dist/{chunk-yyr7vb7k.js → chunk-9b9tvhmh.js} +5 -5
  45. package/dist/{chunk-66b56g2z.js → chunk-9jcqbgq9.js} +5 -5
  46. package/dist/chunk-9sea317f.js +2 -0
  47. package/dist/chunk-9tpv4cg7.js +2 -0
  48. package/dist/{chunk-qzb0v08n.js → chunk-ak10vygz.js} +1 -1
  49. package/dist/{chunk-wk6xsyv3.js → chunk-aksrh8je.js} +3 -3
  50. package/dist/{chunk-6v4b0xc1.js → chunk-ata5wp2m.js} +4 -4
  51. package/dist/{chunk-nwbq8qvb.js → chunk-axjfaere.js} +1214 -445
  52. package/dist/chunk-axq3c7cb.js +2 -0
  53. package/dist/{chunk-w6taxq7d.js → chunk-ayd635jf.js} +5 -5
  54. package/dist/{chunk-qv85c3qy.js → chunk-azqf0ps0.js} +2 -2
  55. package/dist/{chunk-gb65t4n1.js → chunk-b58n1kfe.js} +2 -2
  56. package/dist/{chunk-c0ejyxfj.js → chunk-baj6w8ja.js} +2 -2
  57. package/dist/{chunk-es006emk.js → chunk-bwf8b4e4.js} +3 -3
  58. package/dist/{chunk-h0jnatd4.js → chunk-bzhzp4f4.js} +2 -2
  59. package/dist/chunk-c5trhqpg.js +2 -0
  60. package/dist/{chunk-bmfk3b29.js → chunk-c5vzr1va.js} +2 -2
  61. package/dist/chunk-c692kj5v.js +2 -0
  62. package/dist/{chunk-8ztgy5y4.js → chunk-cepctq7e.js} +108 -108
  63. package/dist/{chunk-0r61tkfe.js → chunk-cfbpvm5e.js} +2 -2
  64. package/dist/chunk-cfr7cd88.js +2 -0
  65. package/dist/{chunk-bwcj9z19.js → chunk-d50vw81s.js} +4 -4
  66. package/dist/chunk-dsh5q9bg.js +2 -0
  67. package/dist/{chunk-e3wmnjz8.js → chunk-dstzvtvk.js} +3 -3
  68. package/dist/{chunk-2p4yad7w.js → chunk-dxe94pwy.js} +4 -4
  69. package/dist/{chunk-rgz797k3.js → chunk-ectx5ar9.js} +3 -3
  70. package/dist/chunk-emnphnz7.js +2 -0
  71. package/dist/chunk-ennzzth4.js +177 -0
  72. package/dist/chunk-epcdgn78.js +2 -0
  73. package/dist/chunk-etegf4zj.js +2 -0
  74. package/dist/chunk-ewzdsksb.js +2 -0
  75. package/dist/chunk-ey8bgg6x.js +2 -0
  76. package/dist/chunk-f03sg8b0.js +2 -0
  77. package/dist/{chunk-w5hhqjwr.js → chunk-f4j7nsj1.js} +1 -1
  78. package/dist/{chunk-fpn4dren.js → chunk-fcqxa38q.js} +1 -1
  79. package/dist/{chunk-enep9r03.js → chunk-g4n0bjfb.js} +52 -52
  80. package/dist/chunk-gf04pgaa.js +2 -0
  81. package/dist/chunk-ghn8vhet.js +2 -0
  82. package/dist/chunk-gywp6kd8.js +2 -0
  83. package/dist/{chunk-tnn0br4w.js → chunk-h656zg6k.js} +3 -3
  84. package/dist/{chunk-8e23zh2y.js → chunk-hnbx1t3t.js} +2 -2
  85. package/dist/{chunk-2m5h2mtr.js → chunk-hp10khyy.js} +41 -41
  86. package/dist/{chunk-d18xd9x5.js → chunk-hwcfgs3e.js} +3 -3
  87. package/dist/{chunk-5a92srn2.js → chunk-jmbh26gv.js} +1 -1
  88. package/dist/chunk-k6sjqb7g.js +2 -0
  89. package/dist/{chunk-vrbcdds3.js → chunk-ka8sk5qa.js} +1 -1
  90. package/dist/{chunk-1stvxcjv.js → chunk-m081078c.js} +2 -2
  91. package/dist/{chunk-hh9t97hr.js → chunk-mcj5qtpp.js} +1 -1
  92. package/dist/chunk-me71d5w5.js +2 -0
  93. package/dist/{chunk-e0wxcst7.js → chunk-njk5db1q.js} +4 -4
  94. package/dist/chunk-nvytej81.js +2 -0
  95. package/dist/{chunk-488kx8j5.js → chunk-nyer6v3y.js} +5 -5
  96. package/dist/chunk-p1txw41y.js +2 -0
  97. package/dist/{chunk-agtvdtx4.js → chunk-p3ej3954.js} +2 -2
  98. package/dist/chunk-p8gekf4b.js +2 -0
  99. package/dist/{chunk-nps2whkz.js → chunk-pm8a4kdf.js} +6 -6
  100. package/dist/{chunk-y0pqpch2.js → chunk-pnddmgjf.js} +7 -7
  101. package/dist/chunk-px0qsd38.js +2 -0
  102. package/dist/{chunk-27rzdq3n.js → chunk-qnxctfdf.js} +2 -2
  103. package/dist/chunk-qr23snrp.js +2 -0
  104. package/dist/{chunk-v8rfeev5.js → chunk-r1vkk7qp.js} +2 -2
  105. package/dist/{chunk-qp3xd98j.js → chunk-r3a15pax.js} +2 -2
  106. package/dist/{chunk-pa9zfbh6.js → chunk-rdymnn2t.js} +2 -2
  107. package/dist/{chunk-8q63njnd.js → chunk-reb7rddz.js} +1 -1
  108. package/dist/chunk-s151a2dj.js +2 -0
  109. package/dist/{chunk-v1z6n7wz.js → chunk-sphc7xzx.js} +4 -4
  110. package/dist/chunk-sqettc34.js +2 -0
  111. package/dist/chunk-srgbv05n.js +2 -0
  112. package/dist/chunk-t0d4rsfx.js +2 -0
  113. package/dist/chunk-t0k0yk24.js +2 -0
  114. package/dist/chunk-tdcgskyy.js +2 -0
  115. package/dist/chunk-te3hr6d7.js +2 -0
  116. package/dist/chunk-tes8fdv6.js +2 -0
  117. package/dist/{chunk-9tqa8xvf.js → chunk-thpwk6ya.js} +2 -2
  118. package/dist/{chunk-w9nwb8r3.js → chunk-tmfrq4nq.js} +7 -7
  119. package/dist/{chunk-tnkxww7b.js → chunk-tqvw1673.js} +5 -5
  120. package/dist/chunk-v6j5vkce.js +2 -0
  121. package/dist/chunk-vmp876q6.js +2 -0
  122. package/dist/{chunk-4s5q1aea.js → chunk-vpzdqbw7.js} +4 -4
  123. package/dist/{chunk-tktkj2dc.js → chunk-vwp5fchy.js} +1 -1
  124. package/dist/{chunk-1hajf3wc.js → chunk-w6e30qkz.js} +13 -13
  125. package/dist/{chunk-3gn1t0pa.js → chunk-w76cve9j.js} +9 -9
  126. package/dist/{chunk-7fr038wx.js → chunk-wa7fzgw7.js} +4 -4
  127. package/dist/chunk-wes5fdpe.js +2 -0
  128. package/dist/chunk-wfnfb4fr.js +2 -0
  129. package/dist/{chunk-cdsv4yrv.js → chunk-wfrqwtar.js} +1 -1
  130. package/dist/chunk-wzwfbehm.js +20 -0
  131. package/dist/{chunk-j56mg28d.js → chunk-x8ghjw9b.js} +2 -2
  132. package/dist/{chunk-74rf78w8.js → chunk-x8h81amr.js} +2 -2
  133. package/dist/chunk-xbhb8102.js +2 -0
  134. package/dist/{chunk-5j619xgb.js → chunk-xqjat573.js} +2 -2
  135. package/dist/chunk-xv4paxmt.js +2 -0
  136. package/dist/{chunk-5gppagt3.js → chunk-y2jqx5k4.js} +1 -1
  137. package/dist/{chunk-d6arvs57.js → chunk-y64f5t74.js} +5 -5
  138. package/dist/chunk-yeaqebnd.js +2 -0
  139. package/dist/chunk-yj20tq3s.js +2 -0
  140. package/dist/chunk-yjm7c78z.js +2 -0
  141. package/dist/{chunk-h0c6jtrj.js → chunk-yjnaqahd.js} +4 -4
  142. package/dist/{chunk-epcy3r18.js → chunk-zmr0pvcd.js} +113 -105
  143. package/dist/{chunk-6pt4158p.js → chunk-zv3zpmv1.js} +1 -1
  144. package/dist/{chunk-7sartb04.js → chunk-zva4a7xq.js} +2 -2
  145. package/dist/cli.js +19 -19
  146. package/dist/client/signals-authoring-runtime.js +2 -2
  147. package/dist/client/signals-binding-utils-runtime.js +2 -4
  148. package/dist/client/signals-component-props-runtime.js +8 -2
  149. package/dist/client/signals-expression-compiler-runtime.js +1 -1
  150. package/dist/client/signals-for-runtime.js +34 -0
  151. package/dist/client/signals-handler-runtime.js +43 -20
  152. package/dist/client/signals-helpers-runtime.js +39 -0
  153. package/dist/client/signals-native-row-runtime.d.ts +26 -0
  154. package/dist/client/signals-native-row-runtime.js +626 -0
  155. package/dist/client/signals-process-element-runtime.js +305 -287
  156. package/dist/client/signals-proxy-runtime.js +56 -31
  157. package/dist/craft-entry.js +2 -2
  158. package/dist/craft.js +2 -2
  159. package/dist/native/accessibility.js +8 -0
  160. package/dist/native/compiler/bundle.js +1 -1
  161. package/dist/native/compiler/inline-style.js +38 -1
  162. package/dist/native/compiler/style-variables.js +9 -1
  163. package/dist/native/event-names.js +1 -0
  164. package/dist/native/prop-names.js +9 -1
  165. package/dist/native/runtime/binding-tree.d.ts +2 -0
  166. package/dist/native/runtime/binding-tree.js +12 -1
  167. package/dist/native/runtime/craft-bridge.js +66 -0
  168. package/dist/native/runtime/craft.d.ts +78 -2
  169. package/dist/native/runtime/native-host.d.ts +2 -0
  170. package/dist/native/runtime/native-host.js +179 -76
  171. package/dist/pwa.js +3 -3
  172. package/dist/signals.d.ts +13 -10
  173. package/dist/signals.js +5 -3
  174. package/dist/ssg.js +15 -15
  175. package/dist/stx-virtual-ts.d.ts +25 -1
  176. package/dist/stx-virtual-ts.js +109 -6
  177. package/dist/typecheck.d.ts +3 -1
  178. package/dist/typecheck.js +28 -11
  179. package/package.json +5 -5
  180. package/dist/chunk-0675z8hj.js +0 -177
  181. package/dist/chunk-1brkqd5f.js +0 -2
  182. package/dist/chunk-1ds97d9m.js +0 -2
  183. package/dist/chunk-1tvb2stj.js +0 -2
  184. package/dist/chunk-2vxh8b8g.js +0 -2
  185. package/dist/chunk-33na85q2.js +0 -2
  186. package/dist/chunk-3t4t655h.js +0 -2
  187. package/dist/chunk-43ynckvh.js +0 -2
  188. package/dist/chunk-4v22nj67.js +0 -2
  189. package/dist/chunk-5v5w0cd2.js +0 -2
  190. package/dist/chunk-699t603m.js +0 -2
  191. package/dist/chunk-6f6xqzhb.js +0 -2
  192. package/dist/chunk-7mrr4ke5.js +0 -2
  193. package/dist/chunk-7tzzzvdg.js +0 -2
  194. package/dist/chunk-8a5txj4f.js +0 -2
  195. package/dist/chunk-8pphy0p1.js +0 -2
  196. package/dist/chunk-8rmb79zw.js +0 -2
  197. package/dist/chunk-8rwnzmvb.js +0 -2
  198. package/dist/chunk-90pxjq62.js +0 -2
  199. package/dist/chunk-9s4ggstz.js +0 -2
  200. package/dist/chunk-9xdz8r73.js +0 -2
  201. package/dist/chunk-agvykxs8.js +0 -2
  202. package/dist/chunk-ajj56vrw.js +0 -2
  203. package/dist/chunk-ay4ep67v.js +0 -2
  204. package/dist/chunk-bwfncfe1.js +0 -3
  205. package/dist/chunk-d5e47gr4.js +0 -2
  206. package/dist/chunk-d910ytt2.js +0 -2
  207. package/dist/chunk-d9p7xaj7.js +0 -2
  208. package/dist/chunk-dsrn2vgp.js +0 -2
  209. package/dist/chunk-fkkdt6sj.js +0 -2
  210. package/dist/chunk-fpw03bhv.js +0 -2
  211. package/dist/chunk-fxy0cq7h.js +0 -2
  212. package/dist/chunk-g6smtcc0.js +0 -2
  213. package/dist/chunk-g747k4gg.js +0 -3
  214. package/dist/chunk-gryrg1c0.js +0 -2
  215. package/dist/chunk-gvj862m1.js +0 -2
  216. package/dist/chunk-h5nrnen8.js +0 -2
  217. package/dist/chunk-hagk74x6.js +0 -2
  218. package/dist/chunk-hv0whj8t.js +0 -2
  219. package/dist/chunk-k2brrhf8.js +0 -2
  220. package/dist/chunk-k6ncb5qm.js +0 -2
  221. package/dist/chunk-kn38mjpp.js +0 -2
  222. package/dist/chunk-kvmpc0sg.js +0 -2
  223. package/dist/chunk-nbjgytem.js +0 -2
  224. package/dist/chunk-nf2bzqaw.js +0 -2
  225. package/dist/chunk-nt7wqqax.js +0 -2
  226. package/dist/chunk-pq1qs7bp.js +0 -2
  227. package/dist/chunk-pvw58x2j.js +0 -20
  228. package/dist/chunk-qk9v0emh.js +0 -2
  229. package/dist/chunk-qnj444zc.js +0 -2
  230. package/dist/chunk-s1wdzttg.js +0 -2
  231. package/dist/chunk-sq0qc9sk.js +0 -2
  232. package/dist/chunk-th5afzmv.js +0 -2
  233. package/dist/chunk-vgzfsh1z.js +0 -2
  234. package/dist/chunk-wmh4yxcs.js +0 -2
  235. package/dist/chunk-wr3adhd8.js +0 -2
  236. package/dist/chunk-xmae29mn.js +0 -2
  237. package/dist/chunk-zdwnzq78.js +0 -2
  238. package/dist/chunk-zssf9fdg.js +0 -2
  239. package/dist/chunk-zyf6737j.js +0 -2
@@ -1,10 +1,10 @@
1
1
  // @bun
2
- import{fl,gl,ml}from"./chunk-gb65t4n1.js";import{le,Vn,Un,bo,Gr,Jr,Wn,qn,wo,Yr}from"./chunk-9tqa8xvf.js";function W(e,s,i,a,d,y){let r=!0,u=new Set,f=(p)=>a.get?a.get(p):p,o=()=>f(e());return Object.defineProperty(o,"_isSignal",{value:!0}),Object.defineProperty(o,"modifiers",{get:s}),o.set=(p)=>{if(!r)return;let h=s(),t=a.set?a.set(p,h):p;if(h.trim&&typeof t==="string")t=t.trim();if(h.number&&typeof t==="string"&&t!==""){let l=Number(t);if(!Number.isNaN(l))t=l}if(Object.is(e(),t))return;e.set(t),i(t)},o.update=(p)=>o.set(p(o())),o.input=(p)=>{if(!s().lazy)o.set(p)},o.change=(p)=>{if(s().lazy)o.set(p)},o.subscribe=(p)=>{if(!r)return()=>{};let h=e.subscribe((t,l)=>p(f(t),f(l)));return u.add(h),()=>{h(),u.delete(h)}},Object.defineProperty(o,"value",{get:o,set:o.set}),d(()=>{r=!1,u.forEach((p)=>p()),u.clear()}),y?.(()=>{r=!0}),o}function X(e,s=!0,i){if(!s||!e||typeof window>"u")return;let a=window;if(!a.__STX_DATA__){let y=document.querySelector("script[data-stx-server-data]");try{let r=JSON.parse(y?.textContent||"{}");a.__STX_DATA__=r&&typeof r==="object"&&!Array.isArray(r)?r:{}}catch{a.__STX_DATA__={}}}let d=a.__STX_DATA__;if(d&&Object.prototype.hasOwnProperty.call(d,e))try{return{data:i?i(d[e]):d[e]}}catch(y){return{data:null,error:y instanceof Error?y:Error(String(y))}}return}function Q(e){if(typeof window>"u")return;let s=window;if(e===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__[e]}}function Y(e){let s=null;try{s=typeof indexedDB<"u"?indexedDB:null}catch{s=null}if(!s)return null;let i=s,a=e||"stx-kept",d=null,y=()=>{if(!d)d=new Promise((u,f)=>{let o=i.open(a,1);o.onupgradeneeded=()=>{o.result.createObjectStore("kv")},o.onsuccess=()=>u(o.result),o.onerror=()=>f(o.error),o.onblocked=()=>f(Error("blocked"))}),d.catch(()=>{d=null});return d},r=(u,f)=>y().then((o)=>new Promise((p,h)=>{let t=o.transaction("kv",u),l=f(t.objectStore("kv"));t.oncomplete=()=>p(l?l.result:void 0),t.onerror=()=>h(t.error),t.onabort=()=>h(t.error)}));return{get:(u)=>r("readonly",(f)=>f.get(u)),set:(u,f)=>r("readwrite",(o)=>{o.put(f,u)}),remove:(u)=>r("readwrite",(f)=>{f.delete(u)}),removePrefix:(u)=>r("readwrite",(f)=>{f.delete(IDBKeyRange.bound(u,`${u}\uFFFF`))})}}function J(e,s){let i=e||{},a=null;if(i.storage!==void 0)a=i.storage;else try{a=typeof localStorage<"u"?localStorage:null}catch{a=null}let d=null,y=i.backend!==void 0;if(y)d=i.backend||null;let r=()=>{if(y)return d;y=!0;try{d=s?s():null}catch{d=null}if(d){let n=d;n.get("__stx_probe__").catch(()=>{if(d===n)d=null})}return d},u=i.limit||32768,f=i.defer||((n)=>{let c=typeof requestIdleCallback==="function"?requestIdleCallback:null;if(c)c(n,{timeout:200});else setTimeout(n,16)}),o=new Map,p=new Set,h=new Map,t=!1,l=Promise.resolve(),g=(n)=>{try{return JSON.parse(n)}catch{return n}},m=(n,c)=>{if(!a)return!1;try{return a.setItem(n,c),!0}catch{return!1}},_=(n)=>{try{if(a)a.removeItem(n)}catch{}},k=()=>{if(t=!1,!h.size)return l;let n=Array.from(h.entries());return h.clear(),l=l.then(()=>Promise.all(n.map(([c,v])=>{if(!d){p.delete(c);try{m(c,JSON.stringify(v===void 0?null:v))}catch{}return}let x;try{return x={v},d.set(c,x).catch(()=>{let S;try{S=JSON.stringify(v)}catch{return}return d?d.set(c,{j:S}).catch(()=>{m(c,S)}):void 0})}catch{return}}))).then(()=>{}),l},N=(n,c)=>{if(h.set(n,c),p.add(n),t)return;t=!0,f(()=>{k()})},M=(n)=>{if(!n||typeof n!=="object")return;let c=n;if("v"in c)return{value:c.v};if(typeof c.j==="string")return{value:g(c.j)};return},E={peek(n){if(o.has(n))return{value:o.get(n)};let c=null;try{c=a?a.getItem(n):null}catch{c=null}if(c===null||c===void 0)return;let v=g(c);return o.set(n,v),{value:v}},load(n){let c=E.peek(n),v=c?null:r();if(c||!v)return Promise.resolve(c);return v.get(n).then((x)=>{if(o.has(n))return{value:o.get(n)};let S=M(x);if(S)o.set(n,S.value),p.add(n);return S},()=>{return})},set(n,c){if(o.set(n,c),d&&p.has(n)){N(n,c);return}let v;try{v=JSON.stringify(c===void 0?null:c)}catch{return}if(v.length<=u&&m(n,v))return;if(!r()){if(v.length>u)m(n,v);return}_(n),N(n,c)},forget(n){for(let v of Array.from(o.keys()))if(v.indexOf(n)===0)o.delete(v);for(let v of Array.from(h.keys()))if(v.indexOf(n)===0)h.delete(v);for(let v of Array.from(p))if(v.indexOf(n)===0)p.delete(v);try{if(a)for(let v=a.length-1;v>=0;v--){let x=a.key(v);if(x&&x.indexOf(n)===0)a.removeItem(x)}}catch{}let c=r();if(!c)return l;return l=l.then(()=>c.removePrefix(n)).catch(()=>{}),l},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 Z(e,s){if(!e)return!1;if(e===s.key)return!0;if(!s.url)return!1;if(e===s.url)return!0;try{let i=typeof location<"u"&&location.origin&&location.origin!=="null"?location.origin:"http://localhost",a=new URL(e,i),d=new URL(s.url,i);if(a.origin!==d.origin||a.pathname!==d.pathname)return!1;return!a.search||a.search===d.search}catch{return!1}}function ee(e){let s=e.prefix||"stx:kept:",i=e.matches||((t,l)=>t===l.key||t===l.url),a=new Set,d=new Map,y,r=(t)=>t===void 0?y:t,u=(t,l)=>{let g=r(l);if(g===!1||g===null||g==="")return null;return`${s}${g===void 0?"":`${g}:`}query:${t}`},f=(t)=>{let l=t&&t.value;if(!l||typeof l!=="object"||!("d"in l))return;return{data:l.d,at:Number(l.at)||0}},o=()=>{let t=globalThis;return t.__stx_outboxes instanceof Map?t.__stx_outboxes:null},p={setScope(t){y=t},scope:()=>y,keyFor:u,seed(t,l){let g=u(t,l);return g?f(e.kept.peek(g)):void 0},restore(t,l){let g=u(t,l);return g?e.kept.load(g).then(f):Promise.resolve(void 0)},persist(t,l,g){let m=u(t,g);if(m)e.kept.set(m,{d:l,at:Date.now()})},overlay(t,l,g){let m=o();if(!m||!m.size)return l;let _=l;return m.forEach((k)=>{try{_=k.overlay(t,_,g)}catch{}}),_},watch(t){return a.add(t),()=>{a.delete(t)}},cachedQuery(t,l){let g=d.get(t);if(g){if(l&&g.__options)g.__options(l);return g}let m=l||{},_=m.initial===void 0?null:m.initial,k=()=>typeof m.scope==="function"?m.scope():m.scope,N=()=>(typeof m.url==="function"?m.url():m.url)||null,M=()=>({key:t,url:N()}),E=k(),n=_,c=0,v=e.sharedRequest(),x=0,S=p.seed(t,E);if(S)n=S.data;let I=e.state(p.overlay(M(),n)),U=e.state(!1),q=e.state(!1),K=e.state(null),P=e.state(S?S.at:0),R=0,F=()=>{I.set(p.overlay(M(),n))},z=(b)=>{let w=R;p.restore(t,b).then((T)=>{if(!T||w!==R||c)return;n=T.data,P.set(T.at),F()})};if(!S)z(E);let _t=()=>{let b=k();if(b===E)return;E=b,R++,x=0,q.set(!1),U.set(!1),c=0;let w=p.seed(t,E);if(n=w?w.data:_,P.set(w?w.at:0),F(),!w)z(E)},xt=(b,w)=>{let T=m.timeoutMs||15000,C=typeof AbortController<"u"?new AbortController:null,O=null,V=new Promise((D,H)=>{O=setTimeout(()=>{if(C)C.abort();H(Error("The request took too long."))},T)}),A;if(m.load)A=m.load({force:b,url:w,signal:C?C.signal:void 0});else if(w){let D=m.fetch||((L,j)=>fetch(L,j)),H={method:"GET",headers:{Accept:"application/json"}};if(b)H.cache="no-cache";if(C)H.signal=C.signal;A=D(w,H).then((L)=>{if(!L.ok)return L.json().catch(()=>null).then((j)=>{throw Error(j&&(j.error||j.message)||`Request failed (${L.status})`)});return L.json()})}else return Promise.resolve(I());return Promise.race([A,V]).then((D)=>{if(O)clearTimeout(O);return m.transform?m.transform(D):D},(D)=>{if(O)clearTimeout(O);throw D})},G=(b)=>{let w=R,T=N(),C=()=>{if(w!==R)return Promise.resolve(I());if(x++,q.set(!0),c===0&&!P())U.set(!0);let V=()=>{if(w!==R)return;if(x=Math.max(0,x-1),!x)q.set(!1),U.set(!1)};return xt(b,T).then((A)=>{if(w!==R||T!==N())return V(),I();return n=A,c=Date.now(),P.set(c),K.set(null),p.persist(t,A,E),F(),V(),I()},(A)=>{if(w===R&&T===N())K.set(A&&A.message?A.message:"Could not load.");return V(),I()})},O=`${w} ${T||""}`;return b?v.fresh(O,C):v.run(O,C)},B={data:I,loading:U,isFetching:q,error:K,updatedAt:P,get key(){return t},load(b){if(_t(),!b&&c&&Date.now()-c<(m.staleTime||0))return Promise.resolve(I());return G(!!b)},refresh(){return B.load(!0)},set(b){n=typeof b==="function"?b(n):b,p.persist(t,n,E),F()},invalidate(){c=0},__options(b){m={...m,...b}}};if(a.add({target:M,updated:()=>{if(c||P())G(!1)},outbox:(b)=>{if(b)n=p.overlay(M(),n,b.id),c=0,G(!0);F()}}),d.set(t,B),m.immediate)B.load();return B}},h=typeof window<"u"?window:typeof addEventListener==="function"?globalThis:null;if(e.listen!==!1&&h&&typeof h.addEventListener==="function")h.addEventListener("stx:updated",(t)=>{let l=t.detail||{};if(l.kind!=="api"||typeof l.url!=="string")return;a.forEach((g)=>{if(i(l.url,g.target()))g.updated()})}),h.addEventListener("stx:outbox",(t)=>{let l=t.detail||{},g=l.sent&&typeof l.sent.id==="string"?l.sent:null;a.forEach((m)=>{if(g){let _=Array.isArray(g.affects)?g.affects:[],k=m.target();if(!_.some((N)=>i(N,k)))return}m.outbox(g)})});return p}function te(e){let s=e&&e.covers||((r,u)=>Object.is(r,u)),i=[],a=[],d=0,y=(r,u)=>{let f;try{f=Promise.resolve(u())}catch(h){f=Promise.reject(h)}let o={key:r,promise:f};i.push(o);let p=()=>{let h=i.indexOf(o);if(h!==-1)i.splice(h,1)};return f.then(p,p),f};return{run(r,u){for(let f of i)if(s(f.key,r))return f.promise;for(let f of a)if(s(f.key,r))return f.promise;return y(r,u)},fresh(r,u){for(let h of a)if(s(h.key,r))return h.promise;let f=i.filter((h)=>s(h.key,r)).map((h)=>h.promise);if(!f.length)return y(r,u);let o={key:r,promise:null},p=()=>{};return o.promise=Promise.all(f.map((h)=>h.then(p,p))).then(()=>{let h=a.indexOf(o);if(h!==-1)a.splice(h,1);return y(r,u)}),a.push(o),o.promise},latest(){let r=++d;return()=>r===d},get busy(){return i.length>0||a.length>0}}}function ne(e){let s=!1,i=null,a=null,d=0;async function y(){if(s)return;i=new AbortController;try{let r=await e.request(e.endpoint,{signal:i.signal,cache:"no-store",headers:{Accept:"text/event-stream"}});if(!r.ok||!r.body||!r.headers.get("content-type")?.includes("text/event-stream"))throw Error("Broadcast stream unavailable");if(s){await r.body.cancel();return}let u=r.body.getReader(),f=new TextDecoder,o="";d=0,e.onStatus?.(!0),e.onConnected?.();try{while(!s){let{done:p,value:h}=await u.read();if(p)break;if(o+=f.decode(h,{stream:!0}).replace(/\r\n/g,`
3
- `),o.length>1048576)throw Error("Broadcast frame too large");let t;while((t=o.indexOf(`
2
+ import{gl,ml,hl}from"./chunk-b58n1kfe.js";import{le,Vn,Un,wo,Jr,Yr,Wn,qn,vo,Zr}from"./chunk-thpwk6ya.js";function z(e,o,l,r,d,y){let s=!0,u=new Set,h=(p)=>r.get?r.get(p):p,a=()=>h(e());return Object.defineProperty(a,"_isSignal",{value:!0}),Object.defineProperty(a,"modifiers",{get:o}),a.set=(p)=>{if(!s)return;let f=o(),t=r.set?r.set(p,f):p;if(f.trim&&typeof t==="string")t=t.trim();if(f.number&&typeof t==="string"&&t!==""){let i=Number(t);if(!Number.isNaN(i))t=i}if(Object.is(e(),t))return;e.set(t),l(t)},a.update=(p)=>a.set(p(a())),a.input=(p)=>{if(!o().lazy)a.set(p)},a.change=(p)=>{if(o().lazy)a.set(p)},a.subscribe=(p)=>{if(!s)return()=>{};let f=e.subscribe((t,i)=>p(h(t),h(i)));return u.add(f),()=>{f(),u.delete(f)}},Object.defineProperty(a,"value",{get:a,set:a.set}),d(()=>{s=!1,u.forEach((p)=>p()),u.clear()}),y?.(()=>{s=!0}),a}function X(e,o=!0,l){if(!o||!e||typeof window>"u")return;let r=window;if(!r.__STX_DATA__){let y=document.querySelector("script[data-stx-server-data]");try{let s=JSON.parse(y?.textContent||"{}");r.__STX_DATA__=s&&typeof s==="object"&&!Array.isArray(s)?s:{}}catch{r.__STX_DATA__={}}}let d=r.__STX_DATA__;if(d&&Object.prototype.hasOwnProperty.call(d,e))try{return{data:l?l(d[e]):d[e]}}catch(y){return{data:null,error:y instanceof Error?y:Error(String(y))}}return}function Q(e){if(typeof window>"u")return;let o=window;if(e===void 0)o.__STX_DATA__={};else{if(!o.__STX_DATA__)try{let l=JSON.parse(document.querySelector("script[data-stx-server-data]")?.textContent||"{}");o.__STX_DATA__=l&&typeof l==="object"&&!Array.isArray(l)?l:{}}catch{o.__STX_DATA__={}}if(o.__STX_DATA__)delete o.__STX_DATA__[e]}}function Y(e){let o=null;try{o=typeof indexedDB<"u"?indexedDB:null}catch{o=null}if(!o)return null;let l=o,r=e||"stx-kept",d=null,y=()=>{if(!d)d=new Promise((u,h)=>{let a=l.open(r,1);a.onupgradeneeded=()=>{a.result.createObjectStore("kv")},a.onsuccess=()=>u(a.result),a.onerror=()=>h(a.error),a.onblocked=()=>h(Error("blocked"))}),d.catch(()=>{d=null});return d},s=(u,h)=>y().then((a)=>new Promise((p,f)=>{let t=a.transaction("kv",u),i=h(t.objectStore("kv"));t.oncomplete=()=>p(i?i.result:void 0),t.onerror=()=>f(t.error),t.onabort=()=>f(t.error)}));return{get:(u)=>s("readonly",(h)=>h.get(u)),set:(u,h)=>s("readwrite",(a)=>{a.put(h,u)}),remove:(u)=>s("readwrite",(h)=>{h.delete(u)}),removePrefix:(u)=>s("readwrite",(h)=>{h.delete(IDBKeyRange.bound(u,`${u}\uFFFF`))})}}function J(e,o){let l=e||{},r=null;if(l.storage!==void 0)r=l.storage;else try{r=typeof localStorage<"u"?localStorage:null}catch{r=null}let d=null,y=l.backend!==void 0;if(y)d=l.backend||null;let s=()=>{if(y)return d;y=!0;try{d=o?o():null}catch{d=null}if(d){let n=d;n.get("__stx_probe__").catch(()=>{if(d===n)d=null})}return d},u=l.limit||32768,h=l.defer||((n)=>{let c=typeof requestIdleCallback==="function"?requestIdleCallback:null;if(c)c(n,{timeout:200});else setTimeout(n,16)}),a=new Map,p=new Set,f=new Map,t=!1,i=Promise.resolve(),g=(n)=>{try{return JSON.parse(n)}catch{return n}},m=(n,c)=>{if(!r)return!1;try{return r.setItem(n,c),!0}catch{return!1}},_=(n)=>{try{if(r)r.removeItem(n)}catch{}},k=()=>{if(t=!1,!f.size)return i;let n=Array.from(f.entries());return f.clear(),i=i.then(()=>Promise.all(n.map(([c,v])=>{if(!d){p.delete(c);try{m(c,JSON.stringify(v===void 0?null:v))}catch{}return}let x;try{return x={v},d.set(c,x).catch(()=>{let S;try{S=JSON.stringify(v)}catch{return}return d?d.set(c,{j:S}).catch(()=>{m(c,S)}):void 0})}catch{return}}))).then(()=>{}),i},N=(n,c)=>{if(f.set(n,c),p.add(n),t)return;t=!0,h(()=>{k()})},M=(n)=>{if(!n||typeof n!=="object")return;let c=n;if("v"in c)return{value:c.v};if(typeof c.j==="string")return{value:g(c.j)};return},E={peek(n){if(a.has(n))return{value:a.get(n)};let c=null;try{c=r?r.getItem(n):null}catch{c=null}if(c===null||c===void 0)return;let v=g(c);return a.set(n,v),{value:v}},load(n){let c=E.peek(n),v=c?null:s();if(c||!v)return Promise.resolve(c);return v.get(n).then((x)=>{if(a.has(n))return{value:a.get(n)};let S=M(x);if(S)a.set(n,S.value),p.add(n);return S},()=>{return})},set(n,c){if(a.set(n,c),d&&p.has(n)){N(n,c);return}let v;try{v=JSON.stringify(c===void 0?null:c)}catch{return}if(v.length<=u&&m(n,v))return;if(!s()){if(v.length>u)m(n,v);return}_(n),N(n,c)},forget(n){for(let v of Array.from(a.keys()))if(v.indexOf(n)===0)a.delete(v);for(let v of Array.from(f.keys()))if(v.indexOf(n)===0)f.delete(v);for(let v of Array.from(p))if(v.indexOf(n)===0)p.delete(v);try{if(r)for(let v=r.length-1;v>=0;v--){let x=r.key(v);if(x&&x.indexOf(n)===0)r.removeItem(x)}}catch{}let c=s();if(!c)return i;return i=i.then(()=>c.removePrefix(n)).catch(()=>{}),i},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 Z(e,o){if(!e)return!1;if(e===o.key)return!0;if(!o.url)return!1;if(e===o.url)return!0;try{let l=typeof location<"u"&&location.origin&&location.origin!=="null"?location.origin:"http://localhost",r=new URL(e,l),d=new URL(o.url,l);if(r.origin!==d.origin||r.pathname!==d.pathname)return!1;return!r.search||r.search===d.search}catch{return!1}}function ee(e){let o=e.prefix||"stx:kept:",l=e.matches||((t,i)=>t===i.key||t===i.url),r=new Set,d=new Map,y,s=(t)=>t===void 0?y:t,u=(t,i)=>{let g=s(i);if(g===!1||g===null||g==="")return null;return`${o}${g===void 0?"":`${g}:`}query:${t}`},h=(t)=>{let i=t&&t.value;if(!i||typeof i!=="object"||!("d"in i))return;return{data:i.d,at:Number(i.at)||0}},a=()=>{let t=globalThis;return t.__stx_outboxes instanceof Map?t.__stx_outboxes:null},p={setScope(t){y=t},scope:()=>y,keyFor:u,seed(t,i){let g=u(t,i);return g?h(e.kept.peek(g)):void 0},restore(t,i){let g=u(t,i);return g?e.kept.load(g).then(h):Promise.resolve(void 0)},persist(t,i,g){let m=u(t,g);if(m)e.kept.set(m,{d:i,at:Date.now()})},overlay(t,i,g){let m=a();if(!m||!m.size)return i;let _=i;return m.forEach((k)=>{try{_=k.overlay(t,_,g)}catch{}}),_},watch(t){return r.add(t),()=>{r.delete(t)}},cachedQuery(t,i){let g=d.get(t);if(g){if(i&&g.__options)g.__options(i);return g}let m=i||{},_=m.initial===void 0?null:m.initial,k=()=>typeof m.scope==="function"?m.scope():m.scope,N=()=>(typeof m.url==="function"?m.url():m.url)||null,M=()=>({key:t,url:N()}),E=k(),n=_,c=0,v=e.sharedRequest(),x=0,S=p.seed(t,E);if(S)n=S.data;let C=e.state(p.overlay(M(),n)),U=e.state(!1),q=e.state(!1),K=e.state(null),P=e.state(S?S.at:0),R=0,V=()=>{C.set(p.overlay(M(),n))},W=(w)=>{let b=R;p.restore(t,w).then((T)=>{if(!T||b!==R||c)return;n=T.data,P.set(T.at),V()})};if(!S)W(E);let xt=()=>{let w=k();if(w===E)return;E=w,R++,x=0,q.set(!1),U.set(!1),c=0;let b=p.seed(t,E);if(n=b?b.data:_,P.set(b?b.at:0),V(),!b)W(E)},St=(w,b)=>{let T=m.timeoutMs||15000,I=typeof AbortController<"u"?new AbortController:null,O=null,F=new Promise((D,H)=>{O=setTimeout(()=>{if(I)I.abort();H(Error("The request took too long."))},T)}),A;if(m.load)A=m.load({force:w,url:b,signal:I?I.signal:void 0});else if(b){let D=m.fetch||((L,j)=>fetch(L,j)),H={method:"GET",headers:{Accept:"application/json"}};if(w)H.cache="no-cache";if(I)H.signal=I.signal;A=D(b,H).then((L)=>{if(!L.ok)return L.json().catch(()=>null).then((j)=>{throw Error(j&&(j.error||j.message)||`Request failed (${L.status})`)});return L.json()})}else return Promise.resolve(C());return Promise.race([A,F]).then((D)=>{if(O)clearTimeout(O);return m.transform?m.transform(D):D},(D)=>{if(O)clearTimeout(O);throw D})},G=(w)=>{let b=R,T=N(),I=()=>{if(b!==R)return Promise.resolve(C());if(x++,q.set(!0),c===0&&!P())U.set(!0);let F=()=>{if(b!==R)return;if(x=Math.max(0,x-1),!x)q.set(!1),U.set(!1)};return St(w,T).then((A)=>{if(b!==R||T!==N())return F(),C();return n=A,c=Date.now(),P.set(c),K.set(null),p.persist(t,A,E),V(),F(),C()},(A)=>{if(b===R&&T===N())K.set(A&&A.message?A.message:"Could not load.");return F(),C()})},O=`${b} ${T||""}`;return w?v.fresh(O,I):v.run(O,I)},B={data:C,loading:U,isFetching:q,error:K,updatedAt:P,get key(){return t},load(w){if(xt(),!w&&c&&Date.now()-c<(m.staleTime||0))return Promise.resolve(C());return G(!!w)},refresh(){return B.load(!0)},set(w){n=typeof w==="function"?w(n):w,p.persist(t,n,E),V()},invalidate(){c=0},__options(w){m={...m,...w}}};if(r.add({target:M,updated:()=>{if(c||P())G(!1)},outbox:(w)=>{if(w)n=p.overlay(M(),n,w.id),c=0,G(!0);V()}}),d.set(t,B),m.immediate)B.load();return B}},f=typeof window<"u"?window:typeof addEventListener==="function"?globalThis:null;if(e.listen!==!1&&f&&typeof f.addEventListener==="function")f.addEventListener("stx:updated",(t)=>{let i=t.detail||{};if(i.kind!=="api"||typeof i.url!=="string")return;r.forEach((g)=>{if(l(i.url,g.target()))g.updated()})}),f.addEventListener("stx:outbox",(t)=>{let i=t.detail||{},g=i.sent&&typeof i.sent.id==="string"?i.sent:null;r.forEach((m)=>{if(g){let _=Array.isArray(g.affects)?g.affects:[],k=m.target();if(!_.some((N)=>l(N,k)))return}m.outbox(g)})});return p}function te(e){let o=e&&e.covers||((s,u)=>Object.is(s,u)),l=[],r=[],d=0,y=(s,u)=>{let h;try{h=Promise.resolve(u())}catch(f){h=Promise.reject(f)}let a={key:s,promise:h};l.push(a);let p=()=>{let f=l.indexOf(a);if(f!==-1)l.splice(f,1)};return h.then(p,p),h};return{run(s,u){for(let h of l)if(o(h.key,s))return h.promise;for(let h of r)if(o(h.key,s))return h.promise;return y(s,u)},fresh(s,u){for(let f of r)if(o(f.key,s))return f.promise;let h=l.filter((f)=>o(f.key,s)).map((f)=>f.promise);if(!h.length)return y(s,u);let a={key:s,promise:null},p=()=>{};return a.promise=Promise.all(h.map((f)=>f.then(p,p))).then(()=>{let f=r.indexOf(a);if(f!==-1)r.splice(f,1);return y(s,u)}),r.push(a),a.promise},latest(){let s=++d;return()=>s===d},get busy(){return l.length>0||r.length>0}}}function ne(e){let o=!1,l=null,r=null,d=0;async function y(){if(o)return;l=new AbortController;try{let s=await e.request(e.endpoint,{signal:l.signal,cache:"no-store",headers:{Accept:"text/event-stream"}});if(!s.ok||!s.body||!s.headers.get("content-type")?.includes("text/event-stream"))throw Error("Broadcast stream unavailable");if(o){await s.body.cancel();return}let u=s.body.getReader(),h=new TextDecoder,a="";d=0,e.onStatus?.(!0),e.onConnected?.();try{while(!o){let{done:p,value:f}=await u.read();if(p)break;if(a+=h.decode(f,{stream:!0}).replace(/\r\n/g,`
3
+ `),a.length>1048576)throw Error("Broadcast frame too large");let t;while((t=a.indexOf(`
4
4
 
5
- `))!==-1){let l=o.slice(0,t);o=o.slice(t+2);let g=l.split(`
5
+ `))!==-1){let i=a.slice(0,t);a=a.slice(t+2);let g=i.split(`
6
6
  `).filter((_)=>_.startsWith("data:")).map((_)=>_.slice(5).trimStart()).join(`
7
- `);if(!g)continue;let m=JSON.parse(g);if(typeof m.channel==="string"&&typeof m.event==="string")e.onMessage(m)}}}finally{await u.cancel().catch(()=>{}),u.releaseLock()}}catch{}finally{if(e.onStatus?.(!1),!s)a=setTimeout(y,Math.min((e.reconnectDelay??1000)*2**d++,30000))}}return y(),{close(){if(s=!0,i?.abort(),a)clearTimeout(a);e.onStatus?.(!1)}}}var re=` function useColorMode(options) {
7
+ `);if(!g)continue;let m=JSON.parse(g);if(typeof m.channel==="string"&&typeof m.event==="string")e.onMessage(m)}}}finally{await u.cancel().catch(()=>{}),u.releaseLock()}}catch{}finally{if(e.onStatus?.(!1),!o)r=setTimeout(y,Math.min((e.reconnectDelay??1000)*2**d++,30000))}}return y(),{close(){if(o=!0,l?.abort(),r)clearTimeout(r);e.onStatus?.(!1)}}}var re=` function useColorMode(options) {
8
8
  options = options || {};
9
9
  // The pre-paint boot script (stacksjs/stx#1794) publishes the app's
10
10
  // configured options here. Reading them makes a bare useColorMode() agree
@@ -364,7 +364,7 @@ catch (e) {} }
364
364
  return v;
365
365
  };
366
366
  var root = window.__STX_CURRENT_ELEMENT__;
367
- var kebabName = name.replace(/([A-Z])/g, function(_, c) { return '-' + c.toLowerCase(); });
367
+ var kebabName = __stxKebab(name);
368
368
  var lowerName = name.toLowerCase();
369
369
  var attributeNames = [name];
370
370
  if (kebabName !== name) attributeNames.push(kebabName);
@@ -384,7 +384,7 @@ catch (e) {} }
384
384
  if (serializedProps) {
385
385
  try {
386
386
  var parsedProps = JSON.parse(serializedProps);
387
- var camelName = name.replace(/-([a-z0-9])/g, function(_, c) { return c.toUpperCase(); });
387
+ var camelName = __stxCamel(name);
388
388
  if (Object.prototype.hasOwnProperty.call(parsedProps, name)) staticValue = parsedProps[name];
389
389
  else if (Object.prototype.hasOwnProperty.call(parsedProps, camelName)) staticValue = parsedProps[camelName];
390
390
  }
@@ -550,7 +550,7 @@ catch (e) {} }
550
550
  }
551
551
 
552
552
  function preserveDeferredParentComponentProps(el) {
553
- var names = (el.getAttribute('data-stx-parent-bindings') || '').split(/\\s+/).filter(Boolean);
553
+ var names = __stxWords(el.getAttribute('data-stx-parent-bindings') || '');
554
554
  if (!names.length) return;
555
555
  var deferred = readDeferredParentComponentProps(el);
556
556
  names.forEach(function(name) {
@@ -607,9 +607,7 @@ catch (e) {} }
607
607
  if (!el || !el.getAttribute) return;
608
608
  var scopeId = el.getAttribute('data-stx-scope');
609
609
  var scopeVars = scopeId && window.stx._scopes && window.stx._scopes[scopeId];
610
- var camelName = name.replace(/-([a-z0-9])/g, function(_, character) {
611
- return character.toUpperCase();
612
- });
610
+ var camelName = __stxCamel(name);
613
611
  // useReactiveProp signals are often intentionally aliased inside the
614
612
  // child, for example liveClosable = useReactiveProp('closable', true).
615
613
  // The public prop name therefore cannot be inferred from the variable
@@ -995,7 +993,7 @@ else {
995
993
  }
996
994
  `;var ue=` function bindParentComponentProps(el, callerScope) {
997
995
  if (!el || !el.getAttribute || el.__stx_parent_props_bound) return;
998
- var names = (el.getAttribute('data-stx-parent-bindings') || '').split(/\\s+/).filter(Boolean);
996
+ var names = __stxWords(el.getAttribute('data-stx-parent-bindings') || '');
999
997
  if (!names.length) return;
1000
998
  if (hasPendingLoopBoundary(el)) {
1001
999
  preserveDeferredParentComponentProps(el);
@@ -1069,8 +1067,14 @@ else {
1069
1067
  }
1070
1068
 
1071
1069
  function resolveComponentCallerScope(el, pageScope) {
1070
+ return componentCallerScopeFrom(el && (el.parentElement || el.parentNode), pageScope);
1071
+ }
1072
+
1073
+ // The caller scope for a component placed under \`current\`: the page's
1074
+ // scope, then every component scope around it, outermost first. A native
1075
+ // loop row binds before it is inserted, so it asks from its future parent.
1076
+ function componentCallerScopeFrom(current, pageScope) {
1072
1077
  var ancestors = [];
1073
- var current = el && (el.parentElement || el.parentNode);
1074
1078
  while (current && current !== document) {
1075
1079
  if (current.getAttribute && current.hasAttribute('data-stx-scope'))
1076
1080
  ancestors.push(current.getAttribute('data-stx-scope'));
@@ -1267,7 +1271,7 @@ else {
1267
1271
  }
1268
1272
  });
1269
1273
  }
1270
- `;var he=` // Component composition API (Phase 4)
1274
+ `;var fe=` // Component composition API (Phase 4)
1271
1275
  defineProps: function(definitions) {
1272
1276
  var props = window.__STX_CURRENT_PROPS__ || {};
1273
1277
  if (!definitions) return props;
@@ -1325,7 +1329,7 @@ else {
1325
1329
  // implementation behind it (#1804).
1326
1330
  useSlots: function() {
1327
1331
  return window.__STX_CURRENT_SLOTS__ || {};
1328
- },`;var fe=` var __bindIfCounter = 0;
1332
+ },`;var he=` var __bindIfCounter = 0;
1329
1333
  // \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
1330
1334
  // Returns { name, terminal } for an else/else-if attribute present on el,
1331
1335
  // or null. terminal=true for the catch-all x-else (no further siblings
@@ -1734,7 +1738,7 @@ else {
1734
1738
  function stxConfirm(message, options) {
1735
1739
  return _createDialog(message, options, true);
1736
1740
  }
1737
- `;var be=` // ==========================================================================
1741
+ `;var we=` // ==========================================================================
1738
1742
  // DevTools introspection (stacksjs/stx#1747, Phase 1)
1739
1743
  // ==========================================================================
1740
1744
  // A read-only, console-usable inspector wired to the live runtime \u2014 no manual
@@ -1869,7 +1873,7 @@ else {
1869
1873
  return s ? __stxDevtoolsClassify(s) : null;
1870
1874
  },
1871
1875
  };
1872
- `;var we=` // ==========================================================================
1876
+ `;var be=` // ==========================================================================
1873
1877
  // Auto-initialization
1874
1878
  // ==========================================================================
1875
1879
 
@@ -2544,7 +2548,7 @@ finally {
2544
2548
  const names = __stxNamesIn(body);
2545
2549
  // A layered view answers from its layers directly: through the proxy,
2546
2550
  // each name cost a trap and a fresh property descriptor.
2547
- const own = __stxOwnOf.get(scope);
2551
+ const own = __stxOwnOf.get(__stxUnwrapTargetOf.get(scope) || scope);
2548
2552
  for (let i = 0; i < names.length; i++) {
2549
2553
  if (own !== undefined ? __stxLayerOf(own, names[i]) !== null : Object.prototype.propertyIsEnumerable.call(scope, names[i])) keys.push(names[i]);
2550
2554
  }
@@ -2981,12 +2985,12 @@ catch (e) {
2981
2985
  }
2982
2986
  throw e;
2983
2987
  }
2984
- }`;function Ae(e,s){return` // ==========================================================================
2988
+ }`;function Ae(e,o){return` // ==========================================================================
2985
2989
  // Declarative Data Fetching (Feature #6 - useFetch)
2986
2990
  // ==========================================================================
2987
2991
 
2988
2992
  var readHydratedData = ${e};
2989
- var clearServerData = ${s};
2993
+ var clearServerData = ${o};
2990
2994
 
2991
2995
  function useFetch(urlOrFn, options = {}) {
2992
2996
  const hydrated = readHydratedData(options.key, options.hydrate !== false, options.transform);
@@ -3305,6 +3309,9 @@ else {
3305
3309
  templateContent = wrapper;
3306
3310
  }
3307
3311
 
3312
+ // The native row plan: undefined until the first row asks for it, null
3313
+ // where this template keeps the generic path.
3314
+ let rowPlan;
3308
3315
  let currentElements = [];
3309
3316
  // One entry per list item, each holding EVERY node that item rendered.
3310
3317
  // currentElements stays flat for transition snapshots, but the keyed
@@ -3781,6 +3788,37 @@ catch (e) {
3781
3788
  signals.index.set(i);
3782
3789
  }
3783
3790
  } else {
3791
+ // A native screen builds its rows from a plan of the template, made
3792
+ // with the first row (signals-native-row-runtime). A row is bound
3793
+ // before it is inserted, so it reaches the host whole.
3794
+ if (rowPlan === undefined) {
3795
+ // A native :for is a template holding the row; a plan covers a
3796
+ // template of one element (the usual row) or a bare element.
3797
+ const rowTemplate = isTemplate
3798
+ ? (templateContent.childNodes.length === 1 ? templateContent.childNodes[0] : null)
3799
+ : templateContent;
3800
+ rowPlan = stxHost.isNative && typeof planNativeRow === 'function' && typeof stxHost.cloneElement === 'function'
3801
+ && rowTemplate && !slotScopeInfo && !componentSetupTemplates.length ? planNativeRow(rowTemplate) : null;
3802
+ }
3803
+ if (rowPlan && !tgIsGroup) {
3804
+ const plannedItem = state(list[i]);
3805
+ plannedItem._isStxLoopItem = true;
3806
+ const plannedIndex = state(i);
3807
+ const plannedScope = layerTemplateScopes(globalHelpers, passedScope, capturedScope || {});
3808
+ Object.defineProperty(plannedScope, itemName, { value: plannedItem, writable: true, enumerable: true, configurable: true });
3809
+ if (indexName) Object.defineProperty(plannedScope, indexName, { value: plannedIndex, writable: true, enumerable: true, configurable: true });
3810
+ const created = createNativeRow(rowPlan, plannedScope, parent);
3811
+ markLoopRow(created.root, itemName, plannedItem);
3812
+ const plannedRow = isTemplate
3813
+ ? [stxHost.anchor('stx-for-item-start'), created.root, stxHost.anchor('stx-for-item-end')]
3814
+ : [created.root];
3815
+ plannedRow.__stx_signals = { item: plannedItem, index: plannedIndex };
3816
+ for (let pi = 0; pi < plannedRow.length; pi++) stxHost.insert(parent, plannedRow[pi], cursor || placeholder);
3817
+ finishNativeRow(created);
3818
+ newElements.push(...plannedRow);
3819
+ newGroups.push(plannedRow);
3820
+ continue;
3821
+ }
3784
3822
  // New item \u2014 create DOM elements with a fresh item signal
3785
3823
  const elements = createItemElements(list[i], i, key);
3786
3824
  elements.forEach(el => {
@@ -3869,6 +3907,631 @@ catch (e) {
3869
3907
  if (tgIsGroup) parent.__stx_tg_init = true;
3870
3908
  });
3871
3909
  }
3910
+ `;var Ie=` // ==========================================================================
3911
+ // Native row plans
3912
+ // ==========================================================================
3913
+
3914
+ var __STX_ROW_GENERIC_ATTRS = { 'stx-hydrate': 1, 'data-stx-memo': 1, 'data-stx-suspense': 1, 'x-data': 1, 'data-stx-xdata': 1, ref: 1, 'data-stx-ref': 1, 'data-stx-lazy': 1, 'data-stx-slot-scope': 1 };
3915
+ var __STX_ROW_SKIPPED_EVENTS = { if: 1, for: 1, show: 1, model: 1, class: 1, style: 1, text: 1, html: 1, ref: 1 };
3916
+ var __STX_ROW_CONTROL_ATTRS = { value: 1, checked: 1, selected: 1, indeterminate: 1 };
3917
+ var __STX_IDENT = /^[A-Za-z_$][\\w$]*$/;
3918
+ var __STX_QUOTED = /'(?:[^'\\\\]|\\\\.)*'|"(?:[^"\\\\]|\\\\.)*"/g;
3919
+ var __STX_KEYWORDS = { return: 1, true: 1, false: 1, null: 1, typeof: 1, instanceof: 1, new: 1, this: 1, void: 1, in: 1, of: 1, delete: 1, function: 1, var: 1, let: 1, const: 1, if: 1, else: 1 };
3920
+
3921
+ function __stxAlwaysVisible() { return true; }
3922
+
3923
+ // A plan for rows cloned from \`template\`, or null where the generic path
3924
+ // has to make them.
3925
+ function planNativeRow(template) {
3926
+ if (!template || template.nodeType !== 1 || !template.attributes) return null;
3927
+ // Two scopes a row reads from: its own (bindings inside the row) and, for
3928
+ // a component, its caller's (the props the caller passes). Each keeps the
3929
+ // names its expressions mention and the functions compiled per shape.
3930
+ var plan = { sites: [], eval: rowGroup(), prop: rowGroup(), props: null, component: false, scopeId: null, setup: null, root: null };
3931
+ if (template.hasAttribute('data-stx-scope')) {
3932
+ plan.component = true;
3933
+ plan.scopeId = template.getAttribute('data-stx-template-scope') || template.getAttribute('data-stx-scope');
3934
+ var setups = window.__stx_componentSetups;
3935
+ plan.setup = setups && setups[plan.scopeId];
3936
+ if (typeof plan.setup !== 'function') return null;
3937
+ }
3938
+ try {
3939
+ plan.root = planRowNode(plan, template, true, false);
3940
+ }
3941
+ catch (e) {
3942
+ return null;
3943
+ }
3944
+ return plan.root ? plan : null;
3945
+ }
3946
+
3947
+ function rowGroup() {
3948
+ return { names: [], nameIndex: {}, shapes: new Map() };
3949
+ }
3950
+
3951
+ function planRowSite(plan, raw, kind) {
3952
+ var expr = raw.indexOf('&') === -1 ? raw : raw.replace(/&amp;/g, '&').replace(/&lt;/g, '<').replace(/&gt;/g, '>').replace(/&quot;/g, '"').replace(/&#39;/g, "'").replace(/&#x27;/g, "'");
3953
+ // The same body text each path compiles, so the functions are the ones
3954
+ // the generic path would have made.
3955
+ var body = kind === 'attr' || kind === 'text' || kind === 'prop' ? 'return (' + expr + ')'
3956
+ : kind === 'if' ? 'return ' + expr + ''
3957
+ : 'return ' + raw;
3958
+ var source = kind === 'attr' || kind === 'text' || kind === 'if' ? expr : raw;
3959
+ var group = kind === 'prop' ? plan.prop : plan.eval;
3960
+ if (parsePipeExpression(source, {}) !== null) throw new Error('pipe');
3961
+ if (plan.component && raw.indexOf(plan.scopeId) !== -1) throw new Error('scope id in an expression');
3962
+ // The names the expression can read: not the words of its quoted strings
3963
+ // (a class list in a ternary) nor keywords, which every row would
3964
+ // otherwise look up in its scope for nothing.
3965
+ var names = __stxNamesIn(source.replace(__STX_QUOTED, ' ')).filter(function(k) {
3966
+ return !__STX_KEYWORDS[k] && /^[a-zA-Z_$][a-zA-Z0-9_$]*$/.test(k);
3967
+ });
3968
+ for (var i = 0; i < names.length; i++) {
3969
+ if (group.nameIndex[names[i]] === undefined) {
3970
+ group.nameIndex[names[i]] = group.names.length;
3971
+ group.names.push(names[i]);
3972
+ }
3973
+ }
3974
+ var site = { index: plan.sites.length, kind: kind, group: group, expr: source, body: body, names: names, placeholder: /^__[A-Z_]+__$/.test(source.trim()), ident: __STX_IDENT.test(source.trim()), handler: null };
3975
+ plan.sites.push(site);
3976
+ return site;
3977
+ }
3978
+
3979
+ // One element of the template: its bindings, the attributes a row's copy
3980
+ // keeps, and its children. Throws where the template needs the generic path;
3981
+ // returns { generic: true } for an :if branch whose content does.
3982
+ function planRowNode(plan, tmpl, isRoot, inBranch) {
3983
+ var node = { tmpl: tmpl, attrs: [], ops: [], children: [], ifSite: null, generic: false, inert: false, remap: [] };
3984
+ var attrs = getElementAttributes(tmpl);
3985
+ var parentEvents = __stxWords(tmpl.getAttribute('data-stx-parent-events') || '');
3986
+ var parentBindings = isRoot && plan.component ? __stxWords(tmpl.getAttribute('data-stx-parent-bindings') || '') : [];
3987
+ // A component's props, as bindParentComponentProps reads them: each
3988
+ // parent binding from its :name attribute, else from the bindings an
3989
+ // enclosing loop deferred (data-stx-deferred-parent-bindings). What the
3990
+ // row leaves deferred is the same for every row.
3991
+ var deferredProps = null;
3992
+ if (isRoot && plan.component) {
3993
+ plan.props = [];
3994
+ deferredProps = readDeferredParentComponentProps(tmpl);
3995
+ for (var b = 0; b < parentBindings.length; b++) {
3996
+ var propName = parentBindings[b];
3997
+ var propExpression = tmpl.hasAttribute(':' + propName) ? tmpl.getAttribute(':' + propName) : deferredProps[propName];
3998
+ if (typeof propExpression !== 'string') continue;
3999
+ plan.props.push({ name: propName, site: planRowSite(plan, propExpression, 'prop') });
4000
+ delete deferredProps[propName];
4001
+ }
4002
+ }
4003
+ var generic = false;
4004
+ for (var i = 0; i < attrs.length; i++) {
4005
+ var name = attrs[i].name;
4006
+ var value = attrs[i].value;
4007
+ if (!name) continue;
4008
+ if (name === ':if' || name === '@if') {
4009
+ if (isRoot) throw new Error('root if');
4010
+ if (getElseAttrInfo(tmpl.nextElementSibling)) throw new Error('if chain');
4011
+ node.ifSite = planRowSite(plan, value, 'if');
4012
+ continue;
4013
+ }
4014
+ if (name === 'x-if' || getElseAttrInfo(tmpl)) throw new Error('chain');
4015
+ if ((name === ':for' || name === '@for' || name === 'x-for') && isForDirectiveExpression(value)) throw new Error('nested for');
4016
+ if (name === 'x-cloak') continue;
4017
+ if (name === 'data-stx-scope' || name === 'data-stx-template-scope') {
4018
+ if (!isRoot) throw new Error('nested component');
4019
+ continue;
4020
+ }
4021
+ if (__STX_ROW_GENERIC_ATTRS[name] || name.startsWith('::') || name.startsWith('x-') || name.startsWith('@bind:')) { generic = true; continue; }
4022
+ if (name.charCodeAt(0) === 58) {
4023
+ var bound = name.slice(1);
4024
+ var base = bound.split('.')[0];
4025
+ if (base === 'class' || base === 'style' || base === 'text') {
4026
+ if (name !== ':' + base) { generic = true; continue; }
4027
+ node.ops.push({ kind: base, site: planRowSite(plan, value, base) });
4028
+ if (base === 'text') node.inert = true;
4029
+ continue;
4030
+ }
4031
+ if (DIRECTIVE_NAMES[base] || EVENT_RE.test(bound)) { generic = true; continue; }
4032
+ if (isRoot && plan.component && parentBindings.indexOf(bound) !== -1) continue;
4033
+ if ((__STX_ROW_CONTROL_ATTRS[bound] && bound in tmpl) || (bound === 'src' && tmpl.tagName === 'IFRAME')) { generic = true; continue; }
4034
+ node.ops.push({ kind: 'attr', attrName: bound, site: planRowSite(plan, value, 'attr') });
4035
+ continue;
4036
+ }
4037
+ if (name.charCodeAt(0) === 64) {
4038
+ if (name === '@class' || name === '@style' || name === '@text') {
4039
+ var directive = name.slice(1);
4040
+ node.ops.push({ kind: directive, site: planRowSite(plan, value, directive) });
4041
+ if (directive === 'text') node.inert = true;
4042
+ continue;
4043
+ }
4044
+ var parts = name.slice(1).split('.');
4045
+ var eventName = parentEvents.find(function(event) { return event.toLowerCase() === parts[0].toLowerCase(); }) || parts[0];
4046
+ if (__STX_ROW_SKIPPED_EVENTS[eventName]) { generic = true; continue; }
4047
+ if (plan.component && value.indexOf(plan.scopeId) !== -1) throw new Error('scope id in a handler');
4048
+ node.ops.push({
4049
+ kind: 'event',
4050
+ eventName: eventName,
4051
+ modifiers: parts.slice(1),
4052
+ value: value,
4053
+ key: '__stx_evt_' + eventName + '_' + value.substring(0, 20),
4054
+ forwarded: isRoot && plan.component && parentEvents.indexOf(eventName) !== -1,
4055
+ });
4056
+ continue;
4057
+ }
4058
+ if (deferredProps && name === 'data-stx-deferred-parent-bindings' && plan.props.length) {
4059
+ if (Object.keys(deferredProps).length) node.attrs.push({ name: name, value: JSON.stringify(deferredProps) });
4060
+ continue;
4061
+ }
4062
+ if (plan.component && typeof value === 'string' && value.indexOf(plan.scopeId) !== -1) node.remap.push(node.attrs.length);
4063
+ node.attrs.push(attrs[i]);
4064
+ }
4065
+ if (generic) {
4066
+ if (!inBranch || !node.ifSite) throw new Error('generic content');
4067
+ return { tmpl: tmpl, generic: true, ifSite: node.ifSite };
4068
+ }
4069
+ var kids = tmpl.childNodes || [];
4070
+ for (var k = 0; k < kids.length; k++) {
4071
+ var child = kids[k];
4072
+ if (child.nodeType !== 1 || child.tagName === 'SCRIPT' || child.tagName === 'TEMPLATE' || child.__stx_scope) throw new Error('child kind');
4073
+ var hasIf = child.hasAttribute(':if') || child.hasAttribute('@if');
4074
+ node.children.push(planRowNode(plan, child, false, hasIf));
4075
+ }
4076
+ return node;
4077
+ }
4078
+
4079
+ // Which of the plan's names this row's scope holds, and the functions
4080
+ // compiled for that answer. Rows of one loop nearly always share one.
4081
+ function rowShape(group, own, layers) {
4082
+ var names = group.names;
4083
+ var signature = '';
4084
+ for (var i = 0; i < names.length; i++) {
4085
+ var layer = __stxLayerOf(own, names[i]);
4086
+ layers[i] = layer;
4087
+ signature += layer === null ? '0' : '1';
4088
+ }
4089
+ var shape = group.shapes.get(signature);
4090
+ if (!shape) {
4091
+ shape = { signature: signature, compiled: [] };
4092
+ group.shapes.set(signature, shape);
4093
+ }
4094
+ return shape;
4095
+ }
4096
+
4097
+ // How the expression uses a name its scope holds, worked out when a row
4098
+ // first evaluates it: a prop's scope keeps a signal its expression calls or
4099
+ // uses as a signal (createAutoUnwrapProxy's rule), everything else follows
4100
+ // the expression (StxAutoUnwrapHandler's).
4101
+ function rowSignalUse(site, name) {
4102
+ return site.kind === 'prop'
4103
+ ? (expressionCallsSignal(site.expr, name) || expressionUsesSignalApi(site.expr, name) ? 1 : 0)
4104
+ : expressionSignalUse(site.expr, name);
4105
+ }
4106
+
4107
+ function compileRowSite(site, shape) {
4108
+ var nameIndex = site.group.nameIndex;
4109
+ var keys = [];
4110
+ var uses = [];
4111
+ for (var i = 0; i < site.names.length; i++) {
4112
+ if (shape.signature.charCodeAt(nameIndex[site.names[i]]) === 49) {
4113
+ keys.push(site.names[i]);
4114
+ uses.push(rowSignalUse(site, site.names[i]));
4115
+ }
4116
+ }
4117
+ var slots = keys.map(function(key) { return nameIndex[key]; });
4118
+ var compiled = { keys: keys, slots: slots, uses: uses, fn: null, error: null };
4119
+ try { compiled.fn = __stxCompile(keys, site.body); }
4120
+ catch (e) { compiled.error = e; }
4121
+ shape.compiled[site.index] = compiled;
4122
+ return compiled;
4123
+ }
4124
+
4125
+ function readRowScope(own, key) {
4126
+ var layer = __stxLayerOf(own, key);
4127
+ return layer === null ? own[key] : layer[key];
4128
+ }
4129
+
4130
+ // What the expression's auto-unwrap proxy would hand the function for one
4131
+ // name (StxAutoUnwrapHandler.get with the expression).
4132
+ function unwrapRowValue(site, value, use) {
4133
+ if (value && typeof value === 'function' && (value._isSignal || value._isDerived)) {
4134
+ if (value._isStxLoopItem) return value();
4135
+ if (use === 1) return value;
4136
+ if (use === 0) return value();
4137
+ var keep;
4138
+ try {
4139
+ var current = value();
4140
+ keep = !(current && typeof current === 'object' && Object.prototype.hasOwnProperty.call(current, 'value'));
4141
+ }
4142
+ catch (e) { keep = true; }
4143
+ return keep ? value : value();
4144
+ }
4145
+ if (value && typeof value === 'object' && value._isStxStore) {
4146
+ if (!site.handler) {
4147
+ var expr = site.expr;
4148
+ site.handler = site.kind === 'prop'
4149
+ ? new StxAutoUnwrapHandler(function(prop) { return typeof prop === 'string' && (expressionCallsSignal(expr, prop) || expressionUsesSignalApi(expr, prop)); }, null)
4150
+ : new StxAutoUnwrapHandler(null, expr);
4151
+ }
4152
+ return new Proxy(value, site.handler);
4153
+ }
4154
+ return value;
4155
+ }
4156
+
4157
+ // An expression evaluated as its generic path does: through the unwrapping
4158
+ // scope first, then the raw scope, then reported and replaced by \`fallback\`.
4159
+ // \`at\`: the scope the site reads, as the row found it (row.local or row.caller).
4160
+ function evaluateRowSite(at, site, el, fallback, subscribe) {
4161
+ if (site.placeholder) return site.expr;
4162
+ var compiled = at.shape.compiled[site.index] || compileRowSite(site, at.shape);
4163
+ var keys = compiled.keys;
4164
+ var layers = at.layers;
4165
+ var raw = new Array(keys.length);
4166
+ var args = new Array(keys.length);
4167
+ for (var i = 0; i < keys.length; i++) {
4168
+ // The layer holding each name was found once for the row (rowShape):
4169
+ // the layers are the row's own objects and the scopes it was given.
4170
+ var value = layers[compiled.slots[i]][keys[i]];
4171
+ raw[i] = value;
4172
+ if (subscribe && value && typeof value === 'function' && (value._isSignal || value._isDerived)) value();
4173
+ args[i] = unwrapRowValue(site, value, compiled.uses[i]);
4174
+ }
4175
+ if (compiled.fn) {
4176
+ try {
4177
+ var result = compiled.fn.apply(null, args);
4178
+ if (site.kind === 'attr' || site.kind === 'text') {
4179
+ if (result && typeof result === 'function' && (result._isSignal || result._isDerived)) result = result();
4180
+ noteExprSuccess(site.expr);
4181
+ }
4182
+ return result;
4183
+ }
4184
+ catch (e1) {
4185
+ try {
4186
+ var retried = compiled.fn.apply(null, raw);
4187
+ if (site.kind === 'attr' || site.kind === 'text') {
4188
+ if (retried && typeof retried === 'function' && (retried._isSignal || retried._isDerived)) retried = retried();
4189
+ noteExprSuccess(site.expr);
4190
+ }
4191
+ return retried;
4192
+ }
4193
+ catch (e2) {
4194
+ return failRowSite(at, site, el, e2, fallback);
4195
+ }
4196
+ }
4197
+ }
4198
+ return failRowSite(at, site, el, compiled.error, fallback);
4199
+ }
4200
+
4201
+ function failRowSite(at, site, el, error, fallback) {
4202
+ reportUnknownBinding(error, site.expr, at.scope, el);
4203
+ if (site.kind === 'prop') {
4204
+ if (!(error instanceof ReferenceError) && !(error instanceof TypeError)) console.warn('[STX] Parent component prop error:', site.expr, error);
4205
+ return fallback;
4206
+ }
4207
+ var label = site.kind === 'attr' || site.kind === 'text' ? '[STX] Attribute expression error:'
4208
+ : site.kind === 'style' ? '[STX] Style expression error:'
4209
+ : site.kind === 'class' ? '[STX] Class expression error:' : '[STX] Expression error:';
4210
+ if (!(error instanceof ReferenceError) && !(error instanceof TypeError)) console.warn(label, site.expr, error);
4211
+ else if (site.kind === 'attr' || site.kind === 'text') noteExprFailure(site.expr, error);
4212
+ return fallback;
4213
+ }
4214
+
4215
+ // The visibility gates an element's attribute bindings wait on: every :if
4216
+ // around it, the row's own and those around the loop.
4217
+ function rowVisibility(el, row) {
4218
+ var gates = [];
4219
+ for (var node = el; node; node = node.parentNode) {
4220
+ if (node.__stx_if_visible) gates.push(node.__stx_if_visible);
4221
+ if (node === row.root && !node.parentNode) {
4222
+ for (var i = 0; i < row.outer.length; i++) gates.push(row.outer[i]);
4223
+ break;
4224
+ }
4225
+ }
4226
+ if (!gates.length) return __stxAlwaysVisible;
4227
+ if (gates.length === 1) { var gate = gates[0]; return function() { return gate(); }; }
4228
+ return function() {
4229
+ for (var g = 0; g < gates.length; g++) if (!gates[g]()) return false;
4230
+ return true;
4231
+ };
4232
+ }
4233
+
4234
+ // The nodes of one planned element, children placed and :if children
4235
+ // given their anchors, nothing bound yet.
4236
+ function buildRowNode(pnode, row) {
4237
+ var el = stxHost.cloneElement(pnode.tmpl, pnode.attrs);
4238
+ for (var r = 0; r < pnode.remap.length; r++) {
4239
+ var attribute = pnode.attrs[pnode.remap[r]];
4240
+ el.setAttribute(attribute.name, attribute.value.split(row.plan.scopeId).join(row.scopeId));
4241
+ }
4242
+ var kids = new Array(pnode.children.length);
4243
+ for (var i = 0; i < pnode.children.length; i++) {
4244
+ var child = pnode.children[i];
4245
+ var made;
4246
+ if (child.ifSite) {
4247
+ made = { pnode: child, el: null, anchor: stxHost.anchor('stx-if') };
4248
+ stxHost.append(el, made.anchor);
4249
+ }
4250
+ else {
4251
+ made = buildRowNode(child, row);
4252
+ stxHost.append(el, made.el);
4253
+ }
4254
+ kids[i] = made;
4255
+ }
4256
+ return { pnode: pnode, el: el, kids: kids, anchor: null };
4257
+ }
4258
+
4259
+ function bindRowNode(made, row) {
4260
+ var pnode = made.pnode;
4261
+ var el = made.el;
4262
+ var ops = pnode.ops;
4263
+ var visible = null;
4264
+ var urlWarning = null;
4265
+ for (var i = 0; i < ops.length; i++) {
4266
+ var op = ops[i];
4267
+ if (op.kind === 'attr') {
4268
+ if (!visible) visible = rowVisibility(el, row);
4269
+ if (!urlWarning) urlWarning = { warned: false };
4270
+ bindRowAttribute(el, op, row, visible, urlWarning);
4271
+ }
4272
+ else if (op.kind === 'class') {
4273
+ if (!visible) visible = rowVisibility(el, row);
4274
+ bindRowClass(el, op.site, row, visible);
4275
+ }
4276
+ else if (op.kind === 'style') {
4277
+ if (!visible) visible = rowVisibility(el, row);
4278
+ bindRowStyle(el, op.site, row, visible);
4279
+ }
4280
+ else if (op.kind === 'text') {
4281
+ el.__stx_inert_content = true;
4282
+ bindRowText(el, op.site, row);
4283
+ }
4284
+ else if (op.kind === 'event') {
4285
+ if (el[op.key]) continue;
4286
+ el[op.key] = true;
4287
+ var forwarded = op.forwarded && !!el.__stx_parent_scope;
4288
+ listenTemplateEvent(el, op.eventName, op.modifiers, op.value,
4289
+ forwarded ? layerTemplateScopes(globalHelpers, el.__stx_parent_scope) : row.evalScope, forwarded);
4290
+ }
4291
+ }
4292
+ if (pnode.inert) return;
4293
+ for (var k = 0; k < made.kids.length; k++) {
4294
+ var kid = made.kids[k];
4295
+ if (kid.anchor) bindRowIf(kid, made.el, row);
4296
+ else bindRowNode(kid, row);
4297
+ }
4298
+ }
4299
+
4300
+ function bindRowAttribute(el, op, row, visible, urlWarning) {
4301
+ effect(function() {
4302
+ if (!visible()) return;
4303
+ applyBoundAttribute(el, op.attrName, evaluateRowSite(row.local, op.site, el, ''), visible, urlWarning);
4304
+ });
4305
+ }
4306
+
4307
+ function bindRowText(el, site, row) {
4308
+ effect(function() { stxHost.setText(el, evaluateRowSite(row.local, site, el, '')); });
4309
+ }
4310
+
4311
+ function bindRowStyle(el, site, row, visible) {
4312
+ effect(function() {
4313
+ if (!visible()) return;
4314
+ stxHost.setStyle(el, evaluateRowSite(row.local, site, el, {}), true);
4315
+ });
4316
+ }
4317
+
4318
+ // bindClass, reading its names through the row's scope.
4319
+ function bindRowClass(el, site, row, visible) {
4320
+ var originalClasses = el.className;
4321
+ effect(function() {
4322
+ if (!visible()) return;
4323
+ var value = evaluateRowSite(row.local, site, el, '', true);
4324
+ if (typeof value === 'object' && value !== null && !Array.isArray(value)) {
4325
+ Object.keys(value).forEach(function(cls) {
4326
+ var tokens = cls.split(/\\s+/).filter(Boolean);
4327
+ if (value[cls]) tokens.forEach(function(t) { el.classList.add(t); });
4328
+ else tokens.forEach(function(t) { el.classList.remove(t); });
4329
+ });
4330
+ }
4331
+ else if (Array.isArray(value)) {
4332
+ el.className = [originalClasses, value.filter(Boolean).join(' ')].filter(Boolean).join(' ');
4333
+ }
4334
+ else {
4335
+ el.className = [originalClasses, value || ''].filter(Boolean).join(' ');
4336
+ }
4337
+ });
4338
+ }
4339
+
4340
+ // bindIf for an element of a planned row. Its element is made the first
4341
+ // time it shows, rather than cloned with the row and removed again.
4342
+ function bindRowIf(made, parentEl, row) {
4343
+ var pnode = made.pnode;
4344
+ var site = pnode.ifSite;
4345
+ var placeholder = made.anchor;
4346
+ var parent = parentEl;
4347
+ var el = null;
4348
+ var isInserted = false;
4349
+ var childrenProcessed = false;
4350
+ var firstRun = true;
4351
+ var direct = site.ident ? readRowScope(row.local.own, site.expr.trim()) : null;
4352
+ var directSignal = direct && (direct._isSignal || direct._isDerived) ? direct : null;
4353
+ effect(function() {
4354
+ parent = followPlaceholder(placeholder, parent, el ? [el] : []);
4355
+ var value = directSignal ? directSignal() : evaluateRowSite(row.local, site, null, '');
4356
+ var initial = firstRun;
4357
+ firstRun = false;
4358
+ if (!el) {
4359
+ if (!value) return;
4360
+ el = makeRowBranch(pnode, row);
4361
+ made.el = el;
4362
+ if (initial) {
4363
+ // Shown from the start: placed as the generic path's clone was.
4364
+ stxHost.insert(parent, el, placeholder.nextSibling);
4365
+ isInserted = true;
4366
+ }
4367
+ }
4368
+ stxHost.setVisible(el, !!value);
4369
+ if (value && !isInserted) {
4370
+ stxHost.insert(parent, el, placeholder.nextSibling);
4371
+ if (parent && parent.__stx_detached_if) parent.__stx_detached_if.delete(el);
4372
+ el.__stx_if_visible.set(true);
4373
+ el.__stx_shown_at = performance.now();
4374
+ isInserted = true;
4375
+ peek(resumeDetachedBranches);
4376
+ if (childrenProcessed) {
4377
+ queueMicrotask(function() {
4378
+ if (isInserted) peek(function() { resumeSubtreeScopes([el]); });
4379
+ });
4380
+ }
4381
+ }
4382
+ else if (!value && isInserted) {
4383
+ el.__stx_if_visible.set(false);
4384
+ suspendSubtreeScopes([el]);
4385
+ stxHost.remove(el);
4386
+ if (parent) {
4387
+ if (!parent.__stx_detached_if) parent.__stx_detached_if = new Set();
4388
+ parent.__stx_detached_if.add(el);
4389
+ }
4390
+ isInserted = false;
4391
+ }
4392
+ if (value && isInserted && !childrenProcessed) {
4393
+ childrenProcessed = true;
4394
+ peek(function() { hydrateRowBranch(made, row); });
4395
+ }
4396
+ });
4397
+ }
4398
+
4399
+ function makeRowBranch(pnode, row) {
4400
+ var el;
4401
+ if (pnode.generic) {
4402
+ el = stxHost.clone(pnode.tmpl);
4403
+ el.removeAttribute(':if');
4404
+ el.removeAttribute('@if');
4405
+ if (row.plan.component) remapRowSubtree(el, row);
4406
+ }
4407
+ else {
4408
+ var made = buildRowNode(pnode, row);
4409
+ el = made.el;
4410
+ el.__stx_row_made = made;
4411
+ }
4412
+ el.__stx_if_bound = true;
4413
+ el.__stx_if_visible = state(true);
4414
+ return el;
4415
+ }
4416
+
4417
+ function remapRowSubtree(el, row) {
4418
+ var oldId = row.plan.scopeId;
4419
+ [el].concat(stxHost.descendants(el)).forEach(function(node) {
4420
+ if (!node.attributes) return;
4421
+ getElementAttributes(node).forEach(function(attribute) {
4422
+ if (typeof attribute.value === 'string' && attribute.value.indexOf(oldId) !== -1)
4423
+ node.setAttribute(attribute.name, attribute.value.split(oldId).join(row.scopeId));
4424
+ });
4425
+ });
4426
+ }
4427
+
4428
+ function hydrateRowBranch(made, row) {
4429
+ var el = made.el;
4430
+ var built = el.__stx_row_made;
4431
+ if (built) {
4432
+ el.__stx_row_made = null;
4433
+ el.__stx_if_disposers = trackEffects(function() { bindRowNode(built, row); });
4434
+ resumeDetachedBranches();
4435
+ return;
4436
+ }
4437
+ // Generic content, processed as bindIf's shown branch is: once its row
4438
+ // is on the screen, since the generic walk reads the tree around it.
4439
+ var run = function() {
4440
+ if (!el.isConnected) {
4441
+ if (!row.inserted) { row.after.push(run); return; }
4442
+ var resume = function() { peek(run); };
4443
+ resume.el = el;
4444
+ detachedBranches.add(resume);
4445
+ return;
4446
+ }
4447
+ var wasTracked = !!el.__stx_disposers;
4448
+ if (wasTracked || !el.__stx_disposers)
4449
+ el.__stx_if_disposers = trackEffects(function() { processElement(el, row.evalScope); });
4450
+ resumeDetachedBranches();
4451
+ };
4452
+ run();
4453
+ }
4454
+
4455
+ // The scope a row's expressions read, with the layer each name lives in
4456
+ // found once (rowShape): the layers are the row's own objects and the
4457
+ // scopes it was given, so a read goes straight to the layer.
4458
+ function rowScopeAt(group, scope) {
4459
+ var own = __stxOwnOf.get(scope);
4460
+ var layers = new Array(group.names.length);
4461
+ return { scope: scope, own: own, layers: layers, shape: rowShape(group, own, layers) };
4462
+ }
4463
+
4464
+ // bindParentComponentProps for a planned row: the caller's props, each
4465
+ // evaluated with the function compiled for it, written as the generic
4466
+ // path writes them.
4467
+ function bindRowProps(root, row, callerScope) {
4468
+ root.__stx_parent_props_bound = true;
4469
+ var props = row.plan.props;
4470
+ var caller = row.caller = rowScopeAt(row.plan.prop, layerTemplateScopes(globalHelpers, callerScope));
4471
+ for (var i = 0; i < props.length; i++) bindRowProp(root, props[i], caller);
4472
+ }
4473
+
4474
+ function bindRowProp(root, prop, caller) {
4475
+ var name = prop.name;
4476
+ effect(function() {
4477
+ var value = evaluateRowSite(caller, prop.site, root, undefined);
4478
+ if (value && typeof value === 'function' && (value._isSignal || value._isDerived)) value = value();
4479
+ if (name.startsWith('aria-') && typeof value === 'boolean') stxHost.setAttribute(root, name, String(value));
4480
+ else if (value === null || value === undefined) stxHost.removeAttribute(root, name);
4481
+ else stxHost.setAttribute(root, name, value);
4482
+ syncComponentPropSignal(root, name, value);
4483
+ });
4484
+ }
4485
+
4486
+ // A row of \`plan\`, bound before it is inserted. \`parent\` is where it will
4487
+ // go; the caller inserts it and then calls finishNativeRow.
4488
+ function createNativeRow(plan, itemScope, parent) {
4489
+ var row = { plan: plan, root: null, scope: null, evalScope: null, local: null, caller: null, outer: [], after: [], inserted: false, scopeVars: null, scopeId: null };
4490
+ for (var node = parent; node; node = node.parentNode) if (node.__stx_if_visible) row.outer.push(node.__stx_if_visible);
4491
+ if (plan.component) row.scopeId = plan.scopeId + '_for_' + (++__forComponentScopeCounter);
4492
+ var made = buildRowNode(plan.root, row);
4493
+ var root = made.el;
4494
+ row.root = root;
4495
+ if (plan.component) {
4496
+ if (!root.hasAttribute('data-stx-template-scope')) root.setAttribute('data-stx-template-scope', plan.scopeId);
4497
+ root.setAttribute('data-stx-scope', row.scopeId);
4498
+ if (!(window.stx._scopes && window.stx._scopes[row.scopeId])) runClonedComponentSetup(plan.setup, root);
4499
+ var callerScope = componentCallerScopeFrom(parent, itemScope);
4500
+ root.__stx_parent_scope = callerScope;
4501
+ if (plan.props.length) bindRowProps(root, row, callerScope);
4502
+ var scopeVars = window.stx._scopes && window.stx._scopes[row.scopeId];
4503
+ if (!scopeVars) return { root: root, row: row };
4504
+ scopeVars.__el = root;
4505
+ row.scopeVars = scopeVars;
4506
+ row.scope = layerTemplateScopes(callerScope, scopeVars);
4507
+ // processElement layers the helpers and the component's variables over
4508
+ // this scope for each element; it already starts with the helpers (the
4509
+ // item scope's first layer) and ends with the variables, so the same
4510
+ // names resolve to the same layers through it as it is.
4511
+ row.evalScope = row.scope;
4512
+ }
4513
+ else {
4514
+ row.scope = itemScope;
4515
+ row.evalScope = layerTemplateScopes(globalHelpers, itemScope, findElementScope(parent) || {});
4516
+ }
4517
+ row.local = rowScopeAt(plan.eval, row.evalScope);
4518
+ var dispose = trackEffects(function() { bindRowNode(made, row); });
4519
+ if (plan.component) root.__stx_disposers = dispose;
4520
+ else root.__stx_effect_disposers = dispose;
4521
+ return { root: root, row: row };
4522
+ }
4523
+
4524
+ function finishNativeRow(created) {
4525
+ var row = created.row;
4526
+ row.inserted = true;
4527
+ var scopeVars = row.scopeVars;
4528
+ if (scopeVars && scopeVars.__mountCallbacks && !scopeVars.__mounted) {
4529
+ scopeVars.__mounted = true;
4530
+ runMountCallbacks(scopeVars.__mountCallbacks, scopeDestroySink(scopeVars));
4531
+ }
4532
+ var after = row.after.splice(0, row.after.length);
4533
+ for (var i = 0; i < after.length; i++) after[i]();
4534
+ }
3872
4535
  `;var Ce=` // Also expose globally for convenience
3873
4536
  window.state = state;
3874
4537
  window.derived = derived;
@@ -3936,7 +4599,7 @@ catch (e) {
3936
4599
  // Note: SPA Router and View Transitions CSS are provided by the canonical
3937
4600
  // router script (packages/router/src/client.ts) which is injected alongside
3938
4601
  // the signals runtime or via the @stxRouter directive.
3939
- `;var Ie=` function expressionUsesSignalApi(expression, name) {
4602
+ `;var Re=` function expressionUsesSignalApi(expression, name) {
3940
4603
  var escapedName = name.replace(/[-/\\\\^$*+?.()|[\\]{}]/g, '\\\\$&');
3941
4604
  return expressionUsesSignalMethod(expression, name)
3942
4605
  || expressionUsesSignalValue(expression, name);
@@ -3957,27 +4620,50 @@ catch (e) {
3957
4620
  return new RegExp('(?:^|[^\\\\w$])' + escapedName + '\\\\s*\\\\(').test(expression);
3958
4621
  }
3959
4622
 
3960
- function createExpressionAutoUnwrapProxy(scope, expression) {
3961
- return createAutoUnwrapProxy(scope, function(prop, signal) {
3962
- if (typeof prop !== 'string') return false;
3963
- if (expressionCallsSignal(expression, prop) || expressionUsesSignalMethod(expression, prop))
3964
- return true;
3965
- if (!expressionUsesSignalValue(expression, prop))
3966
- return false;
4623
+ // What an expression does with a signal it names: calls it, calls one of
4624
+ // its methods, reads its .value, or none of these. It depends only on the
4625
+ // expression and the name, so it is worked out once: three regular
4626
+ // expressions were built for every signal an expression read, every time
4627
+ // it ran.
4628
+ const __stxSignalUse = new Map();
4629
+ function expressionSignalUse(expression, name) {
4630
+ let uses = __stxSignalUse.get(expression);
4631
+ if (uses === undefined) {
4632
+ if (__stxSignalUse.size >= 5000) __stxSignalUse.clear();
4633
+ uses = new Map();
4634
+ __stxSignalUse.set(expression, uses);
4635
+ }
4636
+ let use = uses.get(name);
4637
+ if (use === undefined) {
4638
+ use = expression.indexOf(name) === -1 ? 0
4639
+ : expressionCallsSignal(expression, name) || expressionUsesSignalMethod(expression, name) ? 1
4640
+ : expressionUsesSignalValue(expression, name) ? 2 : 0;
4641
+ uses.set(name, use);
4642
+ }
4643
+ return use;
4644
+ }
4645
+
4646
+ function expressionKeepsSignal(expression, prop, signal) {
4647
+ if (typeof prop !== 'string') return false;
4648
+ const use = expressionSignalUse(expression, prop);
4649
+ if (use === 1) return true;
4650
+ if (use === 0) return false;
4651
+ // A :for item is itself represented by a signal. If that item's value
4652
+ // is an object with a real value field, item.value means the field,
4653
+ // not the signal wrapper API. Primitive signals still support
4654
+ // count.value, matching the explicit ref syntax.
4655
+ try {
4656
+ var currentValue = signal();
4657
+ return !(currentValue && typeof currentValue === 'object'
4658
+ && Object.prototype.hasOwnProperty.call(currentValue, 'value'));
4659
+ }
4660
+ catch (e) {
4661
+ return true;
4662
+ }
4663
+ }
3967
4664
 
3968
- // A :for item is itself represented by a signal. If that item's value
3969
- // is an object with a real value field, item.value means the field,
3970
- // not the signal wrapper API. Primitive signals still support
3971
- // count.value, matching the explicit ref syntax.
3972
- try {
3973
- var currentValue = signal();
3974
- return !(currentValue && typeof currentValue === 'object'
3975
- && Object.prototype.hasOwnProperty.call(currentValue, 'value'));
3976
- }
3977
- catch (e) {
3978
- return true;
3979
- }
3980
- });
4665
+ function createExpressionAutoUnwrapProxy(scope, expression) {
4666
+ return createExpressionUnwrapProxy(scope, expression);
3981
4667
  }
3982
4668
 
3983
4669
  function executeHandler(expr, event, el) {
@@ -4018,7 +4704,7 @@ catch (e) {
4018
4704
  console.warn('[STX] Handler error:', expr, e);
4019
4705
  }
4020
4706
  }
4021
- `;var Re=` // ==========================================================================
4707
+ `;var Oe=` // ==========================================================================
4022
4708
  // Client-side useHead / useSeoMeta
4023
4709
  // ==========================================================================
4024
4710
 
@@ -4110,7 +4796,46 @@ catch (e) {
4110
4796
  if (config.canonical) meta.push({ property: 'og:url', content: config.canonical });
4111
4797
  useHead({ title: config.title || config.ogTitle, meta: meta });
4112
4798
  }
4113
- `;var Oe=` // ==========================================================================
4799
+ `;var De=` // ==========================================================================
4800
+ // Name and word lists, remembered
4801
+ // ==========================================================================
4802
+
4803
+ // The same few strings (a component's parent-binding names, a prop's name)
4804
+ // are taken apart for every row of every list. A regular expression split
4805
+ // or replace is among the slowest things an interpreted engine does, so
4806
+ // each answer is kept. Callers must not change a returned list.
4807
+ var __stxWordLists = new Map();
4808
+ function __stxWords(text) {
4809
+ var words = __stxWordLists.get(text);
4810
+ if (words === undefined) {
4811
+ words = String(text).split(/\\s+/).filter(Boolean);
4812
+ if (__stxWordLists.size >= 2000) __stxWordLists.clear();
4813
+ __stxWordLists.set(text, words);
4814
+ }
4815
+ return words;
4816
+ }
4817
+ var __stxCamelNames = new Map();
4818
+ function __stxCamel(name) {
4819
+ var camel = __stxCamelNames.get(name);
4820
+ if (camel === undefined) {
4821
+ camel = name.replace(/-([a-z0-9])/g, function(_, c) { return c.toUpperCase(); });
4822
+ if (__stxCamelNames.size >= 2000) __stxCamelNames.clear();
4823
+ __stxCamelNames.set(name, camel);
4824
+ }
4825
+ return camel;
4826
+ }
4827
+ var __stxKebabNames = new Map();
4828
+ function __stxKebab(name) {
4829
+ var kebab = __stxKebabNames.get(name);
4830
+ if (kebab === undefined) {
4831
+ kebab = name.replace(/([A-Z])/g, function(_, c) { return '-' + c.toLowerCase(); });
4832
+ if (__stxKebabNames.size >= 2000) __stxKebabNames.clear();
4833
+ __stxKebabNames.set(name, kebab);
4834
+ }
4835
+ return kebab;
4836
+ }
4837
+
4838
+ // ==========================================================================
4114
4839
  // Global Helpers (Feature #5)
4115
4840
  // ==========================================================================
4116
4841
 
@@ -4239,7 +4964,7 @@ catch (e) {
4239
4964
  const deps = depsMap.get(key);
4240
4965
  if (deps) notifySubscribers(deps);
4241
4966
  }
4242
- `;var De=` // \u2500\u2500 Host \u2500\u2500
4967
+ `;var Me=` // \u2500\u2500 Host \u2500\u2500
4243
4968
  //
4244
4969
  // The tree this runtime mutates. Every write the binding layer makes to a
4245
4970
  // node goes through here, so the same runtime can drive something that is not
@@ -4490,7 +5215,7 @@ catch (e) {
4490
5215
  return ids;
4491
5216
  }
4492
5217
  };
4493
- `;var Me=` // Hydrate a subtree inserted AFTER initial load \u2014 e.g. a streamed suspense
5218
+ `;var Pe=` // Hydrate a subtree inserted AFTER initial load \u2014 e.g. a streamed suspense
4494
5219
  // boundary (#1746 Phase 3). Mirrors the SPA re-init pass, scoped to the
4495
5220
  // container: (1) executes the subtree's scoped setup scripts (inert when
4496
5221
  // inserted via innerHTML, so they're cloned into fresh script elements to
@@ -4541,7 +5266,7 @@ catch (e) {
4541
5266
  }
4542
5267
  window.dispatchEvent(new CustomEvent('stx:hydrated', { detail: { el: container, trigger: 'stream' } }));
4543
5268
  }
4544
- `;var Pe=` // ==========================================================================
5269
+ `;var Le=` // ==========================================================================
4545
5270
  // Post-hydration invariant sweep (stacksjs/stx#1773)
4546
5271
  // ==========================================================================
4547
5272
  //
@@ -4751,7 +5476,7 @@ catch (e) {
4751
5476
  _exprFailureCount = 0;
4752
5477
  }
4753
5478
  }
4754
- `;var Le=` // Reactive if/else-if/else chain. A single effect drives mutual exclusion:
5479
+ `;var Ve=` // Reactive if/else-if/else chain. A single effect drives mutual exclusion:
4755
5480
  // on each run it picks the first branch whose condition is truthy (the
4756
5481
  // trailing x-else always matches), inserts that branch, and removes
4757
5482
  // whichever branch was previously shown. One effect for the whole chain
@@ -5389,7 +6114,7 @@ else if (!value && isInserted) {
5389
6114
  }
5390
6115
  });
5391
6116
  }
5392
- `;function Ve(e,s,i,a,d){return` // One request for every caller that wants the same answer: run joins one
6117
+ `;function He(e,o,l,r,d){return` // One request for every caller that wants the same answer: run joins one
5393
6118
  // in flight, fresh waits one out and asks again, latest replaces a request
5394
6119
  // counter. See shared-request.ts; cached queries are built on it.
5395
6120
  var sharedRequest = (${d});
@@ -5408,8 +6133,8 @@ else if (!value && isInserted) {
5408
6133
  // off the critical path and read back asynchronously. Values kept before it
5409
6134
  // are read where they are.
5410
6135
  var STX_KEPT_PREFIX = 'stx:kept:';
5411
- var __stxKept = (${e})(undefined, ${s});
5412
- var __stxQueries = (${i})({ state: state, kept: __stxKept, prefix: STX_KEPT_PREFIX, matches: ${a}, sharedRequest: sharedRequest });
6136
+ var __stxKept = (${e})(undefined, ${o});
6137
+ var __stxQueries = (${l})({ state: state, kept: __stxKept, prefix: STX_KEPT_PREFIX, matches: ${r}, sharedRequest: sharedRequest });
5413
6138
  function stxKeptPrefix(scope) {
5414
6139
  return STX_KEPT_PREFIX + (scope === undefined || scope === null || scope === '' ? '' : String(scope) + ':');
5415
6140
  }
@@ -5453,7 +6178,7 @@ else if (!value && isInserted) {
5453
6178
  function cachedQuery(key, options) {
5454
6179
  return __stxQueries.cachedQuery(key, options);
5455
6180
  }
5456
- `}var He=` // Lazy hydration: defer processElement for subtrees marked with stx-hydrate.
6181
+ `}var je=` // Lazy hydration: defer processElement for subtrees marked with stx-hydrate.
5457
6182
  // Triggers: "visible" (IntersectionObserver), "idle" (requestIdleCallback),
5458
6183
  // "interaction" (mouseenter/click/focus), "media:<query>" (matchMedia).
5459
6184
  function deferHydration(el, trigger, scope) {
@@ -5585,7 +6310,7 @@ else if (!value && isInserted) {
5585
6310
  run();
5586
6311
  }
5587
6312
  }
5588
- `;var je=` // ==========================================================================
6313
+ `;var Ue=` // ==========================================================================
5589
6314
  // Lifecycle
5590
6315
  // ==========================================================================
5591
6316
 
@@ -5713,7 +6438,7 @@ else if (!value && isInserted) {
5713
6438
  // Drain any early mount/destroy calls captured by the pre-initialization shim
5714
6439
  if (window.__stx_early_mounts) { window.__stx_early_mounts.forEach(function(fn) { mountCallbacks.push(fn); }); window.__stx_early_mounts = null; }
5715
6440
  if (window.__stx_early_destroys) { window.__stx_early_destroys.forEach(function(fn) { destroyCallbacks.push(fn); }); window.__stx_early_destroys = null; }
5716
- `;var Ue=` var __forComponentScopeCounter = 0;
6441
+ `;var qe=` var __forComponentScopeCounter = 0;
5717
6442
  var __forComponentSetupFactories = new Map();
5718
6443
 
5719
6444
  function forEachGroupElement(nodes, callback) {
@@ -5778,7 +6503,7 @@ else if (!value && isInserted) {
5778
6503
  }
5779
6504
  });
5780
6505
  }
5781
- `;var qe=` // A :for row is a clone of its template, so a conditional element in the row
6506
+ `;var Be=` // A :for row is a clone of its template, so a conditional element in the row
5782
6507
  // is built for every row whether or not its condition ever holds; :if then
5783
6508
  // parks the false ones. In WebKit a <video> or <audio> sets up a media player
5784
6509
  // as it is created: a message list with one media slot per attachment took
@@ -5891,7 +6616,7 @@ else if (!value && isInserted) {
5891
6616
  el.appendChild(fragment);
5892
6617
  remapForComponentScopes([el]);
5893
6618
  }
5894
- `;var Be=` // A loop row binds in its own iteration scope, and only its loop puts it
6619
+ `;var Ke=` // A loop row binds in its own iteration scope, and only its loop puts it
5895
6620
  // there. A walk from further out (an enclosing :if hydrating the branch it
5896
6621
  // shows) carries no item, so it used to bind whatever in the row was still
5897
6622
  // unbound -- a conditional's children, waiting for their own deferred pass
@@ -5931,7 +6656,7 @@ else if (!value && isInserted) {
5931
6656
  }
5932
6657
  return now;
5933
6658
  }
5934
- `;var Ke=` /**
6659
+ `;var Ge=` /**
5935
6660
  * Bind what the server said carries a binding, instead of looking for it.
5936
6661
  *
5937
6662
  * The walk exists because the runtime does not know where the bindings are.
@@ -6042,7 +6767,7 @@ else if (!value && isInserted) {
6042
6767
  }
6043
6768
  };
6044
6769
  }
6045
- `;var Ge=` function bindModel(el, expr, passedScope = componentScope, attrName = '@model') {
6770
+ `;var $e=` function bindModel(el, expr, passedScope = componentScope, attrName = '@model') {
6046
6771
  if (el.__stx_model_bound) return;
6047
6772
  el.__stx_model_bound = true;
6048
6773
  const tag = el.tagName.toLowerCase();
@@ -6200,7 +6925,7 @@ else {
6200
6925
 
6201
6926
  el.removeAttribute(attrName);
6202
6927
  }
6203
- `;var $e=` mountEl: function(selector, setupFn) {
6928
+ `;var We=` mountEl: function(selector, setupFn) {
6204
6929
  function doMount() {
6205
6930
  var root = document.querySelector(selector);
6206
6931
  if (!root) { console.warn('[stx] mountEl: element not found:', selector); return; }
@@ -6646,7 +7371,7 @@ else {
6646
7371
  }
6647
7372
  };
6648
7373
  }
6649
- `;var We=` // ==========================================================================
7374
+ `;var Xe=` // ==========================================================================
6650
7375
  // Optimistic State (useOptimistic) \u2014 stacksjs/stx#1742
6651
7376
  // ==========================================================================
6652
7377
  // Mirrors signals-api.ts useOptimistic. Shows base + pending actions while an
@@ -6679,7 +7404,7 @@ else {
6679
7404
  }
6680
7405
  return [optimistic, addOptimistic];
6681
7406
  }
6682
- `;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
7407
+ `;var Qe=` // \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
6683
7408
  //
6684
7409
  // One stack for everything that takes over the page: stxAlert/stxConfirm,
6685
7410
  // the runtime modal and drawer, @stacksjs/components' Dialog and Drawer, and
@@ -7053,7 +7778,7 @@ else {
7053
7778
  else modal.open(id);
7054
7779
  }
7055
7780
  };
7056
- `;var Qe=` // ==========================================================================
7781
+ `;var Ye=` // ==========================================================================
7057
7782
  // Advanced Data Fetching (useQuery / useMutation)
7058
7783
  // ==========================================================================
7059
7784
 
@@ -7403,7 +8128,7 @@ finally {
7403
8128
  reset: function() { data.set(null); error.set(null); loading.set(false); }
7404
8129
  };
7405
8130
  }
7406
- `;var Ye=` // ==========================================================================
8131
+ `;var Je=` // ==========================================================================
7407
8132
  // Notify
7408
8133
  // ==========================================================================
7409
8134
 
@@ -7428,16 +8153,16 @@ finally {
7428
8153
  collectSubscribers(subscribers, reached);
7429
8154
  reached.forEach(function(e) { e(); });
7430
8155
  }
7431
- `;function Je(e,s,i){return`${e} // ==========================================================================
8156
+ `;function Ze(e,o,l){return`${e} // ==========================================================================
7432
8157
  // Reactive Core
7433
8158
  // ==========================================================================
7434
8159
 
7435
- ${s}
8160
+ ${o}
7436
8161
  let activeEffect = null;
7437
8162
  const effectStack = [];
7438
8163
  const pendingEffects = new Set();
7439
8164
  let isBatching = false;
7440
- ${Ye}
8165
+ ${Je}
7441
8166
 
7442
8167
  // DevTools Phase 2 (#1747): dev-mode reactivity instrumentation. OFF by
7443
8168
  // default \u2014 even in the dev runtime \u2014 so set()/effect-run stay zero-overhead
@@ -7454,9 +8179,9 @@ ${Ye}
7454
8179
  function __stxDevtoolsNow() { return (typeof performance !== 'undefined' && performance.now) ? performance.now() : Date.now(); }
7455
8180
  function __stxDevtoolsRecordIf(rec) { if (!__stxDevtoolsTracking) return; __stxDevtoolsIfTrace.push(rec); if (__stxDevtoolsIfTrace.length > 100) __stxDevtoolsIfTrace.shift(); }
7456
8181
  function __stxDevtoolsRecordQuery(rec) { if (!__stxDevtoolsTracking) return; __stxDevtoolsQueries.push(rec); if (__stxDevtoolsQueries.length > 100) __stxDevtoolsQueries.shift(); }
7457
- ${i}
8182
+ ${l}
7458
8183
  let activeDisposers = null; // Array | null \u2014 when non-null, effects auto-register their dispose fn
7459
- const targetMap = new WeakMap();`}var Ze=` // Vue-compat aliases
8184
+ const targetMap = new WeakMap();`}var et=` // Vue-compat aliases
7460
8185
  var ref = state;
7461
8186
 
7462
8187
  // reactive() used to be a bare alias of state(), which made it the most
@@ -7521,7 +8246,7 @@ ${i}
7521
8246
  return proxy;
7522
8247
  }
7523
8248
  var computed = derived;
7524
- var watchEffect = function(fn) { return effect(fn); };`;var et=` // ==========================================================================
8249
+ var watchEffect = function(fn) { return effect(fn); };`;var tt=` // ==========================================================================
7525
8250
  // Pipe Syntax Support (Feature #2)
7526
8251
  // ==========================================================================
7527
8252
 
@@ -7707,7 +8432,46 @@ else {
7707
8432
 
7708
8433
  return value;
7709
8434
  }
7710
- `;function tt(e,s,i){return` // True for text a binding wrote, or markup :html injected: data, never
8435
+ `;function nt(e,o,l){return` // Known directive names to exclude from generic :attr binding
8436
+ var DIRECTIVE_NAMES = ${e};
8437
+
8438
+ // A bound value cannot introduce a URL scheme the page did not ask for.
8439
+ // This is the client half of url-safety.ts: the server refuses a scheme
8440
+ // substituted into an href, and x-href over a signal reaches the same
8441
+ // attribute by another road. Same policy, same unsafe: prefix, so a page
8442
+ // behaves the same whether the value arrived at render or at runtime.
8443
+ var URL_NAV_ATTR = {href:1, 'xlink:href':1, action:1, formaction:1, ping:1, cite:1, manifest:1, data:1, to:1};
8444
+ var URL_FETCH_ATTR = {src:1, srcset:1, poster:1, background:1};
8445
+ function __stxSafeUrlAttr(attrName, value, warning) {
8446
+ var navigable = URL_NAV_ATTR[attrName];
8447
+ if (!navigable && !URL_FETCH_ATTR[attrName]) return value;
8448
+ if (typeof value !== 'string' || !value) return value;
8449
+ // Browsers ignore ASCII whitespace and controls inside a scheme and match
8450
+ // it case-insensitively, so the spellings collapse before the test.
8451
+ var probe = value.replace(/[\\u0000-\\u0020\\u00a0\\u2000-\\u200f\\u2028\\u2029\\ufeff]+/g, '').toLowerCase();
8452
+ var refused = /^(?:javascript|vbscript|livescript|mocha|view-source):/.test(probe)
8453
+ || (navigable
8454
+ ? /^data:(?:text\\/html|text\\/xml|application\\/xhtml\\+xml|application\\/xml|image\\/svg\\+xml)/.test(probe)
8455
+ : /^data:(?:text\\/html|application\\/xhtml\\+xml)/.test(probe));
8456
+ if (!refused) return value;
8457
+ if (!warning.warned) {
8458
+ warning.warned = true;
8459
+ console.warn('[stx] refused a ' + attrName + ' value whose scheme can run script: ' + probe.slice(0, 24));
8460
+ }
8461
+ return 'unsafe:' + value;
8462
+ }
8463
+ // SVG attributes are case-sensitive, but the HTML parser lowercases
8464
+ // prefixed attribute names \u2014 ':viewBox' arrives as ':viewbox' because
8465
+ // the spec's "adjust SVG attributes" step only covers unprefixed names.
8466
+ // Without restoring the canonical casing, setAttribute('viewbox') creates
8467
+ // a dead duplicate attribute and the real viewBox never updates.
8468
+ 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'};
8469
+ var SVG_NS = 'http://www.w3.org/2000/svg';
8470
+ var EVENT_RE = ${o};
8471
+ var X_HANDLED = ${l};
8472
+ var KEY_MAP = {enter:'Enter', tab:'Tab', escape:'Escape', space:' ', up:'ArrowUp', down:'ArrowDown', left:'ArrowLeft', right:'ArrowRight', 'delete':'Delete', backspace:'Backspace'};
8473
+
8474
+ // True for text a binding wrote, or markup :html injected: data, never
7711
8475
  // template. Checked only for text that holds braces, so the climb is rare.
7712
8476
  function isInertContent(node) {
7713
8477
  for (var n = node; n; n = n.parentNode) if (n.__stx_inert_content) return true;
@@ -7949,7 +8713,8 @@ else if (part) {
7949
8713
  const activeScope = evaluationScope || attrCapturedScope;
7950
8714
  // Decode HTML entities that browsers may encode in attribute values
7951
8715
  // e.g. :text="a > b" may be stored as :text="a &gt; b" in HTML
7952
- var expr = rawExpr.replace(/&amp;/g,'&').replace(/&lt;/g,'<').replace(/&gt;/g,'>').replace(/&quot;/g,'"').replace(/&#39;/g,"'").replace(/&#x27;/g,"'");
8716
+ // Nearly no expression holds an entity: six replaces on every run of every binding.
8717
+ var expr = rawExpr.indexOf('&') === -1 ? rawExpr : rawExpr.replace(/&amp;/g,'&').replace(/&lt;/g,'<').replace(/&gt;/g,'>').replace(/&quot;/g,'"').replace(/&#39;/g,"'").replace(/&#x27;/g,"'");
7953
8718
  try {
7954
8719
  if (/^__[A-Z_]+__$/.test(expr.trim())) return expr;
7955
8720
 
@@ -7993,44 +8758,8 @@ catch (e2) {
7993
8758
  }
7994
8759
  };
7995
8760
 
7996
- // Known directive names to exclude from generic :attr binding
7997
- var DIRECTIVE_NAMES = ${e};
7998
-
7999
- // A bound value cannot introduce a URL scheme the page did not ask for.
8000
- // This is the client half of url-safety.ts: the server refuses a scheme
8001
- // substituted into an href, and x-href over a signal reaches the same
8002
- // attribute by another road. Same policy, same unsafe: prefix, so a page
8003
- // behaves the same whether the value arrived at render or at runtime.
8004
- var URL_NAV_ATTR = {href:1, 'xlink:href':1, action:1, formaction:1, ping:1, cite:1, manifest:1, data:1, to:1};
8005
- var URL_FETCH_ATTR = {src:1, srcset:1, poster:1, background:1};
8006
- var urlRefusalWarned = false;
8007
- function safeUrlAttr(attrName, value) {
8008
- var navigable = URL_NAV_ATTR[attrName];
8009
- if (!navigable && !URL_FETCH_ATTR[attrName]) return value;
8010
- if (typeof value !== 'string' || !value) return value;
8011
- // Browsers ignore ASCII whitespace and controls inside a scheme and match
8012
- // it case-insensitively, so the spellings collapse before the test.
8013
- var probe = value.replace(/[\\u0000-\\u0020\\u00a0\\u2000-\\u200f\\u2028\\u2029\\ufeff]+/g, '').toLowerCase();
8014
- var refused = /^(?:javascript|vbscript|livescript|mocha|view-source):/.test(probe)
8015
- || (navigable
8016
- ? /^data:(?:text\\/html|text\\/xml|application\\/xhtml\\+xml|application\\/xml|image\\/svg\\+xml)/.test(probe)
8017
- : /^data:(?:text\\/html|application\\/xhtml\\+xml)/.test(probe));
8018
- if (!refused) return value;
8019
- if (!urlRefusalWarned) {
8020
- urlRefusalWarned = true;
8021
- console.warn('[stx] refused a ' + attrName + ' value whose scheme can run script: ' + probe.slice(0, 24));
8022
- }
8023
- return 'unsafe:' + value;
8024
- }
8025
- // SVG attributes are case-sensitive, but the HTML parser lowercases
8026
- // prefixed attribute names \u2014 ':viewBox' arrives as ':viewbox' because
8027
- // the spec's "adjust SVG attributes" step only covers unprefixed names.
8028
- // Without restoring the canonical casing, setAttribute('viewbox') creates
8029
- // a dead duplicate attribute and the real viewBox never updates.
8030
- 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'};
8031
- var SVG_NS = 'http://www.w3.org/2000/svg';
8032
- var EVENT_RE = ${s};
8033
- var KEY_MAP = {enter:'Enter', tab:'Tab', escape:'Escape', space:' ', up:'ArrowUp', down:'ArrowDown', left:'ArrowLeft', right:'ArrowRight', 'delete':'Delete', backspace:'Backspace'};
8761
+ // One refusal warning per element, as before the policy moved out.
8762
+ var urlWarning = { warned: false };
8034
8763
 
8035
8764
  // Handle attributes
8036
8765
  getElementAttributes(el).forEach(attr => {
@@ -8065,13 +8794,12 @@ catch (e2) {
8065
8794
  // :attr still works for backward compat but is reserved for structural directives.
8066
8795
  // x-text, x-html, x-model, x-show, x-if, x-for, x-cloak, x-ref, x-data are
8067
8796
  // handled by their own code paths below \u2014 exclude them here.
8068
- var X_HANDLED = ${i};
8069
8797
  if (name.startsWith('@bind:') || name.startsWith('x-bind:')
8070
8798
  || (name.startsWith(':') && !name.startsWith('::') && !DIRECTIVE_NAMES[name.slice(1).split('.')[0]] && !EVENT_RE.test(name.slice(1)))
8071
8799
  || (name.startsWith('x-') && !X_HANDLED[name.split('.')[0]] && !X_HANDLED[name])) {
8072
8800
  let attrName = name.startsWith('@bind:') ? name.slice(6) : name.startsWith('x-bind:') ? name.slice(7) : name.startsWith('x-') ? name.slice(2) : name.slice(1);
8073
8801
  if (el.namespaceURI === SVG_NS && SVG_ATTR_CASE[attrName]) attrName = SVG_ATTR_CASE[attrName];
8074
- var parentBindingNames = (el.getAttribute && el.getAttribute('data-stx-parent-bindings') || '').split(/\\s+/);
8802
+ var parentBindingNames = __stxWords(el.getAttribute && el.getAttribute('data-stx-parent-bindings') || '');
8075
8803
  var bindingScope = el.__stx_parent_scope && parentBindingNames.includes(attrName)
8076
8804
  ? el.__stx_parent_scope
8077
8805
  : attrCapturedScope;
@@ -8085,112 +8813,7 @@ catch (e2) {
8085
8813
  effect(() => {
8086
8814
  if (!attributesVisible()) return;
8087
8815
  const v = evalAttrExpr(value, bindingScope);
8088
- // Form control values are live DOM properties. Setting only the HTML
8089
- // attribute does not update a <select>'s chosen option and can leave
8090
- // inputs displaying stale text after a reactive update.
8091
- if (attrName === 'value' && 'value' in el) {
8092
- var controlValue = v;
8093
- if (typeof v === 'object' && v !== null) {
8094
- try { controlValue = JSON.stringify(v); }
8095
- catch (e) { controlValue = String(v); }
8096
- }
8097
- controlValue = v === false || v === null || v === undefined ? '' : String(controlValue);
8098
- el.__stx_bound_value = controlValue;
8099
- var applyControlValue = function() {
8100
- if (!attributesVisible()) return;
8101
- var desiredValue = el.__stx_bound_value == null ? '' : String(el.__stx_bound_value);
8102
- el.value = desiredValue;
8103
- if (desiredValue === '' && el.tagName !== 'OPTION') el.removeAttribute(attrName);
8104
- else if (el.getAttribute(attrName) !== desiredValue) el.setAttribute(attrName, desiredValue);
8105
- if (typeof el.__stx_model_sync === 'function') el.__stx_model_sync();
8106
- };
8107
- applyControlValue();
8108
-
8109
- // A select's value binding is processed before its child
8110
- // directives. When a nested :for creates the matching options
8111
- // afterward, the browser otherwise leaves the first option
8112
- // selected. Keep the desired value and reapply it whenever the
8113
- // option tree changes, including later reactive list updates.
8114
- if (el.tagName === 'SELECT' && !el.__stx_value_observer && typeof window.MutationObserver !== 'undefined') {
8115
- el.__stx_value_observer = new window.MutationObserver(applyControlValue);
8116
- el.__stx_value_observer.observe(el, {
8117
- childList: true,
8118
- subtree: true,
8119
- attributes: true,
8120
- attributeFilter: ['value'],
8121
- });
8122
- el.__stx_destroy = el.__stx_destroy || [];
8123
- el.__stx_destroy.push(function() {
8124
- if (el.__stx_value_observer) el.__stx_value_observer.disconnect();
8125
- el.__stx_value_observer = null;
8126
- });
8127
- }
8128
- return;
8129
- }
8130
- // Checked, selected, and indeterminate are live DOM properties, just like value.
8131
- // Updating only the HTML attribute leaves a user-touched checkbox or
8132
- // radio in its previous state because the property becomes dirty.
8133
- // Indeterminate has no corresponding effective HTML attribute at all.
8134
- if ((attrName === 'checked' || attrName === 'selected' || attrName === 'indeterminate') && attrName in el) {
8135
- var selectedState = Boolean(v);
8136
- el[attrName] = selectedState;
8137
- if (attrName === 'indeterminate') {
8138
- el.removeAttribute(attrName);
8139
- }
8140
- else if (selectedState) {
8141
- el.setAttribute(attrName, '');
8142
- }
8143
- else {
8144
- el.removeAttribute(attrName);
8145
- }
8146
- return;
8147
- }
8148
- // aria-* and data-* carry a STRING: the platform's boolean attribute
8149
- // is presence, which cannot say "false" and wrote data-open="" for
8150
- // true, so a [data-open='true'] selector never matched. React renders
8151
- // both as "true" / "false", and so does this.
8152
- if ((attrName.startsWith('aria-') || attrName.startsWith('data-')) && typeof v === 'boolean') {
8153
- stxHost.setAttribute(el, attrName, String(v));
8154
- }
8155
- else if (typeof v === 'boolean') {
8156
- stxHost.setAttribute(el, attrName, v);
8157
- }
8158
- else if (v === null || v === undefined) {
8159
- stxHost.removeAttribute(el, attrName);
8160
- }
8161
- else {
8162
- var attrValue = v;
8163
- if (typeof v === 'object') {
8164
- try { attrValue = JSON.stringify(v); }
8165
- catch (e) { attrValue = String(v); }
8166
- }
8167
- var attrValueSafe = safeUrlAttr(attrName, attrValue);
8168
- // Keep structured values structured for non-DOM hosts. The DOM
8169
- // host serializes them at its boundary, preserving web output.
8170
- var hostValue = (typeof v === 'object' && v !== null) ? v : attrValueSafe;
8171
- // Writing the value an attribute already has is not nothing: a
8172
- // frame given its own src again loads again (an entry in the
8173
- // page's history each time) and a video restarts. A player whose
8174
- // rest and next set share a video re-set it on every step.
8175
- if (el.getAttribute(attrName) === String(attrValueSafe)) return;
8176
- // A frame already on the page that is pointed somewhere else
8177
- // navigates, and every navigation is an entry in the page's own
8178
- // history: a player showing a video per step left one per step,
8179
- // and Back had to be tapped through all of them before it left
8180
- // the screen. Out of the page and back in, the frame starts afresh
8181
- // (its first load adds no entry, and its old entries go with it).
8182
- var parentNode = el.parentNode;
8183
- if (attrName === 'src' && el.tagName === 'IFRAME' && parentNode && el.isConnected
8184
- && el.hasAttribute('src') && el.getAttribute('src') !== String(attrValueSafe)) {
8185
- var nextSibling = el.nextSibling;
8186
- parentNode.removeChild(el);
8187
- stxHost.setAttribute(el, attrName, hostValue);
8188
- parentNode.insertBefore(el, nextSibling);
8189
- }
8190
- else {
8191
- stxHost.setAttribute(el, attrName, hostValue);
8192
- }
8193
- }
8816
+ applyBoundAttribute(el, attrName, v, attributesVisible, urlWarning);
8194
8817
  });
8195
8818
  el.removeAttribute(name);
8196
8819
  }
@@ -8265,7 +8888,7 @@ else if (name === 'ref' || name === ':ref' || name === 'x-ref' || name === 'data
8265
8888
  const parts = name.slice(1).split('.');
8266
8889
  // HTML folds attribute names to lowercase; the forwarding metadata
8267
8890
  // retains the declared event spelling (e.g. update:modelValue).
8268
- const parentEventNames = (el.getAttribute && el.getAttribute('data-stx-parent-events') || '').split(/\\s+/);
8891
+ const parentEventNames = __stxWords(el.getAttribute && el.getAttribute('data-stx-parent-events') || '');
8269
8892
  const eventName = parentEventNames.find(function(event) {
8270
8893
  return event.toLowerCase() === parts[0].toLowerCase();
8271
8894
  }) || parts[0];
@@ -8288,146 +8911,11 @@ else if (name === 'ref' || name === ':ref' || name === 'x-ref' || name === 'data
8288
8911
 
8289
8912
  // Capture scope at setup time so @for loop variables are available when event fires
8290
8913
  const isForwardedComponentEvent = !!(el.__stx_parent_scope && parentEventNames.includes(eventName));
8291
- let eventCapturedScope = isForwardedComponentEvent
8914
+ const eventCapturedScope = isForwardedComponentEvent
8292
8915
  ? layerTemplateScopes(globalHelpers, el.__stx_parent_scope)
8293
8916
  : layerTemplateScopes(globalHelpers, scope, (findElementScope(el) || {}));
8294
8917
 
8295
- stxHost.listen(el, eventName, (event) => {
8296
- // A forwarded handler belongs to the caller, whose scope can be
8297
- // resolved again after this listener is bound: a component inside
8298
- // another component's :if, in a dialog, was bound against the
8299
- // page's scope and only later handed its real caller, so
8300
- // @pick="pickFromBank" found nothing and did nothing. Read it now.
8301
- if (isForwardedComponentEvent && el.__stx_parent_scope)
8302
- eventCapturedScope = layerTemplateScopes(globalHelpers, el.__stx_parent_scope);
8303
- // Vue-style component listeners fall through to the rendered native
8304
- // root unless the child emits the same event. Signal components use
8305
- // a scope wrapper, so native events arrive here from a descendant.
8306
- // Ignore that native event only after defineEmits() has declared or
8307
- // emitted the same name, preventing submit/click handlers from
8308
- // firing once for the native event and again for the CustomEvent.
8309
- var componentEmits = el.__stx_component_emits;
8310
- if (isForwardedComponentEvent && event.target !== el
8311
- && componentEmits && componentEmits[eventName]) return;
8312
-
8313
- // Vue-style component handlers receive the emitted payload directly.
8314
- // Native root events still receive the Event object so server-only
8315
- // components can forward clicks and other browser events.
8316
- var emittedArgs = isForwardedComponentEvent && event instanceof CustomEvent
8317
- && Array.isArray(event.__stx_emit_args) ? event.__stx_emit_args : null;
8318
- var handlerEvent = emittedArgs ? emittedArgs[0]
8319
- : isForwardedComponentEvent && event instanceof CustomEvent ? event.detail : event;
8320
-
8321
- // Skip an opener click that reaches UI which just became visible in
8322
- // this frame. A click whose target is inside the revealed subtree is
8323
- // a real interaction and must not be discarded, especially for
8324
- // async lists whose controls are usable as soon as they render.
8325
- if (eventName === 'click') {
8326
- var ancestor = el;
8327
- while (ancestor) {
8328
- if (ancestor.__stx_shown_at
8329
- && (performance.now() - ancestor.__stx_shown_at) < 50
8330
- && !(ancestor.contains && ancestor.contains(event.target))) return;
8331
- ancestor = ancestor.parentElement;
8332
- }
8333
- }
8334
- // System key modifiers
8335
- if (modifiers.includes('self') && event.target !== el) return;
8336
- if (modifiers.includes('ctrl') && !event.ctrlKey) return;
8337
- if (modifiers.includes('alt') && !event.altKey) return;
8338
- if (modifiers.includes('shift') && !event.shiftKey) return;
8339
- if (modifiers.includes('meta') && !event.metaKey) return;
8340
- // Key modifiers
8341
- for (var mi = 0; mi < modifiers.length; mi++) {
8342
- if (KEY_MAP[modifiers[mi]] && event.key !== KEY_MAP[modifiers[mi]]) return;
8343
- }
8344
- if (modifiers.includes('prevent')) event.preventDefault();
8345
- if (modifiers.includes('stop')) event.stopPropagation();
8346
- // Execute with captured scope (includes @for loop variables)
8347
- // For x-data scopes, expressions like "mobileOpen = !mobileOpen" need to
8348
- // read the signal value AND write back through the signal's setter.
8349
- try {
8350
- if (!value || /^__[A-Z_]+__$/.test(value.trim())) return;
8351
- var shorthandFn = parseEventShorthand(value, eventCapturedScope);
8352
- if (shorthandFn) { shorthandFn.apply(null, emittedArgs || [handlerEvent]); return; }
8353
- // Check if any scope values are signals (x-data pattern)
8354
- // A derived value reads like a signal in a handler, as it does in a
8355
- // binding: \`pick(selectedPackage)\` passes the package. Leaving it
8356
- // out handed the handler the derived's getter function, so
8357
- // \`selectedPackage.trainer_id\` was undefined with nothing said.
8358
- // Only the names the handler mentions. A page's scope holds
8359
- // hundreds; reading, testing and declaring every one of them on
8360
- // each click or hover cost far more than the handler itself.
8361
- var handlerNames = __stxNamesIn(value).filter(function(k) {
8362
- return /^[a-zA-Z_$][a-zA-Z0-9_$]*$/.test(k) && (k in eventCapturedScope);
8363
- });
8364
- var hasSignals = handlerNames.some(function(k) {
8365
- var v = eventCapturedScope[k];
8366
- return v && typeof v === 'function' && (v._isSignal || v._isDerived);
8367
- });
8368
- // Only use signal read/write proxy for DIRECT assignment expressions
8369
- // like "count = count + 1" or "open = !open". Function calls like
8370
- // "openModal()" handle their own signal.set() internally \u2014 the writeback
8371
- // would RESET signals to their pre-handler values.
8372
- var isDirectAssignment = hasSignals && /^[a-zA-Z_$]\\w*\\s*=/.test(value.trim()) && !value.trim().startsWith('==');
8373
- if (isDirectAssignment) {
8374
- var getVars = handlerNames.map(function(k) {
8375
- return 'var ' + k + ' = __s["' + k + '"] && typeof __s["' + k + '"] === "function" && (__s["' + k + '"]._isSignal || __s["' + k + '"]._isDerived) ? __s["' + k + '"]() : __s["' + k + '"]';
8376
- }).join(';');
8377
- var setVars = handlerNames.filter(function(k) {
8378
- var v = eventCapturedScope[k];
8379
- return v && typeof v === 'function' && v._isSignal;
8380
- }).map(function(k) {
8381
- return 'if(' + k + ' !== __s["' + k + '"]()) __s["' + k + '"].set(' + k + ')';
8382
- }).join(';');
8383
- var body = getVars + ';' + value + ';' + setVars;
8384
- var fn2 = __stxCompile(['__s', '$event'], body);
8385
- fn2(eventCapturedScope, handlerEvent);
8386
- } else if (hasSignals) {
8387
- // Function calls with signals in scope keep any signal used through
8388
- // its object API as a raw signal function, and unwrap the rest for
8389
- // primitive reads.
8390
- var unwrapVars = handlerNames.map(function(k) {
8391
- var v = eventCapturedScope[k];
8392
- // A :for item is a signal only as an implementation detail, so
8393
- // that keyed rows can update in place. Its \`.value\` is a field
8394
- // on the item, never the signal compatibility API \u2014 the same
8395
- // rule createAutoUnwrapProxy states for binding expressions.
8396
- // Without the carve-out, expressionUsesSignalApi sees
8397
- // \`option.value\` and hands the handler the raw signal, so a
8398
- // handler like \`pick(option.value)\` receives the whole item.
8399
- // It is not an error, so it lands silently: the wrong value is
8400
- // stored and only surfaces much later.
8401
- if (v && typeof v === 'function' && ((v._isSignal && !v._isStxLoopItem) || v._isDerived)
8402
- && (expressionCallsSignal(value, k) || expressionUsesSignalApi(value, k))) {
8403
- return 'var ' + k + ' = __s["' + k + '"]';
8404
- }
8405
- return 'var ' + k + ' = __s["' + k + '"] && typeof __s["' + k + '"] === "function" && (__s["' + k + '"]._isSignal || __s["' + k + '"]._isDerived) ? __s["' + k + '"]() : __s["' + k + '"]';
8406
- }).join(';');
8407
- var fn3 = __stxCompile(['__s', '$event'], unwrapVars + ';' + value);
8408
- fn3(eventCapturedScope, handlerEvent);
8409
- } else {
8410
- var fn = __stxCompileScoped(eventCapturedScope, ['$event'], value);
8411
- fn(...__stxArgs(fn, eventCapturedScope), handlerEvent);
8412
- }
8413
- }
8414
- catch (e) {
8415
- // See #1694: dropping the TypeError/ReferenceError carve-out for inline
8416
- // handlers \u2014 same reason as executeHandler above. Silencing these hid
8417
- // the substring-detector bug (auto-unwrap missing .set( inside helper
8418
- // calls) for ~30min of bisecting in the field.
8419
- console.warn('[STX] Handler error:', value, e);
8420
- }
8421
- }, {
8422
- capture: modifiers.includes('capture'),
8423
- // A touch or wheel listener that is not passive holds every scroll
8424
- // starting on the element until this thread has run it. Passive
8425
- // unless .prevent needs preventDefault() or .nonpassive asks.
8426
- passive: modifiers.includes('passive')
8427
- || (/^(touchstart|touchmove|wheel|mousewheel)$/i.test(eventName)
8428
- && !modifiers.includes('prevent') && !modifiers.includes('nonpassive')),
8429
- once: modifiers.includes('once')
8430
- });
8918
+ listenTemplateEvent(el, eventName, modifiers, value, eventCapturedScope, isForwardedComponentEvent);
8431
8919
  el.removeAttribute(name);
8432
8920
  }
8433
8921
  });
@@ -8447,10 +8935,312 @@ catch (e) {
8447
8935
  processElement(child, scope);
8448
8936
  });
8449
8937
  }
8450
- }`}var nt=` // ==========================================================================
8938
+ }
8939
+
8940
+ // A bound attribute's new value, written as the element's kind wants it:
8941
+ // live properties for form controls, strings for aria-/data- booleans, a
8942
+ // structured value kept structured for a native host. Shared by
8943
+ // processElement and the native row plans so both write a value one way.
8944
+ function applyBoundAttribute(el, attrName, v, attributesVisible, urlWarning) {
8945
+ // Form control values are live DOM properties. Setting only the HTML
8946
+ // attribute does not update a <select>'s chosen option and can leave
8947
+ // inputs displaying stale text after a reactive update.
8948
+ if (attrName === 'value' && 'value' in el) {
8949
+ var controlValue = v;
8950
+ if (typeof v === 'object' && v !== null) {
8951
+ try { controlValue = JSON.stringify(v); }
8952
+ catch (e) { controlValue = String(v); }
8953
+ }
8954
+ controlValue = v === false || v === null || v === undefined ? '' : String(controlValue);
8955
+ el.__stx_bound_value = controlValue;
8956
+ var applyControlValue = function() {
8957
+ if (!attributesVisible()) return;
8958
+ var desiredValue = el.__stx_bound_value == null ? '' : String(el.__stx_bound_value);
8959
+ el.value = desiredValue;
8960
+ if (desiredValue === '' && el.tagName !== 'OPTION') el.removeAttribute(attrName);
8961
+ else if (el.getAttribute(attrName) !== desiredValue) el.setAttribute(attrName, desiredValue);
8962
+ if (typeof el.__stx_model_sync === 'function') el.__stx_model_sync();
8963
+ };
8964
+ applyControlValue();
8965
+
8966
+ // A select's value binding is processed before its child
8967
+ // directives. When a nested :for creates the matching options
8968
+ // afterward, the browser otherwise leaves the first option
8969
+ // selected. Keep the desired value and reapply it whenever the
8970
+ // option tree changes, including later reactive list updates.
8971
+ if (el.tagName === 'SELECT' && !el.__stx_value_observer && typeof window.MutationObserver !== 'undefined') {
8972
+ el.__stx_value_observer = new window.MutationObserver(applyControlValue);
8973
+ el.__stx_value_observer.observe(el, {
8974
+ childList: true,
8975
+ subtree: true,
8976
+ attributes: true,
8977
+ attributeFilter: ['value'],
8978
+ });
8979
+ el.__stx_destroy = el.__stx_destroy || [];
8980
+ el.__stx_destroy.push(function() {
8981
+ if (el.__stx_value_observer) el.__stx_value_observer.disconnect();
8982
+ el.__stx_value_observer = null;
8983
+ });
8984
+ }
8985
+ return;
8986
+ }
8987
+ // Checked, selected, and indeterminate are live DOM properties, just like value.
8988
+ // Updating only the HTML attribute leaves a user-touched checkbox or
8989
+ // radio in its previous state because the property becomes dirty.
8990
+ // Indeterminate has no corresponding effective HTML attribute at all.
8991
+ if ((attrName === 'checked' || attrName === 'selected' || attrName === 'indeterminate') && attrName in el) {
8992
+ var selectedState = Boolean(v);
8993
+ el[attrName] = selectedState;
8994
+ if (attrName === 'indeterminate') {
8995
+ el.removeAttribute(attrName);
8996
+ }
8997
+ else if (selectedState) {
8998
+ el.setAttribute(attrName, '');
8999
+ }
9000
+ else {
9001
+ el.removeAttribute(attrName);
9002
+ }
9003
+ return;
9004
+ }
9005
+ // aria-* and data-* carry a STRING: the platform's boolean attribute
9006
+ // is presence, which cannot say "false" and wrote data-open="" for
9007
+ // true, so a [data-open='true'] selector never matched. React renders
9008
+ // both as "true" / "false", and so does this.
9009
+ if ((attrName.startsWith('aria-') || attrName.startsWith('data-')) && typeof v === 'boolean') {
9010
+ stxHost.setAttribute(el, attrName, String(v));
9011
+ }
9012
+ else if (typeof v === 'boolean') {
9013
+ stxHost.setAttribute(el, attrName, v);
9014
+ }
9015
+ else if (v === null || v === undefined) {
9016
+ stxHost.removeAttribute(el, attrName);
9017
+ }
9018
+ else {
9019
+ var attrValue = v;
9020
+ if (typeof v === 'object') {
9021
+ try { attrValue = JSON.stringify(v); }
9022
+ catch (e) { attrValue = String(v); }
9023
+ }
9024
+ var attrValueSafe = __stxSafeUrlAttr(attrName, attrValue, urlWarning);
9025
+ // Keep structured values structured for non-DOM hosts. The DOM
9026
+ // host serializes them at its boundary, preserving web output.
9027
+ var hostValue = (typeof v === 'object' && v !== null) ? v : attrValueSafe;
9028
+ // Writing the value an attribute already has is not nothing: a
9029
+ // frame given its own src again loads again (an entry in the
9030
+ // page's history each time) and a video restarts. A player whose
9031
+ // rest and next set share a video re-set it on every step.
9032
+ if (el.getAttribute(attrName) === String(attrValueSafe)) return;
9033
+ // A frame already on the page that is pointed somewhere else
9034
+ // navigates, and every navigation is an entry in the page's own
9035
+ // history: a player showing a video per step left one per step,
9036
+ // and Back had to be tapped through all of them before it left
9037
+ // the screen. Out of the page and back in, the frame starts afresh
9038
+ // (its first load adds no entry, and its old entries go with it).
9039
+ var parentNode = el.parentNode;
9040
+ if (attrName === 'src' && el.tagName === 'IFRAME' && parentNode && el.isConnected
9041
+ && el.hasAttribute('src') && el.getAttribute('src') !== String(attrValueSafe)) {
9042
+ var nextSibling = el.nextSibling;
9043
+ parentNode.removeChild(el);
9044
+ stxHost.setAttribute(el, attrName, hostValue);
9045
+ parentNode.insertBefore(el, nextSibling);
9046
+ }
9047
+ else {
9048
+ stxHost.setAttribute(el, attrName, hostValue);
9049
+ }
9050
+ }
9051
+ }
9052
+
9053
+ // An authored @event listener. The scope is re-read for a forwarded
9054
+ // component event, whose caller can be resolved after the listener is bound.
9055
+ function listenTemplateEvent(el, eventName, modifiers, value, eventCapturedScope, isForwardedComponentEvent) {
9056
+ stxHost.listen(el, eventName, (event) => {
9057
+ // A forwarded handler belongs to the caller, whose scope can be
9058
+ // resolved again after this listener is bound: a component inside
9059
+ // another component's :if, in a dialog, was bound against the
9060
+ // page's scope and only later handed its real caller, so
9061
+ // @pick="pickFromBank" found nothing and did nothing. Read it now.
9062
+ if (isForwardedComponentEvent && el.__stx_parent_scope)
9063
+ eventCapturedScope = layerTemplateScopes(globalHelpers, el.__stx_parent_scope);
9064
+ // Vue-style component listeners fall through to the rendered native
9065
+ // root unless the child emits the same event. Signal components use
9066
+ // a scope wrapper, so native events arrive here from a descendant.
9067
+ // Ignore that native event only after defineEmits() has declared or
9068
+ // emitted the same name, preventing submit/click handlers from
9069
+ // firing once for the native event and again for the CustomEvent.
9070
+ var componentEmits = el.__stx_component_emits;
9071
+ if (isForwardedComponentEvent && event.target !== el
9072
+ && componentEmits && componentEmits[eventName]) return;
9073
+
9074
+ // Vue-style component handlers receive the emitted payload directly.
9075
+ // Native root events still receive the Event object so server-only
9076
+ // components can forward clicks and other browser events.
9077
+ var emittedArgs = isForwardedComponentEvent && event instanceof CustomEvent
9078
+ && Array.isArray(event.__stx_emit_args) ? event.__stx_emit_args : null;
9079
+ var handlerEvent = emittedArgs ? emittedArgs[0]
9080
+ : isForwardedComponentEvent && event instanceof CustomEvent ? event.detail : event;
9081
+
9082
+ // Skip an opener click that reaches UI which just became visible in
9083
+ // this frame. A click whose target is inside the revealed subtree is
9084
+ // a real interaction and must not be discarded, especially for
9085
+ // async lists whose controls are usable as soon as they render.
9086
+ if (eventName === 'click') {
9087
+ var ancestor = el;
9088
+ while (ancestor) {
9089
+ if (ancestor.__stx_shown_at
9090
+ && (performance.now() - ancestor.__stx_shown_at) < 50
9091
+ && !(ancestor.contains && ancestor.contains(event.target))) return;
9092
+ ancestor = ancestor.parentElement;
9093
+ }
9094
+ }
9095
+ // System key modifiers
9096
+ if (modifiers.includes('self') && event.target !== el) return;
9097
+ if (modifiers.includes('ctrl') && !event.ctrlKey) return;
9098
+ if (modifiers.includes('alt') && !event.altKey) return;
9099
+ if (modifiers.includes('shift') && !event.shiftKey) return;
9100
+ if (modifiers.includes('meta') && !event.metaKey) return;
9101
+ // Key modifiers
9102
+ for (var mi = 0; mi < modifiers.length; mi++) {
9103
+ if (KEY_MAP[modifiers[mi]] && event.key !== KEY_MAP[modifiers[mi]]) return;
9104
+ }
9105
+ if (modifiers.includes('prevent')) event.preventDefault();
9106
+ if (modifiers.includes('stop')) event.stopPropagation();
9107
+ // Execute with captured scope (includes @for loop variables)
9108
+ // For x-data scopes, expressions like "mobileOpen = !mobileOpen" need to
9109
+ // read the signal value AND write back through the signal's setter.
9110
+ try {
9111
+ if (!value || /^__[A-Z_]+__$/.test(value.trim())) return;
9112
+ var shorthandFn = parseEventShorthand(value, eventCapturedScope);
9113
+ if (shorthandFn) { shorthandFn.apply(null, emittedArgs || [handlerEvent]); return; }
9114
+ // Check if any scope values are signals (x-data pattern)
9115
+ // A derived value reads like a signal in a handler, as it does in a
9116
+ // binding: \`pick(selectedPackage)\` passes the package. Leaving it
9117
+ // out handed the handler the derived's getter function, so
9118
+ // \`selectedPackage.trainer_id\` was undefined with nothing said.
9119
+ // Only the names the handler mentions. A page's scope holds
9120
+ // hundreds; reading, testing and declaring every one of them on
9121
+ // each click or hover cost far more than the handler itself.
9122
+ var handlerNames = __stxNamesIn(value).filter(function(k) {
9123
+ return /^[a-zA-Z_$][a-zA-Z0-9_$]*$/.test(k) && (k in eventCapturedScope);
9124
+ });
9125
+ var hasSignals = handlerNames.some(function(k) {
9126
+ var v = eventCapturedScope[k];
9127
+ return v && typeof v === 'function' && (v._isSignal || v._isDerived);
9128
+ });
9129
+ // Only use signal read/write proxy for DIRECT assignment expressions
9130
+ // like "count = count + 1" or "open = !open". Function calls like
9131
+ // "openModal()" handle their own signal.set() internally \u2014 the writeback
9132
+ // would RESET signals to their pre-handler values.
9133
+ var isDirectAssignment = hasSignals && /^[a-zA-Z_$]\\w*\\s*=/.test(value.trim()) && !value.trim().startsWith('==');
9134
+ if (isDirectAssignment) {
9135
+ var getVars = handlerNames.map(function(k) {
9136
+ return 'var ' + k + ' = __s["' + k + '"] && typeof __s["' + k + '"] === "function" && (__s["' + k + '"]._isSignal || __s["' + k + '"]._isDerived) ? __s["' + k + '"]() : __s["' + k + '"]';
9137
+ }).join(';');
9138
+ var setVars = handlerNames.filter(function(k) {
9139
+ var v = eventCapturedScope[k];
9140
+ return v && typeof v === 'function' && v._isSignal;
9141
+ }).map(function(k) {
9142
+ return 'if(' + k + ' !== __s["' + k + '"]()) __s["' + k + '"].set(' + k + ')';
9143
+ }).join(';');
9144
+ var body = getVars + ';' + value + ';' + setVars;
9145
+ var fn2 = __stxCompile(['__s', '$event'], body);
9146
+ fn2(eventCapturedScope, handlerEvent);
9147
+ } else if (hasSignals) {
9148
+ // Function calls with signals in scope keep any signal used through
9149
+ // its object API as a raw signal function, and unwrap the rest for
9150
+ // primitive reads.
9151
+ var unwrapVars = handlerNames.map(function(k) {
9152
+ var v = eventCapturedScope[k];
9153
+ // A :for item is a signal only as an implementation detail, so
9154
+ // that keyed rows can update in place. Its \`.value\` is a field
9155
+ // on the item, never the signal compatibility API \u2014 the same
9156
+ // rule createAutoUnwrapProxy states for binding expressions.
9157
+ // Without the carve-out, expressionUsesSignalApi sees
9158
+ // \`option.value\` and hands the handler the raw signal, so a
9159
+ // handler like \`pick(option.value)\` receives the whole item.
9160
+ // It is not an error, so it lands silently: the wrong value is
9161
+ // stored and only surfaces much later.
9162
+ if (v && typeof v === 'function' && ((v._isSignal && !v._isStxLoopItem) || v._isDerived)
9163
+ && (expressionCallsSignal(value, k) || expressionUsesSignalApi(value, k))) {
9164
+ return 'var ' + k + ' = __s["' + k + '"]';
9165
+ }
9166
+ return 'var ' + k + ' = __s["' + k + '"] && typeof __s["' + k + '"] === "function" && (__s["' + k + '"]._isSignal || __s["' + k + '"]._isDerived) ? __s["' + k + '"]() : __s["' + k + '"]';
9167
+ }).join(';');
9168
+ var fn3 = __stxCompile(['__s', '$event'], unwrapVars + ';' + value);
9169
+ fn3(eventCapturedScope, handlerEvent);
9170
+ } else {
9171
+ var fn = __stxCompileScoped(eventCapturedScope, ['$event'], value);
9172
+ fn(...__stxArgs(fn, eventCapturedScope), handlerEvent);
9173
+ }
9174
+ }
9175
+ catch (e) {
9176
+ // See #1694: dropping the TypeError/ReferenceError carve-out for inline
9177
+ // handlers \u2014 same reason as executeHandler above. Silencing these hid
9178
+ // the substring-detector bug (auto-unwrap missing .set( inside helper
9179
+ // calls) for ~30min of bisecting in the field.
9180
+ console.warn('[STX] Handler error:', value, e);
9181
+ }
9182
+ }, {
9183
+ capture: modifiers.includes('capture'),
9184
+ // A touch or wheel listener that is not passive holds every scroll
9185
+ // starting on the element until this thread has run it. Passive
9186
+ // unless .prevent needs preventDefault() or .nonpassive asks.
9187
+ passive: modifiers.includes('passive')
9188
+ || (/^(touchstart|touchmove|wheel|mousewheel)$/i.test(eventName)
9189
+ && !modifiers.includes('prevent') && !modifiers.includes('nonpassive')),
9190
+ once: modifiers.includes('once')
9191
+ });
9192
+ }
9193
+ `}var rt=` // ==========================================================================
8451
9194
  // Auto-unwrap Signals (Feature #1)
8452
9195
  // ==========================================================================
8453
9196
 
9197
+ // One handler class for every auto-unwrap proxy: an expression is
9198
+ // evaluated through a fresh one each time it runs, and a handler object
9199
+ // with closures of its own per proxy was a cost every binding paid in an
9200
+ // interpreter. A handler knows how to keep a signal either by a callback
9201
+ // (preserveSignal) or, for an expression, by what the expression does with
9202
+ // the name (expressionKeepsSignal), which needs no closure at all.
9203
+ function StxAutoUnwrapHandler(preserveSignal, expression) {
9204
+ this.preserveSignal = preserveSignal;
9205
+ this.expression = expression;
9206
+ }
9207
+ StxAutoUnwrapHandler.prototype.get = function(target, prop) {
9208
+ const val = target[prop];
9209
+ // If it's a signal or derived, call it to get the value
9210
+ if (val && typeof val === 'function' && (val._isSignal || val._isDerived)) {
9211
+ // Loop variables are implementation-detail signals so keyed rows can
9212
+ // update reactively. In template expressions they must behave like
9213
+ // their item value, including for objects with fields named value,
9214
+ // set, or subscribe. Otherwise item.value is mistaken for the
9215
+ // signal compatibility API and resolves to the whole item object.
9216
+ if (val._isStxLoopItem) return val();
9217
+ if (this.expression !== null) {
9218
+ if (expressionKeepsSignal(this.expression, prop, val)) return val;
9219
+ }
9220
+ else if (this.preserveSignal && this.preserveSignal(prop, val)) return val;
9221
+ return val();
9222
+ }
9223
+ // If it's an stx store, return a recursively-unwrapping wrapper so
9224
+ // store.signalProp resolves to the value in template expressions
9225
+ if (val && typeof val === 'object' && val._isStxStore) {
9226
+ return new Proxy(val, this);
9227
+ }
9228
+ return val;
9229
+ };
9230
+ StxAutoUnwrapHandler.prototype.set = function(target, prop, value) {
9231
+ const cur = target[prop];
9232
+ if (cur && typeof cur === 'function' && cur._isSignal && typeof cur.set === 'function') {
9233
+ cur.set(value);
9234
+ return true;
9235
+ }
9236
+ target[prop] = value;
9237
+ return true;
9238
+ };
9239
+
9240
+ // The scope an auto-unwrap proxy reads, so compiling an expression asks
9241
+ // the scope itself which names it holds rather than through the proxy.
9242
+ const __stxUnwrapTargetOf = new WeakMap();
9243
+
8454
9244
  // Create a proxy that auto-unwraps signals when accessed.
8455
9245
  // For stx stores (objects with _isStxStore), recursively wrap so nested
8456
9246
  // signal properties auto-unwrap too \u2014 this is what makes template
@@ -8458,37 +9248,15 @@ catch (e) {
8458
9248
  // resolve to the value. Action methods on the store pass through as
8459
9249
  // functions because they don't carry _isSignal/_isDerived markers.
8460
9250
  function createAutoUnwrapProxy(scope, preserveSignal) {
8461
- return new Proxy(scope, {
8462
- get(target, prop) {
8463
- const val = target[prop];
8464
- // If it's a signal or derived, call it to get the value
8465
- if (val && typeof val === 'function' && (val._isSignal || val._isDerived)) {
8466
- // Loop variables are implementation-detail signals so keyed rows can
8467
- // update reactively. In template expressions they must behave like
8468
- // their item value, including for objects with fields named value,
8469
- // set, or subscribe. Otherwise item.value is mistaken for the
8470
- // signal compatibility API and resolves to the whole item object.
8471
- if (val._isStxLoopItem) return val();
8472
- if (preserveSignal && preserveSignal(prop, val)) return val;
8473
- return val();
8474
- }
8475
- // If it's an stx store, return a recursively-unwrapping wrapper so
8476
- // store.signalProp resolves to the value in template expressions
8477
- if (val && typeof val === 'object' && val._isStxStore) {
8478
- return createAutoUnwrapProxy(val, preserveSignal);
8479
- }
8480
- return val;
8481
- },
8482
- set(target, prop, value) {
8483
- const cur = target[prop];
8484
- if (cur && typeof cur === 'function' && cur._isSignal && typeof cur.set === 'function') {
8485
- cur.set(value);
8486
- return true;
8487
- }
8488
- target[prop] = value;
8489
- return true;
8490
- }
8491
- });
9251
+ const proxy = new Proxy(scope, new StxAutoUnwrapHandler(preserveSignal || null, null));
9252
+ __stxUnwrapTargetOf.set(proxy, scope);
9253
+ return proxy;
9254
+ }
9255
+
9256
+ function createExpressionUnwrapProxy(scope, expression) {
9257
+ const proxy = new Proxy(scope, new StxAutoUnwrapHandler(null, expression));
9258
+ __stxUnwrapTargetOf.set(proxy, scope);
9259
+ return proxy;
8492
9260
  }
8493
9261
 
8494
9262
  // A proxy for the WRITE side of x-model, kept separate from the read proxy
@@ -8524,7 +9292,7 @@ catch (e) {
8524
9292
  },
8525
9293
  });
8526
9294
  }
8527
- `;function rt(e){return` // Component mount system
9295
+ `;function ot(e){return` // Component mount system
8528
9296
  var mountQueue = [];
8529
9297
 
8530
9298
  // MERGE, never replace (#1804). Three client bundles assign window.stx and
@@ -8648,7 +9416,7 @@ ${e}
8648
9416
  _scopes: {}, // Component-level scopes
8649
9417
  _scopeCounter: 0, // Counter for generating unique scope IDs during SPA navigation
8650
9418
  _latestSetup: window.__stx_latestSetup || null, // Latest SFC setup function (including scripts parsed before the runtime)
8651
- _stores: new Map(), // Global store registry \u2014 survives SPA navigation`}var ot=` // ==========================================================================
9419
+ _stores: new Map(), // Global store registry \u2014 survives SPA navigation`}var st=` // ==========================================================================
8652
9420
  // Template Refs (useRef)
8653
9421
  // ==========================================================================
8654
9422
 
@@ -8680,7 +9448,7 @@ ${e}
8680
9448
  Object.defineProperty(read, 'value', { get: read, enumerable: true });
8681
9449
  return read;
8682
9450
  }
8683
- `;var st=` // ==========================================================================
9451
+ `;var at=` // ==========================================================================
8684
9452
  // Scope Disposal
8685
9453
  // ==========================================================================
8686
9454
 
@@ -8888,7 +9656,7 @@ ${e}
8888
9656
  delete scopes[id];
8889
9657
  }
8890
9658
  }
8891
- `;var at=` // Helper to process elements while skipping already-processed scoped containers
9659
+ `;var it=` // Helper to process elements while skipping already-processed scoped containers
8892
9660
  function processElementSkipScopes(el, processedScopes) {
8893
9661
  if (processedScopes.has(el)) return;
8894
9662
  if (el.nodeType === Node.TEXT_NODE) {
@@ -8929,7 +9697,7 @@ ${e}
8929
9697
  if (el.tagName !== 'SCRIPT' && el.tagName !== 'STYLE') {
8930
9698
  Array.from(el.childNodes).forEach(child => processElementSkipScopes(child, processedScopes));
8931
9699
  }
8932
- }`;var it=` function bindShow(el, expr, passedScope = componentScope, attrName = '@show') {
9700
+ }`;var lt=` function bindShow(el, expr, passedScope = componentScope, attrName = '@show') {
8933
9701
  if (el.__stx_show_bound) return;
8934
9702
  el.__stx_show_bound = true;
8935
9703
 
@@ -8983,7 +9751,7 @@ ${e}
8983
9751
  }
8984
9752
  el.removeAttribute(attrName);
8985
9753
  }
8986
- `;var lt=` // Re-initialize components after SPA content swap.
9754
+ `;var ct=` // Re-initialize components after SPA content swap.
8987
9755
  // Debounce to handle rapid re-fires (HMR triggers navigate which triggers stx:load again).
8988
9756
  var _stxLoadTimer = null;
8989
9757
  if (window.__stxLoadHandler) {
@@ -9024,7 +9792,7 @@ ${e}
9024
9792
  var departingDestroys = null;
9025
9793
  function beginSwap() {
9026
9794
  departingDestroys = (departingDestroys || []).concat(destroyCallbacks.splice(0));
9027
- }`;var ct=` function _handleStxLoad() {
9795
+ }`;var dt=` function _handleStxLoad() {
9028
9796
  _stxLoadTimer = null;
9029
9797
  console.log('[stx:load] START. mountQueue:', mountQueue.length, '_latestSetup:', !!window.stx._latestSetup);
9030
9798
 
@@ -9210,7 +9978,7 @@ catch (e) { console.warn('[stx] destroy callback error:', e); }
9210
9978
  // Everything that should have hydrated has now had its chance (#1773).
9211
9979
  auditHydration(container, 'stx:load');
9212
9980
  }
9213
- `;var dt=` // ==========================================================================
9981
+ `;var ut=` // ==========================================================================
9214
9982
  // State Signal
9215
9983
  // ==========================================================================
9216
9984
 
@@ -9361,7 +10129,7 @@ finally {
9361
10129
  function memo(compute, equals) {
9362
10130
  return derived(compute, { equals: typeof equals === 'function' ? equals : Object.is });
9363
10131
  }
9364
- `;var ut=` // \u2500\u2500 Store System \u2500\u2500
10132
+ `;var pt=` // \u2500\u2500 Store System \u2500\u2500
9365
10133
  // Pinia-inspired, signals-based. Stores survive SPA navigation.
9366
10134
 
9367
10135
  defineStore: function(id, setupOrOptions, storeOptions) {
@@ -9821,7 +10589,7 @@ finally {
9821
10589
  }
9822
10590
  console.log('[stx:store] useStore:', id);
9823
10591
  return store;
9824
- },`;var pt=` // Storage access is guarded end to end (stacksjs/stx#1793). Every one of
10592
+ },`;var ft=` // Storage access is guarded end to end (stacksjs/stx#1793). Every one of
9825
10593
  // these can throw, and each throw took down the whole client script for the
9826
10594
  // page rather than just the composable:
9827
10595
  //
@@ -9899,7 +10667,7 @@ finally {
9899
10667
  window.addEventListener('storage', handler);
9900
10668
  onDestroy(function() { window.removeEventListener('storage', handler); });
9901
10669
  return s;
9902
- }`;var ft=` function bindStyle(el, expr, passedScope = componentScope, isVisible) {
10670
+ }`;var mt=` function bindStyle(el, expr, passedScope = componentScope, isVisible) {
9903
10671
  // Capture scope at setup time - use passed scope to preserve context
9904
10672
  const capturedScope = layerTemplateScopes(globalHelpers, passedScope, (findElementScope(el) || {}));
9905
10673
 
@@ -9934,7 +10702,7 @@ catch (e2) {
9934
10702
  stxHost.setStyle(el, value, true);
9935
10703
  });
9936
10704
  }
9937
- `;var mt=` // <Suspense> boundary (#1742). Aggregates the loading/error state of every
10705
+ `;var gt=` // <Suspense> boundary (#1742). Aggregates the loading/error state of every
9938
10706
  // descendant suspense query (useQuery/useFetch with { suspense: true }) for
9939
10707
  // which this is the nearest [data-stx-suspense] ancestor, and toggles three
9940
10708
  // regions accordingly: [data-stx-suspense-fallback] while any query is loading,
@@ -9992,7 +10760,7 @@ catch (e2) {
9992
10760
  var contentRoot = (contentEl === el) ? el : contentEl;
9993
10761
  Array.from(contentRoot.childNodes).forEach(function(child) { processElement(child, scope); });
9994
10762
  }
9995
- `;var gt=` // ==========================================================================
10763
+ `;var vt=` // ==========================================================================
9996
10764
  // Timer & Utility Composables
9997
10765
  // ==========================================================================
9998
10766
 
@@ -10393,7 +11161,7 @@ else if (timer === null) {
10393
11161
  }
10394
11162
  };
10395
11163
  }
10396
- `;var vt=` // \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
11164
+ `;var yt=` // \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
10397
11165
  (function() {
10398
11166
  var tip = null;
10399
11167
  function createTip() {
@@ -10432,7 +11200,7 @@ else if (timer === null) {
10432
11200
  document.addEventListener('focusin', function(e) { var el = e.target.closest('[x-tooltip]'); if (el) show(el); });
10433
11201
  document.addEventListener('focusout', function(e) { var el = e.target.closest('[x-tooltip]'); if (el) hide(); });
10434
11202
  })();
10435
- `;var yt=` // ==========================================================================
11203
+ `;var wt=` // ==========================================================================
10436
11204
  // Toast notification system
10437
11205
  // ==========================================================================
10438
11206
 
@@ -10728,7 +11496,7 @@ else if (timer === null) {
10728
11496
  });
10729
11497
  });
10730
11498
  }
10731
- `;var wt=` // ==========================================================================
11499
+ `;var _t=` // ==========================================================================
10732
11500
  // WebSocket Composable
10733
11501
  // ==========================================================================
10734
11502
 
@@ -10865,85 +11633,86 @@ else if (timer === null) {
10865
11633
  subscribe: subscribe
10866
11634
  };
10867
11635
  }
10868
- `;function ht(){let e=St(Hn());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 St(e){let s=[],i=0,a="console.log(";while(i<e.length){let d=e.indexOf(a,i);if(d===-1){s.push(e.slice(i));break}s.push(e.slice(i,d));let y=1,r=d+a.length;while(r<e.length&&y>0){let u=e[r];if(u==='"'||u==="'"||u==="`"){let f=u;r++;while(r<e.length&&e[r]!==f){if(e[r]==="\\")r++;r++}r++;continue}if(u==="(")y++;else if(u===")")y--;r++}s.push("0"),i=r}return s.join("")}function Hn(){return`${ae}${De}
10869
- ${Je(ie,ke,Te)}
11636
+ `;function ht(e={}){let o=kt(Hn(e));try{let r=new Bun.Transpiler({loader:"js",minifyWhitespace:!0}).transformSync(o);return r=r.replace(/\}(var |let |const |function )/g,"};$1"),r}catch{return o}}function kt(e){let o=[],l=0,r="console.log(";while(l<e.length){let d=e.indexOf(r,l);if(d===-1){o.push(e.slice(l));break}o.push(e.slice(l,d));let y=1,s=d+r.length;while(s<e.length&&y>0){let u=e[s];if(u==='"'||u==="'"||u==="`"){let h=u;s++;while(s<e.length&&e[s]!==h){if(e[s]==="\\")s++;s++}s++;continue}if(u==="(")y++;else if(u===")")y--;s++}o.push("0"),l=s}return o.join("")}function Hn(e={}){return`${ae}${Me}
11637
+ ${Ze(ie,ke,Te)}
10870
11638
 
10871
- ${Oe}
10872
- ${nt}
10873
- ${et}
10874
- ${dt}
11639
+ ${De}
11640
+ ${rt}
11641
+ ${tt}
11642
+ ${ut}
10875
11643
  ${xe}
10876
- ${je}
10877
- ${wt}
11644
+ ${Ue}
11645
+ ${_t}
10878
11646
  ${Ae(X.toString(),Q.toString())}
10879
- ${ot}
11647
+ ${st}
10880
11648
  ${ze}
10881
- ${Qe}
10882
- ${We}
11649
+ ${Ye}
11650
+ ${Xe}
10883
11651
  // ==========================================================================
10884
11652
  // Template Binding
10885
11653
  // ==========================================================================
10886
11654
 
10887
11655
  ${Ee}
10888
11656
  ${Se}
10889
- ${Ie}
10890
- ${He}
11657
+ ${Re}
11658
+ ${je}
10891
11659
  ${se}
10892
11660
  ${ue}
10893
11661
  ${me}
10894
- ${Ke}
10895
- ${tt(gl(),ml(),fl())}
10896
-
10897
- ${mt}
10898
- ${it}
10899
11662
  ${Ge}
11663
+ ${nt(ml(),hl(),gl())}
11664
+
11665
+ ${gt}
11666
+ ${lt}
11667
+ ${$e}
10900
11668
  ${ce}
10901
- ${ft}
11669
+ ${mt}
10902
11670
  ${bt}
10903
- ${Ue}
11671
+ ${qe}
10904
11672
  ${pe}
10905
- ${Be}
11673
+ ${Ke}
10906
11674
  ${Ne}
10907
- ${qe}
10908
- ${fe}
10909
- ${Le}
11675
+ ${e.native?Ie:""}
11676
+ ${Be}
11677
+ ${he}
11678
+ ${Ve}
10910
11679
  ${Fe}
10911
11680
  ${de}
10912
- ${gt}
11681
+ ${vt}
10913
11682
  ${re}
10914
- ${Ze}
11683
+ ${et}
10915
11684
 
10916
- ${pt}
11685
+ ${ft}
10917
11686
 
10918
11687
  var useBroadcastStream = ${ne.toString()};
10919
11688
 
10920
- ${Ve(J.toString(),Y.toString(),ee.toString(),Z.toString(),te.toString())}
11689
+ ${He(J.toString(),Y.toString(),ee.toString(),Z.toString(),te.toString())}
10921
11690
  ${ve}
10922
- ${oe(W.toString())}
10923
- ${Re}
10924
- ${yt}
11691
+ ${oe(z.toString())}
11692
+ ${Oe}
11693
+ ${wt}
10925
11694
 
10926
- ${Xe}
11695
+ ${Qe}
10927
11696
  ${ye}
10928
11697
  ${_e}
10929
- ${vt}
10930
- ${Me}
10931
- ${rt(he)}
11698
+ ${yt}
11699
+ ${Pe}
11700
+ ${ot(fe)}
10932
11701
 
10933
- ${ut}
11702
+ ${pt}
10934
11703
 
10935
- ${$e}
11704
+ ${We}
10936
11705
  });
10937
11706
 
10938
11707
  ${Ce}
10939
- ${be}
10940
11708
  ${we}
10941
- ${st}
10942
- ${Pe}
11709
+ ${be}
11710
+ ${at}
11711
+ ${Le}
10943
11712
  ${ge}
10944
- ${lt}
10945
11713
  ${ct}
10946
- ${at}
11714
+ ${dt}
11715
+ ${it}
10947
11716
  })();
10948
- `}var ah={state:le,derived:Vn,effect:Un,batch:bo,onMount:Gr,onDestroy:Jr,isSignal:Wn,isDerived:qn,untrack:wo,peek:Yr,generateSignalsRuntime:ht,generateSignalsRuntimeDev:Hn};
10949
- export{ht,Hn,ah};
11717
+ `}var ch={state:le,derived:Vn,effect:Un,batch:wo,onMount:Jr,onDestroy:Yr,isSignal:Wn,isDerived:qn,untrack:vo,peek:Zr,generateSignalsRuntime:ht,generateSignalsRuntimeDev:Hn};
11718
+ export{ht,Hn,ch};