@stacksjs/stx 0.2.914 → 0.2.917

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 (217) hide show
  1. package/dist/build-defer-scripts.d.ts +12 -0
  2. package/dist/build-defer-scripts.js +37 -0
  3. package/dist/build-externalize-repeated.js +2 -0
  4. package/dist/build-externalize.js +1 -1
  5. package/dist/builtins/image-delivery.js +2 -0
  6. package/dist/builtins/image-placeholder.js +2 -0
  7. package/dist/{chunk-2vdbt2a7.js → chunk-0adc8x2h.js} +1 -1
  8. package/dist/{chunk-tykdvjbe.js → chunk-0asdv3hk.js} +2 -2
  9. package/dist/{chunk-1mmv8wb8.js → chunk-0atz8fjx.js} +4 -4
  10. package/dist/chunk-0fm6avxt.js +3 -0
  11. package/dist/{chunk-5ya4nmmr.js → chunk-0sj79ha5.js} +4 -4
  12. package/dist/{chunk-dhkw1r4y.js → chunk-0v7555tr.js} +4 -4
  13. package/dist/{chunk-5jn2qyv7.js → chunk-11c7xg1z.js} +1 -1
  14. package/dist/chunk-11rnqey0.js +2 -0
  15. package/dist/{chunk-4b110x6r.js → chunk-16sfjkc4.js} +2 -2
  16. package/dist/{chunk-kmy34he2.js → chunk-1hbf5e1h.js} +2 -2
  17. package/dist/{chunk-9atdw0p8.js → chunk-1jvt9t3r.js} +2 -2
  18. package/dist/chunk-1mx3j280.js +2 -0
  19. package/dist/{chunk-0d3pkkrv.js → chunk-23x3k751.js} +2 -2
  20. package/dist/chunk-29v3b5ks.js +2 -0
  21. package/dist/chunk-2cay3heb.js +2 -0
  22. package/dist/{chunk-6yketqa1.js → chunk-2f5jjxcj.js} +2 -2
  23. package/dist/{chunk-razwegar.js → chunk-2vx2ben8.js} +2 -2
  24. package/dist/{chunk-132j46ey.js → chunk-302nw40c.js} +1 -1
  25. package/dist/chunk-31yx4sjh.js +2 -0
  26. package/dist/chunk-33fnbw33.js +2 -0
  27. package/dist/{chunk-wbsbrm6n.js → chunk-36cz2v8k.js} +30 -30
  28. package/dist/{chunk-9gptdyqq.js → chunk-388xpdw5.js} +31 -5
  29. package/dist/chunk-38kerh2r.js +2 -0
  30. package/dist/chunk-38y11q8x.js +2 -0
  31. package/dist/{chunk-kyfydbtg.js → chunk-3h4db9yb.js} +3 -3
  32. package/dist/{chunk-3m457a9q.js → chunk-3jc6yb02.js} +3 -3
  33. package/dist/chunk-3q80f7mt.js +2 -0
  34. package/dist/{chunk-fghf6amb.js → chunk-43sgpy4e.js} +5 -5
  35. package/dist/{chunk-w4177qn3.js → chunk-4e18r89n.js} +2 -2
  36. package/dist/chunk-4pve3r5a.js +2 -0
  37. package/dist/{chunk-c08jvjqt.js → chunk-4vz17ytv.js} +8 -8
  38. package/dist/chunk-5afnyvw5.js +2 -0
  39. package/dist/chunk-5d5dxts6.js +2 -0
  40. package/dist/chunk-5fdsyyfe.js +2 -0
  41. package/dist/chunk-67yr4m5h.js +2 -0
  42. package/dist/chunk-6aqr0e6s.js +2 -0
  43. package/dist/chunk-6bw02d1t.js +2 -0
  44. package/dist/chunk-76mn123c.js +2 -0
  45. package/dist/{chunk-3z3b98f0.js → chunk-789yp1tg.js} +3 -3
  46. package/dist/chunk-7ar11ccn.js +2 -0
  47. package/dist/chunk-7fc0vrs5.js +2 -0
  48. package/dist/chunk-82fg5gp6.js +2 -0
  49. package/dist/{chunk-gyv2bsmn.js → chunk-88fx8xc1.js} +2 -2
  50. package/dist/chunk-89r7bbsk.js +2 -0
  51. package/dist/{chunk-h8tgqq8x.js → chunk-8b8az19t.js} +5 -5
  52. package/dist/chunk-8egbh6z1.js +2 -0
  53. package/dist/chunk-8n9jd8cz.js +2 -0
  54. package/dist/{chunk-9tj16d70.js → chunk-8wqhzzkn.js} +2 -2
  55. package/dist/chunk-8x3yaahc.js +2 -0
  56. package/dist/{chunk-rcwg2pdk.js → chunk-91p8p2cc.js} +5 -5
  57. package/dist/chunk-94qc4zwb.js +2 -0
  58. package/dist/{chunk-d4hnj3ct.js → chunk-952dfmcb.js} +2 -2
  59. package/dist/{chunk-72pbhpq8.js → chunk-95j8660f.js} +2 -2
  60. package/dist/{chunk-75r2p1cz.js → chunk-9928zdej.js} +2 -2
  61. package/dist/{chunk-8f5x16ht.js → chunk-9ay18k46.js} +1 -1
  62. package/dist/{chunk-2gwgcybp.js → chunk-9kn81bmp.js} +1 -1
  63. package/dist/{chunk-9bexzgws.js → chunk-9tv0tw7f.js} +1 -1
  64. package/dist/{chunk-0h06ry05.js → chunk-9w9y84t5.js} +6 -6
  65. package/dist/chunk-a5h9bwrc.js +2 -0
  66. package/dist/{chunk-gg31th5s.js → chunk-ar6jeqmm.js} +4 -4
  67. package/dist/{chunk-kx3mmpfd.js → chunk-b5qzed8y.js} +37 -37
  68. package/dist/chunk-bej9kz05.js +2 -0
  69. package/dist/chunk-bh2khcet.js +2 -0
  70. package/dist/{chunk-4h48fgkz.js → chunk-bm6y085n.js} +3 -3
  71. package/dist/{chunk-9phqwza2.js → chunk-c13dv3wm.js} +10 -10
  72. package/dist/chunk-c6096ssb.js +2 -0
  73. package/dist/chunk-ccgabq3a.js +2 -0
  74. package/dist/{chunk-sdf4c754.js → chunk-cxsc37fg.js} +2 -2
  75. package/dist/{chunk-jap66ea8.js → chunk-da05660m.js} +37 -37
  76. package/dist/{chunk-2671myh8.js → chunk-dwt2drzf.js} +5 -5
  77. package/dist/chunk-e0tvd7jj.js +2 -0
  78. package/dist/{chunk-sg95ne5m.js → chunk-ezqfrea9.js} +5 -5
  79. package/dist/{chunk-z27szg5v.js → chunk-f0sxbgbm.js} +1 -1
  80. package/dist/{chunk-08bzdet4.js → chunk-fn1reean.js} +19 -19
  81. package/dist/{chunk-2m4d8jkv.js → chunk-frpsrv1e.js} +2 -2
  82. package/dist/{chunk-pc89t52s.js → chunk-ftvpz1j4.js} +5 -5
  83. package/dist/{chunk-zjrnz9yt.js → chunk-fvr3h2fr.js} +3 -3
  84. package/dist/{chunk-8p3vqt2q.js → chunk-fzcqw147.js} +2 -2
  85. package/dist/{chunk-jttzrv0w.js → chunk-gg715pj6.js} +5 -5
  86. package/dist/chunk-gmmqz698.js +2 -0
  87. package/dist/{chunk-nzw0y1ny.js → chunk-h0aw9hmc.js} +3 -3
  88. package/dist/chunk-hxftzw0x.js +2 -0
  89. package/dist/{chunk-mpfm5ctr.js → chunk-jr2r2nh5.js} +4 -4
  90. package/dist/chunk-js1wayhb.js +2 -0
  91. package/dist/chunk-k2t0w8z1.js +2 -0
  92. package/dist/chunk-k8s3hyh2.js +2 -0
  93. package/dist/chunk-kcpxqsdj.js +2 -0
  94. package/dist/{chunk-nan0ysys.js → chunk-m8n14s3z.js} +2 -2
  95. package/dist/{chunk-as1p2pch.js → chunk-ma5ptt4m.js} +2 -2
  96. package/dist/{chunk-fyb9qy7x.js → chunk-mf5cqv1k.js} +9 -9
  97. package/dist/{chunk-jhegz7az.js → chunk-mgj074y2.js} +5 -5
  98. package/dist/chunk-mjr5fkc2.js +2 -0
  99. package/dist/{chunk-gqh8shzf.js → chunk-mt5ewkbg.js} +2 -2
  100. package/dist/{chunk-0m0w8rr1.js → chunk-n4m50dpk.js} +14 -14
  101. package/dist/chunk-na0e3s88.js +2 -0
  102. package/dist/chunk-new89wh2.js +2 -0
  103. package/dist/{chunk-eyw4g6kq.js → chunk-ngqb22wj.js} +9 -9
  104. package/dist/{chunk-v0yay1kw.js → chunk-nhyv3w4r.js} +1 -1
  105. package/dist/{chunk-yzgtsrjb.js → chunk-npj20tj9.js} +2 -2
  106. package/dist/{chunk-j01a1am0.js → chunk-nwef47nx.js} +1 -1
  107. package/dist/{chunk-zk1c6tg7.js → chunk-p3fepzt9.js} +3 -3
  108. package/dist/{chunk-z8rf8abt.js → chunk-p3x84jj0.js} +1 -1
  109. package/dist/chunk-p9bghe13.js +2 -0
  110. package/dist/{chunk-fycxc75p.js → chunk-pyyda92j.js} +1 -1
  111. package/dist/chunk-q2cwzgd0.js +2 -0
  112. package/dist/chunk-q60afqr7.js +2 -0
  113. package/dist/chunk-qdwtemy1.js +2 -0
  114. package/dist/chunk-qp0ndbk6.js +2 -0
  115. package/dist/{chunk-1ezcxbpg.js → chunk-qsexsrw2.js} +5 -5
  116. package/dist/{chunk-w3y8408q.js → chunk-r7y1196g.js} +2 -2
  117. package/dist/{chunk-ta7cwykn.js → chunk-ra2tzsvz.js} +4 -4
  118. package/dist/chunk-rzsvxjse.js +2 -0
  119. package/dist/chunk-s2c0ynn9.js +2 -0
  120. package/dist/{chunk-6w9av0n9.js → chunk-sdmq09jw.js} +1 -1
  121. package/dist/{chunk-qvjg8w1a.js → chunk-t65f98qv.js} +2 -2
  122. package/dist/chunk-v1wr2vdx.js +2 -0
  123. package/dist/{chunk-4fmfc48n.js → chunk-v78hjbz0.js} +3 -3
  124. package/dist/{chunk-ekyx5z50.js → chunk-vayzmvf5.js} +6 -6
  125. package/dist/{chunk-f9vch452.js → chunk-w6ydg43d.js} +3 -3
  126. package/dist/{chunk-e52rtbde.js → chunk-wc10m4tp.js} +3 -3
  127. package/dist/chunk-wcxa8xy2.js +2 -0
  128. package/dist/chunk-wgrj0cvs.js +2 -0
  129. package/dist/{chunk-49n9xce7.js → chunk-wj9bqkc0.js} +1 -1
  130. package/dist/{chunk-r4za879x.js → chunk-wm24jx3t.js} +2 -2
  131. package/dist/chunk-wpkwx3wq.js +2 -0
  132. package/dist/chunk-wq17dce6.js +2 -0
  133. package/dist/chunk-wvc6eayq.js +2 -0
  134. package/dist/chunk-xa98a901.js +2 -0
  135. package/dist/chunk-xjt5129x.js +2 -0
  136. package/dist/{chunk-eca022er.js → chunk-xnp031ba.js} +6 -6
  137. package/dist/{chunk-hgtcgz9b.js → chunk-yc3frw0z.js} +2 -2
  138. package/dist/chunk-yn02d599.js +2 -0
  139. package/dist/{chunk-g9bsafzx.js → chunk-yq2krsc9.js} +4 -4
  140. package/dist/chunk-ywrpmyzj.js +5 -0
  141. package/dist/{chunk-95x3jvmz.js → chunk-z110bf2c.js} +8 -6
  142. package/dist/{chunk-3syagjd7.js → chunk-zv3rn0ch.js} +4 -4
  143. package/dist/cli.js +14 -14
  144. package/dist/client/signals-mount-runtime.js +4 -2
  145. package/dist/craft-entry.js +2 -2
  146. package/dist/craft.js +2 -2
  147. package/dist/dev-server/ts-css.d.ts +1 -1
  148. package/dist/dev-server/ts-css.js +2 -2
  149. package/dist/index.d.ts +2 -0
  150. package/dist/index.js +2 -0
  151. package/dist/native/compiler/html-to-ir.d.ts +3 -1
  152. package/dist/native/compiler/html-to-ir.js +30 -0
  153. package/dist/process.js +1 -1
  154. package/dist/pwa.js +3 -3
  155. package/dist/serve-page-assets.d.ts +2 -0
  156. package/dist/serve-page-assets.js +14 -0
  157. package/dist/ssg.js +25 -25
  158. package/dist/types/config-types.d.ts +2 -0
  159. package/package.json +5 -5
  160. package/dist/chunk-1dc6h93m.js +0 -2
  161. package/dist/chunk-1htdsypj.js +0 -3
  162. package/dist/chunk-1k5ns68h.js +0 -2
  163. package/dist/chunk-2870sk9z.js +0 -2
  164. package/dist/chunk-2fyey6pn.js +0 -2
  165. package/dist/chunk-2jkq15je.js +0 -2
  166. package/dist/chunk-3d3f35fz.js +0 -2
  167. package/dist/chunk-3e3zsgke.js +0 -2
  168. package/dist/chunk-3fabcebr.js +0 -2
  169. package/dist/chunk-41y868zf.js +0 -2
  170. package/dist/chunk-5xsghm23.js +0 -2
  171. package/dist/chunk-7k1thytm.js +0 -2
  172. package/dist/chunk-8n42epb6.js +0 -5
  173. package/dist/chunk-94r6mkcy.js +0 -2
  174. package/dist/chunk-9s8he3d1.js +0 -2
  175. package/dist/chunk-9y4gz22m.js +0 -2
  176. package/dist/chunk-a02sy0m5.js +0 -2
  177. package/dist/chunk-abs4fwmf.js +0 -2
  178. package/dist/chunk-abxwggen.js +0 -2
  179. package/dist/chunk-asewbsct.js +0 -2
  180. package/dist/chunk-bprjp80g.js +0 -2
  181. package/dist/chunk-c60egpe6.js +0 -2
  182. package/dist/chunk-cjq455ve.js +0 -2
  183. package/dist/chunk-cqq68aw8.js +0 -2
  184. package/dist/chunk-d9066gp6.js +0 -2
  185. package/dist/chunk-dmsrpf7h.js +0 -2
  186. package/dist/chunk-fzh73jtc.js +0 -2
  187. package/dist/chunk-g3a2gx3p.js +0 -2
  188. package/dist/chunk-g6s4151k.js +0 -2
  189. package/dist/chunk-gcc5tp4j.js +0 -2
  190. package/dist/chunk-gf4a9h9x.js +0 -2
  191. package/dist/chunk-gmczbe3j.js +0 -2
  192. package/dist/chunk-h13csdpm.js +0 -2
  193. package/dist/chunk-h7k1y40p.js +0 -2
  194. package/dist/chunk-h7xqba9k.js +0 -2
  195. package/dist/chunk-hpxhxwda.js +0 -2
  196. package/dist/chunk-j846tv4t.js +0 -2
  197. package/dist/chunk-jnk3nk5k.js +0 -2
  198. package/dist/chunk-jy5gh22e.js +0 -2
  199. package/dist/chunk-jzbte09f.js +0 -2
  200. package/dist/chunk-k0b1t59r.js +0 -2
  201. package/dist/chunk-k5v22gn4.js +0 -2
  202. package/dist/chunk-kwh5pjqd.js +0 -2
  203. package/dist/chunk-mgcakk1m.js +0 -2
  204. package/dist/chunk-n3bt1sv5.js +0 -2
  205. package/dist/chunk-n62nqhey.js +0 -2
  206. package/dist/chunk-n6ve45hj.js +0 -2
  207. package/dist/chunk-ptrz5xwt.js +0 -2
  208. package/dist/chunk-q3ha3fcj.js +0 -2
  209. package/dist/chunk-qgc59a7d.js +0 -2
  210. package/dist/chunk-qjkpwjg6.js +0 -2
  211. package/dist/chunk-t4paeg33.js +0 -2
  212. package/dist/chunk-tfn3x8t2.js +0 -2
  213. package/dist/chunk-vhk7a79j.js +0 -2
  214. package/dist/chunk-vmn8vpp8.js +0 -2
  215. package/dist/chunk-x1svtz8k.js +0 -2
  216. package/dist/chunk-ykx4zt07.js +0 -2
  217. package/dist/chunk-zb75qq5j.js +0 -2
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{Th}from"./chunk-m8n14s3z.js";export{Th as processDeferDirectives};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{ec,tc,nc,rc,oy}from"./chunk-ezqfrea9.js";import"./chunk-36cz2v8k.js";import"./chunk-h0aw9hmc.js";import"./chunk-0vyytd9v.js";import"./chunk-n4m50dpk.js";import"./chunk-ngqb22wj.js";import"./chunk-43sgpy4e.js";import"./chunk-fs43342z.js";import"./chunk-0v7555tr.js";import"./chunk-0fm6avxt.js";import"./chunk-bm6y085n.js";import"./chunk-9tv0tw7f.js";import"./chunk-9w9y84t5.js";import"./chunk-8b8az19t.js";import"./chunk-nhyv3w4r.js";import"./chunk-t65f98qv.js";import"./chunk-0adc8x2h.js";import"./chunk-mf5cqv1k.js";import"./chunk-w6ydg43d.js";import"./chunk-2vx2ben8.js";import"./chunk-jr2r2nh5.js";import"./chunk-xnp031ba.js";import"./chunk-388xpdw5.js";import"./chunk-b5qzed8y.js";import"./chunk-p3x84jj0.js";import"./chunk-w98yt4d4.js";import"./chunk-4vz17ytv.js";import"./chunk-phzhmnnm.js";import"./chunk-9928zdej.js";import"./chunk-0jdz31q1.js";import"./chunk-16sfjkc4.js";export{ec as buildNative,oy as default,tc as findCraftBinary,rc as getAvailableFormats,nc as getAvailableTargets};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{R}from"./chunk-0jdz31q1.js";import{Ie,Wt,oe,F,Nn,ae,P}from"./chunk-kx3mmpfd.js";import{Zi,ho,d,m,M,Ee,p,yo,n,u,_}from"./chunk-c08jvjqt.js";import{kr}from"./chunk-0h06ry05.js";import{ge}from"./chunk-9bexzgws.js";import{js}from"./chunk-v0yay1kw.js";var he=1000,me=!1;function xe(t,r){let i=/@(include|partial)\s*\(\s*(['"])([^'"]+)\2\s*,\s*/g,e="",o=0,s;while((s=i.exec(t))!==null){let l=s.index+s[0].length,b=s.index+s[0].indexOf("("),x=_(t,"(",")",b);if(x===-1)continue;let f=t.slice(l,x).trim();if(!f)continue;if(!Object.keys(r).some((a)=>new RegExp(`(?:^|[^\\w$.])${a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}(?![\\w$])`).test(f)))continue;let h;try{let a=M(f,r);if(!a||typeof a!=="object")continue;h=JSON.stringify(a)}catch{continue}e+=t.slice(o,l)+h,o=x,i.lastIndex=x}return o===0?t:e+t.slice(o)}function be(t,r){let i=/@component\s*\(/g,e=t,o,s=[];while((o=i.exec(e))!==null){let l=o.index,b=l+o[0].length-1,x=1,f=b+1;while(f<e.length&&x>0){if(e[f]==="(")x++;else if(e[f]===")"){if(x--,x===0)break}f++}if(x!==0)continue;let c=e.substring(b+1,f),h=f+1,a=c.match(/^\s*['"]([^'"]+)['"]/);if(!a)continue;let y=a[1],g=c.slice(a[0].length),w=g.match(/^\s*,\s*/);if(!w)continue;let k=g.slice(w[0].length).trim();if(!k)continue;try{let S=M(k,r),B=JSON.stringify(S),I=`@component('${y}', ${B})`;s.push({start:l,end:h,replacement:I})}catch{continue}}for(let l=s.length-1;l>=0;l--){let{start:b,end:x,replacement:f}=s[l];e=e.substring(0,b)+f+e.substring(x)}return e}function se(t,r,i){let e=t,o=new RegExp(`${r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}\\(`),s;while((s=o.exec(e))!==null){let l=s.index,b=l+s[0].length-1,x=1,f=b+1,c=null,h=!1;while(f<e.length&&x>0){let g=e[f];if(h){h=!1,f++;continue}if(g==="\\"&&c){h=!0,f++;continue}if(c){if(g===c)c=null;f++;continue}if(g==='"'||g==="'"||g==="`"){c=g,f++;continue}if(g==="(")x++;else if(g===")"){if(x--,x===0)break}f++}if(x!==0)break;let a=e.substring(b+1,f),y=i(a);e=e.substring(0,l)+y+e.substring(f+1)}return e}function ye(t,r){let i=t;return i=i.replace(/:([a-zA-Z_][a-zA-Z0-9_-]*)(?=\s+[^=]|\s*\/?>|\s*$)/g,(e,o)=>{if(o in r)return`:${o}="${o}"`;return e}),i=i.replace(/:([a-zA-Z_][a-zA-Z0-9_-]*)\s*=\s*"([^"]*)"/g,(e,o,s)=>{try{if(F(s,r.__stx_client_signal_names||[]))return e;let l=Object.keys(r),b=Object.values(r);Zi(s);let x=!1,c=p(s,l,()=>{x=!0})(...b);if(x)return e;let h=JSON.stringify(c);if(h===void 0){if(!Ee(s).some((g)=>!(g in r)))return"";return e}let a=Buffer.from(h,"utf8").toString("base64");return`__stx_${o}="${a}"`}catch(l){return e}}),i}var Q="<!--__STX_BREAK__-->",ee="<!--__STX_CONTINUE__-->";function le(t,r){let i=/\{\{\{?|\{!!|@(break|continue)(?![\w$])/g,e="",o=0;for(let s=i.exec(t);s;s=i.exec(t)){if(!s[1]){let f=s[0].length===3&&s[0]==="{{{"?3:2,c=s[0]==="{!!"?t.indexOf("!!}",i.lastIndex):Ie(t,s.index,f);if(c<0)break;i.lastIndex=c+(s[0]==="{!!"?3:f);continue}let l=i.lastIndex,b=!0,x=/^\s*\(/.exec(t.slice(l));if(x){let f=l+x[0].length-1,c=_(t,"(",")",f);if(c<0)break;l=c+1;try{let h=`!!(${t.slice(f+1,c).trim()})`;b=m(h)?Boolean(p(h,Object.keys(r))(...Object.values(r))):Boolean(d(h,r))}catch{b=!1}}if(e+=t.slice(o,s.index),b)return e+(s[1]==="break"?Q:ee);o=l,i.lastIndex=l}return e+t.slice(o)}function ue(t){let r=(o)=>o.replace(/\\/g,"\\\\").replace(/`/g,"\\`").replace(/\$\{/g,"\\${"),i="",e=0;return Nn(t,(o,s,l)=>(i+=ie(r(t.slice(e,l))),i+=`\${__stxRenderLoopValue(${l}, (${s}), ${o.length})}`,e=l+o.length,o)),i+ie(r(t.slice(e)))}function fe(t,r,i,e){return ae(t,r,i==null?"":String(i),!1,e)}function ie(t){let r=t;return r=se(r,"@break",(i)=>{let e=i.trim();if(!yo(e))return"";return`\`; if (${e}) { break; } result += \``}),r=se(r,"@continue",(i)=>{let e=i.trim();if(!yo(e))return"";return`\`; if (${e}) { continue; } result += \``}),r=r.replace(/@break(?!\()/g,"`; break; result += `"),r=r.replace(/@continue(?!\()/g,"`; continue; result += `"),r}function _e(t){let r=/@forelse\s*\(/g,i,e=[],o=/@foreach\s*\(/g,s=/@endforeach/g,l;while((l=o.exec(t))!==null)e.push({pos:l.index,delta:1});while((l=s.exec(t))!==null)e.push({pos:l.index,delta:-1});e.sort((c,h)=>c.pos-h.pos);let b=[],x=0;for(let c of e)x+=c.delta,b.push({pos:c.pos,depth:x});function f(c){let h=0,a=b.length-1,y=0;while(h<=a){let g=h+a>>1;if(b[g].pos<=c)y=b[g].depth,h=g+1;else a=g-1}return y}while((i=r.exec(t))!==null){if(f(i.index)>0)continue;let c=i.index,h=i.index+i[0].length-1,a=1,y=h+1,g=-1;while(y<t.length&&a>0){if(t[y]==="(")a++;else if(t[y]===")"){if(a--,a===0){g=y;break}}y++}if(g===-1)continue;let w=t.substring(h+1,g),k=Wt(w);if(!k)continue;let{arrayExpr:S,itemVar:B}=k,I=g+1,A=1,T=I,K=/@forelse\s*\(/g,L=/@endforelse/g,V=-1;while(A>0&&T<t.length){K.lastIndex=T,L.lastIndex=T;let C=K.exec(t),E=L.exec(t);if(!E)break;if(C&&C.index<E.index)A++,T=C.index+C[0].length;else{if(A--,A===0){V=E.index;break}T=E.index+11}}if(V===-1)continue;let O=t.substring(I,V),Z=V+11,z=-1,D=0,N=0;while(N<O.length){let C=O.indexOf("@",N);if(C===-1)break;let E=O.substring(C);if(/^@forelse\s*\(/.test(E))D++,N=C+1;else if(E.startsWith("@endforelse"))D--,N=C+11;else if(D===0&&E.startsWith("@empty")){if(O.length<=C+6||!/[a-z]/i.test(O[C+6])){z=C;break}N=C+1}else N=C+1}if(z===-1)continue;return{start:c,end:Z,arrayExpr:S,itemVar:B,foreachContent:O.substring(0,z),emptyContent:O.substring(z+6)}}return null}function ce(t,r){let i=t;while(!0){let e=_e(i);if(!e)break;let{start:o,end:s,arrayExpr:l,itemVar:b,foreachContent:x,emptyContent:f}=e;try{let c;if(m(l))c=p(l,Object.keys(r))(...Object.values(r));else c=d(l,r);let h;if(!Array.isArray(c)||c.length===0)h=f;else h=`@foreach (${l} as ${b})${x}@endforeach`;i=i.substring(0,o)+h+i.substring(s)}catch(c){let h=c instanceof Error?c.message:String(c),a=u("Forelse",`Error in @forelse(${l} as ${b}): ${h}`,n.EVALUATION_ERROR);i=i.substring(0,o)+a+i.substring(s)}}return i}var de="<!--stx:foreach-not-iterable:",$e=/<!--stx:foreach-not-iterable:([^|>]*)\|([^>]*?)-->/g;function Re(t,r){return`${de}${encodeURIComponent(t)}|${encodeURIComponent(r)}-->`}function Ae(t,r){console.warn(`[stx] @foreach(${t}) in ${r}: ${t} is not iterable server-side, so the loop rendered nothing. `+"Values a server loop reads must come from <script server> or the page context \u2014 "+"a plain <script> runs in the browser.")}function Is(t){if(!t.includes(de))return t;return t.replace($e,(r,i,e)=>(Ae(decodeURIComponent(i),decodeURIComponent(e)),""))}function mg(t,r,i,e,o=!1){let s=ne(t,r,i,e,o),l=s.next();while(!l.done)l=s.next();return l.value}async function ui(t,r,i,e,o=!1){let s=ne(t,r,i,e,o),l=s.next();while(!l.done)await R(),l=s.next();return l.value}function*ne(t,r,i,e,o=!1){let s=t,l=new Set(r.__stx_client_signal_names||[]);for(let c of kr(t))l.add(c);if(l.size)r={...r,__stx_client_signal_names:[...l]};s=ce(s,r);function b(c){let h=/@foreach\s*\(/g,a;while((a=h.exec(c))!==null){let y=a.index,g=a.index+a[0].length-1,w=1,k=g+1,S=-1;while(k<c.length&&w>0){if(c[k]==="(")w++;else if(c[k]===")"){if(w--,w===0){S=k;break}}k++}if(S===-1)continue;let B=c.substring(g+1,S),I=Wt(B);if(!I)continue;let A=y,{arrayExpr:T,itemVar:K}=I,L=S+1,V=1,O=L,Z=/@foreach\s*\(/g,z=/@endforeach/g;while(V>0&&O<c.length){Z.lastIndex=O,z.lastIndex=O;let D=Z.exec(c),N=z.exec(c);if(!N)break;if(D&&D.index<N.index)V++,O=D.index+D[0].length;else{if(V--,V===0){let C=c.substring(L,N.index),E=N.index+11;return{start:A,end:E,arrayExpr:T,itemVar:K,content:C}}O=N.index+11}}}return null}function*x(c,h){let a=c;while(!0){let y=b(a);if(!y)break;let{start:g,end:w,arrayExpr:k,itemVar:S,content:B}=y;try{let I=k.trim(),A;if(m(I))A=p(I,Object.keys(h))(...Object.values(h));else A=d(I,h);let T=!1;if(!Array.isArray(A))if(A instanceof Map)A=Array.from(A),T=!0;else if(A instanceof Set)A=Array.from(A);else if(typeof A==="string")A=Array.from(A);else if(A&&typeof A==="object"&&!(A instanceof Date)&&!(A instanceof RegExp))A=Object.entries(A),T=!0;else{let E=Re(I,i)+u("Foreach",`Error in @foreach: ${I} is not iterable`,n.TYPE_ERROR);a=a.substring(0,g)+E+a.substring(w);continue}let K=e?.loops?.useAltLoopVariable??me,L=S.trim(),V=null,O,Z=!1;if(L.includes("=>")){let E=L.split("=>").map((W)=>W.trim());if(E.length===2&&E[0]&&E[1])V=E[0],O=E[1];else O=L}else if(!L.startsWith("[")&&!L.startsWith("{")&&L.includes(",")){let E=L.split(",").map((W)=>W.trim());if(E.length===2&&E[0]&&E[1])O=E[0],V=E[1],Z=!0;else O=L}else O=L;let z="",D=new Set(oe(`${k} as ${S}`)),N=A,C=h[ho]??new WeakMap;for(let E=0;E<N.length;E++){if(E%16===0)yield;let W=N[E],te={index:E,iteration:E+1,first:E===0,last:E===N.length-1,count:N.length},j={...h,loop:te,$loop:te,[ho]:C};if(Array.isArray(h.__stx_client_signal_names))j.__stx_client_signal_names=h.__stx_client_signal_names.filter((H)=>!D.has(H));if(O.startsWith("[")&&O.endsWith("]")){let H=O.slice(1,-1).split(",").map((U)=>U.trim());if(Array.isArray(W))H.forEach((U,X)=>{if(U)j[U]=W[X]});else j[O]=W}else if(O.startsWith("{")&&O.endsWith("}")){let H=O.slice(1,-1).split(",").map((U)=>U.trim()).filter(Boolean);if(W!==null&&typeof W==="object")H.forEach((U)=>{let X=U.indexOf(":"),Y=(X===-1?U:U.slice(0,X)).trim(),re=X===-1?Y:U.slice(X+1).trim();if(Y&&re)j[re]=W[Y]});else j[O]=W}else j[O]=W;if(V)if(!Z&&T&&Array.isArray(W)&&W.length===2)j[V]=W[0],j[O]=W[1];else j[V]=E;let v=ce(B,j);v=yield*ne(v,j,i,e,!0),v=ge(v,j,i),v=le(v,j);let J=v.indexOf(Q),G=v.indexOf(ee),q=J<0?G:G<0?J:Math.min(J,G);if(q>=0)v=v.slice(0,q);if(v=P(v,j,i),v=ye(v,j),v=be(v,j),v=xe(v,j),z+=v,q>=0&&q===J)break}a=a.substring(0,g)+z+a.substring(w)}catch(I){let A=u("Foreach",`Error in @foreach(${k.trim()} as ${S.trim()}): ${I instanceof Error?I.message:String(I)}`,n.EVALUATION_ERROR);a=a.substring(0,g)+A+a.substring(w)}}return a}s=yield*x(s,r),s=we(s,r,i,e);let f=e?.loops?.maxWhileIterations??he;return s=Se(s,r,f),o?s:Is(s)}function hg(t){let r=/^(\s*)([A-Za-z_$][\w$]*|\[[^\]]*\]|\{[^}]*\})(\s+(?:of|in)\s)/.exec(t);if(!r||/^(?:const|let|var)$/.test(r[2]))return t;return`${r[1]}let ${t.slice(r[1].length)}`}function pe(t){return yo(t)}function we(t,r,i,e){let o=t,s=!0;while(s){s=!1;let l=o.match(/@for\s*\(/);if(!l||l.index===void 0)break;let b=l.index,x=b+l[0].length-1,f=_(o,"(",")",x);if(f===-1)break;let c=hg(o.slice(x+1,f)),h=f+1,a=js(o.slice(b),"for","endfor");if(a.length===0)break;let y=a[0].content,g=b+a[0].end;if(!pe(c)){let w=u("For",`Unsafe expression in @for: ${c}`,n.UNSAFE_EXPRESSION);o=o.substring(0,b)+w+o.substring(g),s=!0;continue}try{let w=Oe(c),k=/@(?:for|foreach|if|unless)\s*\(/.test(y);if(w.length>0&&k){let K=ke({forExpr:c,content:y,iterVarNames:w,context:r,filePath:i,options:e});o=o.substring(0,b)+K+o.substring(g),s=!0;continue}let S=Object.keys(r),B=Object.values(r),I=ue(y),T=Function(...S,"__stxRenderLoopValue",`
2
+ import{R}from"./chunk-0jdz31q1.js";import{Ie,Wt,oe,F,Nn,ae,P}from"./chunk-b5qzed8y.js";import{Zi,ho,d,m,M,Ee,p,yo,n,u,_}from"./chunk-4vz17ytv.js";import{kr}from"./chunk-9w9y84t5.js";import{ge}from"./chunk-9tv0tw7f.js";import{js}from"./chunk-nhyv3w4r.js";var he=1000,me=!1;function xe(t,r){let i=/@(include|partial)\s*\(\s*(['"])([^'"]+)\2\s*,\s*/g,e="",o=0,s;while((s=i.exec(t))!==null){let l=s.index+s[0].length,b=s.index+s[0].indexOf("("),x=_(t,"(",")",b);if(x===-1)continue;let f=t.slice(l,x).trim();if(!f)continue;if(!Object.keys(r).some((a)=>new RegExp(`(?:^|[^\\w$.])${a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}(?![\\w$])`).test(f)))continue;let h;try{let a=M(f,r);if(!a||typeof a!=="object")continue;h=JSON.stringify(a)}catch{continue}e+=t.slice(o,l)+h,o=x,i.lastIndex=x}return o===0?t:e+t.slice(o)}function be(t,r){let i=/@component\s*\(/g,e=t,o,s=[];while((o=i.exec(e))!==null){let l=o.index,b=l+o[0].length-1,x=1,f=b+1;while(f<e.length&&x>0){if(e[f]==="(")x++;else if(e[f]===")"){if(x--,x===0)break}f++}if(x!==0)continue;let c=e.substring(b+1,f),h=f+1,a=c.match(/^\s*['"]([^'"]+)['"]/);if(!a)continue;let y=a[1],g=c.slice(a[0].length),w=g.match(/^\s*,\s*/);if(!w)continue;let k=g.slice(w[0].length).trim();if(!k)continue;try{let S=M(k,r),B=JSON.stringify(S),I=`@component('${y}', ${B})`;s.push({start:l,end:h,replacement:I})}catch{continue}}for(let l=s.length-1;l>=0;l--){let{start:b,end:x,replacement:f}=s[l];e=e.substring(0,b)+f+e.substring(x)}return e}function se(t,r,i){let e=t,o=new RegExp(`${r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}\\(`),s;while((s=o.exec(e))!==null){let l=s.index,b=l+s[0].length-1,x=1,f=b+1,c=null,h=!1;while(f<e.length&&x>0){let g=e[f];if(h){h=!1,f++;continue}if(g==="\\"&&c){h=!0,f++;continue}if(c){if(g===c)c=null;f++;continue}if(g==='"'||g==="'"||g==="`"){c=g,f++;continue}if(g==="(")x++;else if(g===")"){if(x--,x===0)break}f++}if(x!==0)break;let a=e.substring(b+1,f),y=i(a);e=e.substring(0,l)+y+e.substring(f+1)}return e}function ye(t,r){let i=t;return i=i.replace(/:([a-zA-Z_][a-zA-Z0-9_-]*)(?=\s+[^=]|\s*\/?>|\s*$)/g,(e,o)=>{if(o in r)return`:${o}="${o}"`;return e}),i=i.replace(/:([a-zA-Z_][a-zA-Z0-9_-]*)\s*=\s*"([^"]*)"/g,(e,o,s)=>{try{if(F(s,r.__stx_client_signal_names||[]))return e;let l=Object.keys(r),b=Object.values(r);Zi(s);let x=!1,c=p(s,l,()=>{x=!0})(...b);if(x)return e;let h=JSON.stringify(c);if(h===void 0){if(!Ee(s).some((g)=>!(g in r)))return"";return e}let a=Buffer.from(h,"utf8").toString("base64");return`__stx_${o}="${a}"`}catch(l){return e}}),i}var Q="<!--__STX_BREAK__-->",ee="<!--__STX_CONTINUE__-->";function le(t,r){let i=/\{\{\{?|\{!!|@(break|continue)(?![\w$])/g,e="",o=0;for(let s=i.exec(t);s;s=i.exec(t)){if(!s[1]){let f=s[0].length===3&&s[0]==="{{{"?3:2,c=s[0]==="{!!"?t.indexOf("!!}",i.lastIndex):Ie(t,s.index,f);if(c<0)break;i.lastIndex=c+(s[0]==="{!!"?3:f);continue}let l=i.lastIndex,b=!0,x=/^\s*\(/.exec(t.slice(l));if(x){let f=l+x[0].length-1,c=_(t,"(",")",f);if(c<0)break;l=c+1;try{let h=`!!(${t.slice(f+1,c).trim()})`;b=m(h)?Boolean(p(h,Object.keys(r))(...Object.values(r))):Boolean(d(h,r))}catch{b=!1}}if(e+=t.slice(o,s.index),b)return e+(s[1]==="break"?Q:ee);o=l,i.lastIndex=l}return e+t.slice(o)}function ue(t){let r=(o)=>o.replace(/\\/g,"\\\\").replace(/`/g,"\\`").replace(/\$\{/g,"\\${"),i="",e=0;return Nn(t,(o,s,l)=>(i+=ie(r(t.slice(e,l))),i+=`\${__stxRenderLoopValue(${l}, (${s}), ${o.length})}`,e=l+o.length,o)),i+ie(r(t.slice(e)))}function fe(t,r,i,e){return ae(t,r,i==null?"":String(i),!1,e)}function ie(t){let r=t;return r=se(r,"@break",(i)=>{let e=i.trim();if(!yo(e))return"";return`\`; if (${e}) { break; } result += \``}),r=se(r,"@continue",(i)=>{let e=i.trim();if(!yo(e))return"";return`\`; if (${e}) { continue; } result += \``}),r=r.replace(/@break(?!\()/g,"`; break; result += `"),r=r.replace(/@continue(?!\()/g,"`; continue; result += `"),r}function _e(t){let r=/@forelse\s*\(/g,i,e=[],o=/@foreach\s*\(/g,s=/@endforeach/g,l;while((l=o.exec(t))!==null)e.push({pos:l.index,delta:1});while((l=s.exec(t))!==null)e.push({pos:l.index,delta:-1});e.sort((c,h)=>c.pos-h.pos);let b=[],x=0;for(let c of e)x+=c.delta,b.push({pos:c.pos,depth:x});function f(c){let h=0,a=b.length-1,y=0;while(h<=a){let g=h+a>>1;if(b[g].pos<=c)y=b[g].depth,h=g+1;else a=g-1}return y}while((i=r.exec(t))!==null){if(f(i.index)>0)continue;let c=i.index,h=i.index+i[0].length-1,a=1,y=h+1,g=-1;while(y<t.length&&a>0){if(t[y]==="(")a++;else if(t[y]===")"){if(a--,a===0){g=y;break}}y++}if(g===-1)continue;let w=t.substring(h+1,g),k=Wt(w);if(!k)continue;let{arrayExpr:S,itemVar:B}=k,I=g+1,A=1,T=I,K=/@forelse\s*\(/g,L=/@endforelse/g,V=-1;while(A>0&&T<t.length){K.lastIndex=T,L.lastIndex=T;let C=K.exec(t),E=L.exec(t);if(!E)break;if(C&&C.index<E.index)A++,T=C.index+C[0].length;else{if(A--,A===0){V=E.index;break}T=E.index+11}}if(V===-1)continue;let O=t.substring(I,V),Z=V+11,z=-1,D=0,N=0;while(N<O.length){let C=O.indexOf("@",N);if(C===-1)break;let E=O.substring(C);if(/^@forelse\s*\(/.test(E))D++,N=C+1;else if(E.startsWith("@endforelse"))D--,N=C+11;else if(D===0&&E.startsWith("@empty")){if(O.length<=C+6||!/[a-z]/i.test(O[C+6])){z=C;break}N=C+1}else N=C+1}if(z===-1)continue;return{start:c,end:Z,arrayExpr:S,itemVar:B,foreachContent:O.substring(0,z),emptyContent:O.substring(z+6)}}return null}function ce(t,r){let i=t;while(!0){let e=_e(i);if(!e)break;let{start:o,end:s,arrayExpr:l,itemVar:b,foreachContent:x,emptyContent:f}=e;try{let c;if(m(l))c=p(l,Object.keys(r))(...Object.values(r));else c=d(l,r);let h;if(!Array.isArray(c)||c.length===0)h=f;else h=`@foreach (${l} as ${b})${x}@endforeach`;i=i.substring(0,o)+h+i.substring(s)}catch(c){let h=c instanceof Error?c.message:String(c),a=u("Forelse",`Error in @forelse(${l} as ${b}): ${h}`,n.EVALUATION_ERROR);i=i.substring(0,o)+a+i.substring(s)}}return i}var de="<!--stx:foreach-not-iterable:",$e=/<!--stx:foreach-not-iterable:([^|>]*)\|([^>]*?)-->/g;function Re(t,r){return`${de}${encodeURIComponent(t)}|${encodeURIComponent(r)}-->`}function Ae(t,r){console.warn(`[stx] @foreach(${t}) in ${r}: ${t} is not iterable server-side, so the loop rendered nothing. `+"Values a server loop reads must come from <script server> or the page context \u2014 "+"a plain <script> runs in the browser.")}function Is(t){if(!t.includes(de))return t;return t.replace($e,(r,i,e)=>(Ae(decodeURIComponent(i),decodeURIComponent(e)),""))}function yg(t,r,i,e,o=!1){let s=ne(t,r,i,e,o),l=s.next();while(!l.done)l=s.next();return l.value}async function ui(t,r,i,e,o=!1){let s=ne(t,r,i,e,o),l=s.next();while(!l.done)await R(),l=s.next();return l.value}function*ne(t,r,i,e,o=!1){let s=t,l=new Set(r.__stx_client_signal_names||[]);for(let c of kr(t))l.add(c);if(l.size)r={...r,__stx_client_signal_names:[...l]};s=ce(s,r);function b(c){let h=/@foreach\s*\(/g,a;while((a=h.exec(c))!==null){let y=a.index,g=a.index+a[0].length-1,w=1,k=g+1,S=-1;while(k<c.length&&w>0){if(c[k]==="(")w++;else if(c[k]===")"){if(w--,w===0){S=k;break}}k++}if(S===-1)continue;let B=c.substring(g+1,S),I=Wt(B);if(!I)continue;let A=y,{arrayExpr:T,itemVar:K}=I,L=S+1,V=1,O=L,Z=/@foreach\s*\(/g,z=/@endforeach/g;while(V>0&&O<c.length){Z.lastIndex=O,z.lastIndex=O;let D=Z.exec(c),N=z.exec(c);if(!N)break;if(D&&D.index<N.index)V++,O=D.index+D[0].length;else{if(V--,V===0){let C=c.substring(L,N.index),E=N.index+11;return{start:A,end:E,arrayExpr:T,itemVar:K,content:C}}O=N.index+11}}}return null}function*x(c,h){let a=c;while(!0){let y=b(a);if(!y)break;let{start:g,end:w,arrayExpr:k,itemVar:S,content:B}=y;try{let I=k.trim(),A;if(m(I))A=p(I,Object.keys(h))(...Object.values(h));else A=d(I,h);let T=!1;if(!Array.isArray(A))if(A instanceof Map)A=Array.from(A),T=!0;else if(A instanceof Set)A=Array.from(A);else if(typeof A==="string")A=Array.from(A);else if(A&&typeof A==="object"&&!(A instanceof Date)&&!(A instanceof RegExp))A=Object.entries(A),T=!0;else{let E=Re(I,i)+u("Foreach",`Error in @foreach: ${I} is not iterable`,n.TYPE_ERROR);a=a.substring(0,g)+E+a.substring(w);continue}let K=e?.loops?.useAltLoopVariable??me,L=S.trim(),V=null,O,Z=!1;if(L.includes("=>")){let E=L.split("=>").map((W)=>W.trim());if(E.length===2&&E[0]&&E[1])V=E[0],O=E[1];else O=L}else if(!L.startsWith("[")&&!L.startsWith("{")&&L.includes(",")){let E=L.split(",").map((W)=>W.trim());if(E.length===2&&E[0]&&E[1])O=E[0],V=E[1],Z=!0;else O=L}else O=L;let z="",D=new Set(oe(`${k} as ${S}`)),N=A,C=h[ho]??new WeakMap;for(let E=0;E<N.length;E++){if(E%16===0)yield;let W=N[E],te={index:E,iteration:E+1,first:E===0,last:E===N.length-1,count:N.length},j={...h,loop:te,$loop:te,[ho]:C};if(Array.isArray(h.__stx_client_signal_names))j.__stx_client_signal_names=h.__stx_client_signal_names.filter((H)=>!D.has(H));if(O.startsWith("[")&&O.endsWith("]")){let H=O.slice(1,-1).split(",").map((U)=>U.trim());if(Array.isArray(W))H.forEach((U,X)=>{if(U)j[U]=W[X]});else j[O]=W}else if(O.startsWith("{")&&O.endsWith("}")){let H=O.slice(1,-1).split(",").map((U)=>U.trim()).filter(Boolean);if(W!==null&&typeof W==="object")H.forEach((U)=>{let X=U.indexOf(":"),Y=(X===-1?U:U.slice(0,X)).trim(),re=X===-1?Y:U.slice(X+1).trim();if(Y&&re)j[re]=W[Y]});else j[O]=W}else j[O]=W;if(V)if(!Z&&T&&Array.isArray(W)&&W.length===2)j[V]=W[0],j[O]=W[1];else j[V]=E;let v=ce(B,j);v=yield*ne(v,j,i,e,!0),v=ge(v,j,i),v=le(v,j);let J=v.indexOf(Q),G=v.indexOf(ee),q=J<0?G:G<0?J:Math.min(J,G);if(q>=0)v=v.slice(0,q);if(v=P(v,j,i),v=ye(v,j),v=be(v,j),v=xe(v,j),z+=v,q>=0&&q===J)break}a=a.substring(0,g)+z+a.substring(w)}catch(I){let A=u("Foreach",`Error in @foreach(${k.trim()} as ${S.trim()}): ${I instanceof Error?I.message:String(I)}`,n.EVALUATION_ERROR);a=a.substring(0,g)+A+a.substring(w)}}return a}s=yield*x(s,r),s=we(s,r,i,e);let f=e?.loops?.maxWhileIterations??he;return s=Se(s,r,f),o?s:Is(s)}function bg(t){let r=/^(\s*)([A-Za-z_$][\w$]*|\[[^\]]*\]|\{[^}]*\})(\s+(?:of|in)\s)/.exec(t);if(!r||/^(?:const|let|var)$/.test(r[2]))return t;return`${r[1]}let ${t.slice(r[1].length)}`}function pe(t){return yo(t)}function we(t,r,i,e){let o=t,s=!0;while(s){s=!1;let l=o.match(/@for\s*\(/);if(!l||l.index===void 0)break;let b=l.index,x=b+l[0].length-1,f=_(o,"(",")",x);if(f===-1)break;let c=bg(o.slice(x+1,f)),h=f+1,a=js(o.slice(b),"for","endfor");if(a.length===0)break;let y=a[0].content,g=b+a[0].end;if(!pe(c)){let w=u("For",`Unsafe expression in @for: ${c}`,n.UNSAFE_EXPRESSION);o=o.substring(0,b)+w+o.substring(g),s=!0;continue}try{let w=Oe(c),k=/@(?:for|foreach|if|unless)\s*\(/.test(y);if(w.length>0&&k){let K=ke({forExpr:c,content:y,iterVarNames:w,context:r,filePath:i,options:e});o=o.substring(0,b)+K+o.substring(g),s=!0;continue}let S=Object.keys(r),B=Object.values(r),I=ue(y),T=Function(...S,"__stxRenderLoopValue",`
3
3
  let result = '';
4
4
  for (${c}) {
5
5
  result += \`${I}\`;
@@ -9,7 +9,7 @@ import{R}from"./chunk-0jdz31q1.js";import{Ie,Wt,oe,F,Nn,ae,P}from"./chunk-kx3mmp
9
9
  for (${r}) {
10
10
  if (!__renderIteration([${e.join(", ")}])) break;
11
11
  }
12
- `)(...x,(a)=>{let y={...o};e.forEach((B,I)=>{y[B]=a[I]});let g=mg(i,y,f,l,!0);g=ge(g,y,f),g=le(g,y);let w=g.indexOf(Q),k=g.indexOf(ee),S=w<0?k:k<0?w:Math.min(w,k);if(S>=0)g=g.slice(0,S);return c+=P(g,y,f),S<0||S!==w}),c}function Se(t,r,i){let e=t,o=!0;while(o){o=!1;let s=e.match(/@while\s*\(/);if(!s||s.index===void 0)break;let l=s.index,b=l+s[0].length-1,x=_(e,"(",")",b);if(x===-1)break;let f=e.slice(b+1,x),c=js(e.slice(l),"while","endwhile");if(c.length===0)break;let h=c[0].content,a=l+c[0].end;if(!pe(f)){let y=u("While",`Unsafe expression in @while: ${f}`,n.UNSAFE_EXPRESSION);e=e.substring(0,l)+y+e.substring(a),o=!0;continue}try{let y=Object.keys(r),g=Object.values(r),w=ue(h),S=Function(...y,"__stxRenderLoopValue",`
12
+ `)(...x,(a)=>{let y={...o};e.forEach((B,I)=>{y[B]=a[I]});let g=yg(i,y,f,l,!0);g=ge(g,y,f),g=le(g,y);let w=g.indexOf(Q),k=g.indexOf(ee),S=w<0?k:k<0?w:Math.min(w,k);if(S>=0)g=g.slice(0,S);return c+=P(g,y,f),S<0||S!==w}),c}function Se(t,r,i){let e=t,o=!0;while(o){o=!1;let s=e.match(/@while\s*\(/);if(!s||s.index===void 0)break;let l=s.index,b=l+s[0].length-1,x=_(e,"(",")",b);if(x===-1)break;let f=e.slice(b+1,x),c=js(e.slice(l),"while","endwhile");if(c.length===0)break;let h=c[0].content,a=l+c[0].end;if(!pe(f)){let y=u("While",`Unsafe expression in @while: ${f}`,n.UNSAFE_EXPRESSION);e=e.substring(0,l)+y+e.substring(a),o=!0;continue}try{let y=Object.keys(r),g=Object.values(r),w=ue(h),S=Function(...y,"__stxRenderLoopValue",`
13
13
  let result = '';
14
14
  let maxIterations = ${i}; // Configurable safety limit
15
15
  let counter = 0;
@@ -22,4 +22,4 @@ import{R}from"./chunk-0jdz31q1.js";import{Ie,Wt,oe,F,Nn,ae,P}from"./chunk-kx3mmp
22
22
  }
23
23
  return result;
24
24
  `)(...g,(B,I,A)=>fe(h,B,I,A));e=e.substring(0,l)+S+e.substring(a),o=!0}catch(y){let g=u("While",`Error in @while(${f}): ${y instanceof Error?y.message:String(y)}`,n.EVALUATION_ERROR);e=e.substring(0,l)+g+e.substring(a),o=!0}}return e}
25
- export{Is,mg,ui,hg};
25
+ export{Is,yg,ui,bg};
@@ -1,8 +1,8 @@
1
1
  // @bun
2
- import{Oe,ht,qt,no,ro,_e,Di,$n,ll,ul,Li,dl,pl,oo,ji,Bi,fl,Fi}from"./chunk-kx3mmpfd.js";import{C}from"./chunk-4b110x6r.js";import{a}from"./chunk-fyb9qy7x.js";import{Uo}from"./chunk-e52rtbde.js";import{l}from"./chunk-w4177qn3.js";import{existsSync as G,readFileSync as U}from"fs";import h from"path";var we=new Set(["module","exports","require","$bool","$num","window","document","console","confirm","alert","fetch"]),oe=ht.filter((e)=>!we.has(e)).sort(),ce=[...C].sort(),ke=[...new Set([...oe,...ce])].sort(),ve=new Set(oe),$e=new Set(ce),De=new Set(ke),re=/\bimport\s+(?!type[\s{])\{([^}]*)\}\s*from\s*(['"])stx\2/g;function Te(e,t){if(t==="server")return`'${e}' is not provided by 'stx' in a <script server> block. The engine binds only its own names there (defineProps, state, useHead, ...); any other name becomes \`await import('stx')\`, which does not resolve, so the whole script fails when the page renders. Import it from '@stacksjs/stx' instead.`;return`'${e}' is not provided by 'stx' in a client <script> block. The import is replaced by the window.stx runtime, which has no '${e}', so it is undefined in the browser.`}function ae(e,t){let o=[];for(let d of t){if(d.offset===void 0)continue;let i=d.kind==="server"?ve:$e;re.lastIndex=0;for(let c of d.code.matchAll(re)){let m=c.index+c[0].indexOf("{")+1;for(let f of c[1].matchAll(/[^,]+/g)){let k=f[0];if(/^\s*type\s/.test(k))continue;let S=/^\s*([A-Za-z_$][\w$]*)/.exec(k);if(!S)continue;let s=S[1];if(!De.has(s)||i.has(s))continue;let u=d.offset+m+f.index+S[0].length-s.length,g=e.slice(0,u),v=g.split(`
2
+ import{Oe,ht,qt,no,ro,_e,Di,$n,dl,pl,Li,fl,gl,oo,ji,Bi,ml,Fi}from"./chunk-b5qzed8y.js";import{C}from"./chunk-16sfjkc4.js";import{a}from"./chunk-mf5cqv1k.js";import{Uo}from"./chunk-wc10m4tp.js";import{l}from"./chunk-4e18r89n.js";import{existsSync as G,readFileSync as U}from"fs";import h from"path";var we=new Set(["module","exports","require","$bool","$num","window","document","console","confirm","alert","fetch"]),oe=ht.filter((e)=>!we.has(e)).sort(),ce=[...C].sort(),ke=[...new Set([...oe,...ce])].sort(),ve=new Set(oe),$e=new Set(ce),De=new Set(ke),re=/\bimport\s+(?!type[\s{])\{([^}]*)\}\s*from\s*(['"])stx\2/g;function Te(e,t){if(t==="server")return`'${e}' is not provided by 'stx' in a <script server> block. The engine binds only its own names there (defineProps, state, useHead, ...); any other name becomes \`await import('stx')\`, which does not resolve, so the whole script fails when the page renders. Import it from '@stacksjs/stx' instead.`;return`'${e}' is not provided by 'stx' in a client <script> block. The import is replaced by the window.stx runtime, which has no '${e}', so it is undefined in the browser.`}function ae(e,t){let o=[];for(let d of t){if(d.offset===void 0)continue;let i=d.kind==="server"?ve:$e;re.lastIndex=0;for(let c of d.code.matchAll(re)){let m=c.index+c[0].indexOf("{")+1;for(let f of c[1].matchAll(/[^,]+/g)){let k=f[0];if(/^\s*type\s/.test(k))continue;let S=/^\s*([A-Za-z_$][\w$]*)/.exec(k);if(!S)continue;let s=S[1];if(!De.has(s)||i.has(s))continue;let u=d.offset+m+f.index+S[0].length-s.length,g=e.slice(0,u),v=g.split(`
3
3
  `).length;o.push({line:v,column:u-(g.lastIndexOf(`
4
4
  `)+1)+1,offset:u,length:s.length,name:s,kind:d.kind,message:Te(s,d.kind)})}}}return o}import M from"path";var Ce="@stacksjs/stx-typescript-plugin";function Ee(e,t){let o=M.resolve(e);for(;;){let d=M.join(o,"tsconfig.json");if(t(d))return d;let i=M.dirname(o);if(i===o)return;o=i}}function le(e,t,o){let d=Ee(e,o);if(!d)return;let i=new Set,c=(m)=>{if(i.has(m))return;i.add(m);let f=t(m);if(!f)return;let k=f.compilerOptions?.plugins;if(Array.isArray(k)){let s=k.find((g)=>g?.name===Ce),u=Array.isArray(s?.libs)?s.libs.filter((g)=>typeof g==="string"):[];return s?{configPath:m,libs:u.map((g)=>M.resolve(M.dirname(m),g))}:null}let S=typeof f.extends==="string"?[f.extends]:Array.isArray(f.extends)?f.extends:[];for(let s of[...S].reverse()){if(typeof s!=="string"||!s.startsWith("."))continue;let u=M.resolve(M.dirname(m),s.endsWith(".json")?s:`${s}.json`),g=c(u);if(g!==void 0)return g}return};return c(d)??void 0}function Ma(e,t="",o="",d=t,i){let c=e.startLine>1?`
5
- `.repeat(e.startLine-1):"",m=Di(ji(e)+e.code,d),f=e.kind==="client"&&i?i.project(m.code):void 0,k=$n(f?.code??m.code),S=e.kind==="client"||e.kind==="plain"?dl(t,e.code):"",s=(c+k).split(`
5
+ `.repeat(e.startLine-1):"",m=Di(ji(e)+e.code,d),f=e.kind==="client"&&i?i.project(m.code):void 0,k=$n(f?.code??m.code),S=e.kind==="client"||e.kind==="plain"?fl(t,e.code):"",s=(c+k).split(`
6
6
  `),u=s.length,g=new Map;for(let y of m.declarations)for(let[w,D]of y.text.split(`
7
7
  `).entries())if(s.push(D),y.origin)g.set(s.length,{...y.origin,line:e.startLine+y.origin.line-1+w,column:w===0?y.origin.column:1});s.push(...S.split(`
8
8
  `),...(i?.declarations??"").split(`
@@ -10,17 +10,17 @@ import{Oe,ht,qt,no,ro,_e,Di,$n,ll,ul,Li,dl,pl,oo,ji,Bi,fl,Fi}from"./chunk-kx3mmp
10
10
  `));let v=e.kind==="server"?qt(e.code):void 0;if(v?.unsupported){let y=e.code.slice(0,v.offset),w=e.startLine+y.split(`
11
11
  `).length-1,D=v.offset-e.code.lastIndexOf(`
12
12
  `,v.offset-1)+(w===e.startLine?(e.startColumn??1)-1:0);s.push(`;({})[${JSON.stringify(v.unsupported)}];`),g.set(s.length,{line:w,column:D,anchor:!0})}s.push("export {}","");let R=oo(s.join(`
13
- `),o);return{text:R.code,sourceLineCount:u,lineMap:g,scriptColumns:new Map([...m.columns].map(([y,w])=>[y+e.startLine-1,w])),importColumns:R.columns,componentColumns:f?new Map([...f.columns].map(([y,w])=>[y+e.startLine-1,w])):void 0}}function Om(e,t="",o=""){return Ma(e,t,o).text}var Ne=new Set(["name","status","length","location","history","origin","closed","close","open","focus","blur","print","scroll","scrollTo","scrollBy","stop","top","parent","self","frames","event","external","menubar","toolbar"]);function Me(e){if(e.length===0)return"";let t=["// Generated \u2014 the composables the runtime publishes as bare globals."],o=new Set(C),d=[];for(let{file:i,names:c}of e){let m=JSON.stringify(i.replace(/\\/g,"/").replace(/\.ts$/,""));d.push(` export * from ${m}`);for(let f of c){if(o.has(f)||Ne.has(f))continue;o.add(f),t.push(`declare const ${f}: typeof import(${m})[${JSON.stringify(f)}]`)}}return t.push("declare module '@composables' {",...d,"}"),t.join(`
14
- `)}function jo(e,t,o){return`${e}.__stx_${t}${o}.ts`}function Nm(e){return e.replace(/\.__stx_(?:server|client|plain|template)\d+\.ts$/,"")}function hu(){return ue("stx.d.ts")}function yu(){return ue("stx-module.d.ts")}function ue(e){for(let t of[h.resolve(import.meta.dir,"..",e),h.resolve(import.meta.dir,"..","..",e)])if(G(t))return t;return null}var Re=/^(.*?)\((\d+),(\d+)\):\s+(error|warning)\s+TS(\d+):\s+(.*)$/;function pe(e){return e>=1000&&e<2000}function de(e){let t="",o=!1,d=!1;for(let i=0;i<e.length;i++){let c=e[i];if(o){if(t+=c,d)d=!1;else if(c==="\\")d=!0;else if(c==='"')o=!1;continue}if(c==='"'){o=!0,t+=c;continue}if(c==="/"&&e[i+1]==="/"){while(i<e.length&&e[i]!==`
13
+ `),o);return{text:R.code,sourceLineCount:u,lineMap:g,scriptColumns:new Map([...m.columns].map(([y,w])=>[y+e.startLine-1,w])),importColumns:R.columns,componentColumns:f?new Map([...f.columns].map(([y,w])=>[y+e.startLine-1,w])):void 0}}function Mm(e,t="",o=""){return Ma(e,t,o).text}var Ne=new Set(["name","status","length","location","history","origin","closed","close","open","focus","blur","print","scroll","scrollTo","scrollBy","stop","top","parent","self","frames","event","external","menubar","toolbar"]);function Me(e){if(e.length===0)return"";let t=["// Generated \u2014 the composables the runtime publishes as bare globals."],o=new Set(C),d=[];for(let{file:i,names:c}of e){let m=JSON.stringify(i.replace(/\\/g,"/").replace(/\.ts$/,""));d.push(` export * from ${m}`);for(let f of c){if(o.has(f)||Ne.has(f))continue;o.add(f),t.push(`declare const ${f}: typeof import(${m})[${JSON.stringify(f)}]`)}}return t.push("declare module '@composables' {",...d,"}"),t.join(`
14
+ `)}function jo(e,t,o){return`${e}.__stx_${t}${o}.ts`}function Dm(e){return e.replace(/\.__stx_(?:server|client|plain|template)\d+\.ts$/,"")}function bu(){return ue("stx.d.ts")}function wu(){return ue("stx-module.d.ts")}function ue(e){for(let t of[h.resolve(import.meta.dir,"..",e),h.resolve(import.meta.dir,"..","..",e)])if(G(t))return t;return null}var Re=/^(.*?)\((\d+),(\d+)\):\s+(error|warning)\s+TS(\d+):\s+(.*)$/;function pe(e){return e>=1000&&e<2000}function de(e){let t="",o=!1,d=!1;for(let i=0;i<e.length;i++){let c=e[i];if(o){if(t+=c,d)d=!1;else if(c==="\\")d=!0;else if(c==='"')o=!1;continue}if(c==='"'){o=!0,t+=c;continue}if(c==="/"&&e[i+1]==="/"){while(i<e.length&&e[i]!==`
15
15
  `)i++;t+=`
16
- `;continue}if(c==="/"&&e[i+1]==="*"){i+=2;while(i<e.length&&!(e[i]==="*"&&e[i+1]==="/"))i++;i++;continue}t+=c}return t.replace(/,(\s*[}\]])/g,"$1")}function je(e){try{return JSON.parse(de(U(e,"utf8")))}catch{return}}function Le(e){let t=h.resolve(e),o;for(;;){let s=h.join(t,"tsconfig.json");if(G(s)){o=s;break}let u=h.dirname(t);if(u===t)break;t=u}if(!o)return{};let d=new Set,i=o,c,m,f=o;while(i&&!d.has(i)){d.add(i);let s;try{s=JSON.parse(de(U(i,"utf8")))}catch{break}let u=s?.compilerOptions??{};if(!c&&u.paths&&typeof u.paths==="object")c=u.paths,f=i;if(!m&&typeof u.baseUrl==="string")m=h.resolve(h.dirname(i),u.baseUrl);if(c&&m)break;i=typeof s?.extends==="string"?h.resolve(h.dirname(i),s.extends.endsWith(".json")?s.extends:`${s.extends}.json`):void 0}if(!c)return{};let k=m??h.dirname(f),S={};for(let[s,u]of Object.entries(c)){if(!Array.isArray(u))continue;S[s]=u.map((g)=>typeof g==="string"&&!h.isAbsolute(g)?h.resolve(k,g):g)}return{paths:S}}async function Mm(e,t={}){let o=t.client!==!1,d=t.server!==!1,i=t.templates!==!1,c=i?await a():void 0,m=t.componentsDir??c?.componentsDir,f=t.partialsDir??c?.partialsDir,k=t.layoutsDir??c?.layoutsDir,S=new Map(await Promise.all(e.map(async(n)=>[n,await Bun.file(n).text()]))),s=[...S.values()].some((n)=>qt(_e(n).filter((r)=>r.kind==="server").map((r)=>r.code).join(`
17
- `))),u=new Map,g=new Map,v=[],R=[],y=0,w=0,D=hu();for(let n of e){let r=S.get(n),x=_e(r).filter((p)=>{if(p.kind==="server")return d;return o}),O=_e(r).filter((p)=>p.kind==="server").map((p)=>p.code).join(`
18
- `),B=Li(_e(r)),_=ro(r);for(let p of ae(r,x))v.push({file:n,line:p.line,column:p.column,code:0,message:p.message,category:"error",blockKind:p.kind});if(o&&O){let p=x.filter((E)=>E.kind!=="server"),b=[...new Set(p.flatMap((E)=>pl(O,E.code)))];if(b.length>0)g.set(n,{names:b,line:p[0].startLine,kind:p[0].kind})}let I=h.dirname(h.resolve(n)),T=i?Bi(r,{runtimeGlobals:!D,originDir:I,filePath:h.resolve(n),componentsDir:m,partialsDir:f,layoutsDir:k,inheritedContractsKnown:s}):null,A=T?[...T.lineMap.values()].filter((p)=>p.expression).length:0;if(x.length===0&&A===0&&!_?.checks.length)continue;if(R.push(n),y+=x.length,w+=A,_&&o&&(x.some((p)=>p.kind!=="server")||!i&&_.checks.length)){let p=Bi(r,{runtimeGlobals:!1,globals:!1,originDir:I,templateExpressions:!1,scriptKinds:["client","plain"],nativeChecks:!i});u.set(jo(n,"client",0),{virtual:p,source:p.text,origin:n,kind:"client"})}if(x.forEach((p,b)=>{if(_&&p.kind!=="server")return;let E=Ma(p,O,I,B);u.set(jo(n,p.kind,b),{virtual:E,source:E.text,origin:n,kind:p.kind})}),T&&(A>0||_?.checks.length))u.set(jo(n,"template",0),{source:T.text,origin:n,kind:"template",virtual:T})}if(u.size===0)return{diagnostics:v,checkedFiles:R,blockCount:0,expressionCount:0};let j=(t.extraLibs??[]).map((n)=>h.resolve(n)),fe=le(e.length>0?h.dirname(h.resolve(e[0])):process.cwd(),je,G);for(let n of fe?.libs??[])if(!j.includes(n)&&G(n))j.push(n);if(D)j.push(D);let W=D?yu():null;if(W)j.push(W);let z=`${l()}/typecheck/__stx_globals.d.ts`,me=["// Generated \u2014 the context serve.ts injects into <script server> blocks.",ll(D?ul(U(D,"utf8")):void 0),...D?[]:["declare const window: any",...C.map((n)=>`declare const ${n}: any`)],["// Generated \u2014 the names stx auto-imports from @stacksjs/browser.",...Oe.map((n)=>`declare const ${n}: any`)].join(`
16
+ `;continue}if(c==="/"&&e[i+1]==="*"){i+=2;while(i<e.length&&!(e[i]==="*"&&e[i+1]==="/"))i++;i++;continue}t+=c}return t.replace(/,(\s*[}\]])/g,"$1")}function je(e){try{return JSON.parse(de(U(e,"utf8")))}catch{return}}function Le(e){let t=h.resolve(e),o;for(;;){let s=h.join(t,"tsconfig.json");if(G(s)){o=s;break}let u=h.dirname(t);if(u===t)break;t=u}if(!o)return{};let d=new Set,i=o,c,m,f=o;while(i&&!d.has(i)){d.add(i);let s;try{s=JSON.parse(de(U(i,"utf8")))}catch{break}let u=s?.compilerOptions??{};if(!c&&u.paths&&typeof u.paths==="object")c=u.paths,f=i;if(!m&&typeof u.baseUrl==="string")m=h.resolve(h.dirname(i),u.baseUrl);if(c&&m)break;i=typeof s?.extends==="string"?h.resolve(h.dirname(i),s.extends.endsWith(".json")?s.extends:`${s.extends}.json`):void 0}if(!c)return{};let k=m??h.dirname(f),S={};for(let[s,u]of Object.entries(c)){if(!Array.isArray(u))continue;S[s]=u.map((g)=>typeof g==="string"&&!h.isAbsolute(g)?h.resolve(k,g):g)}return{paths:S}}async function Lm(e,t={}){let o=t.client!==!1,d=t.server!==!1,i=t.templates!==!1,c=i?await a():void 0,m=t.componentsDir??c?.componentsDir,f=t.partialsDir??c?.partialsDir,k=t.layoutsDir??c?.layoutsDir,S=new Map(await Promise.all(e.map(async(n)=>[n,await Bun.file(n).text()]))),s=[...S.values()].some((n)=>qt(_e(n).filter((r)=>r.kind==="server").map((r)=>r.code).join(`
17
+ `))),u=new Map,g=new Map,v=[],R=[],y=0,w=0,D=bu();for(let n of e){let r=S.get(n),x=_e(r).filter((p)=>{if(p.kind==="server")return d;return o}),O=_e(r).filter((p)=>p.kind==="server").map((p)=>p.code).join(`
18
+ `),B=Li(_e(r)),_=ro(r);for(let p of ae(r,x))v.push({file:n,line:p.line,column:p.column,code:0,message:p.message,category:"error",blockKind:p.kind});if(o&&O){let p=x.filter((E)=>E.kind!=="server"),b=[...new Set(p.flatMap((E)=>gl(O,E.code)))];if(b.length>0)g.set(n,{names:b,line:p[0].startLine,kind:p[0].kind})}let I=h.dirname(h.resolve(n)),T=i?Bi(r,{runtimeGlobals:!D,originDir:I,filePath:h.resolve(n),componentsDir:m,partialsDir:f,layoutsDir:k,inheritedContractsKnown:s}):null,A=T?[...T.lineMap.values()].filter((p)=>p.expression).length:0;if(x.length===0&&A===0&&!_?.checks.length)continue;if(R.push(n),y+=x.length,w+=A,_&&o&&(x.some((p)=>p.kind!=="server")||!i&&_.checks.length)){let p=Bi(r,{runtimeGlobals:!1,globals:!1,originDir:I,templateExpressions:!1,scriptKinds:["client","plain"],nativeChecks:!i});u.set(jo(n,"client",0),{virtual:p,source:p.text,origin:n,kind:"client"})}if(x.forEach((p,b)=>{if(_&&p.kind!=="server")return;let E=Ma(p,O,I,B);u.set(jo(n,p.kind,b),{virtual:E,source:E.text,origin:n,kind:p.kind})}),T&&(A>0||_?.checks.length))u.set(jo(n,"template",0),{source:T.text,origin:n,kind:"template",virtual:T})}if(u.size===0)return{diagnostics:v,checkedFiles:R,blockCount:0,expressionCount:0};let j=(t.extraLibs??[]).map((n)=>h.resolve(n)),fe=le(e.length>0?h.dirname(h.resolve(e[0])):process.cwd(),je,G);for(let n of fe?.libs??[])if(!j.includes(n)&&G(n))j.push(n);if(D)j.push(D);let W=D?wu():null;if(W)j.push(W);let z=`${l()}/typecheck/__stx_globals.d.ts`,me=["// Generated \u2014 the context serve.ts injects into <script server> blocks.",dl(D?pl(U(D,"utf8")):void 0),...D?[]:["declare const window: any",...C.map((n)=>`declare const ${n}: any`)],["// Generated \u2014 the names stx auto-imports from @stacksjs/browser.",...Oe.map((n)=>`declare const ${n}: any`)].join(`
19
19
  `),Me(await Uo())].filter(Boolean).join(`
20
20
  `),L=`${l()}/typecheck`;await Bun.$`rm -rf ${L}`.quiet().nothrow(),await Bun.$`mkdir -p ${L}`.quiet().nothrow(),await Bun.write(z,me);let P=new Map,ge=0;for(let[n,r]of u){let x=`${ge++}_${n.replace(/[^\w.-]+/g,"_")}`;await Bun.write(`${L}/${x}`,r.source),P.set(x,r)}let he={target:"ESNext",module:"ESNext",moduleResolution:"bundler",strict:!0,noEmit:!0,skipLibCheck:!0,allowJs:!0,esModuleInterop:!0,resolveJsonModule:!0,lib:["ESNext","DOM","DOM.Iterable"],types:[],...Le(e.length>0?h.dirname(h.resolve(e[0])):process.cwd()),...t.compilerOptions??{}},q=async(n,r)=>{let x=`${L}/tsconfig${r===1?"":`.${r}`}.json`;await Bun.write(x,JSON.stringify({compilerOptions:he,files:n.map((B)=>`${L}/${B}`).concat(z,...j)},null,2));let O=Bun.spawnSync(["bun","x","tsc","-p",x,"--pretty","false"],{stdout:"pipe",stderr:"pipe"});return{output:new TextDecoder().decode(O.stdout)+new TextDecoder().decode(O.stderr),exitCode:O.exitCode??0}},H=await q([...P.keys()],1),Z=H.output,K=[],Q=H.exitCode,Y=0,xe=new Set(j.map((n)=>n.split("/").pop())),ee=0,F=new Set,te=(n)=>{for(let r of n.replace(/\n[\t ]+([^\n]*)/g," $1").split(`
21
- `)){let x=r.match(Re);if(!x)continue;if(Y++,xe.has(x[1].split("/").pop()))ee++;let[,O,B,_,I,T,A]=x,p=O.split("/").pop(),b=P.get(p);if(!b)continue;if(pe(Number(T)))F.add(p);let E=Number(B),X=Number(_),se,J=b.kind;if(b.virtual){let N=Fi(b.virtual,E,X)??(b.kind!=="template"&&pe(Number(T))?Fi(b.virtual,b.virtual.sourceLineCount,1):null);if(!N||b.kind==="template"&&!N.expression&&!N.diagnosticOrigin)continue;if(fl(N,Number(T)))continue;E=N.line,X=N.column,se=N.expression?.code.trim(),J=N.diagnosticOrigin??J}K.push({file:b.origin,line:E,column:X,code:Number(T),message:A,category:I==="error"?"error":"warning",blockKind:J,expression:se})}};te(Z);let ye=Y,be=ee;if(F.size>0&&F.size<P.size){let n=[...P.keys()].filter((r)=>!F.has(r));te((await q(n,2)).output)}if(o)for(let[n,r]of g){if(r.names.length===0)continue;K.push({file:n,line:r.line,column:1,code:0,message:`${r.names.length===1?"1 value reaches":`${r.names.length} values reach`} this block on the implicit bridge and ${r.names.length===1?"is":"are"} untyped: ${r.names.join(", ")}. Declare them with defineClientPayload({ ${r.names.join(", ")} }) in the server block to have them checked.`,category:"warning",blockKind:r.kind})}K.push(...v);let ne=new Set,V=K.filter((n)=>{let r=`${n.file}:${n.line}:${n.column}:${n.code}:${n.message}`;if(ne.has(r))return!1;return ne.add(r),!0});V.sort((n,r)=>n.file.localeCompare(r.file)||n.line-r.line||n.column-r.column);let ie=be>0&&V.length===0,Se=ie||Q!==0&&ye===0?`${ie?"a file passed with --lib has errors of its own, so nothing in your code was checked":`tsc exited ${Q} without reporting any diagnostic, so nothing was checked`}. `+"A syntax error in an ambient declaration file does this \u2014 skipLibCheck suppresses "+`SEMANTIC diagnostics only. tsc said:
21
+ `)){let x=r.match(Re);if(!x)continue;if(Y++,xe.has(x[1].split("/").pop()))ee++;let[,O,B,_,I,T,A]=x,p=O.split("/").pop(),b=P.get(p);if(!b)continue;if(pe(Number(T)))F.add(p);let E=Number(B),X=Number(_),se,J=b.kind;if(b.virtual){let N=Fi(b.virtual,E,X)??(b.kind!=="template"&&pe(Number(T))?Fi(b.virtual,b.virtual.sourceLineCount,1):null);if(!N||b.kind==="template"&&!N.expression&&!N.diagnosticOrigin)continue;if(ml(N,Number(T)))continue;E=N.line,X=N.column,se=N.expression?.code.trim(),J=N.diagnosticOrigin??J}K.push({file:b.origin,line:E,column:X,code:Number(T),message:A,category:I==="error"?"error":"warning",blockKind:J,expression:se})}};te(Z);let ye=Y,be=ee;if(F.size>0&&F.size<P.size){let n=[...P.keys()].filter((r)=>!F.has(r));te((await q(n,2)).output)}if(o)for(let[n,r]of g){if(r.names.length===0)continue;K.push({file:n,line:r.line,column:1,code:0,message:`${r.names.length===1?"1 value reaches":`${r.names.length} values reach`} this block on the implicit bridge and ${r.names.length===1?"is":"are"} untyped: ${r.names.join(", ")}. Declare them with defineClientPayload({ ${r.names.join(", ")} }) in the server block to have them checked.`,category:"warning",blockKind:r.kind})}K.push(...v);let ne=new Set,V=K.filter((n)=>{let r=`${n.file}:${n.line}:${n.column}:${n.code}:${n.message}`;if(ne.has(r))return!1;return ne.add(r),!0});V.sort((n,r)=>n.file.localeCompare(r.file)||n.line-r.line||n.column-r.column);let ie=be>0&&V.length===0,Se=ie||Q!==0&&ye===0?`${ie?"a file passed with --lib has errors of its own, so nothing in your code was checked":`tsc exited ${Q} without reporting any diagnostic, so nothing was checked`}. `+"A syntax error in an ambient declaration file does this \u2014 skipLibCheck suppresses "+`SEMANTIC diagnostics only. tsc said:
22
22
  ${Z.trim().split(`
23
23
  `).slice(0,12).join(`
24
- `)||"(no output)"}`:void 0;return{diagnostics:V,checkedFiles:R,blockCount:y,expressionCount:w,failure:Se}}function Dm(e){return e.map((t)=>{let o=t.blockKind==="template"?`[template: ${t.expression??""}]`:`[${t.blockKind==="plain"?"<script>":`<script ${t.blockKind}>`}]`;return`${t.file}:${t.line}:${t.column} ${t.category} TS${t.code} ${t.message} ${o}`}).join(`
24
+ `)||"(no output)"}`:void 0;return{diagnostics:V,checkedFiles:R,blockCount:y,expressionCount:w,failure:Se}}function jm(e){return e.map((t)=>{let o=t.blockKind==="template"?`[template: ${t.expression??""}]`:`[${t.blockKind==="plain"?"<script>":`<script ${t.blockKind}>`}]`;return`${t.file}:${t.line}:${t.column} ${t.category} TS${t.code} ${t.message} ${o}`}).join(`
25
25
  `)}
26
- export{Ma,Om,jo,Nm,hu,yu,Mm,Dm};
26
+ export{Ma,Mm,jo,Dm,bu,wu,Lm,jm};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{zh,Ho,Hh,Uh,Vh,Wh}from"./chunk-yq2krsc9.js";import"./chunk-0atz8fjx.js";import"./chunk-0sj79ha5.js";import"./chunk-cwcmmgvz.js";import"./chunk-9w9y84t5.js";import"./chunk-8b8az19t.js";import"./chunk-nhyv3w4r.js";import"./chunk-0adc8x2h.js";import"./chunk-mf5cqv1k.js";import"./chunk-w6ydg43d.js";import"./chunk-2vx2ben8.js";import"./chunk-jr2r2nh5.js";import"./chunk-xnp031ba.js";import"./chunk-388xpdw5.js";import"./chunk-b5qzed8y.js";import"./chunk-p3x84jj0.js";import"./chunk-w98yt4d4.js";import"./chunk-4vz17ytv.js";import"./chunk-phzhmnnm.js";import"./chunk-9928zdej.js";import"./chunk-0jdz31q1.js";import"./chunk-16sfjkc4.js";export{Wh as clearStoreCache,zh as getStoreScript,Vh as getStoreScriptFor,Uh as pageStoresAll,Ho as storesRead,Hh as storesReadInFiles};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{Ah,Ph,Ih,Oh,Nh,Mh}from"./chunk-mgj074y2.js";export{Oh as generateTransitionCSS,Nh as generateTransitionRuntime,Ah as performEnter,Ph as performLeave,Mh as processTransitionAttributes,Ih as processTransitionDirectives};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- function zc(){return`
2
+ function Uc(){return`
3
3
  (function(){
4
4
  var tip=null,hideTimer=null,currentEl=null;
5
5
 
@@ -103,4 +103,4 @@ document.addEventListener("focusout",function(e){
103
103
  });
104
104
  })();
105
105
  `}
106
- export{zc};
106
+ export{Uc};