@stacksjs/stx 0.2.915 → 0.2.919

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 (280) hide show
  1. package/dist/app-shell.js +3 -2
  2. package/dist/{chunk-frpsrv1e.js → chunk-09xqy448.js} +2 -2
  3. package/dist/chunk-0ebaf0pr.js +2 -0
  4. package/dist/chunk-0jjq552g.js +2 -0
  5. package/dist/chunk-0wctbtad.js +7 -0
  6. package/dist/{chunk-r7y1196g.js → chunk-0xyfs691.js} +4 -4
  7. package/dist/{chunk-w98yt4d4.js → chunk-14df2jzs.js} +2 -2
  8. package/dist/chunk-15rc8t28.js +2 -0
  9. package/dist/chunk-1a2c4pv8.js +54 -0
  10. package/dist/{chunk-1jakr6f2.js → chunk-1baxccfq.js} +18 -18
  11. package/dist/{chunk-0vyytd9v.js → chunk-1bf0grbf.js} +3 -3
  12. package/dist/chunk-1jrhjn2b.js +2 -0
  13. package/dist/chunk-1svffhzq.js +2 -0
  14. package/dist/{chunk-1hx6dyy9.js → chunk-1ts1pg90.js} +2 -2
  15. package/dist/{chunk-88fx8xc1.js → chunk-1vsjmwr1.js} +2 -2
  16. package/dist/{chunk-cxsc37fg.js → chunk-2f46pcg0.js} +2 -2
  17. package/dist/{chunk-pcwq66w3.js → chunk-2jm7map2.js} +2 -2
  18. package/dist/chunk-2m4ydym0.js +33 -0
  19. package/dist/chunk-2mv29s6w.js +9 -0
  20. package/dist/{chunk-d1ka4dvr.js → chunk-2szhk8mh.js} +5 -5
  21. package/dist/{chunk-gg715pj6.js → chunk-2zb642qr.js} +6 -6
  22. package/dist/chunk-3aayrnbh.js +21 -0
  23. package/dist/chunk-3br07y64.js +20 -0
  24. package/dist/{chunk-2f5jjxcj.js → chunk-3efpqm1f.js} +2 -2
  25. package/dist/chunk-3ftrv1f7.js +182 -0
  26. package/dist/{chunk-barb4gka.js → chunk-3hfv217t.js} +6 -6
  27. package/dist/{chunk-eptzpvn0.js → chunk-3kpxkjgm.js} +3 -3
  28. package/dist/{chunk-4w8t0a9e.js → chunk-3tcy9r6r.js} +27 -27
  29. package/dist/{chunk-zv3rn0ch.js → chunk-40j2pmnb.js} +6 -6
  30. package/dist/chunk-426gq0g5.js +2 -0
  31. package/dist/chunk-4ge80k8j.js +2 -0
  32. package/dist/chunk-4vdfqr64.js +2 -0
  33. package/dist/chunk-4yz33vzb.js +2 -0
  34. package/dist/chunk-4zcswx6x.js +2 -0
  35. package/dist/{chunk-smnt37jq.js → chunk-50zzar2c.js} +3 -3
  36. package/dist/{chunk-vayzmvf5.js → chunk-514yg4dr.js} +6 -6
  37. package/dist/{chunk-vnk582z7.js → chunk-5fdc8pej.js} +102 -36
  38. package/dist/chunk-5ht628zp.js +2 -0
  39. package/dist/chunk-67zy5p7x.js +2 -0
  40. package/dist/chunk-6bm7t0hm.js +3 -0
  41. package/dist/{chunk-7qzanp9y.js → chunk-6n6kndk0.js} +1 -1
  42. package/dist/chunk-6x5a2w5a.js +3 -0
  43. package/dist/{chunk-xc5esqcb.js → chunk-6ybq9pfh.js} +2 -2
  44. package/dist/{chunk-23x3k751.js → chunk-7axtwg1f.js} +2 -2
  45. package/dist/chunk-8153bfpx.js +2 -0
  46. package/dist/{chunk-16sfjkc4.js → chunk-858p3hkz.js} +2 -2
  47. package/dist/chunk-86p0m920.js +2 -0
  48. package/dist/chunk-88texeh4.js +2 -0
  49. package/dist/chunk-8mye65n9.js +2 -0
  50. package/dist/chunk-8ycgk8w6.js +2 -0
  51. package/dist/{chunk-npj20tj9.js → chunk-9707zz6v.js} +2 -2
  52. package/dist/{chunk-pyyda92j.js → chunk-9gr7m3tb.js} +1 -1
  53. package/dist/{chunk-952dfmcb.js → chunk-9mack1g8.js} +3 -3
  54. package/dist/chunk-9xcsn4pb.js +2 -0
  55. package/dist/{chunk-3jc6yb02.js → chunk-9zwmfkfg.js} +9 -9
  56. package/dist/chunk-a5tg553d.js +2 -0
  57. package/dist/chunk-agxxqjjt.js +2 -0
  58. package/dist/{chunk-phzhmnnm.js → chunk-ayrd026n.js} +3 -3
  59. package/dist/chunk-b44pvac7.js +2 -0
  60. package/dist/chunk-b4yp16a2.js +2 -0
  61. package/dist/{chunk-95j8660f.js → chunk-cbqe84g3.js} +2 -2
  62. package/dist/{chunk-qsexsrw2.js → chunk-d4xjwebv.js} +5 -5
  63. package/dist/{chunk-pmn9kynz.js → chunk-d69k67bn.js} +11 -11
  64. package/dist/chunk-ex6dne7e.js +3 -0
  65. package/dist/chunk-fb63xppz.js +2 -0
  66. package/dist/chunk-ffqqkeye.js +2 -0
  67. package/dist/chunk-fjpt8arw.js +3 -0
  68. package/dist/{chunk-mgj074y2.js → chunk-fn0y9z1t.js} +5 -5
  69. package/dist/{chunk-ar6jeqmm.js → chunk-ft34x0h1.js} +4 -4
  70. package/dist/{chunk-7x3tt27s.js → chunk-fwxgzktt.js} +2 -2
  71. package/dist/chunk-g1v12bjm.js +2 -0
  72. package/dist/chunk-gg0kkn2e.js +2 -0
  73. package/dist/chunk-ggg8b8n1.js +2 -0
  74. package/dist/chunk-ggrcg7k7.js +2 -0
  75. package/dist/{chunk-11c7xg1z.js → chunk-gjyz5ma7.js} +1 -1
  76. package/dist/chunk-gmn9ba8f.js +3 -0
  77. package/dist/chunk-gqe574d9.js +2 -0
  78. package/dist/chunk-h4nqjks2.js +2 -0
  79. package/dist/chunk-hajamm16.js +2 -0
  80. package/dist/chunk-hg2n2264.js +2 -0
  81. package/dist/{chunk-6t8ce21j.js → chunk-hht7n4zd.js} +2 -2
  82. package/dist/chunk-hxabvt31.js +2 -0
  83. package/dist/chunk-j3sat6vn.js +2 -0
  84. package/dist/chunk-j9gbnqxq.js +2 -0
  85. package/dist/{chunk-1hbf5e1h.js → chunk-jgtn9t5n.js} +2 -2
  86. package/dist/chunk-jj2z4nxa.js +2 -0
  87. package/dist/{chunk-0jdz31q1.js → chunk-jjq7c8s2.js} +3 -3
  88. package/dist/chunk-k289127j.js +2 -0
  89. package/dist/{chunk-p3fepzt9.js → chunk-kk9h53xg.js} +3 -3
  90. package/dist/{chunk-xnp031ba.js → chunk-ktv65e3n.js} +7 -7
  91. package/dist/chunk-m1hfh2t4.js +2 -0
  92. package/dist/{chunk-9b2wdkbq.js → chunk-m390z8w8.js} +11 -11
  93. package/dist/chunk-m3qwqhxp.js +2 -0
  94. package/dist/{chunk-t85zac4y.js → chunk-m6hrb7rm.js} +58 -58
  95. package/dist/{chunk-7gwysmrs.js → chunk-m86sjbx7.js} +3 -3
  96. package/dist/chunk-m9smh7fs.js +2 -0
  97. package/dist/{chunk-1jvt9t3r.js → chunk-m9ta0640.js} +2 -2
  98. package/dist/chunk-mhnjtc42.js +2 -0
  99. package/dist/{chunk-hhspwfva.js → chunk-mn9t5fnv.js} +2 -2
  100. package/dist/{chunk-36cz2v8k.js → chunk-mnpfvxpa.js} +31 -31
  101. package/dist/{chunk-2vx2ben8.js → chunk-mr9pp5cf.js} +2 -2
  102. package/dist/{chunk-1jxkc6d0.js → chunk-mztjpp7m.js} +2 -2
  103. package/dist/chunk-n4bxb2hx.js +2 -0
  104. package/dist/chunk-n958bxm6.js +2 -0
  105. package/dist/{chunk-8wqhzzkn.js → chunk-neymp1bb.js} +3 -3
  106. package/dist/chunk-nkbnsbb0.js +3 -0
  107. package/dist/chunk-nkr1aa5z.js +2 -0
  108. package/dist/{chunk-nhyv3w4r.js → chunk-p0xqm2ne.js} +1 -1
  109. package/dist/chunk-p3vswt0f.js +2 -0
  110. package/dist/{chunk-z110bf2c.js → chunk-p3x7kwb5.js} +7 -7
  111. package/dist/chunk-p4twxjfs.js +6 -0
  112. package/dist/chunk-p8wnp4p1.js +2 -0
  113. package/dist/{chunk-bvqgq18r.js → chunk-p97h91zx.js} +2 -2
  114. package/dist/chunk-pjv4dskp.js +2 -0
  115. package/dist/{chunk-5jc9hmwg.js → chunk-pwg544dw.js} +2 -2
  116. package/dist/chunk-pxvp0cc9.js +3 -0
  117. package/dist/chunk-q3z252d9.js +2 -0
  118. package/dist/{chunk-q9gbdzw0.js → chunk-qda8tmk9.js} +2 -2
  119. package/dist/chunk-qfkak3jb.js +2 -0
  120. package/dist/chunk-qnytvyy0.js +2 -0
  121. package/dist/{chunk-fznjm7qt.js → chunk-qsnw0qyp.js} +2 -2
  122. package/dist/{chunk-ftvpz1j4.js → chunk-qtzfbv7e.js} +5 -5
  123. package/dist/{chunk-9xmx8hc7.js → chunk-qzqqzraq.js} +8 -8
  124. package/dist/{chunk-47z0m17p.js → chunk-rk16391e.js} +3 -3
  125. package/dist/chunk-rt7xy537.js +2 -0
  126. package/dist/chunk-rwjye578.js +2 -0
  127. package/dist/{chunk-cwcmmgvz.js → chunk-s1x2pc9b.js} +2 -2
  128. package/dist/{chunk-zbpvmgjn.js → chunk-sbr3wg75.js} +65 -65
  129. package/dist/chunk-sftznswb.js +2 -0
  130. package/dist/{chunk-cq4cwfqf.js → chunk-sxrcac01.js} +2 -2
  131. package/dist/{chunk-fzcqw147.js → chunk-tb4be5ct.js} +3 -3
  132. package/dist/{chunk-m8n14s3z.js → chunk-tnbzg7fd.js} +2 -2
  133. package/dist/{chunk-jr2r2nh5.js → chunk-txk2z7v0.js} +4 -4
  134. package/dist/chunk-tz5ktd6d.js +2 -0
  135. package/dist/{chunk-302nw40c.js → chunk-v060015m.js} +1 -1
  136. package/dist/chunk-v1a5h1tc.js +38 -0
  137. package/dist/{chunk-7anbc757.js → chunk-v1x96kjr.js} +8 -8
  138. package/dist/chunk-vb609vbj.js +1323 -0
  139. package/dist/chunk-vf7tpgqz.js +70 -0
  140. package/dist/chunk-vtcyber4.js +2 -0
  141. package/dist/chunk-vtj3dwhh.js +4 -0
  142. package/dist/{chunk-p9fyn5k4.js → chunk-whnzf9hn.js} +5 -5
  143. package/dist/chunk-wq2bpt0w.js +2 -0
  144. package/dist/{chunk-sdmq09jw.js → chunk-wv0wsavj.js} +2 -2
  145. package/dist/chunk-wv8zt78c.js +2 -0
  146. package/dist/{chunk-whc4jptx.js → chunk-wxqay5c2.js} +1 -1
  147. package/dist/{chunk-gfp39bzr.js → chunk-x40j67z1.js} +2 -2
  148. package/dist/chunk-xakqpa4z.js +3 -0
  149. package/dist/{chunk-dgt9kfkp.js → chunk-xap1f1bw.js} +2 -2
  150. package/dist/{chunk-zk5g49p5.js → chunk-xk7hdpq5.js} +3 -3
  151. package/dist/{chunk-zkwkhesc.js → chunk-xmy75h5v.js} +2 -2
  152. package/dist/{chunk-dp6r6gtb.js → chunk-xpsg91dh.js} +5 -5
  153. package/dist/{chunk-va4xam1q.js → chunk-xq5s4vc1.js} +1 -1
  154. package/dist/chunk-xy3ex6ht.js +2 -0
  155. package/dist/chunk-y899wtm8.js +2 -0
  156. package/dist/chunk-ye45znz5.js +2 -0
  157. package/dist/chunk-yegp50jb.js +2 -0
  158. package/dist/chunk-yq9aqpk8.js +2 -0
  159. package/dist/{chunk-5xbx0r3k.js → chunk-yvaqgdv1.js} +2 -2
  160. package/dist/{chunk-etmq1qny.js → chunk-yye2pec5.js} +14 -14
  161. package/dist/{chunk-47nzpbvm.js → chunk-yzqb7y45.js} +6 -6
  162. package/dist/{chunk-n0nf8n0h.js → chunk-z6nyyt3n.js} +6 -6
  163. package/dist/{chunk-fs43342z.js → chunk-zaj3nnvv.js} +2 -2
  164. package/dist/{chunk-2qk2ppgm.js → chunk-zb6my502.js} +1 -1
  165. package/dist/{chunk-ra2tzsvz.js → chunk-zrxvj3zf.js} +5 -5
  166. package/dist/chunk-zt45dqfx.js +2 -0
  167. package/dist/cli.js +38 -38
  168. package/dist/color-mode-boot.d.ts +1 -8
  169. package/dist/color-mode-boot.js +46 -2
  170. package/dist/craft-entry.js +2 -2
  171. package/dist/craft.js +2 -2
  172. package/dist/dev-server/ts-css.d.ts +1 -1
  173. package/dist/dev-server/ts-css.js +2 -2
  174. package/dist/document-shell.d.ts +2 -0
  175. package/dist/document-shell.js +15 -3
  176. package/dist/document-tags.d.ts +2 -0
  177. package/dist/document-tags.js +9 -0
  178. package/dist/head-injection.d.ts +2 -0
  179. package/dist/head-injection.js +1 -0
  180. package/dist/head.d.ts +2 -0
  181. package/dist/head.js +2 -2
  182. package/dist/native/compiler/html-to-ir.d.ts +3 -1
  183. package/dist/native/compiler/html-to-ir.js +31 -0
  184. package/dist/native/compiler/ir.d.ts +1 -0
  185. package/dist/native/components/primitives.d.ts +1 -0
  186. package/dist/native/event-names.js +2 -0
  187. package/dist/native/runtime/browser-renderer.d.ts +1 -0
  188. package/dist/native/runtime/browser-renderer.js +23 -6
  189. package/dist/native/testing.d.ts +1 -0
  190. package/dist/native/testing.js +33 -0
  191. package/dist/page-head.js +1 -9
  192. package/dist/process.js +1 -1
  193. package/dist/pwa.js +3 -3
  194. package/dist/ssg.js +13 -13
  195. package/dist/types/config-types.d.ts +2 -1
  196. package/dist/variable-extractor.js +6 -1
  197. package/package.json +5 -5
  198. package/dist/chunk-0adc8x2h.js +0 -9
  199. package/dist/chunk-1gj46s0g.js +0 -2
  200. package/dist/chunk-1mx3j280.js +0 -2
  201. package/dist/chunk-1p6gaaf3.js +0 -3
  202. package/dist/chunk-1rfzs48h.js +0 -2
  203. package/dist/chunk-20hy5p3p.js +0 -2
  204. package/dist/chunk-29v3b5ks.js +0 -2
  205. package/dist/chunk-2cay3heb.js +0 -2
  206. package/dist/chunk-33fnbw33.js +0 -2
  207. package/dist/chunk-357qjcj1.js +0 -3
  208. package/dist/chunk-38y11q8x.js +0 -2
  209. package/dist/chunk-3q80f7mt.js +0 -2
  210. package/dist/chunk-43kz6rx9.js +0 -2
  211. package/dist/chunk-490rrkrp.js +0 -2
  212. package/dist/chunk-49980am3.js +0 -2
  213. package/dist/chunk-4a9bqc8f.js +0 -33
  214. package/dist/chunk-4e18r89n.js +0 -3
  215. package/dist/chunk-4r0028av.js +0 -1323
  216. package/dist/chunk-4vz17ytv.js +0 -68
  217. package/dist/chunk-4w9pvpfd.js +0 -2
  218. package/dist/chunk-5afnyvw5.js +0 -2
  219. package/dist/chunk-5pb1x7x6.js +0 -2
  220. package/dist/chunk-6n50b07t.js +0 -2
  221. package/dist/chunk-76mn123c.js +0 -2
  222. package/dist/chunk-8egbh6z1.js +0 -2
  223. package/dist/chunk-8n9jd8cz.js +0 -2
  224. package/dist/chunk-8tfpv6zf.js +0 -6
  225. package/dist/chunk-94qc4zwb.js +0 -2
  226. package/dist/chunk-9928zdej.js +0 -3
  227. package/dist/chunk-9ay18k46.js +0 -2
  228. package/dist/chunk-9tv0tw7f.js +0 -3
  229. package/dist/chunk-a5h9bwrc.js +0 -2
  230. package/dist/chunk-am7xmh9p.js +0 -2
  231. package/dist/chunk-bdkst2wp.js +0 -2
  232. package/dist/chunk-bej9kz05.js +0 -2
  233. package/dist/chunk-ccgabq3a.js +0 -2
  234. package/dist/chunk-cv6d4zr5.js +0 -2
  235. package/dist/chunk-e5rag6rh.js +0 -3
  236. package/dist/chunk-eqdg72re.js +0 -2
  237. package/dist/chunk-fvr3h2fr.js +0 -7
  238. package/dist/chunk-g0hkknzm.js +0 -2
  239. package/dist/chunk-g44932zc.js +0 -2
  240. package/dist/chunk-g4w3wms2.js +0 -2
  241. package/dist/chunk-gmmqz698.js +0 -2
  242. package/dist/chunk-hxftzw0x.js +0 -2
  243. package/dist/chunk-j3d3q3g7.js +0 -2
  244. package/dist/chunk-jmggm1ep.js +0 -3
  245. package/dist/chunk-jz37h2z0.js +0 -4
  246. package/dist/chunk-k8s3hyh2.js +0 -2
  247. package/dist/chunk-m8mmasgc.js +0 -2
  248. package/dist/chunk-man5ap64.js +0 -54
  249. package/dist/chunk-mdgcjzcn.js +0 -38
  250. package/dist/chunk-mjny8x91.js +0 -2
  251. package/dist/chunk-mjr5fkc2.js +0 -2
  252. package/dist/chunk-n1y82svg.js +0 -2
  253. package/dist/chunk-na0e3s88.js +0 -2
  254. package/dist/chunk-new89wh2.js +0 -2
  255. package/dist/chunk-nrap20qt.js +0 -2
  256. package/dist/chunk-q85wy43m.js +0 -2
  257. package/dist/chunk-q9yahsww.js +0 -2
  258. package/dist/chunk-qdwtemy1.js +0 -2
  259. package/dist/chunk-qp0ndbk6.js +0 -2
  260. package/dist/chunk-r1fhahnn.js +0 -2
  261. package/dist/chunk-r4e17p2x.js +0 -2
  262. package/dist/chunk-rnsa5zz5.js +0 -2
  263. package/dist/chunk-rzsvxjse.js +0 -2
  264. package/dist/chunk-senrtnx2.js +0 -2
  265. package/dist/chunk-sw5g5mbd.js +0 -2
  266. package/dist/chunk-t63y6qd5.js +0 -2
  267. package/dist/chunk-v1wr2vdx.js +0 -2
  268. package/dist/chunk-v6gkjg5f.js +0 -3
  269. package/dist/chunk-vq7m7xcz.js +0 -182
  270. package/dist/chunk-wsfqb5jk.js +0 -2
  271. package/dist/chunk-wvc6eayq.js +0 -2
  272. package/dist/chunk-wz44vmgn.js +0 -21
  273. package/dist/chunk-x1kzqxj5.js +0 -2
  274. package/dist/chunk-xa98a901.js +0 -2
  275. package/dist/chunk-xj95sk0y.js +0 -2
  276. package/dist/chunk-xtf3sab5.js +0 -2
  277. package/dist/chunk-yga49yw3.js +0 -2
  278. package/dist/chunk-yn02d599.js +0 -2
  279. package/dist/chunk-z5nx021e.js +0 -20
  280. package/dist/chunk-z9wwa50p.js +0 -2
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{m,p}from"./chunk-4vz17ytv.js";import{oe,F,g}from"./chunk-4r0028av.js";function z(t,o){let i=1,r=o,e="<template",n="</template";while(r<t.length&&i>0){let s=t.indexOf("<",r);if(s===-1)break;if(r=s,t.startsWith(e,r)&&(r+e.length>=t.length||/[\s>\/]/.test(t[r+e.length]))){i++,r+=e.length;continue}if(t.startsWith(n,r)){let a=t.indexOf(">",r+n.length);if(a!==-1){if(i--,i===0)return a+1;r=a+1;continue}}r++}return i===0?r:-1}var N=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]);function k(t,o){let i=null;for(let r=o;r<t.length;r++){let e=t[r];if(i){if(e==="\\"){r++;continue}if(e===i)i=null;continue}if(e==='"'||e==="'"){i=e;continue}if(e===">")return r+1}return-1}function B(t,o,i){let r=o.toLowerCase(),e=1,n=i;while(n<t.length){let s=t.indexOf("<",n);if(s===-1)return-1;if(t.startsWith("<!--",s)){let f=t.indexOf("-->",s+4);n=f===-1?t.length:f+3;continue}let a=k(t,s+1);if(a===-1)return-1;let u=t.slice(s,a),c=u.match(/^<\s*(\/?)\s*([a-zA-Z][\w-]*)/);if(c&&c[2].toLowerCase()===r){if(c[1]==="/"){if(e--,e===0)return a}else if(!/\/\s*>$/.test(u))e++}n=a}return-1}function Z(t){let o=[],i=[],r=/\bslot\s*=\s*(?:"([^"]+)"|'([^']+)')/i,e=0;while(e<t.length){let n=t.indexOf("<",e);if(n===-1)break;if(t.startsWith("<!--",n)){let l=t.indexOf("-->",n+4);e=l===-1?t.length:l+3;continue}let s=k(t,n+1);if(s===-1)break;let a=t.slice(n,s),u=a.match(/^<\s*(\/?)\s*([a-zA-Z][\w-]*)/);if(!u){e=s;continue}let c=u[2].toLowerCase();if(u[1]==="/"){let l=i.lastIndexOf(c);if(l!==-1)i.splice(l);e=s;continue}let f=/\/\s*>$/.test(a),d=i.length===0?a.match(r):null;if(d){let l=d[1]||d[2],h=a.replace(r,"").replace(/\s+(?=\/?>$)/,"").replace(/\s{2,}/g," "),S=f||N.has(c)?-1:B(t,c,s);if(S===-1)o.push({start:n,end:s,slotName:l,element:h}),e=s;else o.push({start:n,end:S,slotName:l,element:h+t.slice(s,S)}),e=S;continue}if(!f&&!N.has(c)){if(i.push(c),c==="script"||c==="style"){let l=t.toLowerCase().indexOf(`</${c}>`,s);if(l!==-1){e=l;continue}}}e=s}return o}function L(t){let o=[],i=[],r=/^<template\s+(?:#([a-zA-Z][\w-]*)|v-slot:([a-zA-Z][\w-]*)|slot="([a-zA-Z][\w-]*)")(?:\s*=\s*"([^"]*)")?[^>]*>$/i,e=0;while(e<t.length){let n=t.indexOf("<",e);if(n===-1)break;if(t.startsWith("<!--",n)){let l=t.indexOf("-->",n+4);e=l===-1?t.length:l+3;continue}let s=k(t,n+1);if(s===-1)break;let a=t.slice(n,s),u=a.match(/^<\s*(\/?)\s*([a-zA-Z][\w-]*)/);if(!u){e=s;continue}let c=u[1]==="/",f=u[2].toLowerCase();if(c){let l=i.lastIndexOf(f);if(l!==-1)i.splice(l);e=s;continue}if(f==="template"&&i.length===0){let l=a.match(r);if(l){let h=z(t,s);if(h!==-1){let S=l[1]||l[2]||l[3];o.push({start:n,end:h,slotName:S,content:t.slice(s,h-11).trim(),propsBinding:l[4]||void 0}),e=h;continue}}}if(!/\/\s*>$/.test(a)&&!N.has(f)){if(i.push(f),f==="script"||f==="style"){let l=t.toLowerCase().indexOf(`</${f}>`,s);if(l!==-1){e=l;continue}}}e=s}return o}function Su(t){let o={default:"",named:new Map},i=t,r=L(t);for(let n of r)o.named.set(n.slotName,{name:n.slotName,content:n.content,propsBinding:n.propsBinding});r.sort((n,s)=>s.start-n.start);for(let n of r)i=i.slice(0,n.start)+i.slice(n.end);let e=Z(i);for(let n of e){let s=o.named.get(n.slotName);if(s)s.content+=n.element;else o.named.set(n.slotName,{name:n.slotName,content:n.element})}for(let n=e.length-1;n>=0;n--){let s=e[n];i=i.slice(0,s.start)+i.slice(s.end)}return o.default=i.trim(),o}function Zm(t){let o=t.match(/name\s*=\s*["']([^"']+)["']/),i=o?o[1]:"",r={},e=/:([a-zA-Z][\w-]*)\s*=\s*["']([^"']+)["']/g,n;while((n=e.exec(t))!==null)r[n[1]]=n[2];let s=t.match(/<slot[^>]*>([\s\S]*?)<\/slot>/i),a=s?s[1].trim():"";return{name:i,props:r,defaultContent:a}}async function ku(t,o,i,r){if(!t)return i;let e=t.content;if(t.propsBinding&&Object.keys(o).length>0){let n=t.propsBinding.trim(),s={...r},a=new Set,u=new Set;if(n.startsWith("{")&&n.endsWith("}")){let c=n.slice(1,-1).split(",").map((f)=>f.trim()).filter(Boolean);for(let f of c){let[d,l]=f.split(":").map((S)=>S.trim()),h=l||d;if(s[h]=o[d],o[d]!==void 0)u.add(h);else a.add(h)}}else if(s[n]=o,Object.values(o).some((c)=>c===void 0))a.add(n);else u.add(n);e=j(e,s,a,u)}return e}function j(t,o,i,r){return t.replace(/\{\{\s*([^}]+)\s*\}\}/g,(e,n)=>{try{let s=n.trim();if(F(s,i))return e;if(Array.isArray(o.__stx_preserved_client_expressions)&&o.__stx_preserved_client_expressions.includes(s)&&!F(s,r))return e;let a=_(s,o);if(a===void 0)return e;return g(String(a??""))}catch{return`{{ ${n} }}`}})}function _(t,o){if(/^[a-zA-Z_$][\w$]*(\.[a-zA-Z_$][\w$]*)*$/.test(t)){let r=t.split("."),e=o;for(let n of r)if(e&&typeof e==="object"&&n in e)e=e[n];else return;return e}let i=t.match(/^([a-zA-Z_$][\w$]*)\s*([+\-*/])\s*(\d+)$/);if(i){let[,r,e,n]=i,s=o[r],a=parseInt(n,10);if(typeof s==="number")switch(e){case"+":return s+a;case"-":return s-a;case"*":return s*a;case"/":return s/a}}try{if(!m(t))return;return p(t,Object.keys(o))(...Object.values(o))}catch{return}}async function _u(t,o,i,r){let e=t;e=await I(e,/<slot\s+name\s*=\s*["']([^"']+)["']([^>]*?)(?:\/>|>([\s\S]*?)<\/slot>)/gi,async(a,u,c,f)=>{let d=o.named.get(u),l=f?.trim()||"",h=c||"",S={},E=[],C=/:([a-zA-Z_$][\w$-]*)\s*=\s*["']([^"']+)["']/g,b;while((b=C.exec(h))!==null){let w=b[1],x=b[2];S[w]=_(x,i),E.push([w,x])}if(r!==void 0&&d?.propsBinding&&Object.values(S).some((w)=>w===void 0)){let w=d.propsBinding.trim(),x=oe(`${w} in []`),y="__stx_slot_props";while(x.includes(y))y+="_";let M=E.map(([A,P])=>{let O=S[A],R;try{R=O===void 0?void 0:JSON.stringify(O)}catch{}return`${JSON.stringify(A)}:(${R??P})`}).join(","),v=g(JSON.stringify({binding:w,names:x,owner:r}));return`<template :for="${g(`${y} in [{${M}}]`)}" data-stx-slot-binding="${encodeURIComponent(w)}" data-stx-slot-scope="${v}">${d.content}</template>`}return await ku(d,S,l,i)});let s=/<slot\b((?:"[^"]*"|'[^']*'|[^>"'])*?)\s*(?:\/>|>([\s\S]*?)<\/slot>)/gi;return e=e.replace(s,(a,u,c)=>{if(/\bname\s*=/.test(u||""))return a;let f=c?.trim()||"";return o.default||f}),e}async function I(t,o,i){let r=[],e=[];t.replace(o,(a,...u)=>{let c=u[u.length-2];return e.push({match:a,index:c}),r.push(i(a,...u.slice(0,-2))),a});let n=await Promise.all(r),s=t;for(let a=e.length-1;a>=0;a--){let{match:u,index:c}=e[a];s=s.slice(0,c)+n[a]+s.slice(c+u.length)}return s}function Qm(t){let o=Su(t);return{defaultSlot:o.default,namedSlots:o.named}}async function eh(t,o,i,r,e){return await _u(t,{default:o,named:i},r,e)}
3
- export{Su,Zm,ku,_u,Qm,eh};
2
+ import{h,p}from"./chunk-vf7tpgqz.js";import{oe,F,m}from"./chunk-vb609vbj.js";function z(t,o){let i=1,r=o,e="<template",n="</template";while(r<t.length&&i>0){let s=t.indexOf("<",r);if(s===-1)break;if(r=s,t.startsWith(e,r)&&(r+e.length>=t.length||/[\s>\/]/.test(t[r+e.length]))){i++,r+=e.length;continue}if(t.startsWith(n,r)){let a=t.indexOf(">",r+n.length);if(a!==-1){if(i--,i===0)return a+1;r=a+1;continue}}r++}return i===0?r:-1}var N=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]);function k(t,o){let i=null;for(let r=o;r<t.length;r++){let e=t[r];if(i){if(e==="\\"){r++;continue}if(e===i)i=null;continue}if(e==='"'||e==="'"){i=e;continue}if(e===">")return r+1}return-1}function B(t,o,i){let r=o.toLowerCase(),e=1,n=i;while(n<t.length){let s=t.indexOf("<",n);if(s===-1)return-1;if(t.startsWith("<!--",s)){let f=t.indexOf("-->",s+4);n=f===-1?t.length:f+3;continue}let a=k(t,s+1);if(a===-1)return-1;let u=t.slice(s,a),c=u.match(/^<\s*(\/?)\s*([a-zA-Z][\w-]*)/);if(c&&c[2].toLowerCase()===r){if(c[1]==="/"){if(e--,e===0)return a}else if(!/\/\s*>$/.test(u))e++}n=a}return-1}function Z(t){let o=[],i=[],r=/\bslot\s*=\s*(?:"([^"]+)"|'([^']+)')/i,e=0;while(e<t.length){let n=t.indexOf("<",e);if(n===-1)break;if(t.startsWith("<!--",n)){let l=t.indexOf("-->",n+4);e=l===-1?t.length:l+3;continue}let s=k(t,n+1);if(s===-1)break;let a=t.slice(n,s),u=a.match(/^<\s*(\/?)\s*([a-zA-Z][\w-]*)/);if(!u){e=s;continue}let c=u[2].toLowerCase();if(u[1]==="/"){let l=i.lastIndexOf(c);if(l!==-1)i.splice(l);e=s;continue}let f=/\/\s*>$/.test(a),d=i.length===0?a.match(r):null;if(d){let l=d[1]||d[2],g=a.replace(r,"").replace(/\s+(?=\/?>$)/,"").replace(/\s{2,}/g," "),S=f||N.has(c)?-1:B(t,c,s);if(S===-1)o.push({start:n,end:s,slotName:l,element:g}),e=s;else o.push({start:n,end:S,slotName:l,element:g+t.slice(s,S)}),e=S;continue}if(!f&&!N.has(c)){if(i.push(c),c==="script"||c==="style"){let l=t.toLowerCase().indexOf(`</${c}>`,s);if(l!==-1){e=l;continue}}}e=s}return o}function L(t){let o=[],i=[],r=/^<template\s+(?:#([a-zA-Z][\w-]*)|v-slot:([a-zA-Z][\w-]*)|slot="([a-zA-Z][\w-]*)")(?:\s*=\s*"([^"]*)")?[^>]*>$/i,e=0;while(e<t.length){let n=t.indexOf("<",e);if(n===-1)break;if(t.startsWith("<!--",n)){let l=t.indexOf("-->",n+4);e=l===-1?t.length:l+3;continue}let s=k(t,n+1);if(s===-1)break;let a=t.slice(n,s),u=a.match(/^<\s*(\/?)\s*([a-zA-Z][\w-]*)/);if(!u){e=s;continue}let c=u[1]==="/",f=u[2].toLowerCase();if(c){let l=i.lastIndexOf(f);if(l!==-1)i.splice(l);e=s;continue}if(f==="template"&&i.length===0){let l=a.match(r);if(l){let g=z(t,s);if(g!==-1){let S=l[1]||l[2]||l[3];o.push({start:n,end:g,slotName:S,content:t.slice(s,g-11).trim(),propsBinding:l[4]||void 0}),e=g;continue}}}if(!/\/\s*>$/.test(a)&&!N.has(f)){if(i.push(f),f==="script"||f==="style"){let l=t.toLowerCase().indexOf(`</${f}>`,s);if(l!==-1){e=l;continue}}}e=s}return o}function Cu(t){let o={default:"",named:new Map},i=t,r=L(t);for(let n of r)o.named.set(n.slotName,{name:n.slotName,content:n.content,propsBinding:n.propsBinding});r.sort((n,s)=>s.start-n.start);for(let n of r)i=i.slice(0,n.start)+i.slice(n.end);let e=Z(i);for(let n of e){let s=o.named.get(n.slotName);if(s)s.content+=n.element;else o.named.set(n.slotName,{name:n.slotName,content:n.element})}for(let n=e.length-1;n>=0;n--){let s=e[n];i=i.slice(0,s.start)+i.slice(s.end)}return o.default=i.trim(),o}function th(t){let o=t.match(/name\s*=\s*["']([^"']+)["']/),i=o?o[1]:"",r={},e=/:([a-zA-Z][\w-]*)\s*=\s*["']([^"']+)["']/g,n;while((n=e.exec(t))!==null)r[n[1]]=n[2];let s=t.match(/<slot[^>]*>([\s\S]*?)<\/slot>/i),a=s?s[1].trim():"";return{name:i,props:r,defaultContent:a}}async function Eu(t,o,i,r){if(!t)return i;let e=t.content;if(t.propsBinding&&Object.keys(o).length>0){let n=t.propsBinding.trim(),s={...r},a=new Set,u=new Set;if(n.startsWith("{")&&n.endsWith("}")){let c=n.slice(1,-1).split(",").map((f)=>f.trim()).filter(Boolean);for(let f of c){let[d,l]=f.split(":").map((S)=>S.trim()),g=l||d;if(s[g]=o[d],o[d]!==void 0)u.add(g);else a.add(g)}}else if(s[n]=o,Object.values(o).some((c)=>c===void 0))a.add(n);else u.add(n);e=j(e,s,a,u)}return e}function j(t,o,i,r){return t.replace(/\{\{\s*([^}]+)\s*\}\}/g,(e,n)=>{try{let s=n.trim();if(F(s,i))return e;if(Array.isArray(o.__stx_preserved_client_expressions)&&o.__stx_preserved_client_expressions.includes(s)&&!F(s,r))return e;let a=_(s,o);if(a===void 0)return e;return m(String(a??""))}catch{return`{{ ${n} }}`}})}function _(t,o){if(/^[a-zA-Z_$][\w$]*(\.[a-zA-Z_$][\w$]*)*$/.test(t)){let r=t.split("."),e=o;for(let n of r)if(e&&typeof e==="object"&&n in e)e=e[n];else return;return e}let i=t.match(/^([a-zA-Z_$][\w$]*)\s*([+\-*/])\s*(\d+)$/);if(i){let[,r,e,n]=i,s=o[r],a=parseInt(n,10);if(typeof s==="number")switch(e){case"+":return s+a;case"-":return s-a;case"*":return s*a;case"/":return s/a}}try{if(!h(t))return;return p(t,Object.keys(o))(...Object.values(o))}catch{return}}async function Tu(t,o,i,r){let e=t;e=await I(e,/<slot\s+name\s*=\s*["']([^"']+)["']([^>]*?)(?:\/>|>([\s\S]*?)<\/slot>)/gi,async(a,u,c,f)=>{let d=o.named.get(u),l=f?.trim()||"",g=c||"",S={},E=[],C=/:([a-zA-Z_$][\w$-]*)\s*=\s*["']([^"']+)["']/g,b;while((b=C.exec(g))!==null){let w=b[1],x=b[2];S[w]=_(x,i),E.push([w,x])}if(r!==void 0&&d?.propsBinding&&Object.values(S).some((w)=>w===void 0)){let w=d.propsBinding.trim(),x=oe(`${w} in []`),y="__stx_slot_props";while(x.includes(y))y+="_";let M=E.map(([A,P])=>{let O=S[A],R;try{R=O===void 0?void 0:JSON.stringify(O)}catch{}return`${JSON.stringify(A)}:(${R??P})`}).join(","),v=m(JSON.stringify({binding:w,names:x,owner:r}));return`<template :for="${m(`${y} in [{${M}}]`)}" data-stx-slot-binding="${encodeURIComponent(w)}" data-stx-slot-scope="${v}">${d.content}</template>`}return await Eu(d,S,l,i)});let s=/<slot\b((?:"[^"]*"|'[^']*'|[^>"'])*?)\s*(?:\/>|>([\s\S]*?)<\/slot>)/gi;return e=e.replace(s,(a,u,c)=>{if(/\bname\s*=/.test(u||""))return a;let f=c?.trim()||"";return o.default||f}),e}async function I(t,o,i){let r=[],e=[];t.replace(o,(a,...u)=>{let c=u[u.length-2];return e.push({match:a,index:c}),r.push(i(a,...u.slice(0,-2))),a});let n=await Promise.all(r),s=t;for(let a=e.length-1;a>=0;a--){let{match:u,index:c}=e[a];s=s.slice(0,c)+n[a]+s.slice(c+u.length)}return s}function nh(t){let o=Cu(t);return{defaultSlot:o.default,namedSlots:o.named}}async function rh(t,o,i,r,e){return await Tu(t,{default:o,named:i},r,e)}
3
+ export{Cu,th,Eu,Tu,nh,rh};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{q,Tg,Si,Gc,a,j,Ry,Ay}from"./chunk-3tcy9r6r.js";import"./chunk-50zzar2c.js";import"./chunk-mr9pp5cf.js";import"./chunk-txk2z7v0.js";import"./chunk-ktv65e3n.js";import"./chunk-5fdc8pej.js";import"./chunk-vb609vbj.js";import"./chunk-qda8tmk9.js";import"./chunk-14df2jzs.js";import"./chunk-vf7tpgqz.js";import"./chunk-ayrd026n.js";import"./chunk-ex6dne7e.js";import"./chunk-jjq7c8s2.js";import"./chunk-858p3hkz.js";export{j as config,q as defaultConfig,Ry as defineStxConfig,Si as discoverConfig,a as loadStxConfig,Gc as resolveInstalledPackage,Tg as resolveStxDirectories,Ay as validateConfig};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{Qe,Bn,mo,Qi,z,Jt}from"./chunk-14df2jzs.js";export{Bn as currentRuntimeConfig,Jt as injectRuntimeConfig,z as resolveRuntimeConfig,Qi as useRuntimeConfig,mo as useServerRuntimeConfig,Qe as withRuntimeConfig};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{Pt,lr,Yh}from"./chunk-p3x7kwb5.js";import{Se,ur,Zh,dr,qo,ys,bs,Qh,ey,ty,pr,fr,Ko,ws,ny}from"./chunk-jgtn9t5n.js";import"./chunk-858p3hkz.js";export{qo as batch,Yh as default,ur as derived,dr as effect,Pt as generateSignalsRuntime,lr as generateSignalsRuntimeDev,fr as isDerived,pr as isSignal,Zh as memo,bs as onDestroy,ys as onMount,ws as peek,ty as pendingLifecycleCounts,ey as runDestroyCallbacks,Qh as runMountCallbacks,Se as state,Ko as untrack,ny as useOptimistic};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- var f=null,D=[],v=0,g=new Set;function x(){return f}function S(e){let n=f;return D.push(e),f=e,n}function h(e){D.pop(),f=e}var A=new WeakMap;function w(e,n){A.set(e,n)}function p(e,n){for(let r of e){let i=A.get(r);if(i)i(n);else n.add(r)}}function b(e){if(v>0){p(e,g);return}let n=new Set;p(e,n);for(let r of n)r()}function C(e){v++;try{e()}finally{if(v--,v===0){let n=[...g];g.clear();for(let r of n)r()}}}function m(e){let n=f;f=null;try{return e()}finally{f=n}}var k=[],T=[];function xe(e){let n=e,r=new Set,i=new Set,o=()=>{let t=x();if(t)i.add(t);return n};return o.set=(t)=>{if(!Object.is(t,n)){let c=n;n=t,r.forEach((u)=>{try{u(n,c)}catch(l){console.error("[stx] subscriber error:",l)}}),b(i)}},o.update=(t)=>{o.set(t(n))},o.subscribe=(t)=>(r.add(t),()=>r.delete(t)),Object.defineProperty(o,"_isSignal",{value:!0,writable:!1}),Object.defineProperty(o,"value",{get:()=>o(),set:(t)=>o.set(t),configurable:!0}),o}function ir(e,n={}){let r,i=!0,o=!1,t=new Set,c=typeof n.equals==="function"?n.equals:null,u=()=>{let s=S(d);try{r=e(),o=!0}finally{h(s)}i=!1},l=()=>{let s=r,y=o;try{u()}catch{return i=!0,!0}return!y||!c(s,r)},d=()=>{if(i)return;if(c&&t.size){if(l())b(t);return}i=!0,b(t)};w(d,(s)=>{if(i)return;if(c&&t.size){if(l())p(t,s);return}i=!0,p(t,s)});let a=()=>{let s=x();if(s)t.add(s);if(i)u();return r};return Object.defineProperty(a,"_isDerived",{value:!0,writable:!1}),Object.defineProperty(a,"value",{get:()=>a(),configurable:!0}),a}function Gh(e,n=Object.is){return ir(e,{equals:n})}function ar(e,n={}){let r,i=!1,o=()=>{if(i)return;if(r){let c=r;r=void 0;try{c()}catch(u){console.error("[stx] effect cleanup error:",u)}}let t=S(o);try{let c=e();r=typeof c==="function"?c:void 0}catch(c){i=!0,console.error("[stx] effect error (the effect is disposed):",c)}finally{h(t)}};if(n.immediate!==!1)o();return()=>{if(i=!0,r){let t=r;r=void 0,t()}}}function Vo(e){C(e)}function hs(e){k.push(e)}function ys(e){T.push(e)}function Jh(){O(k,"onMount",T)}function Yh(){O(T,"onDestroy")}function O(e,n,r){let i=e.splice(0,e.length);for(let o of i)try{let t=o();if(r&&typeof t==="function")r.push(t)}catch(t){console.error(`[stx] ${n} callback threw:`,t)}}function Zh(){return{mount:k.length,destroy:T.length}}function cr(e){return typeof e==="function"&&e._isSignal===!0}function lr(e){return typeof e==="function"&&e._isDerived===!0}function Wo(e){if(cr(e)||lr(e))return m(()=>e());return e}function bs(e){return m(e)}function Qh(e,n){let r=typeof e==="function"?e:()=>e,i=xe([]),o=ir(()=>i().reduce((u,l)=>n(u,l.action),r())),t=!1;return ar(()=>{if(r(),!t){t=!0;return}if(bs(()=>i().length))i.set([])}),[o,(u,l)=>{let d={action:u};i.set([...i(),d]);let a=()=>{let s=i().filter((y)=>y!==d);if(s.length!==i().length)i.set(s)};if(l&&typeof l.then==="function")Promise.resolve(l).then(a,a);return a}]}
3
- export{xe,ir,Gh,ar,Vo,hs,ys,Jh,Yh,Zh,cr,lr,Wo,bs,Qh};
2
+ var f=null,D=[],v=0,g=new Set;function x(){return f}function S(e){let n=f;return D.push(e),f=e,n}function h(e){D.pop(),f=e}var A=new WeakMap;function w(e,n){A.set(e,n)}function p(e,n){for(let r of e){let i=A.get(r);if(i)i(n);else n.add(r)}}function b(e){if(v>0){p(e,g);return}let n=new Set;p(e,n);for(let r of n)r()}function C(e){v++;try{e()}finally{if(v--,v===0){let n=[...g];g.clear();for(let r of n)r()}}}function m(e){let n=f;f=null;try{return e()}finally{f=n}}var k=[],T=[];function Se(e){let n=e,r=new Set,i=new Set,o=()=>{let t=x();if(t)i.add(t);return n};return o.set=(t)=>{if(!Object.is(t,n)){let c=n;n=t,r.forEach((u)=>{try{u(n,c)}catch(l){console.error("[stx] subscriber error:",l)}}),b(i)}},o.update=(t)=>{o.set(t(n))},o.subscribe=(t)=>(r.add(t),()=>r.delete(t)),Object.defineProperty(o,"_isSignal",{value:!0,writable:!1}),Object.defineProperty(o,"value",{get:()=>o(),set:(t)=>o.set(t),configurable:!0}),o}function ur(e,n={}){let r,i=!0,o=!1,t=new Set,c=typeof n.equals==="function"?n.equals:null,u=()=>{let s=S(d);try{r=e(),o=!0}finally{h(s)}i=!1},l=()=>{let s=r,y=o;try{u()}catch{return i=!0,!0}return!y||!c(s,r)},d=()=>{if(i)return;if(c&&t.size){if(l())b(t);return}i=!0,b(t)};w(d,(s)=>{if(i)return;if(c&&t.size){if(l())p(t,s);return}i=!0,p(t,s)});let a=()=>{let s=x();if(s)t.add(s);if(i)u();return r};return Object.defineProperty(a,"_isDerived",{value:!0,writable:!1}),Object.defineProperty(a,"value",{get:()=>a(),configurable:!0}),a}function Zh(e,n=Object.is){return ur(e,{equals:n})}function dr(e,n={}){let r,i=!1,o=()=>{if(i)return;if(r){let c=r;r=void 0;try{c()}catch(u){console.error("[stx] effect cleanup error:",u)}}let t=S(o);try{let c=e();r=typeof c==="function"?c:void 0}catch(c){i=!0,console.error("[stx] effect error (the effect is disposed):",c)}finally{h(t)}};if(n.immediate!==!1)o();return()=>{if(i=!0,r){let t=r;r=void 0,t()}}}function qo(e){C(e)}function ys(e){k.push(e)}function bs(e){T.push(e)}function Qh(){O(k,"onMount",T)}function ey(){O(T,"onDestroy")}function O(e,n,r){let i=e.splice(0,e.length);for(let o of i)try{let t=o();if(r&&typeof t==="function")r.push(t)}catch(t){console.error(`[stx] ${n} callback threw:`,t)}}function ty(){return{mount:k.length,destroy:T.length}}function pr(e){return typeof e==="function"&&e._isSignal===!0}function fr(e){return typeof e==="function"&&e._isDerived===!0}function Ko(e){if(pr(e)||fr(e))return m(()=>e());return e}function ws(e){return m(e)}function ny(e,n){let r=typeof e==="function"?e:()=>e,i=Se([]),o=ur(()=>i().reduce((u,l)=>n(u,l.action),r())),t=!1;return dr(()=>{if(r(),!t){t=!0;return}if(ws(()=>i().length))i.set([])}),[o,(u,l)=>{let d={action:u};i.set([...i(),d]);let a=()=>{let s=i().filter((y)=>y!==d);if(s.length!==i().length)i.set(s)};if(l&&typeof l.then==="function")Promise.resolve(l).then(a,a);return a}]}
3
+ export{Se,ur,Zh,dr,qo,ys,bs,Qh,ey,ty,pr,fr,Ko,ws,ny};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{Vh,Vo,Wh,qh,Kh,Xh}from"./chunk-3hfv217t.js";import"./chunk-3br07y64.js";import"./chunk-xpsg91dh.js";import"./chunk-s1x2pc9b.js";import"./chunk-3aayrnbh.js";import"./chunk-v1x96kjr.js";import"./chunk-p0xqm2ne.js";import"./chunk-2mv29s6w.js";import"./chunk-3tcy9r6r.js";import"./chunk-50zzar2c.js";import"./chunk-mr9pp5cf.js";import"./chunk-txk2z7v0.js";import"./chunk-ktv65e3n.js";import"./chunk-5fdc8pej.js";import"./chunk-vb609vbj.js";import"./chunk-qda8tmk9.js";import"./chunk-14df2jzs.js";import"./chunk-vf7tpgqz.js";import"./chunk-ayrd026n.js";import"./chunk-ex6dne7e.js";import"./chunk-jjq7c8s2.js";import"./chunk-858p3hkz.js";export{Xh as clearStoreCache,Vh as getStoreScript,Kh as getStoreScriptFor,qh as pageStoresAll,Vo as storesRead,Wh as storesReadInFiles};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- class T{cache=new Map;maxSize;options;sizes;bytes=0;constructor(e=100,t){this.maxSize=e,this.options=t??null,this.sizes=t?new Map:null}get byteSize(){return this.bytes}setMaxBytes(e){if(!this.options)return;this.options={...this.options,maxBytes:e};while(this.bytes>e&&this.cache.size>0){let t=this.cache.keys().next().value;if(t===void 0)break;this.delete(t)}}get(e){if(!this.cache.has(e))return;let t=this.cache.get(e);return this.cache.delete(e),this.cache.set(e,t),t}set(e,t){if(this.cache.has(e))this.delete(e);let i=this.options?this.options.sizeOf(t):0;if(this.options&&i>this.options.maxBytes)return;while(this.cache.size>0&&(this.cache.size>=this.maxSize||this.options!==null&&this.bytes+i>this.options.maxBytes)){let n=this.cache.keys().next().value;if(n===void 0)break;this.delete(n)}if(this.cache.set(e,t),this.sizes)this.sizes.set(e,i),this.bytes+=i}has(e){return this.cache.has(e)}delete(e){if(this.sizes){let t=this.sizes.get(e);if(t!==void 0)this.bytes-=t,this.sizes.delete(e)}return this.cache.delete(e)}clear(){this.cache.clear(),this.sizes?.clear(),this.bytes=0}get size(){return this.cache.size}keys(){return this.cache.keys()}values(){return this.cache.values()}}var o=new Map,x=500;function en(e,t){if(t?.includes("g"))return new RegExp(e,t);let i=`${e}:${t||""}`;if(!o.has(i)){if(o.size>=x){let n=o.keys().next().value;if(n)o.delete(n)}o.set(i,new RegExp(e,t))}return o.get(i)}class f{pool=[];maxPoolSize=10;fnCache=new Map;fnCacheMaxSize=200;getEvaluator(e){let t=Array.from(new Set(e)),i=t.sort().join(","),n=this.pool.find((s)=>s.context.join(",")===i);if(n)return n.func;let r=this.fnCache,c=this.fnCacheMaxSize,a=(...s)=>(u)=>{try{let h=`${i}:${u}`,l=r.get(h);if(!l){if(r.size>=c){let d=r.keys().next().value;if(d)r.delete(d)}l=Function(...t,`
2
+ class T{cache=new Map;maxSize;options;sizes;bytes=0;constructor(e=100,t){this.maxSize=e,this.options=t??null,this.sizes=t?new Map:null}get byteSize(){return this.bytes}setMaxBytes(e){if(!this.options)return;this.options={...this.options,maxBytes:e};while(this.bytes>e&&this.cache.size>0){let t=this.cache.keys().next().value;if(t===void 0)break;this.delete(t)}}get(e){if(!this.cache.has(e))return;let t=this.cache.get(e);return this.cache.delete(e),this.cache.set(e,t),t}set(e,t){if(this.cache.has(e))this.delete(e);let i=this.options?this.options.sizeOf(t):0;if(this.options&&i>this.options.maxBytes)return;while(this.cache.size>0&&(this.cache.size>=this.maxSize||this.options!==null&&this.bytes+i>this.options.maxBytes)){let n=this.cache.keys().next().value;if(n===void 0)break;this.delete(n)}if(this.cache.set(e,t),this.sizes)this.sizes.set(e,i),this.bytes+=i}has(e){return this.cache.has(e)}delete(e){if(this.sizes){let t=this.sizes.get(e);if(t!==void 0)this.bytes-=t,this.sizes.delete(e)}return this.cache.delete(e)}clear(){this.cache.clear(),this.sizes?.clear(),this.bytes=0}get size(){return this.cache.size}keys(){return this.cache.keys()}values(){return this.cache.values()}}var o=new Map,x=500;function rn(e,t){if(t?.includes("g"))return new RegExp(e,t);let i=`${e}:${t||""}`;if(!o.has(i)){if(o.size>=x){let n=o.keys().next().value;if(n)o.delete(n)}o.set(i,new RegExp(e,t))}return o.get(i)}class f{pool=[];maxPoolSize=10;fnCache=new Map;fnCacheMaxSize=200;getEvaluator(e){let t=Array.from(new Set(e)),i=t.sort().join(","),n=this.pool.find((s)=>s.context.join(",")===i);if(n)return n.func;let r=this.fnCache,c=this.fnCacheMaxSize,a=(...s)=>(u)=>{try{let h=`${i}:${u}`,l=r.get(h);if(!l){if(r.size>=c){let d=r.keys().next().value;if(d)r.delete(d)}l=Function(...t,`
3
3
  'use strict';
4
4
  try {
5
5
  return ${u};
@@ -10,5 +10,5 @@ catch (e) {
10
10
  }
11
11
  throw e;
12
12
  }
13
- `),r.set(h,l)}return l(...s)}catch{return}};if(this.pool.length<this.maxPoolSize)this.pool.push({func:a,context:t.slice()});return a}clear(){this.pool.length=0,this.fnCache.clear()}}var v=new f;class p{metrics=new Map;budgets=new Map;violations=[];maxViolations=100;violationHandlers=[];enabled=!0;setEnabled(e){this.enabled=e}isEnabled(){return this.enabled}setBudget(e,t){this.budgets.set(e,{warnThreshold:0.8,action:"warn",...t})}setBudgets(e){for(let[t,i]of Object.entries(e))this.setBudget(t,i)}removeBudget(e){this.budgets.delete(e)}getBudgets(){let e={};for(let[t,i]of this.budgets.entries())e[t]=i;return e}onViolation(e){this.violationHandlers.push(e)}offViolation(e){let t=this.violationHandlers.indexOf(e);if(t!==-1)this.violationHandlers.splice(t,1)}time(e,t){if(!this.enabled)return t();let i=performance.now(),n=t(),r=performance.now()-i;return this.recordTime(e,r),this.checkBudget(e,r),n}async timeAsync(e,t){if(!this.enabled)return t();let i=performance.now(),n=await t(),r=performance.now()-i;return this.recordTime(e,r),this.checkBudget(e,r),n}checkBudget(e,t){let i=this.budgets.get(e);if(!i)return;let n=t/i.maxTime*100,r=i.warnThreshold!==void 0?t>=i.maxTime*i.warnThreshold&&t<i.maxTime:!1,c=t>=i.maxTime;if(!r&&!c)return;let a={label:e,actualTime:t,budgetTime:i.maxTime,exceedancePercent:n,timestamp:new Date,isWarning:r};this.violations.push(a);while(this.violations.length>this.maxViolations)this.violations.shift();for(let u of this.violationHandlers)try{u(a)}catch{}let s=r?`[Performance Warning] "${e}" took ${t.toFixed(2)}ms (${n.toFixed(1)}% of ${i.maxTime}ms budget)`:`[Performance Budget Exceeded] "${e}" took ${t.toFixed(2)}ms (exceeded ${i.maxTime}ms budget by ${(n-100).toFixed(1)}%)`;switch(i.action){case"log":console.log(s);break;case"warn":console.warn(s);break;case"error":console.error(s);break;case"throw":if(c)throw Error(s);else console.warn(s);break}}recordTime(e,t){let i=this.metrics.get(e);if(i)i.count++,i.totalTime+=t,i.maxTime=Math.max(i.maxTime,t),i.minTime=Math.min(i.minTime,t);else this.metrics.set(e,{count:1,totalTime:t,maxTime:t,minTime:t})}getStats(e){if(e){let i=this.metrics.get(e);if(!i)return{};let n=this.budgets.get(e);return{count:i.count,avgTime:i.totalTime/i.count,totalTime:i.totalTime,maxTime:i.maxTime,minTime:i.minTime,budget:n?.maxTime,budgetUtilization:n?i.totalTime/i.count/n.maxTime*100:void 0}}let t={};for(let[i,n]of this.metrics.entries()){let r=this.budgets.get(i);t[i]={count:n.count,avgTime:n.totalTime/n.count,totalTime:n.totalTime,maxTime:n.maxTime,minTime:n.minTime,budget:r?.maxTime,budgetUtilization:r?n.totalTime/n.count/r.maxTime*100:void 0}}return t}getViolations(e){if(e)return this.violations.filter((t)=>t.label===e);return[...this.violations]}getViolationStats(){let e={},t=0,i=0;for(let n of this.violations)if(e[n.label]=(e[n.label]||0)+1,n.isWarning)t++;else i++;return{total:this.violations.length,byLabel:e,warnings:t,errors:i}}clear(){this.metrics.clear()}clearViolations(){this.violations.length=0}clearBudgets(){this.budgets.clear()}reset(){this.clear(),this.clearViolations(),this.clearBudgets(),this.violationHandlers.length=0}}var m=null;function b(){if(!m)m=new p;return m}var we=new Proxy({},{get(e,t){return b()[t]}});var g=0;async function R(){if(performance.now()-g<16)return;await new Promise((e)=>setTimeout(e,0)),g=performance.now()}
14
- export{T,en,we,R};
13
+ `),r.set(h,l)}return l(...s)}catch{return}};if(this.pool.length<this.maxPoolSize)this.pool.push({func:a,context:t.slice()});return a}clear(){this.pool.length=0,this.fnCache.clear()}}var v=new f;class p{metrics=new Map;budgets=new Map;violations=[];maxViolations=100;violationHandlers=[];enabled=!0;setEnabled(e){this.enabled=e}isEnabled(){return this.enabled}setBudget(e,t){this.budgets.set(e,{warnThreshold:0.8,action:"warn",...t})}setBudgets(e){for(let[t,i]of Object.entries(e))this.setBudget(t,i)}removeBudget(e){this.budgets.delete(e)}getBudgets(){let e={};for(let[t,i]of this.budgets.entries())e[t]=i;return e}onViolation(e){this.violationHandlers.push(e)}offViolation(e){let t=this.violationHandlers.indexOf(e);if(t!==-1)this.violationHandlers.splice(t,1)}time(e,t){if(!this.enabled)return t();let i=performance.now(),n=t(),r=performance.now()-i;return this.recordTime(e,r),this.checkBudget(e,r),n}async timeAsync(e,t){if(!this.enabled)return t();let i=performance.now(),n=await t(),r=performance.now()-i;return this.recordTime(e,r),this.checkBudget(e,r),n}checkBudget(e,t){let i=this.budgets.get(e);if(!i)return;let n=t/i.maxTime*100,r=i.warnThreshold!==void 0?t>=i.maxTime*i.warnThreshold&&t<i.maxTime:!1,c=t>=i.maxTime;if(!r&&!c)return;let a={label:e,actualTime:t,budgetTime:i.maxTime,exceedancePercent:n,timestamp:new Date,isWarning:r};this.violations.push(a);while(this.violations.length>this.maxViolations)this.violations.shift();for(let u of this.violationHandlers)try{u(a)}catch{}let s=r?`[Performance Warning] "${e}" took ${t.toFixed(2)}ms (${n.toFixed(1)}% of ${i.maxTime}ms budget)`:`[Performance Budget Exceeded] "${e}" took ${t.toFixed(2)}ms (exceeded ${i.maxTime}ms budget by ${(n-100).toFixed(1)}%)`;switch(i.action){case"log":console.log(s);break;case"warn":console.warn(s);break;case"error":console.error(s);break;case"throw":if(c)throw Error(s);else console.warn(s);break}}recordTime(e,t){let i=this.metrics.get(e);if(i)i.count++,i.totalTime+=t,i.maxTime=Math.max(i.maxTime,t),i.minTime=Math.min(i.minTime,t);else this.metrics.set(e,{count:1,totalTime:t,maxTime:t,minTime:t})}getStats(e){if(e){let i=this.metrics.get(e);if(!i)return{};let n=this.budgets.get(e);return{count:i.count,avgTime:i.totalTime/i.count,totalTime:i.totalTime,maxTime:i.maxTime,minTime:i.minTime,budget:n?.maxTime,budgetUtilization:n?i.totalTime/i.count/n.maxTime*100:void 0}}let t={};for(let[i,n]of this.metrics.entries()){let r=this.budgets.get(i);t[i]={count:n.count,avgTime:n.totalTime/n.count,totalTime:n.totalTime,maxTime:n.maxTime,minTime:n.minTime,budget:r?.maxTime,budgetUtilization:r?n.totalTime/n.count/r.maxTime*100:void 0}}return t}getViolations(e){if(e)return this.violations.filter((t)=>t.label===e);return[...this.violations]}getViolationStats(){let e={},t=0,i=0;for(let n of this.violations)if(e[n.label]=(e[n.label]||0)+1,n.isWarning)t++;else i++;return{total:this.violations.length,byLabel:e,warnings:t,errors:i}}clear(){this.metrics.clear()}clearViolations(){this.violations.length=0}clearBudgets(){this.budgets.clear()}reset(){this.clear(),this.clearViolations(),this.clearBudgets(),this.violationHandlers.length=0}}var m=null;function b(){if(!m)m=new p;return m}var ve=new Proxy({},{get(e,t){return b()[t]}});var g=0;async function R(){if(performance.now()-g<16)return;await new Promise((e)=>setTimeout(e,0)),g=performance.now()}
14
+ export{T,rn,ve,R};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{Wo,Gh,Jh}from"./chunk-v1a5h1tc.js";import"./chunk-3br07y64.js";import"./chunk-xpsg91dh.js";import"./chunk-s1x2pc9b.js";import"./chunk-3aayrnbh.js";import"./chunk-v1x96kjr.js";import"./chunk-p0xqm2ne.js";import"./chunk-2mv29s6w.js";import"./chunk-3tcy9r6r.js";import"./chunk-50zzar2c.js";import"./chunk-mr9pp5cf.js";import"./chunk-txk2z7v0.js";import"./chunk-ktv65e3n.js";import"./chunk-5fdc8pej.js";import"./chunk-vb609vbj.js";import"./chunk-qda8tmk9.js";import"./chunk-14df2jzs.js";import"./chunk-vf7tpgqz.js";import"./chunk-ayrd026n.js";import"./chunk-ex6dne7e.js";import"./chunk-jjq7c8s2.js";import"./chunk-858p3hkz.js";export{Jh as clearComposableCache,Gh as getComposableScript,Wo as listComposableModules};
@@ -45,12 +45,12 @@ var p=0;function f(){return`stx-teleport-${++p}`}function g(t){let e=t.split(","
45
45
  });
46
46
  })();
47
47
  </script>
48
- `}function $h(t,e,l){p=0;let o=/@teleport\s*\(([^)]+)\)\s*([\s\S]*?)@endteleport/g;return t.replace(o,(r,s,d)=>{let a=f(),{target:u,disabled:n}=g(s),c=d.trim();if(n)try{let i=!1;if(n==="true")i=!0;else if(n==="false")i=!1;else if(n in e)i=Boolean(e[n]);if(i)return`<div class="stx-teleport-inline" data-teleport-disabled>${c}</div>`}catch{}let m=h(a,u);return`
48
+ `}function Ph(t,e,l){p=0;let o=/@teleport\s*\(([^)]+)\)\s*([\s\S]*?)@endteleport/g;return t.replace(o,(r,s,d)=>{let a=f(),{target:u,disabled:n}=g(s),c=d.trim();if(n)try{let i=!1;if(n==="true")i=!0;else if(n==="false")i=!1;else if(n in e)i=Boolean(e[n]);if(i)return`<div class="stx-teleport-inline" data-teleport-disabled>${c}</div>`}catch{}let m=h(a,u);return`
49
49
  <div id="${a}" class="stx-teleport-source" style="display: none;">
50
50
  <template>${c}</template>
51
51
  </div>
52
52
  ${m}
53
- `})}function Rh(){return`
53
+ `})}function Ih(){return`
54
54
  <script>
55
55
  (function() {
56
56
  // Common teleport targets
@@ -68,4 +68,4 @@ var p=0;function f(){return`stx-teleport-${++p}`}function g(t){let e=t.split(","
68
68
  })();
69
69
  </script>
70
70
  `}
71
- export{$h,Rh};
71
+ export{Ph,Ih};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{n,u,Yt,Zt,Qt,tt,bt,H,bo,Gr,nt}from"./chunk-4vz17ytv.js";var O=/(?<![\w$@])@meta\s*\(/g,I=/(?<![\w$@])@metaTag\s*\(/g,C=/(?<![\w$@])@structuredData\s*\(/g,k=/(?<![\w$@])@seo\s*\(/g;function _(e,t){return(r)=>H(e,r,"the call has no closing parenthesis",t,n.INVALID_DIRECTIVE_SYNTAX)}function N(e){return"property"in e?`<meta property="${c(e.property)}" content="${c(e.content)}">`:`<meta name="${c(e.name)}" content="${c(e.content)}">`}function ki(e,t,r,g){if(!e.includes("@meta"))return e;let i=Yt(e,O,(a,o)=>{let s=Gr(Zt(a),t);if(s.kind==="tag")return N(s.tag);if(s.kind==="empty")return"";return H("Meta",o,s.message,r,s.code)},_("Meta",r));return i=Yt(i,I,(a,o)=>{let s=Qt(a,t);if(!s.ok)return H("MetaTag",o,s.message,r,s.code);if(s.value===void 0||s.value===null)return"";if(!bt(s.value))return H("MetaTag",o,`expected an object such as { name, content }, got ${tt(s.value)}`,r,n.TYPE_ERROR);let l=s.value;if(!l.name&&!l.property&&!l.httpEquiv)return H("MetaTag",o,"the tag needs a name, property or httpEquiv",r,n.INVALID_DIRECTIVE_SYNTAX);if(l.content===void 0||l.content===null||l.content===""||l.content===!1)return"";let p="<meta";if(l.name)p+=` name="${c(l.name)}"`;if(l.property)p+=` property="${c(l.property)}"`;if(l.httpEquiv)p+=` http-equiv="${c(l.httpEquiv)}"`;return p+=` content="${c(l.content)}">`,p},_("MetaTag",r)),i}function b(e){let t=(r)=>r["@context"]?{...r}:{...r,"@context":"https://schema.org"};if(bt(e))return t(e);if(Array.isArray(e)&&e.length>0&&e.every(bt))return e.map(t);return null}function E(e){return`<script type="application/ld+json">${JSON.stringify(e).replace(/<\//g,"<\\/")}</script>`}function _i(e,t,r){if(!e.includes("@structuredData"))return e;return Yt(e,C,(g,i)=>{let a=Qt(g,t);if(!a.ok)return H("StructuredData",i,a.message,r,a.code);if(a.value===void 0||a.value===null)return"";let o=b(a.value);if(!o)return H("StructuredData",i,`expected an object or an array of objects, got ${tt(a.value)}`,r,n.TYPE_ERROR);try{return E(o)}catch(s){let l=s instanceof Error?s.message:String(s);return H("StructuredData",i,`the data cannot be written as JSON: ${l}`,r,n.EVALUATION_ERROR)}},_("StructuredData",r))}var j=new Set(["title","description","keywords","robots","canonical","openGraph","twitter","structuredData"]),A={image:"openGraph.image",url:"canonical or openGraph.url",type:"openGraph.type",siteName:"openGraph.siteName",locale:"openGraph.locale",og:"openGraph",author:"@meta('author', ...)"};function Ci(e,t,r,g){if(!e.includes("@seo"))return e;return Yt(e,k,(i,a)=>{if(!i.trim())return H("SEO",a,"expected an object: @seo({ title, description }) or @seo(seoVariable)",r,n.INVALID_DIRECTIVE_SYNTAX);let o=Qt(i,t);if(!o.ok)return H("SEO",a,o.message,r,o.code);if(o.value===void 0||o.value===null)return"";if(!bt(o.value))return H("SEO",a,`expected an object such as { title, description }, got ${tt(o.value)}`,r,n.TYPE_ERROR);try{return L(o.value,a,r)}catch(s){let l=s instanceof Error?s.message:String(s);return H("SEO",a,`Error processing @seo directive: ${l}`,r,n.EVALUATION_ERROR)}},_("SEO",r))}function R(e,t,r,g){let i=e[t];if(i===void 0||i===null||i===!1)return;if(bt(i))return i;bo(r,`${t} must be an object, got ${tt(i)}; its tags were left out`,g);return}function L(e,t,r){let g=Object.keys(e).filter((s)=>!j.has(s));if(g.length>0){let s=g.map((l)=>A[l]?`${l} (use ${A[l]})`:l).join(", ");bo(t,`@seo does not read ${s}; ${g.length===1?"it was":"they were"} ignored`,r)}let i="";if(e.title)i+=`<title>${c(e.title)}</title>
2
+ import{n,u,Yt,Zt,Qt,et,wt,H,wo,Yr,rt}from"./chunk-vf7tpgqz.js";var O=/(?<![\w$@])@meta\s*\(/g,I=/(?<![\w$@])@metaTag\s*\(/g,C=/(?<![\w$@])@structuredData\s*\(/g,k=/(?<![\w$@])@seo\s*\(/g;function _(e,t){return(r)=>H(e,r,"the call has no closing parenthesis",t,n.INVALID_DIRECTIVE_SYNTAX)}function N(e){return"property"in e?`<meta property="${c(e.property)}" content="${c(e.content)}">`:`<meta name="${c(e.name)}" content="${c(e.content)}">`}function Ci(e,t,r,g){if(!e.includes("@meta"))return e;let i=Yt(e,O,(a,o)=>{let s=Yr(Zt(a),t);if(s.kind==="tag")return N(s.tag);if(s.kind==="empty")return"";return H("Meta",o,s.message,r,s.code)},_("Meta",r));return i=Yt(i,I,(a,o)=>{let s=Qt(a,t);if(!s.ok)return H("MetaTag",o,s.message,r,s.code);if(s.value===void 0||s.value===null)return"";if(!wt(s.value))return H("MetaTag",o,`expected an object such as { name, content }, got ${et(s.value)}`,r,n.TYPE_ERROR);let l=s.value;if(!l.name&&!l.property&&!l.httpEquiv)return H("MetaTag",o,"the tag needs a name, property or httpEquiv",r,n.INVALID_DIRECTIVE_SYNTAX);if(l.content===void 0||l.content===null||l.content===""||l.content===!1)return"";let p="<meta";if(l.name)p+=` name="${c(l.name)}"`;if(l.property)p+=` property="${c(l.property)}"`;if(l.httpEquiv)p+=` http-equiv="${c(l.httpEquiv)}"`;return p+=` content="${c(l.content)}">`,p},_("MetaTag",r)),i}function b(e){let t=(r)=>r["@context"]?{...r}:{...r,"@context":"https://schema.org"};if(wt(e))return t(e);if(Array.isArray(e)&&e.length>0&&e.every(wt))return e.map(t);return null}function E(e){return`<script type="application/ld+json">${JSON.stringify(e).replace(/<\//g,"<\\/")}</script>`}function Ei(e,t,r){if(!e.includes("@structuredData"))return e;return Yt(e,C,(g,i)=>{let a=Qt(g,t);if(!a.ok)return H("StructuredData",i,a.message,r,a.code);if(a.value===void 0||a.value===null)return"";let o=b(a.value);if(!o)return H("StructuredData",i,`expected an object or an array of objects, got ${et(a.value)}`,r,n.TYPE_ERROR);try{return E(o)}catch(s){let l=s instanceof Error?s.message:String(s);return H("StructuredData",i,`the data cannot be written as JSON: ${l}`,r,n.EVALUATION_ERROR)}},_("StructuredData",r))}var j=new Set(["title","description","keywords","robots","canonical","openGraph","twitter","structuredData"]),A={image:"openGraph.image",url:"canonical or openGraph.url",type:"openGraph.type",siteName:"openGraph.siteName",locale:"openGraph.locale",og:"openGraph",author:"@meta('author', ...)"};function Ti(e,t,r,g){if(!e.includes("@seo"))return e;return Yt(e,k,(i,a)=>{if(!i.trim())return H("SEO",a,"expected an object: @seo({ title, description }) or @seo(seoVariable)",r,n.INVALID_DIRECTIVE_SYNTAX);let o=Qt(i,t);if(!o.ok)return H("SEO",a,o.message,r,o.code);if(o.value===void 0||o.value===null)return"";if(!wt(o.value))return H("SEO",a,`expected an object such as { title, description }, got ${et(o.value)}`,r,n.TYPE_ERROR);try{return L(o.value,a,r)}catch(s){let l=s instanceof Error?s.message:String(s);return H("SEO",a,`Error processing @seo directive: ${l}`,r,n.EVALUATION_ERROR)}},_("SEO",r))}function R(e,t,r,g){let i=e[t];if(i===void 0||i===null||i===!1)return;if(wt(i))return i;wo(r,`${t} must be an object, got ${et(i)}; its tags were left out`,g);return}function L(e,t,r){let g=Object.keys(e).filter((s)=>!j.has(s));if(g.length>0){let s=g.map((l)=>A[l]?`${l} (use ${A[l]})`:l).join(", ");wo(t,`@seo does not read ${s}; ${g.length===1?"it was":"they were"} ignored`,r)}let i="";if(e.title)i+=`<title>${c(e.title)}</title>
3
3
  `,i+=`<meta name="title" content="${c(e.title)}">
4
4
  `;if(e.description)i+=`<meta name="description" content="${c(e.description)}">
5
5
  `;if(e.keywords){let s=Array.isArray(e.keywords)?e.keywords.join(", "):e.keywords;i+=`<meta name="keywords" content="${c(s)}">
@@ -25,7 +25,7 @@ import{n,u,Yt,Zt,Qt,tt,bt,H,bo,Gr,nt}from"./chunk-4vz17ytv.js";var O=/(?<![\w$@]
25
25
  `}if(o.site)i+=`<meta name="twitter:site" content="${c(o.site)}">
26
26
  `;if(o.creator)i+=`<meta name="twitter:creator" content="${c(o.creator)}">
27
27
  `}if(e.structuredData!==void 0&&e.structuredData!==null){let s=b(e.structuredData);if(s)i+=`${E(s)}
28
- `;else bo(t,`structuredData must be an object or an array of objects, got ${tt(e.structuredData)}; it was left out`,r)}return i.trim()}function Ei(e,t,r){if(r.seo?.enabled===!1)return e;if(e.includes("<!-- stx SEO Tags -->")||t.__stx_seo_staged===!0||r.skipDefaultSeoTags===!0)return e;let g=t.__stx_runtime_head;if(!!(g?.title||g?.meta?.some((S)=>S.property==="og:title"||S.name==="og:title"||S.name==="twitter:title"||S.name==="description")))return e;if(/<meta\s+(?:[^>]*\s)?property=["']og:title["']/i.test(e)||/<meta\s+(?:[^>]*\s)?name=["']og:title["']/i.test(e)||/<meta\s+(?:[^>]*\s)?name=["']twitter:title["']/i.test(e))return e;if(!e.includes("<head>")&&!e.includes("<head "))return e;let a=e.includes("<title>")||e.includes("</title>"),o=q(e),s=M(o),l=G(o),p="";if(t.title)p=t.title;else if(t.meta&&t.meta.title)p=t.meta.title;else if(s)p=s;else if(r.seo?.defaultConfig?.title)p=r.seo.defaultConfig.title;else p=r.defaultTitle||"stx Project";let m="";if(t.description)m=t.description;else if(t.meta&&t.meta.description)m=t.meta.description;else if(l)m=l;else if(r.seo?.defaultConfig?.description)m=r.seo.defaultConfig.description;else m=r.defaultDescription||"A website built with stx templating engine";let d="";if(t.image)d=t.image;else if(t.meta&&t.meta.image)d=t.meta.image;else if(t.openGraph&&t.openGraph.image)d=t.openGraph.image;else if(r.seo?.defaultImage)d=r.seo.defaultImage;else if(r.defaultImage)d=r.defaultImage;let f=a?"":`
28
+ `;else wo(t,`structuredData must be an object or an array of objects, got ${et(e.structuredData)}; it was left out`,r)}return i.trim()}function $i(e,t,r){if(r.seo?.enabled===!1)return e;if(e.includes("<!-- stx SEO Tags -->")||t.__stx_seo_staged===!0||r.skipDefaultSeoTags===!0)return e;let g=t.__stx_runtime_head;if(!!(g?.title||g?.meta?.some((S)=>S.property==="og:title"||S.name==="og:title"||S.name==="twitter:title"||S.name==="description")))return e;if(/<meta\s+(?:[^>]*\s)?property=["']og:title["']/i.test(e)||/<meta\s+(?:[^>]*\s)?name=["']og:title["']/i.test(e)||/<meta\s+(?:[^>]*\s)?name=["']twitter:title["']/i.test(e))return e;if(!e.includes("<head>")&&!e.includes("<head "))return e;let a=e.includes("<title>")||e.includes("</title>"),o=q(e),s=M(o),l=G(o),p="";if(t.title)p=t.title;else if(t.meta&&t.meta.title)p=t.meta.title;else if(s)p=s;else if(r.seo?.defaultConfig?.title)p=r.seo.defaultConfig.title;else p=r.defaultTitle||"stx Project";let m="";if(t.description)m=t.description;else if(t.meta&&t.meta.description)m=t.meta.description;else if(l)m=l;else if(r.seo?.defaultConfig?.description)m=r.seo.defaultConfig.description;else m=r.defaultDescription||"A website built with stx templating engine";let d="";if(t.image)d=t.image;else if(t.meta&&t.meta.image)d=t.meta.image;else if(t.openGraph&&t.openGraph.image)d=t.openGraph.image;else if(r.seo?.defaultImage)d=r.seo.defaultImage;else if(r.defaultImage)d=r.defaultImage;let f=a?"":`
29
29
  <meta name="title" content="${c(p)}">`,D=V(o)?"":`
30
30
  <meta name="description" content="${c(m)}">`,y=`
31
31
  <!-- stx SEO Tags -->${f}${D}
@@ -43,7 +43,7 @@ import{n,u,Yt,Zt,Qt,tt,bt,H,bo,Gr,nt}from"./chunk-4vz17ytv.js";var O=/(?<![\w$@]
43
43
  ${y}
44
44
  `),h;return h.replace(/<head[^>]*>/,`$&
45
45
  ${y}
46
- `)}function q(e){let t=e.search(/<\/head\s*>/i);return t===-1?e:e.slice(0,t)}function v(e){return e.replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&quot;/g,'"').replace(/&#0*39;|&apos;/g,"'").replace(/&amp;/g,"&")}function M(e){let t=e.match(/<title(?:\s[^>]*)?>([\s\S]*?)<\/title\s*>/i);return t?v(t[1].trim()):""}function x(e){return(e.match(/<meta\s[^>]*>/gi)||[]).filter((t)=>/\sname\s*=\s*["']description["']/i.test(t))}function V(e){return x(e).length>0}function G(e){for(let t of x(e)){let r=t.match(/\scontent\s*=\s*(?:"([^"]*)"|'([^']*)')/i),g=(r?.[1]??r?.[2]??"").trim();if(g)return v(g)}return""}function c(e){return String(e).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}var Vs={name:"meta",rawParams:!0,handler:(e,t,r,g)=>{let i=Gr(t,r??{});if(i.kind==="error")return H("Meta",`@meta(${t.join(", ")})`,i.message,g,i.code);if(i.kind==="empty")return"";if(r)r.__stx_runtime_head=nt(r.__stx_runtime_head??{},{meta:[i.tag]});return""},hasEndTag:!1},Ws={name:"structuredData",handler:(e,t,r,g)=>{if(e.trim()==="")return u("StructuredData","structuredData directive requires JSON-LD content",n.INVALID_DIRECTIVE_SYNTAX);try{let i=JSON.parse(e);if(!i["@context"])i["@context"]="https://schema.org";if(!i["@type"])return u("StructuredData","structuredData requires @type property",n.INVALID_DIRECTIVE_SYNTAX);return E(i)}catch(i){let a=i instanceof Error?i.message:String(i);return u("StructuredData",a,n.EVALUATION_ERROR)}},hasEndTag:!0};function $y(){return[Vs,Ws]}function Ry(e,t){let{baseUrl:r,defaultChangefreq:g="weekly",defaultPriority:i=0.5,includeLastmod:a=!0}=t,o=r.replace(/\/$/,""),s=(m)=>m.startsWith("http")?m:`${o}${m.startsWith("/")?"":"/"}${m}`,l=e.map((m)=>{let d=s(m.loc),f=m.lastmod||(a?new Date().toISOString().split("T")[0]:void 0),D=m.changefreq||g,y=m.priority??i,h=` <url>
46
+ `)}function q(e){let t=e.search(/<\/head\s*>/i);return t===-1?e:e.slice(0,t)}function v(e){return e.replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&quot;/g,'"').replace(/&#0*39;|&apos;/g,"'").replace(/&amp;/g,"&")}function M(e){let t=e.match(/<title(?:\s[^>]*)?>([\s\S]*?)<\/title\s*>/i);return t?v(t[1].trim()):""}function x(e){return(e.match(/<meta\s[^>]*>/gi)||[]).filter((t)=>/\sname\s*=\s*["']description["']/i.test(t))}function V(e){return x(e).length>0}function G(e){for(let t of x(e)){let r=t.match(/\scontent\s*=\s*(?:"([^"]*)"|'([^']*)')/i),g=(r?.[1]??r?.[2]??"").trim();if(g)return v(g)}return""}function c(e){return String(e).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}var Ws={name:"meta",rawParams:!0,handler:(e,t,r,g)=>{let i=Yr(t,r??{});if(i.kind==="error")return H("Meta",`@meta(${t.join(", ")})`,i.message,g,i.code);if(i.kind==="empty")return"";if(r)r.__stx_runtime_head=rt(r.__stx_runtime_head??{},{meta:[i.tag]});return""},hasEndTag:!1},qs={name:"structuredData",handler:(e,t,r,g)=>{if(e.trim()==="")return u("StructuredData","structuredData directive requires JSON-LD content",n.INVALID_DIRECTIVE_SYNTAX);try{let i=JSON.parse(e);if(!i["@context"])i["@context"]="https://schema.org";if(!i["@type"])return u("StructuredData","structuredData requires @type property",n.INVALID_DIRECTIVE_SYNTAX);return E(i)}catch(i){let a=i instanceof Error?i.message:String(i);return u("StructuredData",a,n.EVALUATION_ERROR)}},hasEndTag:!0};function Py(){return[Ws,qs]}function Iy(e,t){let{baseUrl:r,defaultChangefreq:g="weekly",defaultPriority:i=0.5,includeLastmod:a=!0}=t,o=r.replace(/\/$/,""),s=(m)=>m.startsWith("http")?m:`${o}${m.startsWith("/")?"":"/"}${m}`,l=e.map((m)=>{let d=s(m.loc),f=m.lastmod||(a?new Date().toISOString().split("T")[0]:void 0),D=m.changefreq||g,y=m.priority??i,h=` <url>
47
47
  <loc>${T(d)}</loc>`;for(let w of m.alternates??[])h+=`
48
48
  <xhtml:link rel="alternate" hreflang="${T(w.hreflang)}" href="${T(s(w.href))}"/>`;if(f)h+=`
49
49
  <lastmod>${f}</lastmod>`;return h+=`
@@ -53,13 +53,13 @@ ${y}
53
53
  <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"${e.some((m)=>m.alternates?.length)?' xmlns:xhtml="http://www.w3.org/1999/xhtml"':""}>
54
54
  ${l.join(`
55
55
  `)}
56
- </urlset>`}function Ay(e,t){let r=t.replace(/\/$/,""),g=new Date().toISOString().split("T")[0];return`<?xml version="1.0" encoding="UTF-8"?>
56
+ </urlset>`}function Oy(e,t){let r=t.replace(/\/$/,""),g=new Date().toISOString().split("T")[0];return`<?xml version="1.0" encoding="UTF-8"?>
57
57
  <sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
58
58
  ${e.map((a)=>{let o=a.startsWith("http")?a:`${r}${a.startsWith("/")?"":"/"}${a}`;return` <sitemap>
59
59
  <loc>${T(o)}</loc>
60
60
  <lastmod>${g}</lastmod>
61
61
  </sitemap>`}).join(`
62
62
  `)}
63
- </sitemapindex>`}async function Py(e,t){let{extensions:r=[".stx",".html",".htm"],ignore:g=["_*",".*","node_modules","components","partials","layouts"]}=t,i=[],a=r.length===1?`*${r[0]}`:`*{${r.join(",")}}`,o=new Bun.Glob(`**/${a}`);for await(let s of o.scan(e)){if(g.some((f)=>{if(f.startsWith("*"))return s.includes(f.slice(1));return s.startsWith(f)||s.includes(`/${f}`)}))continue;let p=s.replace(/\\/g,"/").replace(/index\.(stx|html|htm)$/,"").replace(/\.(stx|html|htm)$/,"");if(!p.startsWith("/"))p=`/${p}`;if(p!=="/"&&p.endsWith("/"))p=p.slice(0,-1);let m=`${e}/${s}`,d;try{let f=await Bun.file(m).stat();if(f)d=new Date(f.mtime).toISOString().split("T")[0]}catch{}i.push({loc:p||"/",lastmod:d,priority:p==="/"?1:0.5})}return i.sort((s,l)=>s.loc.localeCompare(l.loc)),i}function qs(e){let t=[];for(let r of e.rules){if(t.push(`User-agent: ${r.userAgent}`),r.allow)for(let g of r.allow)t.push(`Allow: ${g}`);if(r.disallow)for(let g of r.disallow)t.push(`Disallow: ${g}`);if(r.crawlDelay!==void 0)t.push(`Crawl-delay: ${r.crawlDelay}`);t.push("")}if(e.sitemap){let r=Array.isArray(e.sitemap)?e.sitemap:[e.sitemap];for(let g of r)t.push(`Sitemap: ${g}`)}if(e.host)t.push(`Host: ${e.host}`);return t.join(`
64
- `).trim()}function Iy(e){return qs({rules:[{userAgent:"*",allow:["/"]}],sitemap:e})}function T(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&apos;")}
65
- export{ki,_i,Ci,Ei,Vs,Ws,$y,Ry,Ay,Py,qs,Iy};
63
+ </sitemapindex>`}async function Ny(e,t){let{extensions:r=[".stx",".html",".htm"],ignore:g=["_*",".*","node_modules","components","partials","layouts"]}=t,i=[],a=r.length===1?`*${r[0]}`:`*{${r.join(",")}}`,o=new Bun.Glob(`**/${a}`);for await(let s of o.scan(e)){if(g.some((f)=>{if(f.startsWith("*"))return s.includes(f.slice(1));return s.startsWith(f)||s.includes(`/${f}`)}))continue;let p=s.replace(/\\/g,"/").replace(/index\.(stx|html|htm)$/,"").replace(/\.(stx|html|htm)$/,"");if(!p.startsWith("/"))p=`/${p}`;if(p!=="/"&&p.endsWith("/"))p=p.slice(0,-1);let m=`${e}/${s}`,d;try{let f=await Bun.file(m).stat();if(f)d=new Date(f.mtime).toISOString().split("T")[0]}catch{}i.push({loc:p||"/",lastmod:d,priority:p==="/"?1:0.5})}return i.sort((s,l)=>s.loc.localeCompare(l.loc)),i}function Ks(e){let t=[];for(let r of e.rules){if(t.push(`User-agent: ${r.userAgent}`),r.allow)for(let g of r.allow)t.push(`Allow: ${g}`);if(r.disallow)for(let g of r.disallow)t.push(`Disallow: ${g}`);if(r.crawlDelay!==void 0)t.push(`Crawl-delay: ${r.crawlDelay}`);t.push("")}if(e.sitemap){let r=Array.isArray(e.sitemap)?e.sitemap:[e.sitemap];for(let g of r)t.push(`Sitemap: ${g}`)}if(e.host)t.push(`Host: ${e.host}`);return t.join(`
64
+ `).trim()}function My(e){return Ks({rules:[{userAgent:"*",allow:["/"]}],sitemap:e})}function T(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&apos;")}
65
+ export{Ci,Ei,Ti,$i,Ws,qs,Py,Iy,Oy,Ny,Ks,My};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{vh,Ga,Xu,xh,Sh,kh,_h,Ch,Gu,Ju,Eh,Th,$h,Rh}from"./chunk-qzqqzraq.js";import"./chunk-sbr3wg75.js";import"./chunk-m390z8w8.js";import"./chunk-1a2c4pv8.js";import"./chunk-zaj3nnvv.js";import"./chunk-d69k67bn.js";import"./chunk-xakqpa4z.js";import"./chunk-whnzf9hn.js";import"./chunk-fjpt8arw.js";import"./chunk-3aayrnbh.js";import"./chunk-v1x96kjr.js";import"./chunk-p0xqm2ne.js";import"./chunk-fwxgzktt.js";import"./chunk-2mv29s6w.js";import"./chunk-3tcy9r6r.js";import"./chunk-50zzar2c.js";import"./chunk-mr9pp5cf.js";import"./chunk-txk2z7v0.js";import"./chunk-ktv65e3n.js";import"./chunk-5fdc8pej.js";import"./chunk-vb609vbj.js";import"./chunk-qda8tmk9.js";import"./chunk-14df2jzs.js";import"./chunk-vf7tpgqz.js";import"./chunk-ayrd026n.js";import"./chunk-ex6dne7e.js";import"./chunk-jjq7c8s2.js";import"./chunk-858p3hkz.js";export{Xu as SUSPENSE_RESOLVER_RUNTIME,Ga as buildSuspenseResolveScript,Ch as createStreamRenderer,kh as extractStreamBoundaries,Rh as generateHydrationRuntime,Ju as islandDirective,Th as processSectionDirectives,Sh as processStreamDirectives,Eh as registerStreamingDirectives,xh as renderStreamingPage,vh as streamTemplate,_h as streamTemplateSimple,$h as streamToResponse,Gu as streamingSuspenseDirective};
@@ -1,16 +1,16 @@
1
1
  // @bun
2
- import{k,E,zi,Rn}from"./chunk-4r0028av.js";import{wi}from"./chunk-7x3tt27s.js";import{l}from"./chunk-4e18r89n.js";import{L,f}from"./chunk-8tfpv6zf.js";import M from"fs";import d from"path";import{hasLocalConfig as ye}from"bunfig";var It={fg:{light:"neutral-900",dark:"neutral-100",description:"Primary text"},"fg-strong":{light:"neutral-700",dark:"neutral-300",description:"Labels, secondary headings"},"fg-muted":{light:"neutral-600",dark:"neutral-400",description:"Supporting text"},"fg-soft":{light:"neutral-500",dark:"neutral-400",description:"De-emphasised text"},"fg-subtle":{light:"neutral-400",dark:"neutral-500",description:"Recessive, non-essential text"},surface:{light:"neutral-50",dark:"neutral-800",description:"Page and panel background"},"surface-raised":{light:"neutral-100",dark:"neutral-700",description:"Cards, popovers"},"surface-sunken":{light:"neutral-200",dark:"neutral-700",description:"Wells, track backgrounds"},panel:{light:"white",dark:"neutral-800",description:"Card, menu, dialog surface"},field:{light:"white",dark:"neutral-700",description:"Form control surface"},page:{light:"neutral-50",dark:"neutral-900",description:"Page background, behind panels"},content:{light:"white",dark:"neutral-900",description:"Content area under a chrome header - a table or list body"},"surface-hover":{light:"neutral-100",dark:"neutral-700",description:"Row or item highlight on a page or panel"},"surface-raised-hover":{light:"neutral-200",dark:"neutral-600",description:"Raised surface, hovered"},"surface-sunken-hover":{light:"neutral-300",dark:"neutral-600",description:"Sunken surface, hovered"},"field-hover":{light:"neutral-50",dark:"neutral-600",description:"Form control surface, hovered"},link:{light:"blue-500",dark:"blue-400",description:"Hyperlink"},"link-hover":{light:"blue-600",dark:"blue-300",description:"Hyperlink, hovered"},inverse:{light:"neutral-900",dark:"neutral-700",description:"Tooltip bubble, inverted surface"},"inverse-ink":{light:"white",dark:"white",description:"Text on an inverted surface"},line:{light:"neutral-200",dark:"neutral-700",description:"Default border, divider"},"line-strong":{light:"neutral-300",dark:"neutral-600",description:"Input border, focus ring track"},"line-hover":{light:"neutral-400",dark:"neutral-500",description:"Border of a hovered control"},accent:{light:"blue-600",dark:"blue-400",description:"Primary action, selected state"},info:{light:"cyan-600",dark:"cyan-400",description:"Informational emphasis"},danger:{light:"red-600",dark:"red-400",description:"Errors, destructive actions"},success:{light:"green-600",dark:"green-400",description:"Confirmation"},warning:{light:"yellow-600",dark:"yellow-400",description:"Caution"},"accent-solid":{light:"blue-500",dark:"blue-600",description:"Primary button fill"},"info-solid":{light:"cyan-500",dark:"cyan-600",description:"Informational fill"},"danger-solid":{light:"red-500",dark:"red-600",description:"Destructive button fill"},"success-solid":{light:"green-500",dark:"green-600",description:"Confirmation fill"},"warning-solid":{light:"yellow-500",dark:"yellow-600",description:"Caution fill"},"accent-solid-hover":{light:"blue-600",dark:"blue-700",description:"Primary button fill, hovered"},"info-solid-hover":{light:"cyan-600",dark:"cyan-700",description:"Informational fill, hovered"},"danger-solid-hover":{light:"red-600",dark:"red-700",description:"Destructive fill, hovered"},"success-solid-hover":{light:"green-600",dark:"green-700",description:"Confirmation fill, hovered"},"warning-solid-hover":{light:"yellow-600",dark:"yellow-700",description:"Caution fill, hovered"},"accent-ink":{light:"white",dark:"white",description:"Text on a primary fill"},"info-ink":{light:"neutral-900",dark:"neutral-900",description:"Text on an informational fill"},"danger-ink":{light:"white",dark:"white",description:"Text on a destructive fill"},"success-ink":{light:"neutral-900",dark:"neutral-900",description:"Text on a confirmation fill"},"warning-ink":{light:"neutral-900",dark:"neutral-900",description:"Text on a caution fill"},"accent-soft":{light:"blue-100",dark:"blue-900",description:"Tinted primary fill"},"accent-soft-ink":{light:"blue-800",dark:"blue-200",description:"Text on a tinted primary fill"},"info-soft":{light:"cyan-100",dark:"cyan-900",description:"Tinted informational fill"},"info-soft-ink":{light:"cyan-800",dark:"cyan-200",description:"Text on a tinted informational fill"},"danger-soft":{light:"red-100",dark:"red-900",description:"Tinted destructive fill"},"danger-soft-ink":{light:"red-800",dark:"red-200",description:"Text on a tinted destructive fill"},"success-soft":{light:"green-100",dark:"green-900",description:"Tinted confirmation fill"},"success-soft-ink":{light:"green-800",dark:"green-200",description:"Text on a tinted confirmation fill"},"warning-soft":{light:"yellow-100",dark:"yellow-900",description:"Tinted caution fill"},"warning-soft-ink":{light:"yellow-800",dark:"yellow-200",description:"Text on a tinted caution fill"},secondary:{light:"purple-600",dark:"purple-400",description:"Secondary emphasis"},"secondary-solid":{light:"purple-500",dark:"purple-600",description:"Secondary fill"},"secondary-solid-hover":{light:"purple-600",dark:"purple-700",description:"Secondary fill, hovered"},"secondary-ink":{light:"white",dark:"white",description:"Text on a secondary fill"},"secondary-soft":{light:"purple-100",dark:"purple-900",description:"Tinted secondary fill"},"secondary-soft-ink":{light:"purple-800",dark:"purple-200",description:"Text on a tinted secondary fill"},"danger-fg":{light:"red-900",dark:"red-300",description:"Text in a field with an error"},"danger-fg-subtle":{light:"red-300",dark:"red-500",description:"Recessive text in a field with an error"},"danger-line":{light:"red-300",dark:"red-600",description:"Border of a field with an error"},"danger-focus":{light:"red-500",dark:"red-400",description:"Focus ring of a field with an error"}};function at(n){return`--stx-${n}`}function H(n,t){let s=t.lastIndexOf("-");if(s===-1)return typeof n[t]==="string"?n[t]:void 0;let r=n[t.slice(0,s)];if(!r||typeof r!=="object")return;let i=r[t.slice(s+1)];return typeof i==="string"?i:void 0}var $e=/^(?:#[\da-f]{3,8}|(?:rgb|rgba|hsl|hsla|hwb|lab|lch|oklab|oklch|color|color-mix|var)\(.*\)|white|black|transparent|currentcolor)$/i;function te(n,t){let s=t.trim();return H(n,s)??($e.test(s)?s:void 0)}function ne(n={}){return[...Object.keys(n.roles??{}).filter((t)=>!It[t]).map((t)=>`roles.${t}`),...Object.keys(n.shapes??{}).filter((t)=>!Re[t]).map((t)=>`shapes.${t}`),...Object.keys(n.density??{}).filter((t)=>!Ve[t]).map((t)=>`density.${t}`)]}function se(n){let t={};for(let[s,r]of Object.entries(It)){let i=H(n,r.light);if(i===void 0)continue;t[s]=`var(${at(s)}, ${i})`}return t}function re(n,t={}){let s=[],r=[];for(let[i,c]of Object.entries(It)){let o=t[i],g=typeof o==="string"?o:o?.light,a=typeof o==="string"?o:o?.dark,u=g&&te(n,g)||H(n,c.light),m=a&&te(n,a)||H(n,c.dark);if(u===void 0)continue;if(s.push(` ${at(i)}: ${u};`),m!==void 0)r.push(` ${at(i)}: ${m};`)}if(s.length===0)return"";return["/* stx role tokens \u2014 override any of these to re-theme by meaning. */",":root {",...s,"}",".dark {",...r,"}",""].join(`
3
- `)}var Re={control:{value:"0.375rem",description:"Buttons, inputs, selects \u2014 rounded-md"},panel:{value:"0.5rem",description:"Cards, dialogs, menus \u2014 rounded-lg"},pill:{value:"9999px",description:"Chips and badges, which are pill-shaped by intent"}};function xn(n){return`--stx-radius-${n}`}function ie(){let n={};for(let[t,s]of Object.entries(Re))n[t]=`var(${xn(t)}, ${s.value})`;return n}function oe(n={}){return["/* stx shape tokens \u2014 a radius by what the thing is. */",":root {",...Object.entries(Re).map(([t,s])=>` ${xn(t)}: ${n[t]??s.value};`),"}",""].join(`
4
- `)}var Ve={"control-px":{value:"1rem",description:"Inline padding of a md text control \u2014 px-4"},"control-py":{value:"0.5rem",description:"Block padding of a md text control \u2014 py-2"},"control-text":{value:"1rem",description:"Font size of a md text control \u2014 text-base"},"control-leading":{value:"1.5rem",description:"Line height of a md text control \u2014 text-base"},"cell-px":{value:"1.5rem",description:"Inline padding of every table cell, header or body \u2014 px-6"},"cell-py":{value:"1rem",description:"Block padding of a body cell \u2014 py-4"},"cell-text":{value:"0.875rem",description:"Font size of a body cell \u2014 text-sm"},"cell-leading":{value:"1.25rem",description:"Line height of a body cell \u2014 text-sm"},"cell-head-py":{value:"0.75rem",description:"Block padding of a header cell \u2014 py-3"},"cell-head-text":{value:"0.75rem",description:"Font size of a header cell \u2014 text-xs"},"cell-head-leading":{value:"1rem",description:"Line height of a header cell \u2014 text-xs"}},wr={"control-x":"control-px","control-y":"control-py","cell-x":"cell-px","cell-y":"cell-py","cell-head-y":"cell-head-py"},vr={control:{size:"control-text",leading:"control-leading"},cell:{size:"cell-text",leading:"cell-leading"},"cell-head":{size:"cell-head-text",leading:"cell-head-leading"}};function ct(n){return`--stx-${n}`}function Y(n){let t=Ve[n];if(!t)throw Error(`[stx] unknown density token "${n}"`);return`var(${ct(n)}, ${t.value})`}function ce(){let n={};for(let[t,s]of Object.entries(wr))n[t]=Y(s);return n}function ae(){let n={};for(let[t,{size:s,leading:r}]of Object.entries(vr))n[t]=[Y(s),{lineHeight:Y(r)}];return n}function le(n={}){return["/* stx density tokens \u2014 how much room a control or a table cell takes. */",":root {",...Object.entries(Ve).map(([t,s])=>` ${ct(t)}: ${n[t]??s.value};`),"}",""].join(`
2
+ import{k,E,Ui,Pn}from"./chunk-vb609vbj.js";import{xi}from"./chunk-fwxgzktt.js";import{l}from"./chunk-6x5a2w5a.js";import{O,f}from"./chunk-p4twxjfs.js";import _ from"fs";import d from"path";import{hasLocalConfig as ye}from"bunfig";var Ot={fg:{light:"neutral-900",dark:"neutral-100",description:"Primary text"},"fg-strong":{light:"neutral-700",dark:"neutral-300",description:"Labels, secondary headings"},"fg-muted":{light:"neutral-600",dark:"neutral-400",description:"Supporting text"},"fg-soft":{light:"neutral-500",dark:"neutral-400",description:"De-emphasised text"},"fg-subtle":{light:"neutral-400",dark:"neutral-500",description:"Recessive, non-essential text"},surface:{light:"neutral-50",dark:"neutral-800",description:"Page and panel background"},"surface-raised":{light:"neutral-100",dark:"neutral-700",description:"Cards, popovers"},"surface-sunken":{light:"neutral-200",dark:"neutral-700",description:"Wells, track backgrounds"},panel:{light:"white",dark:"neutral-800",description:"Card, menu, dialog surface"},field:{light:"white",dark:"neutral-700",description:"Form control surface"},page:{light:"neutral-50",dark:"neutral-900",description:"Page background, behind panels"},content:{light:"white",dark:"neutral-900",description:"Content area under a chrome header - a table or list body"},"surface-hover":{light:"neutral-100",dark:"neutral-700",description:"Row or item highlight on a page or panel"},"surface-raised-hover":{light:"neutral-200",dark:"neutral-600",description:"Raised surface, hovered"},"surface-sunken-hover":{light:"neutral-300",dark:"neutral-600",description:"Sunken surface, hovered"},"field-hover":{light:"neutral-50",dark:"neutral-600",description:"Form control surface, hovered"},link:{light:"blue-500",dark:"blue-400",description:"Hyperlink"},"link-hover":{light:"blue-600",dark:"blue-300",description:"Hyperlink, hovered"},inverse:{light:"neutral-900",dark:"neutral-700",description:"Tooltip bubble, inverted surface"},"inverse-ink":{light:"white",dark:"white",description:"Text on an inverted surface"},line:{light:"neutral-200",dark:"neutral-700",description:"Default border, divider"},"line-strong":{light:"neutral-300",dark:"neutral-600",description:"Input border, focus ring track"},"line-hover":{light:"neutral-400",dark:"neutral-500",description:"Border of a hovered control"},accent:{light:"blue-600",dark:"blue-400",description:"Primary action, selected state"},info:{light:"cyan-600",dark:"cyan-400",description:"Informational emphasis"},danger:{light:"red-600",dark:"red-400",description:"Errors, destructive actions"},success:{light:"green-600",dark:"green-400",description:"Confirmation"},warning:{light:"yellow-600",dark:"yellow-400",description:"Caution"},"accent-solid":{light:"blue-500",dark:"blue-600",description:"Primary button fill"},"info-solid":{light:"cyan-500",dark:"cyan-600",description:"Informational fill"},"danger-solid":{light:"red-500",dark:"red-600",description:"Destructive button fill"},"success-solid":{light:"green-500",dark:"green-600",description:"Confirmation fill"},"warning-solid":{light:"yellow-500",dark:"yellow-600",description:"Caution fill"},"accent-solid-hover":{light:"blue-600",dark:"blue-700",description:"Primary button fill, hovered"},"info-solid-hover":{light:"cyan-600",dark:"cyan-700",description:"Informational fill, hovered"},"danger-solid-hover":{light:"red-600",dark:"red-700",description:"Destructive fill, hovered"},"success-solid-hover":{light:"green-600",dark:"green-700",description:"Confirmation fill, hovered"},"warning-solid-hover":{light:"yellow-600",dark:"yellow-700",description:"Caution fill, hovered"},"accent-ink":{light:"white",dark:"white",description:"Text on a primary fill"},"info-ink":{light:"neutral-900",dark:"neutral-900",description:"Text on an informational fill"},"danger-ink":{light:"white",dark:"white",description:"Text on a destructive fill"},"success-ink":{light:"neutral-900",dark:"neutral-900",description:"Text on a confirmation fill"},"warning-ink":{light:"neutral-900",dark:"neutral-900",description:"Text on a caution fill"},"accent-soft":{light:"blue-100",dark:"blue-900",description:"Tinted primary fill"},"accent-soft-ink":{light:"blue-800",dark:"blue-200",description:"Text on a tinted primary fill"},"info-soft":{light:"cyan-100",dark:"cyan-900",description:"Tinted informational fill"},"info-soft-ink":{light:"cyan-800",dark:"cyan-200",description:"Text on a tinted informational fill"},"danger-soft":{light:"red-100",dark:"red-900",description:"Tinted destructive fill"},"danger-soft-ink":{light:"red-800",dark:"red-200",description:"Text on a tinted destructive fill"},"success-soft":{light:"green-100",dark:"green-900",description:"Tinted confirmation fill"},"success-soft-ink":{light:"green-800",dark:"green-200",description:"Text on a tinted confirmation fill"},"warning-soft":{light:"yellow-100",dark:"yellow-900",description:"Tinted caution fill"},"warning-soft-ink":{light:"yellow-800",dark:"yellow-200",description:"Text on a tinted caution fill"},secondary:{light:"purple-600",dark:"purple-400",description:"Secondary emphasis"},"secondary-solid":{light:"purple-500",dark:"purple-600",description:"Secondary fill"},"secondary-solid-hover":{light:"purple-600",dark:"purple-700",description:"Secondary fill, hovered"},"secondary-ink":{light:"white",dark:"white",description:"Text on a secondary fill"},"secondary-soft":{light:"purple-100",dark:"purple-900",description:"Tinted secondary fill"},"secondary-soft-ink":{light:"purple-800",dark:"purple-200",description:"Text on a tinted secondary fill"},"danger-fg":{light:"red-900",dark:"red-300",description:"Text in a field with an error"},"danger-fg-subtle":{light:"red-300",dark:"red-500",description:"Recessive text in a field with an error"},"danger-line":{light:"red-300",dark:"red-600",description:"Border of a field with an error"},"danger-focus":{light:"red-500",dark:"red-400",description:"Focus ring of a field with an error"}};function ct(n){return`--stx-${n}`}function H(n,t){let s=t.lastIndexOf("-");if(s===-1)return typeof n[t]==="string"?n[t]:void 0;let r=n[t.slice(0,s)];if(!r||typeof r!=="object")return;let i=r[t.slice(s+1)];return typeof i==="string"?i:void 0}var $e=/^(?:#[\da-f]{3,8}|(?:rgb|rgba|hsl|hsla|hwb|lab|lch|oklab|oklch|color|color-mix|var)\(.*\)|white|black|transparent|currentcolor)$/i;function te(n,t){let s=t.trim();return H(n,s)??($e.test(s)?s:void 0)}function ne(n={}){return[...Object.keys(n.roles??{}).filter((t)=>!Ot[t]).map((t)=>`roles.${t}`),...Object.keys(n.shapes??{}).filter((t)=>!Re[t]).map((t)=>`shapes.${t}`),...Object.keys(n.density??{}).filter((t)=>!Ve[t]).map((t)=>`density.${t}`)]}function se(n){let t={};for(let[s,r]of Object.entries(Ot)){let i=H(n,r.light);if(i===void 0)continue;t[s]=`var(${ct(s)}, ${i})`}return t}function re(n,t={}){let s=[],r=[];for(let[i,o]of Object.entries(Ot)){let a=t[i],g=typeof a==="string"?a:a?.light,c=typeof a==="string"?a:a?.dark,u=g&&te(n,g)||H(n,o.light),h=c&&te(n,c)||H(n,o.dark);if(u===void 0)continue;if(s.push(` ${ct(i)}: ${u};`),h!==void 0)r.push(` ${ct(i)}: ${h};`)}if(s.length===0)return"";return["/* stx role tokens \u2014 override any of these to re-theme by meaning. */",":root {",...s,"}",".dark {",...r,"}",""].join(`
3
+ `)}var Re={control:{value:"0.375rem",description:"Buttons, inputs, selects \u2014 rounded-md"},panel:{value:"0.5rem",description:"Cards, dialogs, menus \u2014 rounded-lg"},pill:{value:"9999px",description:"Chips and badges, which are pill-shaped by intent"}};function _n(n){return`--stx-radius-${n}`}function ie(){let n={};for(let[t,s]of Object.entries(Re))n[t]=`var(${_n(t)}, ${s.value})`;return n}function oe(n={}){return["/* stx shape tokens \u2014 a radius by what the thing is. */",":root {",...Object.entries(Re).map(([t,s])=>` ${_n(t)}: ${n[t]??s.value};`),"}",""].join(`
4
+ `)}var Ve={"control-px":{value:"1rem",description:"Inline padding of a md text control \u2014 px-4"},"control-py":{value:"0.5rem",description:"Block padding of a md text control \u2014 py-2"},"control-text":{value:"1rem",description:"Font size of a md text control \u2014 text-base"},"control-leading":{value:"1.5rem",description:"Line height of a md text control \u2014 text-base"},"cell-px":{value:"1.5rem",description:"Inline padding of every table cell, header or body \u2014 px-6"},"cell-py":{value:"1rem",description:"Block padding of a body cell \u2014 py-4"},"cell-text":{value:"0.875rem",description:"Font size of a body cell \u2014 text-sm"},"cell-leading":{value:"1.25rem",description:"Line height of a body cell \u2014 text-sm"},"cell-head-py":{value:"0.75rem",description:"Block padding of a header cell \u2014 py-3"},"cell-head-text":{value:"0.75rem",description:"Font size of a header cell \u2014 text-xs"},"cell-head-leading":{value:"1rem",description:"Line height of a header cell \u2014 text-xs"}},kr={"control-x":"control-px","control-y":"control-py","cell-x":"cell-px","cell-y":"cell-py","cell-head-y":"cell-head-py"},_r={control:{size:"control-text",leading:"control-leading"},cell:{size:"cell-text",leading:"cell-leading"},"cell-head":{size:"cell-head-text",leading:"cell-head-leading"}};function lt(n){return`--stx-${n}`}function Y(n){let t=Ve[n];if(!t)throw Error(`[stx] unknown density token "${n}"`);return`var(${lt(n)}, ${t.value})`}function ce(){let n={};for(let[t,s]of Object.entries(kr))n[t]=Y(s);return n}function ae(){let n={};for(let[t,{size:s,leading:r}]of Object.entries(_r))n[t]=[Y(s),{lineHeight:Y(r)}];return n}function le(n={}){return["/* stx density tokens \u2014 how much room a control or a table cell takes. */",":root {",...Object.entries(Ve).map(([t,s])=>` ${lt(t)}: ${n[t]??s.value};`),"}",""].join(`
5
5
  `)}function de(n){return typeof n==="object"&&n!==null&&!Array.isArray(n)}function J(n,t){let s={...n};for(let[r,i]of Object.entries(t))s[r]=de(i)&&de(s[r])?J(s[r],i):i;return s}function ge(n,t){if(!t.fonts)return"";let s=new n({...t.config,fonts:t.fonts,cssVariables:!1}).toCSS(!1,t.minify);return s&&!t.minify?`${s}
6
- `:s}function fe(n={},t={}){let s=n.theme||{},r=t.theme||{},{extend:i,...c}=r,{extend:o,...g}=s,a=g.colors||{};g.colors={...a,...se(a)};let u=g.borderRadius||{};g.borderRadius={...u,...ie()};let m=g.spacing||{};g.spacing={...m,...ce()};let P=g.fontSize||{};g.fontSize={...P,...ae()};let D=J(g,c),O=J(o||{},i||{});if(Object.keys(O).length>0)D.extend=O;let y=[...n.safelist||[],...t.safelist||[]],I={...n.shortcuts||{},...t.shortcuts||{}},_=[...n.preflights||[],...t.preflights||[]],{fonts:z,...Q}=n,{fonts:N,roles:R,shapes:T,density:A,...w}=t,b={roles:R,shapes:T,density:A},p=N??z;return{config:{...Q,...w,theme:D,safelist:y,shortcuts:I,..._.length>0?{preflights:_}:{},content:[],output:""},safelist:y,shortcuts:I,includePreflight:t.preflight!==!1,minify:t.minify===!0,tokenCSS:re({...a,...D.colors},R)+oe(T)+le(A),unknownRoles:ne(b),...p?{fonts:p}:{}}}var e={reset:"\x1B[0m",bright:"\x1B[1m",dim:"\x1B[2m",underscore:"\x1B[4m",blink:"\x1B[5m",reverse:"\x1B[7m",hidden:"\x1B[8m",black:"\x1B[30m",red:"\x1B[31m",green:"\x1B[32m",yellow:"\x1B[33m",blue:"\x1B[34m",magenta:"\x1B[35m",cyan:"\x1B[36m",white:"\x1B[37m",gray:"\x1B[90m",bgBlack:"\x1B[40m",bgRed:"\x1B[41m",bgGreen:"\x1B[42m",bgYellow:"\x1B[43m",bgBlue:"\x1B[44m",bgMagenta:"\x1B[45m",bgCyan:"\x1B[46m",bgWhite:"\x1B[47m",bgGray:"\x1B[100m"};import j from"fs";import Te from"path";var je=256,x=new Map,ue=(n)=>Bun.hash(n).toString(16).padStart(16,"0").slice(0,16),pe=(n)=>l(process.cwd(),"css-assets",`${n}.css`);function K(n,t){if(x.delete(n),x.set(n,t),x.size>je)x.delete(x.keys().next().value)}function he(n){let t=ue(n),s=pe(t);if(x.has(s))return K(s,n),t;let r;try{let i;try{i=j.readFileSync(s,"utf8")}catch{}if(i!==n)j.mkdirSync(Te.dirname(s),{recursive:!0}),r=`${s}.${process.pid}.${crypto.randomUUID()}.tmp`,j.writeFileSync(r,n,{flag:"wx"}),j.renameSync(r,s);return K(s,n),t}catch{return}finally{if(r)try{j.unlinkSync(r)}catch{}}}function ug(n){if(!/^[a-f0-9]{16}$/.test(n))return;let t=pe(n),s=x.get(t);if(s!==void 0)return K(t,s),s;try{let r=j.readFileSync(t,"utf8");if(ue(r)!==n)return;return K(t,r),r}catch{return}}function me(){x.clear()}var h=null,U="";function xe(n){try{let t=n.startsWith("file:")?new URL(n).pathname:n;U=`${t}@${Math.trunc(M.statSync(t).mtimeMs)}`}catch{U=n}}var Z=!1,v=null,F="",B=!1,Be=256,Ee="sorted",C=new Map,V=null,we=null,W=new Map,ke=new Set;function ee(n){return Bun.hash(n).toString(16).padStart(16,"0").slice(0,16)}function X(n,t){if(C.has(n))C.delete(n);else if(C.size>=Be)C.delete(C.keys().next().value);C.set(n,t)}async function Pe(n,t=V){if(!t)return null;try{let s=Bun.file(d.join(t,`cw-${ee(n)}.css`));if(!await s.exists())return null;return await s.text()}catch{return null}}async function De(n,t,s=V){if(!s)return;try{if(!M.existsSync(s))M.mkdirSync(s,{recursive:!0});await Bun.write(d.join(s,`cw-${ee(n)}.css`),t)}catch{}}async function Ce(n){try{let t=await import(n);if(t&&t.CSSGenerator)return{CSSGenerator:t.CSSGenerator,config:t.config,build:t.build,defaultConfig:t.defaultConfig,extractClasses:t.extractClasses}}catch{}return null}var Oe=[["@stacksjs","ts-css","dist","engine","index.js"],["@stacksjs","ts-css","src","engine","index.ts"]],Ie=["@stacksjs/ts-css/engine","@stacksjs/ts-css/dist/engine/index.js"];function Ne(){let n=[],t=process.cwd();while(t!==d.dirname(t)){for(let s of["node_modules","pantry"])for(let r of Oe)n.push(d.join(t,s,...r));t=d.dirname(t)}return n}function Ae(){let n=[],t=process.env.HOME||process.env.USERPROFILE||"",s=[t&&d.join(t,"Code","Tools","ts-css"),t&&d.join(t,"Code","Tools","crosswind"),t&&d.join(t,"repos","stacks-org","ts-css"),t&&d.join(t,"repos","stacks-org","crosswind"),d.join(process.cwd(),"..","ts-css"),d.join(process.cwd(),"..","crosswind")].filter(Boolean);for(let r of s)n.push(d.join(r,"packages","toolkit","dist","engine","index.js")),n.push(d.join(r,"packages","toolkit","src","engine","index.ts"));if(t)n.push(d.join(t,"Code","Tools","stx","node_modules","@stacksjs","ts-css","dist","engine","index.js"));return n}async function Dc(){if(Z)return h;Z=!0;try{let n=async(i)=>{for(let c of i){if(!await Bun.file(c).exists())continue;let o=await Ce(c);if(o){if(xe(c),!process.env.STACKS_DEV_QUIET)console.log(`${e.green}[ts-css]${e.reset} CSS engine loaded from ${d.dirname(d.dirname(c))}`);return o}}return null};if(process.env.CROSSWIND_SRC){let i=d.resolve(process.env.CROSSWIND_SRC),c=await n([i]);if(!c)throw Error(`CROSSWIND_SRC did not resolve to a Css module: ${i}`);return h=c,h}let t=await n(Ne());if(t)return h=t,h;let s=Ie;for(let i of s){let c=await Ce(i);if(c){h=c;try{xe(import.meta.resolve(i))}catch{U=i}if(!process.env.STACKS_DEV_QUIET)console.log(`${e.green}[ts-css]${e.reset} CSS engine loaded`);return h}}let r=await n(Ae());if(r)return h=r,h;throw Error("Css CSSGenerator not found in any location")}catch{return console.warn(`${e.yellow}[ts-css] CSS engine not available, Tailwind styles will not be generated${e.reset}`),console.warn(`${e.yellow}Run 'bun add @stacksjs/ts-css' to enable CSS generation${e.reset}`),null}}function ly(){q.clear(),h=null,Z=!1,v=null,F="",C.clear(),me(),we=null,W.clear()}var Se=!1;async function Lc(n){try{let t=ye({name:"css",cwd:n})?"css":ye({name:"crosswind",cwd:n})?"crosswind":null;if(!t)return null;if(t==="crosswind"&&!process.env.STACKS_DEV_QUIET&&!Se)Se=!0,console.warn(`${e.yellow}[ts-css]${e.reset} Reading the CSS config from a \`crosswind\` file. Rename it to \`css\` (e.g. config/css.ts) \u2014 the old name is deprecated.`);let{loadConfigWithResult:s}=await import("bunfig"),r=await s({name:t,cwd:n,defaultConfig:{},checkEnv:!1,verbose:!1});if(!r?.path||!r.config||Object.keys(r.config).length===0)return null;let i=d.relative(n,r.path);if(!process.env.STACKS_DEV_QUIET)console.log(`${e.green}[ts-css]${e.reset} Loaded config from ${i||r.path}`);return r.config}catch(t){if(t instanceof Error&&t.name==="ConfigNotFoundError")return null;return console.warn(`${e.yellow}[ts-css]${e.reset} Failed to load css config:`,t instanceof Error?t.message:t),null}}async function dg(n){let t=null;try{let{loadStxConfig:s}=await import("./chunk-x1kzqxj5.js"),r=await s(n);if(r.css)if(typeof r.css==="string"){let i=d.isAbsolute(r.css)?r.css:d.resolve(n,r.css);if(await Bun.file(i).exists()){let c=await import(i);t=c.default||c,console.log(`${e.green}[ts-css]${e.reset} Loaded config from stx.config.ts \u2192 ${r.css}`)}}else{if(t={...r.css,content:r.css.content||[],preflight:r.css.preflight??!0,minify:r.css.minify??!1},r.css.config){let i=d.isAbsolute(r.css.config)?r.css.config:d.resolve(n,r.css.config);if(await Bun.file(i).exists()){let c=await import(i);t={...c.default||c,...t}}}console.log(`${e.green}[ts-css]${e.reset} Using inline CSS config from stx.config.ts`)}}catch{}return t||await Lc(n)}function pg(n){try{let t=new WeakSet;return ee(JSON.stringify(n??{},(s,r)=>{if(typeof r==="function")return`[fn]${String(r)}`;if(typeof r==="object"&&r!==null){if(t.has(r))return"[circular]";t.add(r)}return r})??"")}catch{return"unhashable"}}async function Sn(n){if(B)return F;B=!0;try{let t=await Dc();if(!t||!t.build)return B=!1,"";if(!v)v=await Lc(n);if(!v)return B=!1,"";let s=t.defaultConfig?.theme||{},r=v.theme||{},i={...t.defaultConfig,...v,theme:{...s,...r,extend:{...s.extend||{},...r.extend||{}}}},c=performance.now(),o=await t.build(i),g=performance.now()-c;if(F=o.css,console.log(`${e.cyan}[ts-css]${e.reset} Built ${o.classes.size} classes in ${g.toFixed(1)}ms`),i.output){let a=d.isAbsolute(i.output)?i.output:d.join(n,i.output),u=d.dirname(a);if(!M.existsSync(u))M.mkdirSync(u,{recursive:!0});await Bun.write(a,o.css)}return B=!1,o.css}catch(t){return console.error(`${e.red}[ts-css]${e.reset} Build error:`,t),B=!1,F}}async function xr(n){v=null,await Sn(n)}function uy(){return F}function fg(n){let t=new Set,s=/class\s*=\s*["']([^"']+)["']/gi,r=s.exec(n);while(r!==null){for(let o of r[1].split(/\s+/))if(o.trim())t.add(o.trim());r=s.exec(n)}let i=/(?:x-class|:class)\s*=\s*"([^"]+)"/gi,c=i.exec(n);while(c!==null){let o=c[1].match(/'([^']+)'/g);if(o){for(let g of o)for(let a of g.slice(1,-1).split(/\s+/))if(a.trim())t.add(a.trim())}c=i.exec(n)}return t}var q=k(64);async function gg(n,t){let s=()=>W.get(t?d.resolve(t):process.cwd())?.fingerprint??null,r=q.get(E(n,t,s()));if(r!==void 0)return r;let i=await Fe(n,t);if(i)q.set(E(n,t,s()),i);return i}function*be(n){yield n;let t=new Set;for(let s of n.matchAll(/\/_stx\/modules\.([0-9a-f]{16})\.js/g)){let r=s[1];if(t.has(r))continue;t.add(r);let i=wi(r);if(i)yield i}}function dy(n){return[...be(n)].join(`
7
- `)}async function Fe(n,t){try{let s=await Dc();if(!s)return"";let r=new Set;for(let p of be(n)){let G=typeof s.extractClasses==="function"?s.extractClasses(p):fg(p);for(let ve of G)r.add(ve)}if(r.size===0)return"";let i=t?d.resolve(t):process.cwd(),c=l(i,"cache");if(!V)V=c;let o=W.get(i);if(!o){let p=await dg(i);o={config:p,fingerprint:pg(p)},W.set(i,o),we=o.fingerprint}let g=[...r].sort(),a=g.join(" "),u=`${Ee}::${U}::${o.fingerprint||"default"}::${a}`,m=C.get(u);if(m!==void 0)return X(u,m),m;let P=await Pe(u,c);if(P!==null)return X(u,P),P;let D=s.defaultConfig||s.config,O=o.config||{},y=fe(D,O),{safelist:I,includePreflight:_,minify:z,tokenCSS:Q}=y;if(y.unknownRoles.length>0&&!ke.has(i))ke.add(i),console.warn(`${e.yellow}[ts-css]${e.reset} No stx role for ${y.unknownRoles.join(", ")} - these keep the stock value. Role names: semanticTokenNames() in @stacksjs/stx/theme-tokens.`);let N=y.config,R=new s.CSSGenerator(N),T=N.shortcuts||O.shortcuts||{},A=Object.keys(T).filter((p)=>r.has(p)||I.includes(p));for(let p of I)if(!T[p])R.generate(p);for(let p of g)if(!T[p])R.generate(p);let w="";if(A.length>0){let p=new s.CSSGenerator(N);for(let G of A)p.generate(G);if(w=p.toCSS(!1,z),w&&!w.endsWith(`
6
+ `:s}function fe(n={},t={}){let s=n.theme||{},r=t.theme||{},{extend:i,...o}=r,{extend:a,...g}=s,c=g.colors||{};g.colors={...c,...se(c)};let u=g.borderRadius||{};g.borderRadius={...u,...ie()};let h=g.spacing||{};g.spacing={...h,...ce()};let P=g.fontSize||{};g.fontSize={...P,...ae()};let D=J(g,o),I=J(a||{},i||{});if(Object.keys(I).length>0)D.extend=I;let y=[...n.safelist||[],...t.safelist||[]],N={...n.shortcuts||{},...t.shortcuts||{}},z=[...n.preflights||[],...t.preflights||[]],{fonts:L,...Q}=n,{fonts:A,roles:R,shapes:T,density:F,...w}=t,b={roles:R,shapes:T,density:F},p=A??L;return{config:{...Q,...w,theme:D,safelist:y,shortcuts:N,...z.length>0?{preflights:z}:{},content:[],output:""},safelist:y,shortcuts:N,includePreflight:t.preflight!==!1,minify:t.minify===!0,tokenCSS:re({...c,...D.colors},R)+oe(T)+le(F),unknownRoles:ne(b),...p?{fonts:p}:{}}}var e={reset:"\x1B[0m",bright:"\x1B[1m",dim:"\x1B[2m",underscore:"\x1B[4m",blink:"\x1B[5m",reverse:"\x1B[7m",hidden:"\x1B[8m",black:"\x1B[30m",red:"\x1B[31m",green:"\x1B[32m",yellow:"\x1B[33m",blue:"\x1B[34m",magenta:"\x1B[35m",cyan:"\x1B[36m",white:"\x1B[37m",gray:"\x1B[90m",bgBlack:"\x1B[40m",bgRed:"\x1B[41m",bgGreen:"\x1B[42m",bgYellow:"\x1B[43m",bgBlue:"\x1B[44m",bgMagenta:"\x1B[45m",bgCyan:"\x1B[46m",bgWhite:"\x1B[47m",bgGray:"\x1B[100m"};import j from"fs";import Te from"path";var je=256,x=new Map,ue=(n)=>Bun.hash(n).toString(16).padStart(16,"0").slice(0,16),pe=(n)=>l(process.cwd(),"css-assets",`${n}.css`);function K(n,t){if(x.delete(n),x.set(n,t),x.size>je)x.delete(x.keys().next().value)}function he(n){let t=ue(n),s=pe(t);if(x.has(s))return K(s,n),t;let r;try{let i;try{i=j.readFileSync(s,"utf8")}catch{}if(i!==n)j.mkdirSync(Te.dirname(s),{recursive:!0}),r=`${s}.${process.pid}.${crypto.randomUUID()}.tmp`,j.writeFileSync(r,n,{flag:"wx"}),j.renameSync(r,s);return K(s,n),t}catch{return}finally{if(r)try{j.unlinkSync(r)}catch{}}}function fg(n){if(!/^[a-f0-9]{16}$/.test(n))return;let t=pe(n),s=x.get(t);if(s!==void 0)return K(t,s),s;try{let r=j.readFileSync(t,"utf8");if(ue(r)!==n)return;return K(t,r),r}catch{return}}function me(){x.clear()}var m=null,U="";function xe(n){try{let t=n.startsWith("file:")?new URL(n).pathname:n;U=`${t}@${Math.trunc(_.statSync(t).mtimeMs)}`}catch{U=n}}var Z=!1,v=null,M="",B=!1,Be=256,Ee="sorted",C=new Map,V=null,we=null,W=new Map,ke=new Set;function ee(n){return Bun.hash(n).toString(16).padStart(16,"0").slice(0,16)}function X(n,t){if(C.has(n))C.delete(n);else if(C.size>=Be)C.delete(C.keys().next().value);C.set(n,t)}async function Pe(n,t=V){if(!t)return null;try{let s=Bun.file(d.join(t,`cw-${ee(n)}.css`));if(!await s.exists())return null;return await s.text()}catch{return null}}async function De(n,t,s=V){if(!s)return;try{if(!_.existsSync(s))_.mkdirSync(s,{recursive:!0});await Bun.write(d.join(s,`cw-${ee(n)}.css`),t)}catch{}}async function Ce(n){try{let t=await import(n);if(t&&t.CSSGenerator)return{CSSGenerator:t.CSSGenerator,config:t.config,build:t.build,defaultConfig:t.defaultConfig,extractClasses:t.extractClasses}}catch{}return null}var Oe=[["@stacksjs","ts-css","dist","engine","index.js"],["@stacksjs","ts-css","src","engine","index.ts"]],Ie=["@stacksjs/ts-css/engine","@stacksjs/ts-css/dist/engine/index.js"];function Ne(){let n=[],t=process.cwd();while(t!==d.dirname(t)){for(let s of["node_modules","pantry"])for(let r of Oe)n.push(d.join(t,s,...r));t=d.dirname(t)}return n}function Ae(){let n=[],t=process.env.HOME||process.env.USERPROFILE||"",s=[t&&d.join(t,"Code","Tools","ts-css"),t&&d.join(t,"Code","Tools","crosswind"),t&&d.join(t,"repos","stacks-org","ts-css"),t&&d.join(t,"repos","stacks-org","crosswind"),d.join(process.cwd(),"..","ts-css"),d.join(process.cwd(),"..","crosswind")].filter(Boolean);for(let r of s)n.push(d.join(r,"packages","toolkit","dist","engine","index.js")),n.push(d.join(r,"packages","toolkit","src","engine","index.ts"));if(t)n.push(d.join(t,"Code","Tools","stx","node_modules","@stacksjs","ts-css","dist","engine","index.js"));return n}async function jc(){if(Z)return m;Z=!0;try{let n=async(i)=>{for(let o of i){if(!await Bun.file(o).exists())continue;let a=await Ce(o);if(a){if(xe(o),!process.env.STACKS_DEV_QUIET)console.log(`${e.green}[ts-css]${e.reset} CSS engine loaded from ${d.dirname(d.dirname(o))}`);return a}}return null};if(process.env.CROSSWIND_SRC){let i=d.resolve(process.env.CROSSWIND_SRC),o=await n([i]);if(!o)throw Error(`CROSSWIND_SRC did not resolve to a Css module: ${i}`);return m=o,m}let t=await n(Ne());if(t)return m=t,m;let s=Ie;for(let i of s){let o=await Ce(i);if(o){m=o;try{xe(import.meta.resolve(i))}catch{U=i}if(!process.env.STACKS_DEV_QUIET)console.log(`${e.green}[ts-css]${e.reset} CSS engine loaded`);return m}}let r=await n(Ae());if(r)return m=r,m;throw Error("Css CSSGenerator not found in any location")}catch{return console.warn(`${e.yellow}[ts-css] CSS engine not available, Tailwind styles will not be generated${e.reset}`),console.warn(`${e.yellow}Run 'bun add @stacksjs/ts-css' to enable CSS generation${e.reset}`),null}}function py(){q.clear(),m=null,Z=!1,v=null,M="",C.clear(),me(),we=null,W.clear()}var Se=!1;async function Bc(n){try{let t=ye({name:"css",cwd:n})?"css":ye({name:"crosswind",cwd:n})?"crosswind":null;if(!t)return null;if(t==="crosswind"&&!process.env.STACKS_DEV_QUIET&&!Se)Se=!0,console.warn(`${e.yellow}[ts-css]${e.reset} Reading the CSS config from a \`crosswind\` file. Rename it to \`css\` (e.g. config/css.ts) \u2014 the old name is deprecated.`);let{loadConfigWithResult:s}=await import("bunfig"),r=await s({name:t,cwd:n,defaultConfig:{},checkEnv:!1,verbose:!1});if(!r?.path||!r.config||Object.keys(r.config).length===0)return null;let i=d.relative(n,r.path);if(!process.env.STACKS_DEV_QUIET)console.log(`${e.green}[ts-css]${e.reset} Loaded config from ${i||r.path}`);return r.config}catch(t){if(t instanceof Error&&t.name==="ConfigNotFoundError")return null;return console.warn(`${e.yellow}[ts-css]${e.reset} Failed to load css config:`,t instanceof Error?t.message:t),null}}async function gg(n){let t=null;try{let{loadStxConfig:s}=await import("./chunk-hxabvt31.js"),r=await s(n);if(r.css)if(typeof r.css==="string"){let i=d.isAbsolute(r.css)?r.css:d.resolve(n,r.css);if(await Bun.file(i).exists()){let o=await import(i);t=o.default||o,console.log(`${e.green}[ts-css]${e.reset} Loaded config from stx.config.ts \u2192 ${r.css}`)}}else{if(t={...r.css,content:r.css.content||[],preflight:r.css.preflight??!0,minify:r.css.minify??!1},r.css.config){let i=d.isAbsolute(r.css.config)?r.css.config:d.resolve(n,r.css.config);if(await Bun.file(i).exists()){let o=await import(i);t={...o.default||o,...t}}}console.log(`${e.green}[ts-css]${e.reset} Using inline CSS config from stx.config.ts`)}}catch{}return t||await Bc(n)}function mg(n){try{let t=new WeakSet;return ee(JSON.stringify(n??{},(s,r)=>{if(typeof r==="function")return`[fn]${String(r)}`;if(typeof r==="object"&&r!==null){if(t.has(r))return"[circular]";t.add(r)}return r})??"")}catch{return"unhashable"}}async function Cn(n){if(B)return M;B=!0;try{let t=await jc();if(!t||!t.build)return B=!1,"";if(!v)v=await Bc(n);if(!v)return B=!1,"";let s=t.defaultConfig?.theme||{},r=v.theme||{},i={...t.defaultConfig,...v,theme:{...s,...r,extend:{...s.extend||{},...r.extend||{}}}},o=performance.now(),a=await t.build(i),g=performance.now()-o;if(M=a.css,console.log(`${e.cyan}[ts-css]${e.reset} Built ${a.classes.size} classes in ${g.toFixed(1)}ms`),i.output){let c=d.isAbsolute(i.output)?i.output:d.join(n,i.output),u=d.dirname(c);if(!_.existsSync(u))_.mkdirSync(u,{recursive:!0});await Bun.write(c,a.css)}return B=!1,a.css}catch(t){return console.error(`${e.red}[ts-css]${e.reset} Build error:`,t),B=!1,M}}async function Cr(n){v=null,await Cn(n)}function fy(){return M}function hg(n){let t=new Set,s=/class\s*=\s*["']([^"']+)["']/gi,r=s.exec(n);while(r!==null){for(let a of r[1].split(/\s+/))if(a.trim())t.add(a.trim());r=s.exec(n)}let i=/(?:x-class|:class)\s*=\s*"([^"]+)"/gi,o=i.exec(n);while(o!==null){let a=o[1].match(/'([^']+)'/g);if(a){for(let g of a)for(let c of g.slice(1,-1).split(/\s+/))if(c.trim())t.add(c.trim())}o=i.exec(n)}return t}var q=k(64);async function yg(n,t){let s=()=>W.get(t?d.resolve(t):process.cwd())?.fingerprint??null,r=q.get(E(n,t,s()));if(r!==void 0)return r;let i=await Fe(n,t);if(i)q.set(E(n,t,s()),i);return i}function*be(n){yield n;let t=new Set;for(let s of n.matchAll(/\/_stx\/modules\.([0-9a-f]{16})\.js/g)){let r=s[1];if(t.has(r))continue;t.add(r);let i=xi(r);if(i)yield i}}function gy(n){return[...be(n)].join(`
7
+ `)}async function Fe(n,t){try{let s=await jc();if(!s)return"";let r=new Set;for(let p of be(n)){let G=typeof s.extractClasses==="function"?s.extractClasses(p):hg(p);for(let ve of G)r.add(ve)}if(r.size===0)return"";let i=t?d.resolve(t):process.cwd(),o=l(i,"cache");if(!V)V=o;let a=W.get(i);if(!a){let p=await gg(i);a={config:p,fingerprint:mg(p)},W.set(i,a),we=a.fingerprint}let g=[...r].sort(),c=g.join(" "),u=`${Ee}::${U}::${a.fingerprint||"default"}::${c}`,h=C.get(u);if(h!==void 0)return X(u,h),h;let P=await Pe(u,o);if(P!==null)return X(u,P),P;let D=s.defaultConfig||s.config,I=a.config||{},y=fe(D,I),{safelist:N,includePreflight:z,minify:L,tokenCSS:Q}=y;if(y.unknownRoles.length>0&&!ke.has(i))ke.add(i),console.warn(`${e.yellow}[ts-css]${e.reset} No stx role for ${y.unknownRoles.join(", ")} - these keep the stock value. Role names: semanticTokenNames() in @stacksjs/stx/theme-tokens.`);let A=y.config,R=new s.CSSGenerator(A),T=A.shortcuts||I.shortcuts||{},F=Object.keys(T).filter((p)=>r.has(p)||N.includes(p));for(let p of N)if(!T[p])R.generate(p);for(let p of g)if(!T[p])R.generate(p);let w="";if(F.length>0){let p=new s.CSSGenerator(A);for(let G of F)p.generate(G);if(w=p.toCSS(!1,L),w&&!w.endsWith(`
8
8
  `))w+=`
9
- `}let b=w+R.toCSS(_,z);return b=ge(s.CSSGenerator,y)+Q+b,X(u,b),De(u,b,c),b}catch(s){return console.warn("Failed to generate Css CSS:",s),""}}async function S(n,t,s=!1,r=!1){let i=await gg(n,t);if(!i)return r?Rn(n):n;let c=s?he(i):void 0,o=c?`<link data-css="generated" rel="stylesheet" href="/_stx/css.${c}.css">`:`<style data-css="generated">
10
- ${i}
11
- </style>`;if(r)return Me(n,o);let g=/(?:<style\b[^>]*\bdata-css=(?:"generated"|'generated')[^>]*>[\s\S]*?<\/style>|<link\b[^>]*\bdata-css=(?:"generated"|'generated')[^>]*>)/g;if(g.test(n)){let a=!1;return n.replace(g,()=>{if(a)return"";return a=!0,o})}if(n.includes("</head>"))return f(n,o);if(n.includes("<body"))return n.replace(/<body([^>]*)>/,`<body$1>
12
- ${o}`);return o+n}function Me(n,t){let s=zi(n).map((a)=>({...a,replacement:""})),r=/(?:<style\b[^>]*\bdata-css=(?:"generated"|'generated')[^>]*>[\s\S]*?<\/style>|<link\b[^>]*\bdata-css=(?:"generated"|'generated')[^>]*>)/g,i=r.exec(n);if(i!==null){let a=!0;while(i!==null)s.push({start:i.index,end:i.index+i[0].length,replacement:a?t:""}),a=!1,i=r.exec(n)}else{let a=L(n);if(a!==-1)s.push({start:a,end:a,replacement:`${t}
9
+ `}let b=w+R.toCSS(z,L);return b=ge(s.CSSGenerator,y)+Q+b,X(u,b),De(u,b,o),b}catch(s){return console.warn("Failed to generate Css CSS:",s),""}}async function S(n,t,s=!1,r=!1,i=0){let o=await yg(n,t);if(!o)return r?Pn(n):n;let a=i>0&&Buffer.byteLength(o)<=i,g=s&&!a?he(o):void 0,c=g?`<link data-css="generated" rel="stylesheet" href="/_stx/css.${g}.css">`:`<style data-css="generated">
10
+ ${o}
11
+ </style>`;if(r)return Me(n,c);let u=/(?:<style\b[^>]*\bdata-css=(?:"generated"|'generated')[^>]*>[\s\S]*?<\/style>|<link\b[^>]*\bdata-css=(?:"generated"|'generated')[^>]*>)/g;if(u.test(n)){let h=!1;return n.replace(u,()=>{if(h)return"";return h=!0,c})}if(n.includes("</head>"))return f(n,c);if(n.includes("<body"))return n.replace(/<body([^>]*)>/,`<body$1>
12
+ ${c}`);return c+n}function Me(n,t){let s=Ui(n).map((c)=>({...c,replacement:""})),r=/(?:<style\b[^>]*\bdata-css=(?:"generated"|'generated')[^>]*>[\s\S]*?<\/style>|<link\b[^>]*\bdata-css=(?:"generated"|'generated')[^>]*>)/g,i=r.exec(n);if(i!==null){let c=!0;while(i!==null)s.push({start:i.index,end:i.index+i[0].length,replacement:c?t:""}),c=!1,i=r.exec(n)}else{let c=O(n);if(c!==-1)s.push({start:c,end:c,replacement:`${t}
13
13
  `});else{let u=n.match(/<body([^>]*)>/);if(u?.index!==void 0)s.push({start:u.index,end:u.index+u[0].length,replacement:`${u[0]}
14
- ${t}`});else s.push({start:0,end:0,replacement:t})}}s.sort((a,u)=>a.start-u.start||a.end-u.end);for(let a=1;a<s.length;a++)if(s[a].start<s[a-1].end)return _e(Rn(n),t);let c=Array(s.length*2+1),o=0,g=0;for(let a of s)c[g++]=n.slice(o,a.start),c[g++]=a.replacement,o=a.end;return c[g]=n.slice(o),c.join("")}function _e(n,t){let s=/(?:<style\b[^>]*\bdata-css=(?:"generated"|'generated')[^>]*>[\s\S]*?<\/style>|<link\b[^>]*\bdata-css=(?:"generated"|'generated')[^>]*>)/g;if(s.test(n)){let r=!1;return n.replace(s,()=>{if(r)return"";return r=!0,t})}if(n.includes("</head>"))return f(n,t);if(n.includes("<body"))return n.replace(/<body([^>]*)>/,`<body$1>
14
+ ${t}`});else s.push({start:0,end:0,replacement:t})}}s.sort((c,u)=>c.start-u.start||c.end-u.end);for(let c=1;c<s.length;c++)if(s[c].start<s[c-1].end)return _e(Pn(n),t);let o=Array(s.length*2+1),a=0,g=0;for(let c of s)o[g++]=n.slice(a,c.start),o[g++]=c.replacement,a=c.end;return o[g]=n.slice(a),o.join("")}function _e(n,t){let s=/(?:<style\b[^>]*\bdata-css=(?:"generated"|'generated')[^>]*>[\s\S]*?<\/style>|<link\b[^>]*\bdata-css=(?:"generated"|'generated')[^>]*>)/g;if(s.test(n)){let r=!1;return n.replace(s,()=>{if(r)return"";return r=!0,t})}if(n.includes("</head>"))return f(n,t);if(n.includes("<body"))return n.replace(/<body([^>]*)>/,`<body$1>
15
15
  ${t}`);return t+n}
16
- export{It,at,Re,xn,Ve,wr,vr,ct,e,ug,Dc,ly,Lc,dg,pg,Sn,xr,uy,fg,gg,dy,S};
16
+ export{Ot,ct,Re,_n,Ve,kr,_r,lt,e,fg,jc,py,Bc,gg,mg,Cn,Cr,fy,hg,yg,gy,S};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{Ph,Ih}from"./chunk-kk9h53xg.js";export{Ih as ensureTeleportTargets,Ph as processTeleportDirectives};