@stacksjs/stx 0.2.845 → 0.2.846

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 (221) hide show
  1. package/dist/builtins/image-worker.d.ts +1 -17
  2. package/dist/builtins/image-worker.js +3 -16
  3. package/dist/{chunk-vf0xbptq.js → chunk-098mrr5f.js} +2 -2
  4. package/dist/{chunk-ndsygfeb.js → chunk-0e4y6h1h.js} +14 -14
  5. package/dist/chunk-13sp1247.js +2 -0
  6. package/dist/chunk-1kdtapc1.js +2 -0
  7. package/dist/{chunk-6x6w0v1k.js → chunk-1qp5808r.js} +3 -3
  8. package/dist/{chunk-hc1f1yq8.js → chunk-1w5hte9z.js} +2 -2
  9. package/dist/chunk-263gby2p.js +2 -0
  10. package/dist/{chunk-4dxq7ft1.js → chunk-2a792g5e.js} +2 -2
  11. package/dist/{chunk-kbv5nwwd.js → chunk-30g5kqy0.js} +1 -1
  12. package/dist/chunk-33ggd5at.js +2 -0
  13. package/dist/chunk-3q19w77r.js +2 -0
  14. package/dist/{chunk-5a7etvxz.js → chunk-4041q9sd.js} +4 -4
  15. package/dist/chunk-40x0vwza.js +2 -0
  16. package/dist/{chunk-c62wxswd.js → chunk-444sbdm8.js} +27 -27
  17. package/dist/chunk-4cmda04d.js +2 -0
  18. package/dist/{chunk-5y3m5vzg.js → chunk-4jmkvzns.js} +2 -2
  19. package/dist/{chunk-0gg7k9cj.js → chunk-4v6mbvqv.js} +4 -4
  20. package/dist/{chunk-rncmfgpk.js → chunk-50tnhq5f.js} +25 -25
  21. package/dist/{chunk-pb9347sn.js → chunk-5903tzcw.js} +3 -3
  22. package/dist/chunk-5xt4tjpm.js +2 -0
  23. package/dist/chunk-6289h3tr.js +2 -0
  24. package/dist/{chunk-nqj1mkkz.js → chunk-66e0d2t7.js} +1 -1
  25. package/dist/{chunk-1c6kczkt.js → chunk-6g7wrn48.js} +1 -1
  26. package/dist/{chunk-3rjgm7qk.js → chunk-6pgq75h9.js} +5 -5
  27. package/dist/chunk-6q7ke5p0.js +2 -0
  28. package/dist/{chunk-y06rw18j.js → chunk-6x6xthsv.js} +2 -2
  29. package/dist/chunk-6ya0860g.js +2 -0
  30. package/dist/{chunk-jabw4ck5.js → chunk-7qwfbafg.js} +2 -2
  31. package/dist/{chunk-r4jwhy37.js → chunk-7rcc2tzz.js} +3 -3
  32. package/dist/{chunk-tpyk6b4c.js → chunk-81nmqdht.js} +2 -2
  33. package/dist/{chunk-py5x8fkq.js → chunk-82vf29ty.js} +2 -2
  34. package/dist/{chunk-48vnw9t9.js → chunk-84myqca7.js} +2 -2
  35. package/dist/{chunk-fs5mshcs.js → chunk-8az9e5b9.js} +5 -5
  36. package/dist/chunk-8k7rfy77.js +3 -0
  37. package/dist/{chunk-28zze2wm.js → chunk-9d9sartn.js} +1 -1
  38. package/dist/chunk-9enwmg0z.js +2 -0
  39. package/dist/{chunk-c6yc6qsv.js → chunk-9hfk5wf1.js} +5 -5
  40. package/dist/chunk-a7z6j9ga.js +2 -0
  41. package/dist/chunk-ab6dw6f4.js +2 -0
  42. package/dist/chunk-adnntqk3.js +2 -0
  43. package/dist/{chunk-47n5s7wk.js → chunk-an6vb4ng.js} +2 -2
  44. package/dist/chunk-bhzbcmm7.js +2 -0
  45. package/dist/{chunk-k1tbgnhf.js → chunk-bsr6kf34.js} +1 -1
  46. package/dist/{chunk-md84j62m.js → chunk-c78dsx3f.js} +10 -10
  47. package/dist/{chunk-ntg8ttm4.js → chunk-caw0wzns.js} +3 -3
  48. package/dist/chunk-cfez1qbm.js +2 -0
  49. package/dist/chunk-cgyddqxw.js +2 -0
  50. package/dist/chunk-cng4fhpt.js +2 -0
  51. package/dist/{chunk-6trgwvt0.js → chunk-cpdfxy8g.js} +12 -12
  52. package/dist/chunk-ctq1qy1g.js +2 -0
  53. package/dist/chunk-cyghcps7.js +2 -0
  54. package/dist/{chunk-2cafvex6.js → chunk-d1pat213.js} +2 -2
  55. package/dist/{chunk-f34ce0pn.js → chunk-d4jhyxp6.js} +6 -6
  56. package/dist/{chunk-xr8hg79c.js → chunk-ds1vj0dw.js} +4 -4
  57. package/dist/{chunk-kxj5sp5w.js → chunk-dspmqeg0.js} +4 -4
  58. package/dist/chunk-e26aqarz.js +2 -0
  59. package/dist/chunk-e7816ep3.js +2 -0
  60. package/dist/{chunk-mnt7jbek.js → chunk-ea5w92vs.js} +3 -3
  61. package/dist/chunk-en8hnq2q.js +2 -0
  62. package/dist/chunk-enz6fsdx.js +2 -0
  63. package/dist/{chunk-tjnf4a8g.js → chunk-evww725k.js} +59 -59
  64. package/dist/chunk-eydqn4gz.js +2 -0
  65. package/dist/chunk-fk7gs41v.js +2 -0
  66. package/dist/chunk-fnfq6fkk.js +12 -0
  67. package/dist/chunk-fx04tq90.js +2 -0
  68. package/dist/chunk-fzba0b0n.js +2 -0
  69. package/dist/chunk-g7tj2tnz.js +2 -0
  70. package/dist/chunk-ga0293gz.js +2 -0
  71. package/dist/chunk-gab3h25h.js +2 -0
  72. package/dist/{chunk-1h6pb8d1.js → chunk-gs33xdk7.js} +4 -4
  73. package/dist/{chunk-ka5ea34g.js → chunk-h76wsqr4.js} +2 -2
  74. package/dist/chunk-hczqyk7c.js +2 -0
  75. package/dist/{chunk-3sskqw4b.js → chunk-hff8z61n.js} +1 -1
  76. package/dist/{chunk-k7am94hr.js → chunk-hp8ny2zb.js} +5 -5
  77. package/dist/chunk-hs6fg0k9.js +2 -0
  78. package/dist/chunk-hsg4ggt0.js +2 -0
  79. package/dist/chunk-j1n2xb48.js +3 -0
  80. package/dist/{chunk-zwxncs2e.js → chunk-j3zy3mrn.js} +6 -6
  81. package/dist/{chunk-02qbawwq.js → chunk-jx14j83s.js} +3 -3
  82. package/dist/chunk-k3pfadjb.js +2 -0
  83. package/dist/chunk-kmnre1tq.js +2 -0
  84. package/dist/{chunk-6tyjvxgb.js → chunk-krdfnsz6.js} +8 -8
  85. package/dist/{chunk-x0dx1pyf.js → chunk-m8cpabd2.js} +3 -3
  86. package/dist/chunk-mgtp037k.js +3 -0
  87. package/dist/chunk-mp42d9v5.js +2 -0
  88. package/dist/chunk-mtmgrccj.js +2 -0
  89. package/dist/{chunk-r3jf8v5a.js → chunk-mzyx6y1a.js} +30 -30
  90. package/dist/chunk-n20tsy6a.js +2 -0
  91. package/dist/{chunk-fm8gfj2g.js → chunk-n475s55q.js} +2 -2
  92. package/dist/{chunk-b6qf7w2b.js → chunk-neh3kewg.js} +4 -4
  93. package/dist/{chunk-y7aqf8r7.js → chunk-ng8nkbp2.js} +2 -2
  94. package/dist/{chunk-eaz30495.js → chunk-nhn69eva.js} +2 -2
  95. package/dist/{chunk-7r4p7zjn.js → chunk-nsc93haq.js} +6 -6
  96. package/dist/{chunk-rk2ex6qx.js → chunk-p8ry1q7c.js} +2 -2
  97. package/dist/chunk-pdt1phnh.js +2 -0
  98. package/dist/{chunk-s68p10zh.js → chunk-ph57nv7v.js} +2 -2
  99. package/dist/{chunk-7s411sa9.js → chunk-prrf0j54.js} +5 -5
  100. package/dist/chunk-q87wwwra.js +2 -0
  101. package/dist/{chunk-87ksn02m.js → chunk-qttjrja7.js} +2 -2
  102. package/dist/{chunk-hgk1v60t.js → chunk-r1984y6y.js} +10 -10
  103. package/dist/chunk-r1mvd96m.js +2 -0
  104. package/dist/{chunk-78q3apyy.js → chunk-r3v1zaj0.js} +2 -2
  105. package/dist/{chunk-vhxrrqrg.js → chunk-rg2gfyy0.js} +2 -2
  106. package/dist/{chunk-rpapxkdm.js → chunk-rgy9c7d8.js} +3 -3
  107. package/dist/{chunk-97bvpszy.js → chunk-rn7710jg.js} +3 -3
  108. package/dist/{chunk-8g5dsjr0.js → chunk-s2a51j0k.js} +6 -6
  109. package/dist/chunk-s321pb85.js +2 -0
  110. package/dist/{chunk-11kp389s.js → chunk-s6qzmwp3.js} +1 -1
  111. package/dist/{chunk-bqsrtvad.js → chunk-serwcna2.js} +2 -2
  112. package/dist/chunk-stss2b88.js +2 -0
  113. package/dist/chunk-svxkcdhh.js +2 -0
  114. package/dist/{chunk-ncrrxp60.js → chunk-sxsjxme0.js} +4 -4
  115. package/dist/{chunk-r8xwd8r1.js → chunk-t3e95q80.js} +13 -13
  116. package/dist/chunk-t6gm8z7x.js +2 -0
  117. package/dist/chunk-tkssavxx.js +2 -0
  118. package/dist/chunk-tw6y23ew.js +2 -0
  119. package/dist/{chunk-302gek13.js → chunk-tzqnf28n.js} +3 -3
  120. package/dist/{chunk-tzdwg9rw.js → chunk-v8y01jbr.js} +4 -4
  121. package/dist/{chunk-9mtyxvhk.js → chunk-vh8wn94m.js} +2 -2
  122. package/dist/chunk-vm34qp5k.js +2 -0
  123. package/dist/chunk-vtg2tqzt.js +2 -0
  124. package/dist/{chunk-6hb75r07.js → chunk-vxayh4az.js} +6 -6
  125. package/dist/{chunk-5p96rafz.js → chunk-vyggv4k0.js} +2 -2
  126. package/dist/{chunk-fg80w4zk.js → chunk-wbx27kdd.js} +2 -2
  127. package/dist/{chunk-315q48qy.js → chunk-wd632rge.js} +7 -7
  128. package/dist/chunk-wddaxpep.js +2 -0
  129. package/dist/{chunk-mveqaxkr.js → chunk-wvsnp294.js} +7 -7
  130. package/dist/{chunk-rb6vr5v9.js → chunk-wzpd3htt.js} +7 -7
  131. package/dist/{chunk-8qjf16yr.js → chunk-x1n01gc1.js} +4 -4
  132. package/dist/{chunk-4rfedg2f.js → chunk-x3pxxx7j.js} +3 -3
  133. package/dist/chunk-x6bt567m.js +2 -0
  134. package/dist/{chunk-8hy5g1hq.js → chunk-xdzs2mxv.js} +5 -5
  135. package/dist/chunk-xf4d9gam.js +2 -0
  136. package/dist/chunk-xf5db38j.js +2 -0
  137. package/dist/{chunk-2ytaezad.js → chunk-xhytkzg7.js} +2 -2
  138. package/dist/{chunk-3ba0nqwm.js → chunk-xj5j18nf.js} +2 -2
  139. package/dist/{chunk-79wb76ya.js → chunk-xq9w5g23.js} +1 -1
  140. package/dist/{chunk-010yhk6m.js → chunk-xskygt2v.js} +5 -5
  141. package/dist/chunk-y5t7ec69.js +2 -0
  142. package/dist/chunk-yk90sqqv.js +2 -0
  143. package/dist/chunk-z231es22.js +2 -0
  144. package/dist/{chunk-n91sm385.js → chunk-z26fg4p0.js} +2 -2
  145. package/dist/{chunk-dhgjq9jx.js → chunk-zkn55966.js} +5 -5
  146. package/dist/chunk-zphekzv8.js +2 -0
  147. package/dist/chunk-zsft5466.js +2 -0
  148. package/dist/{chunk-9vg3jtzw.js → chunk-zx2xwrp3.js} +6 -6
  149. package/dist/{chunk-69b8mr68.js → chunk-zyt8k9n0.js} +2 -2
  150. package/dist/cli.js +19 -19
  151. package/dist/craft-entry.js +2 -2
  152. package/dist/craft.js +2 -2
  153. package/dist/framework-composables.js +13 -1
  154. package/dist/installed-entry.d.ts +8 -0
  155. package/dist/installed-entry.js +19 -0
  156. package/dist/pwa.js +3 -3
  157. package/dist/ssg.js +4 -4
  158. package/package.json +5 -5
  159. package/dist/chunk-01gwdj2y.js +0 -2
  160. package/dist/chunk-12tkqtrv.js +0 -2
  161. package/dist/chunk-168fwztf.js +0 -2
  162. package/dist/chunk-1cdxe8yt.js +0 -2
  163. package/dist/chunk-1k751fgt.js +0 -2
  164. package/dist/chunk-3qa40hgd.js +0 -2
  165. package/dist/chunk-3qstewq3.js +0 -2
  166. package/dist/chunk-40r740w1.js +0 -2
  167. package/dist/chunk-469nzheq.js +0 -2
  168. package/dist/chunk-5hhyqze9.js +0 -2
  169. package/dist/chunk-60jtrz9f.js +0 -2
  170. package/dist/chunk-64evx0my.js +0 -2
  171. package/dist/chunk-6vcpmt0y.js +0 -2
  172. package/dist/chunk-7tdwa595.js +0 -2
  173. package/dist/chunk-7xp2ec0v.js +0 -2
  174. package/dist/chunk-8nq2snvy.js +0 -2
  175. package/dist/chunk-8s27mteq.js +0 -2
  176. package/dist/chunk-8weaawqm.js +0 -2
  177. package/dist/chunk-afyvnpr9.js +0 -2
  178. package/dist/chunk-as6x6be8.js +0 -2
  179. package/dist/chunk-aw45yjrw.js +0 -2
  180. package/dist/chunk-b30fzxwd.js +0 -2
  181. package/dist/chunk-b3wcs8bk.js +0 -2
  182. package/dist/chunk-bygxt820.js +0 -3
  183. package/dist/chunk-c3y7cxe7.js +0 -2
  184. package/dist/chunk-d5bjpjbv.js +0 -2
  185. package/dist/chunk-dmmt4psb.js +0 -12
  186. package/dist/chunk-e1vf62ck.js +0 -2
  187. package/dist/chunk-emzz6seq.js +0 -2
  188. package/dist/chunk-exr9599h.js +0 -2
  189. package/dist/chunk-f1wv2q2z.js +0 -2
  190. package/dist/chunk-fpc1n3je.js +0 -2
  191. package/dist/chunk-fyesbfvr.js +0 -2
  192. package/dist/chunk-fz433ybr.js +0 -2
  193. package/dist/chunk-hbkh87n2.js +0 -2
  194. package/dist/chunk-hpw6hq7p.js +0 -2
  195. package/dist/chunk-j274w1ac.js +0 -2
  196. package/dist/chunk-jf37tpj2.js +0 -2
  197. package/dist/chunk-jv2z9qb7.js +0 -2
  198. package/dist/chunk-k609nyan.js +0 -2
  199. package/dist/chunk-msd0ezxm.js +0 -2
  200. package/dist/chunk-n4c8srx8.js +0 -2
  201. package/dist/chunk-nfxd6y75.js +0 -2
  202. package/dist/chunk-pj1xj34h.js +0 -2
  203. package/dist/chunk-pv2mrc9g.js +0 -2
  204. package/dist/chunk-pwdnqe30.js +0 -2
  205. package/dist/chunk-qeej9h56.js +0 -2
  206. package/dist/chunk-rapk2r7b.js +0 -2
  207. package/dist/chunk-sss23kn5.js +0 -2
  208. package/dist/chunk-sv52qc36.js +0 -3
  209. package/dist/chunk-t4n23dh5.js +0 -2
  210. package/dist/chunk-vkrxrt0a.js +0 -2
  211. package/dist/chunk-vzpbxgg7.js +0 -2
  212. package/dist/chunk-wvwca1e9.js +0 -2
  213. package/dist/chunk-xjbc3bhs.js +0 -2
  214. package/dist/chunk-xtbmntht.js +0 -2
  215. package/dist/chunk-xvd3vdrw.js +0 -2
  216. package/dist/chunk-xvtp7nyj.js +0 -2
  217. package/dist/chunk-xy45tx27.js +0 -2
  218. package/dist/chunk-yg5a54pj.js +0 -2
  219. package/dist/chunk-yhzakgpp.js +0 -2
  220. package/dist/chunk-z3qgv971.js +0 -2
  221. package/dist/chunk-zztfp9qh.js +0 -2
@@ -1,6 +1,6 @@
1
1
  // @bun
2
- import{rr,Re}from"./chunk-4y6hes3h.js";import{V,w,vr,js,C}from"./chunk-tjnf4a8g.js";import{a,O}from"./chunk-md84j62m.js";import{Do}from"./chunk-010yhk6m.js";import{rt}from"./chunk-car6nhfe.js";import{c}from"./chunk-bygxt820.js";import{s,me}from"./chunk-x0dx1pyf.js";import p from"path";import B from"fs";import{AsyncLocalStorage as xt}from"async_hooks";import{randomUUID as yt}from"crypto";var $t=11;function X(t,e,n){return/^(?:(?:stx|ui)\.config\.[cm]?[jt]s|runtime-config-(?:server|loader)\.[cm]?[jt]s)$/.test(p.basename(t))||Do(t,e,n)}var at=2;function _f(t){let e=process.env.STX_BUNDLE_CACHE_DIR?.trim();return e?p.resolve(e):c(t,"bundle-cache")}function nt(t,e){let n=t;for(let i of wt(e))if(i!==p.sep)n=n.split(i).join("\x00root");return n}var st=new Map;function wt(t){let e=p.resolve(t),n=st.get(e);if(!n){let i=e;try{i=B.realpathSync(e)}catch{}n=[...new Set([e,i])].sort((l,d)=>d.length-l.length),st.set(e,n)}return n}function bt(t,e){try{let n=B.statSync(t),i=p.resolve(e),l=t.startsWith(`${i}${p.sep}`);return{path:l?p.relative(i,t):t,...l?{inRoot:!0}:{},mtimeMs:n.mtimeMs,size:n.size,hash:Bun.hash(B.readFileSync(t)).toString(36)}}catch{return null}}function ct(t,e){return t.inRoot?p.join(p.resolve(e),t.path):t.path}function St(t,e){for(let n of t){let i=ct(n,e);try{let l=B.statSync(i);if(l.size!==n.size)return!1;if(l.mtimeMs!==n.mtimeMs&&Bun.hash(B.readFileSync(i)).toString(36)!==n.hash)return!1}catch{return!1}}return!0}var lt=new Map,vt=100;function Cf(t=process.env){let e=Number(t.STX_BUNDLE_CACHE_LIMIT);return Number.isFinite(e)&&e>=1?Math.floor(e):2000}var H=new Map;async function jt(t){let e=H.get(t)??0;if(e>0&&e<vt){H.set(t,e+1);return}H.set(t,1);try{let n=(await B.promises.readdir(t)).filter((o)=>o.endsWith(".js")),i=Cf();if(n.length<=i)return;let d=(await Promise.all(n.map(async(o)=>{try{return{name:o,at:(await B.promises.stat(p.join(t,o))).mtimeMs}}catch{return null}}))).filter((o)=>o!==null);d.sort((o,b)=>b.at-o.at);for(let o of d.slice(i)){let b=o.name.slice(0,-3);await B.promises.rm(p.join(t,`${b}.js`),{force:!0}),await B.promises.rm(p.join(t,`${b}.deps.json`),{force:!0})}A("pruned bundle cache to",i,"entries")}catch{}}function ye(t){return lt.get(t)??[]}function Z(t,e){if(t)lt.set(t,e)}function Ef(t=process.env){return t.STX_DEBUG==="true"||t.STX_DEBUG==="1"}function A(...t){if(Ef())console.log("[stx:bundler]",...t)}var K=[];function sc(t,e,n){K.push({filePath:t||"<inline>",message:e,details:n})}function tn(){return K.slice()}function nn(){K.length=0}var Q;function $h(t){Q=t}function oc(){if(Q)return Q;try{let t=O.strict;return typeof t==="object"&&t!==null?t.bundlerFallback??"warn":"warn"}catch{return"warn"}}var Y=[/^stx$/,/^@stacksjs\/stx$/,/^@stores$/,/^stx\/stores$/,/^@composables$/];function rn(t){let e=/^[ \t]*import[ \t]+(?!type(?:[ \t]|{))[\s\S]*?\s+from\s+['"]([^'"]+)['"][ \t]*;?/gm,n;while((n=e.exec(t))!==null){let l=n[1];if(!Y.some((o)=>o.test(l)))return A("detected user import:",l),!0}let i=/^[ \t]*import[ \t]*['"]([^'"]+)['"]/gm;while((n=i.exec(t))!==null){let l=n[1];if(/\.css(?:\?.*)?$/.test(l))continue;if(!Y.some((o)=>o.test(l)))return A("detected side-effect import:",l),!0}return!1}var nr="stx-module:",Bt=/\.(?:[cm]?[jt]sx?|json)$/i;function Tf(t,e){return p.relative(t,e).split(p.sep).join("/")}function $f(t,e){if(e.size===0)return t;return t.replace(/^([ \t]*import(?:(?:\s+|(?=[{*]))[^;"']*?\s*from\s*|\s*))(["'])([^"']+)\2/gm,(n,i,l,d)=>{let o=e.get(d);return o&&!d.startsWith(nr)?`${i}${l}${o}${l}`:n})}function Rf(t,e){let n=0,i=(d)=>{let o=`__stxMod${n++}`,b=JSON.stringify(d);return e.push(`var ${o} = globalThis.__stxModules && globalThis.__stxModules[${b}];`,`if (${o} === undefined) throw new Error("[stx] module " + ${JSON.stringify(b)} + " is not registered on this page (#1957)");`),o},l=(d,o)=>{for(let b of d.split(",")){let I=b.trim();if(!I)continue;let M=I.match(/^("(?:[^"\\]|\\.)*"|[\w$]+)(?:\s+as\s+([\w$]+))?$/);if(!M)continue;let S=M[1].startsWith('"')?JSON.parse(M[1]):M[1],f=M[2]??S;e.push(`var ${f} = ${o}[${JSON.stringify(S)}];`)}};return t=t.replace(/^[ \t]*import(?:\s+|(?=[{*]))([^;"']+?)\s*from\s*["'](stx-module:[^"']+)["'];?[ \t]*$/gm,(d,o,b)=>{let I=b.slice(nr.length),M=i(I),S=o.trim(),f=S.match(/^([\w$]+)\s*(?:,\s*|$)/);if(f&&!S.startsWith("{")&&!S.startsWith("*"))e.push(`var ${f[1]} = ${M}.default;`),S=S.slice(f[0].length).trim();let v=S.match(/^\*\s*as\s+([\w$]+)$/);if(v)e.push(`var ${v[1]} = ${M};`);else if(S.startsWith("{"))l(S.replace(/^\{|\}$/g,""),M);return""}),t=t.replace(/^[ \t]*import\s*["'](stx-module:[^"']+)["'];?[ \t]*$/gm,(d,o)=>(i(o.slice(nr.length)),"")),t}function it(t){let e=[t,`${t}.ts`,`${t}.tsx`,`${t}.js`,`${t}.mjs`,`${t}.jsx`,p.join(t,"index.ts"),p.join(t,"index.tsx"),p.join(t,"index.js"),p.join(t,"index.mjs")];for(let n of e)try{if(B.existsSync(n)&&B.statSync(n,{throwIfNoEntry:!1})?.isFile())return n}catch{}return}var G=new xt;function is(t,e){let n=new Bun.CryptoHasher("md5");for(let[i,l]of[...t].sort(([d],[o])=>d<o?-1:d>o?1:0))n.update(`${i}\x00${l}\x00`);return G.run({modules:t,key:n.digest("hex").slice(0,12)},e)}function sn(){return G.getStore()?.key??""}function ut(t,e,n,i,l,d,o=new Map,b,I,M){let S=new Map([[n,i],...M??[]]),f=(j)=>j!==void 0&&S.has(j),v=(j,r,u)=>{if(X(r,t,b))return null;if(!d||!f(j)||!Bt.test(r))return null;try{if(!B.statSync(r,{throwIfNoEntry:!1})?.isFile())return null}catch{return null}l.add(r);let E=`${nr}${Tf(process.cwd(),r)}`;return o.set(u,E),{path:E,external:!0}},y=(j,r)=>{let u=f(j)?e:p.dirname(j),E=p.resolve(u,r);return it(E)??E};return{name:"stx-client-bundle",setup(j){if(j.onResolve({filter:/^(stx|@stacksjs\/stx)$/},(r)=>({path:r.path,external:!0})),j.onResolve({filter:/^(@stores|@composables|stx\/stores)$/},(r)=>({path:r.path,external:!0})),j.onResolve({filter:/^\//},(r)=>{if(f(r.path))return{path:r.path};let u=it(r.path);if(u){let E=v(r.importer,u,r.path);if(E)return E;if(!f(u))l.add(u);return{path:u}}return{path:r.path,external:!0}}),j.onResolve({filter:/^\.\.?\//},(r)=>{let u=y(r.importer,r.path),E=v(r.importer,u,r.path);if(E)return E;return l.add(u),{path:u}}),j.onResolve({filter:/^[@~]\//},(r)=>{let u=p.resolve(t,r.path.slice(2)),E=[u,`${u}.ts`,`${u}.tsx`,`${u}.js`,`${u}.mjs`,`${u}.jsx`,p.join(u,"index.ts"),p.join(u,"index.tsx"),p.join(u,"index.js"),p.join(u,"index.mjs")];for(let h of E)if(B.existsSync(h)&&B.statSync(h,{throwIfNoEntry:!1})?.isFile()){let D=v(r.importer,h,r.path);if(D)return D;return A(`resolved ${r.path[0]}/ import:`,r.path,"\u2192",h),l.add(h),{path:h}}return console.warn(`[stx:bundler] could not resolve ${r.path[0]}/ import:`,r.path),{path:u}}),d)j.onResolve({filter:/^(?!node:|bun:)(?:@[\w.-]+\/)?[\w.-]/},(r)=>{if(!f(r.importer))return;let u=`${nr}npm:${r.path}`;return o.set(r.path,u),{path:u,external:!0}});j.onLoad({filter:/\.(?:[cm]?[jt]sx?|json)$/},(r)=>{if(S.has(r.path))return{contents:S.get(r.path),loader:"ts"};if(X(r.path,t,b))throw Error(`Server-only API source cannot be imported by a client script: ${r.path}`);let u=p.extname(r.path).toLowerCase(),E=u===".json"?"json":u===".tsx"?"tsx":u===".jsx"?"jsx":u===".ts"||u===".mts"||u===".cts"?"ts":"js";if(!f(r.path))l.add(r.path);let h=I?.get(r.path);if(h!==void 0)return{contents:h,loader:"js"};return{contents:B.readFileSync(r.path,"utf8"),loader:E}})}}}var q=new Map,P=w(64),ot=Symbol.for("stx.client-bundle-build-queue");function Af(t){let e=globalThis,i=(e[ot]??Promise.resolve()).then(t,t);return e[ot]=i.then(()=>{return},()=>{return}),i}async function on(t,e,n={}){let i=n.projectRoot||process.cwd(),l=(await a(i)).serverApi,d=n.minify??!1,o=n.externalizeUserModules??!0,b=n.expose?.length?[...new Set(n.expose)].sort():void 0,I=n.cacheDir||_f(i),M=G.getStore(),S=new Bun.CryptoHasher("md5");S.update(`${$t}\x00${rt()}\x00${JSON.stringify(l??!1)}\x00${o?"registry":"inline"}\x00${b?b.join(","):"*"}\x00${d?"minified":"readable"}\x00${M?.key??""}\x00${nt(t,i)}\x00${nt(e,i)}`);let f=S.digest("hex").slice(0,12),v=p.join(I,`${f}.js`),y=P.get(v);if(y){if(js(y.files)&&y.files.every((h)=>!X(h.path,i,l))){A("memo hit:",f);let h=y.files.map((D)=>D.path);return Z(e,h),n.collectInputs?.push(...h),y.code}P.delete(v),A("memo invalidated by dep change:",f)}let j=p.join(I,`${f}.deps.json`),r=Bun.file(v);if(await r.exists()){let h=Bun.file(j),D=!1,k=null;if(await h.exists())try{let N=JSON.parse(await h.text());if(N.metadataVersion===at&&Array.isArray(N.files)&&St(N.files,i))k=vr(N.files.map((g)=>ct(g,i))),D=k.length===N.files.length&&!k.some((g)=>X(g.path,i,l))}catch{D=!1}if(D){if(A("cache hit:",f),k)Z(e,k.map((U)=>U.path)),n.collectInputs?.push(...k.map((U)=>U.path));let N=await r.text(),g=new Date;if(B.promises.utimes(v,g,g).catch(()=>{}),k)P.set(v,{code:N,files:k});return N}A("cache invalidated by dep change:",f)}let u=q.get(f);if(u){let h=await u;if(n.collectInputs)n.collectInputs.push(...(P.get(v)?.files??[]).map((D)=>D.path));return h}let E=Af(()=>Et(t,e,{projectRoot:i,minify:d,cacheDir:I,hash:f,cachePath:v,depsPath:j,collectInputs:n.collectInputs,externalizeUserModules:o,serverApi:l,expose:b,throwOnFailure:n.throwOnFailure,substitutes:M?.modules}));q.set(f,E);try{return await E}finally{q.delete(f)}}function ic(t){return`${t}-${process.pid}-${yt()}`}async function Rh(t,e){let{projectRoot:n}=e,i=ic(new Bun.CryptoHasher("md5").update([...t.keys()].join("\x00")).digest("hex").slice(0,12)),l=p.join(c(n,"bundle-tmp"),"out",i);B.mkdirSync(l,{recursive:!0});let d=new Map,o=new Map,b=0;for(let[f,v]of t){let y=p.join(n,`.stx-split-${i}-${b++}.ts`);d.set(y,v),o.set(p.basename(y).replace(/\.ts$/,""),f)}let[I,M]=[...d][0],S=new Set;try{let f=await Bun.build({entrypoints:[...d.keys()],outdir:l,target:"browser",format:"esm",splitting:!0,minify:!1,naming:{entry:"[name].js",chunk:"chunk-[hash].js"},plugins:[ut(n,p.dirname(e.filePath),I,M,S,!1,new Map,void 0,G.getStore()?.modules,d)],define:{"process.env.NODE_ENV":'"development"',...C()},root:n});if(!f.success)throw Error(f.logs.filter((y)=>y.level==="error").map((y)=>y.message).join(", ")||"Unable to bundle the entries");let v={entries:new Map,chunks:new Map};for(let y of f.outputs){let j=p.basename(y.path);if(y.kind==="entry-point"){let r=o.get(j.replace(/\.js$/,""));if(r!==void 0)v.entries.set(r,await y.text())}else if(y.kind==="chunk")v.chunks.set(j.replace(/\.js$/,""),await y.text())}return e.collectInputs?.push(...S),v}finally{try{B.rmSync(l,{recursive:!0,force:!0})}catch{}}}async function Et(t,e,n){let{projectRoot:i,minify:l,cacheDir:d,hash:o,cachePath:b,depsPath:I,externalizeUserModules:M}=n,S=c(i,"bundle-tmp"),f=ic(o),v=p.join(i,`.stx-client-${f}.ts`),y=p.join(S,"out",f);B.mkdirSync(y,{recursive:!0});let j=p.dirname(e),r=new Set,u=/^[ \t]*(export\s+)?(?:const|let|var)\s+(?:\{([^}]+)\}|(\w+))/gm,E=/^[ \t]*(export\s+)?(?:async\s+)?function\s+(\w+)/gm,h=s(t),{depths:D,balanced:k}=me(h),N=(R)=>!k||D[R]===0,g;while((g=u.exec(h))!==null){if(g[1])continue;if(!N(g.index))continue;if(g[2])g[2].split(",").forEach((R)=>{let m=_t(R);if(m)r.add(m)});else if(g[3])r.add(g[3])}while((g=E.exec(h))!==null){if(g[1])continue;if(!N(g.index))continue;r.add(g[2])}let U=/^[ \t]*import[ \t]+(?!type\b)(?:(\w+)\s*(?:,\s*)?)?(?:\*\s+as\s+(\w+)|\{([^}]+)\})?\s+from\b/gm;while((g=U.exec(h))!==null){if(!N(g.index))continue;let R=/^\s*['"]([^'"]+)['"]/.exec(t.slice(g.index+g[0].length))?.[1];if(R&&Y.some((m)=>m.test(R)))continue;if(g[1])r.add(g[1]);if(g[2])r.add(g[2]);for(let m of(g[3]??"").split(",")){let _=m.trim();if(!_||/^type\s/.test(_))continue;let L=/\bas\s+(\w+)\s*$/.exec(_)?.[1]??/^\w+$/.exec(_)?.[0];if(L)r.add(L)}}for(let R of h.matchAll(/\bexport\s*\{([^}]+)\}/g))for(let m of R[1].split(",")){let _=/\bas\s+(\w+)\s*$/.exec(m)?.[1]??/^\s*(\w+)\s*$/.exec(m)?.[1];if(_)r.delete(_)}let pt=r.size>0?`
3
- export { ${[...r].join(", ")} }`:"";A("bundling:",o,"from:",p.basename(e));let tt=new Set,et=new Map;try{let R=await Bun.build({entrypoints:[v],outdir:y,target:"browser",format:"esm",minify:l?{whitespace:!1,identifiers:!0,syntax:!0}:!1,plugins:[ut(i,j,v,t+pt,tt,M,et,n.serverApi,n.substitutes)],define:{"process.env.NODE_ENV":l?'"production"':'"development"',...C()},root:i});if(!R.success){let F=R.logs.filter((T)=>T.level==="error").map((T)=>T.message).join(", ")||`Unable to bundle ${p.basename(e)}`,z=rr(R.logs,e||void 0);if(console.warn("[stx:bundler] build failed:",F),sc(e||"",F,z),n.throwOnFailure||oc()==="error")throw Error(F);return t}let m="";for(let x of R.outputs){m=await x.text();break}let _=[];for(let x of m.matchAll(/^\s*export\s*\{([^}]*)\}\s*;?\s*$/gm))for(let F of x[1].split(",")){let z=F.trim().match(/^([A-Za-z_$][\w$]*)\s+as\s+([A-Za-z_$][\w$]*)$/);if(z){_.push([z[2],z[1]]);continue}let T=F.trim();if(/^[A-Za-z_$][\w$]*$/.test(T))_.push([T,T])}if(n.expose){let x=new Set(n.expose);for(let F=_.length-1;F>=0;F--)if(!x.has(_[F][0]))_.splice(F,1)}let L=[];m=Rf($f(m,et),L);let dt=m.match(/^\s*import(?:\s+|(?=["'{*]))[^;]+;?\s*$/gm)||[];if(m=m.replace(/^\s*import(?:\s+|(?=["'{*]))[^;]+;?\s*$/gm,"").replace(/^\s*export\s*\{[^}]*\}\s*;?\s*$/gm,"").replace(/^\s*export\s+default\s+.*$/gm,"").trim(),l&&m)try{m=new Bun.Transpiler({loader:"js",minifyWhitespace:!0}).transformSync(m)}catch{}let J=`__stxBundle_${o}`,ft=new Set(V(t,!0).split(",").map((x)=>x.trim())),mt=_.map(([x,F])=>`get ${JSON.stringify(x)}() { return ${F} }${ft.has(x)?`, set ${JSON.stringify(x)}(__stxValue_${F}) { ${F} = __stxValue_${F} }`:""}`).join(", "),gt=_.map(([x])=>`var ${x} = undefined;`).join(`
2
+ import{rr,Re}from"./chunk-4y6hes3h.js";import{V,w,xr,Bs,C}from"./chunk-evww725k.js";import{a,O}from"./chunk-c78dsx3f.js";import{Mo}from"./chunk-xskygt2v.js";import{rt}from"./chunk-car6nhfe.js";import{c}from"./chunk-8k7rfy77.js";import{s,me}from"./chunk-m8cpabd2.js";import p from"path";import B from"fs";import{AsyncLocalStorage as xt}from"async_hooks";import{randomUUID as yt}from"crypto";var $t=11;function X(t,e,n){return/^(?:(?:stx|ui)\.config\.[cm]?[jt]s|runtime-config-(?:server|loader)\.[cm]?[jt]s)$/.test(p.basename(t))||Mo(t,e,n)}var at=2;function Cf(t){let e=process.env.STX_BUNDLE_CACHE_DIR?.trim();return e?p.resolve(e):c(t,"bundle-cache")}function nt(t,e){let n=t;for(let i of wt(e))if(i!==p.sep)n=n.split(i).join("\x00root");return n}var st=new Map;function wt(t){let e=p.resolve(t),n=st.get(e);if(!n){let i=e;try{i=B.realpathSync(e)}catch{}n=[...new Set([e,i])].sort((l,d)=>d.length-l.length),st.set(e,n)}return n}function bt(t,e){try{let n=B.statSync(t),i=p.resolve(e),l=t.startsWith(`${i}${p.sep}`);return{path:l?p.relative(i,t):t,...l?{inRoot:!0}:{},mtimeMs:n.mtimeMs,size:n.size,hash:Bun.hash(B.readFileSync(t)).toString(36)}}catch{return null}}function ct(t,e){return t.inRoot?p.join(p.resolve(e),t.path):t.path}function St(t,e){for(let n of t){let i=ct(n,e);try{let l=B.statSync(i);if(l.size!==n.size)return!1;if(l.mtimeMs!==n.mtimeMs&&Bun.hash(B.readFileSync(i)).toString(36)!==n.hash)return!1}catch{return!1}}return!0}var lt=new Map,vt=100;function Ef(t=process.env){let e=Number(t.STX_BUNDLE_CACHE_LIMIT);return Number.isFinite(e)&&e>=1?Math.floor(e):2000}var H=new Map;async function jt(t){let e=H.get(t)??0;if(e>0&&e<vt){H.set(t,e+1);return}H.set(t,1);try{let n=(await B.promises.readdir(t)).filter((o)=>o.endsWith(".js")),i=Ef();if(n.length<=i)return;let d=(await Promise.all(n.map(async(o)=>{try{return{name:o,at:(await B.promises.stat(p.join(t,o))).mtimeMs}}catch{return null}}))).filter((o)=>o!==null);d.sort((o,b)=>b.at-o.at);for(let o of d.slice(i)){let b=o.name.slice(0,-3);await B.promises.rm(p.join(t,`${b}.js`),{force:!0}),await B.promises.rm(p.join(t,`${b}.deps.json`),{force:!0})}A("pruned bundle cache to",i,"entries")}catch{}}function ye(t){return lt.get(t)??[]}function Z(t,e){if(t)lt.set(t,e)}function Tf(t=process.env){return t.STX_DEBUG==="true"||t.STX_DEBUG==="1"}function A(...t){if(Tf())console.log("[stx:bundler]",...t)}var K=[];function oc(t,e,n){K.push({filePath:t||"<inline>",message:e,details:n})}function tn(){return K.slice()}function nn(){K.length=0}var Q;function Rh(t){Q=t}function ic(){if(Q)return Q;try{let t=O.strict;return typeof t==="object"&&t!==null?t.bundlerFallback??"warn":"warn"}catch{return"warn"}}var Y=[/^stx$/,/^@stacksjs\/stx$/,/^@stores$/,/^stx\/stores$/,/^@composables$/];function rn(t){let e=/^[ \t]*import[ \t]+(?!type(?:[ \t]|{))[\s\S]*?\s+from\s+['"]([^'"]+)['"][ \t]*;?/gm,n;while((n=e.exec(t))!==null){let l=n[1];if(!Y.some((o)=>o.test(l)))return A("detected user import:",l),!0}let i=/^[ \t]*import[ \t]*['"]([^'"]+)['"]/gm;while((n=i.exec(t))!==null){let l=n[1];if(/\.css(?:\?.*)?$/.test(l))continue;if(!Y.some((o)=>o.test(l)))return A("detected side-effect import:",l),!0}return!1}var nr="stx-module:",Bt=/\.(?:[cm]?[jt]sx?|json)$/i;function $f(t,e){return p.relative(t,e).split(p.sep).join("/")}function Rf(t,e){if(e.size===0)return t;return t.replace(/^([ \t]*import(?:(?:\s+|(?=[{*]))[^;"']*?\s*from\s*|\s*))(["'])([^"']+)\2/gm,(n,i,l,d)=>{let o=e.get(d);return o&&!d.startsWith(nr)?`${i}${l}${o}${l}`:n})}function Af(t,e){let n=0,i=(d)=>{let o=`__stxMod${n++}`,b=JSON.stringify(d);return e.push(`var ${o} = globalThis.__stxModules && globalThis.__stxModules[${b}];`,`if (${o} === undefined) throw new Error("[stx] module " + ${JSON.stringify(b)} + " is not registered on this page (#1957)");`),o},l=(d,o)=>{for(let b of d.split(",")){let I=b.trim();if(!I)continue;let M=I.match(/^("(?:[^"\\]|\\.)*"|[\w$]+)(?:\s+as\s+([\w$]+))?$/);if(!M)continue;let S=M[1].startsWith('"')?JSON.parse(M[1]):M[1],f=M[2]??S;e.push(`var ${f} = ${o}[${JSON.stringify(S)}];`)}};return t=t.replace(/^[ \t]*import(?:\s+|(?=[{*]))([^;"']+?)\s*from\s*["'](stx-module:[^"']+)["'];?[ \t]*$/gm,(d,o,b)=>{let I=b.slice(nr.length),M=i(I),S=o.trim(),f=S.match(/^([\w$]+)\s*(?:,\s*|$)/);if(f&&!S.startsWith("{")&&!S.startsWith("*"))e.push(`var ${f[1]} = ${M}.default;`),S=S.slice(f[0].length).trim();let v=S.match(/^\*\s*as\s+([\w$]+)$/);if(v)e.push(`var ${v[1]} = ${M};`);else if(S.startsWith("{"))l(S.replace(/^\{|\}$/g,""),M);return""}),t=t.replace(/^[ \t]*import\s*["'](stx-module:[^"']+)["'];?[ \t]*$/gm,(d,o)=>(i(o.slice(nr.length)),"")),t}function it(t){let e=[t,`${t}.ts`,`${t}.tsx`,`${t}.js`,`${t}.mjs`,`${t}.jsx`,p.join(t,"index.ts"),p.join(t,"index.tsx"),p.join(t,"index.js"),p.join(t,"index.mjs")];for(let n of e)try{if(B.existsSync(n)&&B.statSync(n,{throwIfNoEntry:!1})?.isFile())return n}catch{}return}var G=new xt;function as(t,e){let n=new Bun.CryptoHasher("md5");for(let[i,l]of[...t].sort(([d],[o])=>d<o?-1:d>o?1:0))n.update(`${i}\x00${l}\x00`);return G.run({modules:t,key:n.digest("hex").slice(0,12)},e)}function sn(){return G.getStore()?.key??""}function ut(t,e,n,i,l,d,o=new Map,b,I,M){let S=new Map([[n,i],...M??[]]),f=(j)=>j!==void 0&&S.has(j),v=(j,r,u)=>{if(X(r,t,b))return null;if(!d||!f(j)||!Bt.test(r))return null;try{if(!B.statSync(r,{throwIfNoEntry:!1})?.isFile())return null}catch{return null}l.add(r);let E=`${nr}${$f(process.cwd(),r)}`;return o.set(u,E),{path:E,external:!0}},y=(j,r)=>{let u=f(j)?e:p.dirname(j),E=p.resolve(u,r);return it(E)??E};return{name:"stx-client-bundle",setup(j){if(j.onResolve({filter:/^(stx|@stacksjs\/stx)$/},(r)=>({path:r.path,external:!0})),j.onResolve({filter:/^(@stores|@composables|stx\/stores)$/},(r)=>({path:r.path,external:!0})),j.onResolve({filter:/^\//},(r)=>{if(f(r.path))return{path:r.path};let u=it(r.path);if(u){let E=v(r.importer,u,r.path);if(E)return E;if(!f(u))l.add(u);return{path:u}}return{path:r.path,external:!0}}),j.onResolve({filter:/^\.\.?\//},(r)=>{let u=y(r.importer,r.path),E=v(r.importer,u,r.path);if(E)return E;return l.add(u),{path:u}}),j.onResolve({filter:/^[@~]\//},(r)=>{let u=p.resolve(t,r.path.slice(2)),E=[u,`${u}.ts`,`${u}.tsx`,`${u}.js`,`${u}.mjs`,`${u}.jsx`,p.join(u,"index.ts"),p.join(u,"index.tsx"),p.join(u,"index.js"),p.join(u,"index.mjs")];for(let h of E)if(B.existsSync(h)&&B.statSync(h,{throwIfNoEntry:!1})?.isFile()){let D=v(r.importer,h,r.path);if(D)return D;return A(`resolved ${r.path[0]}/ import:`,r.path,"\u2192",h),l.add(h),{path:h}}return console.warn(`[stx:bundler] could not resolve ${r.path[0]}/ import:`,r.path),{path:u}}),d)j.onResolve({filter:/^(?!node:|bun:)(?:@[\w.-]+\/)?[\w.-]/},(r)=>{if(!f(r.importer))return;let u=`${nr}npm:${r.path}`;return o.set(r.path,u),{path:u,external:!0}});j.onLoad({filter:/\.(?:[cm]?[jt]sx?|json)$/},(r)=>{if(S.has(r.path))return{contents:S.get(r.path),loader:"ts"};if(X(r.path,t,b))throw Error(`Server-only API source cannot be imported by a client script: ${r.path}`);let u=p.extname(r.path).toLowerCase(),E=u===".json"?"json":u===".tsx"?"tsx":u===".jsx"?"jsx":u===".ts"||u===".mts"||u===".cts"?"ts":"js";if(!f(r.path))l.add(r.path);let h=I?.get(r.path);if(h!==void 0)return{contents:h,loader:"js"};return{contents:B.readFileSync(r.path,"utf8"),loader:E}})}}}var q=new Map,P=w(64),ot=Symbol.for("stx.client-bundle-build-queue");function Pf(t){let e=globalThis,i=(e[ot]??Promise.resolve()).then(t,t);return e[ot]=i.then(()=>{return},()=>{return}),i}async function on(t,e,n={}){let i=n.projectRoot||process.cwd(),l=(await a(i)).serverApi,d=n.minify??!1,o=n.externalizeUserModules??!0,b=n.expose?.length?[...new Set(n.expose)].sort():void 0,I=n.cacheDir||Cf(i),M=G.getStore(),S=new Bun.CryptoHasher("md5");S.update(`${$t}\x00${rt()}\x00${JSON.stringify(l??!1)}\x00${o?"registry":"inline"}\x00${b?b.join(","):"*"}\x00${d?"minified":"readable"}\x00${M?.key??""}\x00${nt(t,i)}\x00${nt(e,i)}`);let f=S.digest("hex").slice(0,12),v=p.join(I,`${f}.js`),y=P.get(v);if(y){if(Bs(y.files)&&y.files.every((h)=>!X(h.path,i,l))){A("memo hit:",f);let h=y.files.map((D)=>D.path);return Z(e,h),n.collectInputs?.push(...h),y.code}P.delete(v),A("memo invalidated by dep change:",f)}let j=p.join(I,`${f}.deps.json`),r=Bun.file(v);if(await r.exists()){let h=Bun.file(j),D=!1,k=null;if(await h.exists())try{let N=JSON.parse(await h.text());if(N.metadataVersion===at&&Array.isArray(N.files)&&St(N.files,i))k=xr(N.files.map((g)=>ct(g,i))),D=k.length===N.files.length&&!k.some((g)=>X(g.path,i,l))}catch{D=!1}if(D){if(A("cache hit:",f),k)Z(e,k.map((U)=>U.path)),n.collectInputs?.push(...k.map((U)=>U.path));let N=await r.text(),g=new Date;if(B.promises.utimes(v,g,g).catch(()=>{}),k)P.set(v,{code:N,files:k});return N}A("cache invalidated by dep change:",f)}let u=q.get(f);if(u){let h=await u;if(n.collectInputs)n.collectInputs.push(...(P.get(v)?.files??[]).map((D)=>D.path));return h}let E=Pf(()=>Et(t,e,{projectRoot:i,minify:d,cacheDir:I,hash:f,cachePath:v,depsPath:j,collectInputs:n.collectInputs,externalizeUserModules:o,serverApi:l,expose:b,throwOnFailure:n.throwOnFailure,substitutes:M?.modules}));q.set(f,E);try{return await E}finally{q.delete(f)}}function ac(t){return`${t}-${process.pid}-${yt()}`}async function Ah(t,e){let{projectRoot:n}=e,i=ac(new Bun.CryptoHasher("md5").update([...t.keys()].join("\x00")).digest("hex").slice(0,12)),l=p.join(c(n,"bundle-tmp"),"out",i);B.mkdirSync(l,{recursive:!0});let d=new Map,o=new Map,b=0;for(let[f,v]of t){let y=p.join(n,`.stx-split-${i}-${b++}.ts`);d.set(y,v),o.set(p.basename(y).replace(/\.ts$/,""),f)}let[I,M]=[...d][0],S=new Set;try{let f=await Bun.build({entrypoints:[...d.keys()],outdir:l,target:"browser",format:"esm",splitting:!0,minify:!1,naming:{entry:"[name].js",chunk:"chunk-[hash].js"},plugins:[ut(n,p.dirname(e.filePath),I,M,S,!1,new Map,void 0,G.getStore()?.modules,d)],define:{"process.env.NODE_ENV":'"development"',...C()},root:n});if(!f.success)throw Error(f.logs.filter((y)=>y.level==="error").map((y)=>y.message).join(", ")||"Unable to bundle the entries");let v={entries:new Map,chunks:new Map};for(let y of f.outputs){let j=p.basename(y.path);if(y.kind==="entry-point"){let r=o.get(j.replace(/\.js$/,""));if(r!==void 0)v.entries.set(r,await y.text())}else if(y.kind==="chunk")v.chunks.set(j.replace(/\.js$/,""),await y.text())}return e.collectInputs?.push(...S),v}finally{try{B.rmSync(l,{recursive:!0,force:!0})}catch{}}}async function Et(t,e,n){let{projectRoot:i,minify:l,cacheDir:d,hash:o,cachePath:b,depsPath:I,externalizeUserModules:M}=n,S=c(i,"bundle-tmp"),f=ac(o),v=p.join(i,`.stx-client-${f}.ts`),y=p.join(S,"out",f);B.mkdirSync(y,{recursive:!0});let j=p.dirname(e),r=new Set,u=/^[ \t]*(export\s+)?(?:const|let|var)\s+(?:\{([^}]+)\}|(\w+))/gm,E=/^[ \t]*(export\s+)?(?:async\s+)?function\s+(\w+)/gm,h=s(t),{depths:D,balanced:k}=me(h),N=(R)=>!k||D[R]===0,g;while((g=u.exec(h))!==null){if(g[1])continue;if(!N(g.index))continue;if(g[2])g[2].split(",").forEach((R)=>{let m=_t(R);if(m)r.add(m)});else if(g[3])r.add(g[3])}while((g=E.exec(h))!==null){if(g[1])continue;if(!N(g.index))continue;r.add(g[2])}let U=/^[ \t]*import[ \t]+(?!type\b)(?:(\w+)\s*(?:,\s*)?)?(?:\*\s+as\s+(\w+)|\{([^}]+)\})?\s+from\b/gm;while((g=U.exec(h))!==null){if(!N(g.index))continue;let R=/^\s*['"]([^'"]+)['"]/.exec(t.slice(g.index+g[0].length))?.[1];if(R&&Y.some((m)=>m.test(R)))continue;if(g[1])r.add(g[1]);if(g[2])r.add(g[2]);for(let m of(g[3]??"").split(",")){let _=m.trim();if(!_||/^type\s/.test(_))continue;let L=/\bas\s+(\w+)\s*$/.exec(_)?.[1]??/^\w+$/.exec(_)?.[0];if(L)r.add(L)}}for(let R of h.matchAll(/\bexport\s*\{([^}]+)\}/g))for(let m of R[1].split(",")){let _=/\bas\s+(\w+)\s*$/.exec(m)?.[1]??/^\s*(\w+)\s*$/.exec(m)?.[1];if(_)r.delete(_)}let pt=r.size>0?`
3
+ export { ${[...r].join(", ")} }`:"";A("bundling:",o,"from:",p.basename(e));let tt=new Set,et=new Map;try{let R=await Bun.build({entrypoints:[v],outdir:y,target:"browser",format:"esm",minify:l?{whitespace:!1,identifiers:!0,syntax:!0}:!1,plugins:[ut(i,j,v,t+pt,tt,M,et,n.serverApi,n.substitutes)],define:{"process.env.NODE_ENV":l?'"production"':'"development"',...C()},root:i});if(!R.success){let F=R.logs.filter((T)=>T.level==="error").map((T)=>T.message).join(", ")||`Unable to bundle ${p.basename(e)}`,z=rr(R.logs,e||void 0);if(console.warn("[stx:bundler] build failed:",F),oc(e||"",F,z),n.throwOnFailure||ic()==="error")throw Error(F);return t}let m="";for(let x of R.outputs){m=await x.text();break}let _=[];for(let x of m.matchAll(/^\s*export\s*\{([^}]*)\}\s*;?\s*$/gm))for(let F of x[1].split(",")){let z=F.trim().match(/^([A-Za-z_$][\w$]*)\s+as\s+([A-Za-z_$][\w$]*)$/);if(z){_.push([z[2],z[1]]);continue}let T=F.trim();if(/^[A-Za-z_$][\w$]*$/.test(T))_.push([T,T])}if(n.expose){let x=new Set(n.expose);for(let F=_.length-1;F>=0;F--)if(!x.has(_[F][0]))_.splice(F,1)}let L=[];m=Af(Rf(m,et),L);let dt=m.match(/^\s*import(?:\s+|(?=["'{*]))[^;]+;?\s*$/gm)||[];if(m=m.replace(/^\s*import(?:\s+|(?=["'{*]))[^;]+;?\s*$/gm,"").replace(/^\s*export\s*\{[^}]*\}\s*;?\s*$/gm,"").replace(/^\s*export\s+default\s+.*$/gm,"").trim(),l&&m)try{m=new Bun.Transpiler({loader:"js",minifyWhitespace:!0}).transformSync(m)}catch{}let J=`__stxBundle_${o}`,ft=new Set(V(t,!0).split(",").map((x)=>x.trim())),mt=_.map(([x,F])=>`get ${JSON.stringify(x)}() { return ${F} }${ft.has(x)?`, set ${JSON.stringify(x)}(__stxValue_${F}) { ${F} = __stxValue_${F} }`:""}`).join(", "),gt=_.map(([x])=>`var ${x} = undefined;`).join(`
4
4
  `),ht=_.map(([x])=>`${x} = ${J}[${JSON.stringify(x)}];`).join(`
5
5
  `);if(m=`${dt.join(`
6
6
  `)}
@@ -16,5 +16,5 @@ var __stxLiveBindings = typeof __stxLiveBindings === 'undefined' ? {} : __stxLiv
16
16
  Object.keys(${J}).forEach(function(name) {
17
17
  if (!Object.prototype.hasOwnProperty.call(__stxLiveBindings, name))
18
18
  Object.defineProperty(__stxLiveBindings, name, Object.getOwnPropertyDescriptor(${J}, name));
19
- });`.trim(),A("bundled:",o,"output:",m.length,"bytes"),r.size>0&&_.length===0)return console.warn(`[stx:bundler] dropped every binding for ${p.basename(e)} (${o}); serving the unbundled source and not caching this result`),t;B.mkdirSync(d,{recursive:!0}),await Bun.write(b,m);let W=vr(tt);return await Bun.write(I,JSON.stringify({metadataVersion:at,files:W.map((x)=>bt(x.path,i)).filter((x)=>x!==null)})),Z(e,W.map((x)=>x.path)),n.collectInputs?.push(...W.map((x)=>x.path)),P.set(b,{code:m,files:W}),await jt(d),m}catch(R){let m=rr(R,e||void 0),_=Re(R,e||void 0);if(console.warn(`[stx:bundler] error: ${_}`),sc(e||"",_,m),n.throwOnFailure||oc()==="error")throw R;return t}finally{try{B.rmSync(y,{recursive:!0,force:!0})}catch{}}}function _t(t){let e=t.trim();if(!e)return null;let n=e.indexOf("=");if(n!==-1)e=e.slice(0,n).trim();let i=e.indexOf(":");if(i!==-1)e=e.slice(i+1).trim();if(e.startsWith("..."))e=e.slice(3).trim();return/^[A-Za-z_$][\w$]*$/.test(e)?e:null}
20
- export{_f,Cf,ye,Ef,sc,tn,nn,$h,oc,rn,nr,Tf,$f,Rf,is,sn,Af,on,ic,Rh};
19
+ });`.trim(),A("bundled:",o,"output:",m.length,"bytes"),r.size>0&&_.length===0)return console.warn(`[stx:bundler] dropped every binding for ${p.basename(e)} (${o}); serving the unbundled source and not caching this result`),t;B.mkdirSync(d,{recursive:!0}),await Bun.write(b,m);let W=xr(tt);return await Bun.write(I,JSON.stringify({metadataVersion:at,files:W.map((x)=>bt(x.path,i)).filter((x)=>x!==null)})),Z(e,W.map((x)=>x.path)),n.collectInputs?.push(...W.map((x)=>x.path)),P.set(b,{code:m,files:W}),await jt(d),m}catch(R){let m=rr(R,e||void 0),_=Re(R,e||void 0);if(console.warn(`[stx:bundler] error: ${_}`),oc(e||"",_,m),n.throwOnFailure||ic()==="error")throw R;return t}finally{try{B.rmSync(y,{recursive:!0,force:!0})}catch{}}}function _t(t){let e=t.trim();if(!e)return null;let n=e.indexOf("=");if(n!==-1)e=e.slice(0,n).trim();let i=e.indexOf(":");if(i!==-1)e=e.slice(i+1).trim();if(e.startsWith("..."))e=e.slice(3).trim();return/^[A-Za-z_$][\w$]*$/.test(e)?e:null}
20
+ export{Cf,Ef,ye,Tf,oc,tn,nn,Rh,ic,rn,nr,$f,Rf,Af,as,sn,Pf,on,ac,Ah};
@@ -1,7 +1,7 @@
1
1
  // @bun
2
- import x from"fs";import u from"path";import p from"fs";import w from"path";var y=["components","layouts","partials","emails"];function M(e){return e.split(/[\\/]/).filter(Boolean).slice(0,-1).some((a)=>y.includes(a))}function b(e){return M(e.replace(/^\//,""))}function oi(e,t){let a=e.filter((i)=>!b(i.pattern)),r=["// Auto-generated by STX - do not edit"];if(a.length===0)r.push("// No page routes found \u2014 route paths stay typed as string.","export {}","");else{r.push("declare module '@stacksjs/stx' {"," interface KnownRoutes {");for(let i of a){let c=[];for(let l of i.params){let d=i.pattern.includes(`:${l}?`)?"?":"";c.push(`${l}${d}: string`)}let s=c.join("; ");r.push(` '${i.pattern}': { ${s} }`)}r.push(" }","}","","export {}","")}let n=r.join(`
3
- `),o=w.join(t,"route-types.d.ts");try{if(p.existsSync(o)&&p.readFileSync(o,"utf8")===n)return;p.mkdirSync(t,{recursive:!0}),p.writeFileSync(o,n)}catch{}}function ii(e,t,a){let r=process.cwd(),n=w.relative(r,a),o=e.filter((c)=>!b(c.pattern)),i=["// Auto-generated by stx \u2014 do not edit",`// Source: ${n||"pages"}/`,"","export const routes = ["];for(let c of o){let s=w.relative(r,c.filePath).replace(/\\/g,"/"),l=JSON.stringify(c.params),d=c.layout?`, layout: '${w.relative(r,c.layout).replace(/\\/g,"/")}'`:"";i.push(` { pattern: '${c.pattern}', filePath: '${s}', isDynamic: ${c.isDynamic}, params: ${l}${d} },`)}i.push("] as const",""),i.push("export type RouteName = typeof routes[number]['pattern']",""),p.mkdirSync(t,{recursive:!0}),p.writeFileSync(w.join(t,"routes.ts"),i.join(`
4
- `))}import I from"path";var N=Object.freeze(["ico","png","jpg","jpeg","gif","webp","avif","svg","bmp","tif","tiff","heic","css","js","mjs","cjs","map","wasm","webmanifest","json","xml","txt","rss","atom","woff","woff2","ttf","otf","eot","mp3","mp4","m4a","m4v","mov","webm","ogg","ogv","oga","wav","flac","avi","mkv","pdf","csv","doc","docx","xls","xlsx","ppt","pptx","rtf","odt","zip","gz","tgz","tar","rar","7z","bz2","xz","php","phtml","asp","aspx","jsp","cgi","env","ini","yml","yaml","toml","sql","bak","old","swp","log","conf","cfg","exe","dmg","pkg","apk","ipa","msi","iso","bin","dll"]),D=N.flatMap((e)=>e===e.toUpperCase()?[e]:[e,e.toUpperCase()]).join("|"),G=new RegExp(`\\.(?:${D})$`),E=`(?![^/]*\\.(?:${D})$)`;function kt(e){let t=e,a=t.search(/[?#]/);if(a!==-1)t=t.slice(0,a);let r=t.slice(t.lastIndexOf("/")+1);return r.length>0&&G.test(r)}function R(e,t){let r=I.relative(t,e).replace(/\.(stx|md)$/,"");if(r=r.split(I.sep).join("/"),r==="index")return"/";if(r.endsWith("/index"))r=r.slice(0,-6);return r=r.replace(/\[\[([^\]]+)\]\]/g,":$1?"),r=r.replace(/\[([^\]]+)\]/g,":$1"),r=r.replace(/:\.\.\.([^/]+)/g,":$1*"),`/${r}`}function de(e,t={}){let a=t.page?E:"",r=[],n="",o=0;while(o<e.length){let i=e.slice(o),c=/^\/:([^/?*]+)\?/.exec(i);if(c){r.push(c[1]);let d=o+c[0].length===e.length;n+=`(?:/${d?a:""}([^/]+))?`,o+=c[0].length;continue}let s=/^:([^/?*]+)\*/.exec(i);if(s){r.push(s[1]),n+="(.+)",o+=s[0].length;continue}let l=/^:([^/?*]+)/.exec(i);if(l){r.push(l[1]);let d=o+l[0].length===e.length;n+=`${d?a:""}([^/]+)`,o+=l[0].length;continue}n+=e[o].replace(/[.+^${}()|[\]\\*?]/g,"\\$&"),o+=1}return{regex:new RegExp(`^${n}$`),params:r}}function gr(e,t){let a=e===""?"/":e;for(let r of t){let n=a.match(r.regex);if(n){let o={};return r.params.forEach((i,c)=>{o[i]=n[c+1]}),{route:r,params:o}}}return null}function Rs(e,t={}){let a=e.replace(/\[\[([^\]]+)\]\]/g,":$1?").replace(/\[([^\]]+)\]/g,":$1").replace(/:\.\.\.([^/]+)/g,":$1*");return de(a,t)}import j from"fs";import L from"path";function _(e,t){let a=[],r=L.dirname(e);while(r.startsWith(t)||r===t){let n=L.join(r,"_layout.stx");if(j.existsSync(n))a.unshift(n);if(r===t)break;r=L.dirname(r)}return a}function B(e,t){let a=[];if(!x.existsSync(e))return a;let r=x.readdirSync(e,{withFileTypes:!0});for(let n of r){let o=u.join(e,n.name);if(n.isDirectory()){if(n.name.startsWith("."))continue;if(y.includes(n.name))continue;a.push(...B(o,t))}else if(n.isFile()){let i=u.extname(n.name);if(t.includes(i)){if(n.name.startsWith("_")&&n.name!=="_layout.stx")continue;if(n.name==="_layout.stx")continue;a.push(o)}}}return a}class mr{routes;pagesDir;pagesDirs;config;constructor(e,t={}){this.config=t;let a=t.pagesDirs&&t.pagesDirs.length>0?t.pagesDirs:[t.pagesDir||"pages"];this.pagesDirs=a.map((s)=>u.resolve(e,s)),this.pagesDir=this.pagesDirs[0];let r=t.extensions||[".stx"],n=(s)=>{let l=u.resolve(e,s);try{return x.realpathSync(l)}catch{return l}},o=(t.exclude??[]).filter((s)=>typeof s==="string"&&s.trim()!=="").map(n),i=(s)=>{if(o.length===0)return!1;let l=n(s);return o.some((d)=>l===d||l.startsWith(`${d}${u.sep}`))},c=new Set;this.routes=[];for(let s of this.pagesDirs){let l=B(s,r).filter((h)=>!i(h)),d=new Map;for(let h of l){let g=R(h,s),m=t.pagesDirs?g.replace(/:[\w]+/g,":param"):g;if(t.pagesDirs&&d.has(m))throw Error(`Conflicting layer pages for ${g}: ${d.get(m)} and ${h}`);if(d.set(m,h),c.has(m))continue;c.add(m);let{regex:X,params:P}=de(g,{page:!0}),C=t.layouts!==!1?_(h,s):[];this.routes.push({pattern:g,regex:X,params:P,filePath:h,isDynamic:P.length>0,layout:C.length>0?C[C.length-1]:void 0})}}if(this.routes.sort((s,l)=>{if(!s.isDynamic&&l.isDynamic)return-1;if(s.isDynamic&&!l.isDynamic)return 1;let d=s.pattern.split("/").length,h=l.pattern.split("/").length;if(d!==h)return h-d;return s.pattern.localeCompare(l.pattern)}),t.emit!==!1){let s=u.resolve(e,t.stateDir||process.env.STX_DIR?.trim()||".stx");oi(this.routes,s),ii(this.routes,s,this.pagesDir)}}match(e){let t=e===""?"/":e;for(let a of this.routes){let r=t.match(a.regex);if(r){let n={};return a.params.forEach((o,i)=>{n[o]=r[i+1]}),{route:a,params:n}}}return null}resolve(e,t){let a=this.routes.find((n)=>n.pattern===e||n.filePath.includes(e));if(!a)return"#not-found";let r=a.pattern;if(t)for(let[n,o]of Object.entries(t))r=r.replace(`:${n}`,encodeURIComponent(o));return r}addRoute(e){this.routes.push(e),this.routes.sort((t,a)=>{if(!t.isDynamic&&a.isDynamic)return-1;if(t.isDynamic&&!a.isDynamic)return 1;return t.pattern.localeCompare(a.pattern)})}getLayout(e){return e.layout??null}}function As(e,t){let a=[`${t}.stx`,"error.stx"];for(let r of a){let n=u.join(e,r);if(x.existsSync(n))return n}return null}function Ps(e,t){return e.map((a)=>{let r=u.relative(t,a.filePath),n=a.isDynamic?" (dynamic)":"";return`${a.pattern} \u2192 ${r}${n}`})}var f={},k="";function Kf(e){k=e.replace(/\/$/,"")}function Xf(e,t,a={}){f[e]={path:t,name:e,params:a}}function Gf(e){for(let[t,a]of Object.entries(e))if(typeof a==="string")f[t]={path:a,name:t};else f[t]={...a,name:t}}function hr(e,t={},a=!1){let r=f[e];if(!r)return console.warn(`Route [${e}] not defined.`),"#undefined-route";let n={...r.params,...t},o=r.path;o=o.replace(/:(\w+)/g,(c,s)=>{let l=n[s];if(l===void 0)return console.warn(`Missing parameter [${s}] for route [${e}].`),`:${s}`;return delete n[s],encodeURIComponent(String(l))});let i=Object.entries(n);if(i.length>0){let c=i.map(([s,l])=>`${encodeURIComponent(s)}=${encodeURIComponent(String(l))}`).join("&");o+=(o.includes("?")?"&":"?")+c}return a&&k?`${k}${o}`:o}function Jf(){for(let e of Object.keys(f))delete f[e];k=""}import F from"fs";import q from"path";function Yf(e,t={}){return{type:"redirect",path:e,options:{replace:t.replace??!1,external:t.external??!1,redirectCode:t.redirectCode??302}}}function Zf(e){return{type:"abort",error:typeof e==="string"?{statusCode:500,message:e}:e}}function Qf(e,t={}){return{handler:e,mode:t.mode??"universal"}}function O(e){let t={};if(!e)return t;let a=e.split(";");for(let r of a){let[n,...o]=r.split("=");if(n){let i=n.trim(),c=o.join("=").trim();if(i)t[i]=decodeURIComponent(c)}}return t}function S(e,t,a={}){let r=`${encodeURIComponent(e)}=${encodeURIComponent(t)}`;if(a.expires){let n=typeof a.expires==="number"?new Date(Date.now()+a.expires*1000):a.expires;r+=`; Expires=${n.toUTCString()}`}if(a.path)r+=`; Path=${a.path}`;if(a.domain)r+=`; Domain=${a.domain}`;if(a.secure)r+="; Secure";if(a.httpOnly)r+="; HttpOnly";if(a.sameSite)r+=`; SameSite=${a.sameSite}`;return r}function Tc(e,t){let a=e.headers.get("cookie")||"",r=O(a);return{get(n){return r[n]},set(n,o,i={}){r[n]=o,t.append("Set-Cookie",S(n,o,i))},delete(n){delete r[n],t.append("Set-Cookie",S(n,"",{expires:new Date(0),path:"/"}))},getAll(){return{...r}}}}function $c(){return{get(e){if(typeof document>"u")return;return O(document.cookie)[e]},set(e,t,a={}){if(typeof document>"u")return;document.cookie=S(e,t,a)},delete(e){if(typeof document>"u")return;document.cookie=S(e,"",{expires:new Date(0),path:"/"})},getAll(){if(typeof document>"u")return{};return O(document.cookie)}}}function Rc(){let e=typeof window<"u"&&typeof window.localStorage<"u";return{get(t){if(!e)return null;try{return window.localStorage.getItem(t)}catch{return null}},set(t,a){if(!e)return;try{window.localStorage.setItem(t,a)}catch{}},remove(t){if(!e)return;try{window.localStorage.removeItem(t)}catch{}},isAvailable(){return e}}}var v=new Map;function ai(e,t){v.set(e,t)}function Ac(e){return v.get(e)}function eg(e){return v.has(e)}function _t(){v.clear()}function Ct(){return Array.from(v.keys())}async function Et(e,t="middleware"){let a=q.resolve(e,t);if(!F.existsSync(a))return;let r=F.readdirSync(a);for(let n of r){if(!n.endsWith(".ts")&&!n.endsWith(".js"))continue;if(n.includes(".test.")||n.includes(".spec."))continue;let o=n.replace(/\.(ts|js)$/,""),i=q.join(a,n);try{let s=(await import(i)).default;if(s&&typeof s.handler==="function")ai(o,s);else if(typeof s==="function")ai(o,{handler:s,mode:"universal"})}catch(c){console.warn(`Failed to load middleware '${o}' from ${i}:`,c)}}}function K(e){let t={};if(!e)return t;let a=new URLSearchParams(e);for(let[r,n]of a)t[r]=n;return t}function Tt(e,t,a,r=""){return{path:e,params:t,query:K(r),fullPath:r?`${e}?${r}`:e,meta:a}}function $t(e,t,a,r){let n=r?.isServer??typeof window>"u",o=!n,i=new Headers;return{to:e,from:t,isClient:o,isServer:n,cookies:n&&a?Tc(a,i):$c(),storage:Rc(),state:{},request:a,responseHeaders:i}}async function Rt(e,t){let a=Array.isArray(e)?e:[e],r=t.isServer;for(let n of a){let o=Ac(n);if(!o)return console.error(`Route middleware '${n}' is not registered \u2014 failing the guard closed.`),{passed:!1,abort:{type:"abort",error:{statusCode:500,message:`Route middleware '${n}' is not registered`}},state:t.state,responseHeaders:t.responseHeaders};if(o.mode==="server"&&!r)continue;try{let i=await o.handler(t);if(i){if(i.type==="redirect")return{passed:!1,redirect:i,state:t.state,responseHeaders:t.responseHeaders};if(i.type==="abort")return{passed:!1,abort:i,state:t.state,responseHeaders:t.responseHeaders}}}catch(i){return console.error(`Error in middleware '${n}':`,i),{passed:!1,abort:{type:"abort",error:{statusCode:500,message:i instanceof Error?i.message:"Middleware error"}},state:t.state,responseHeaders:t.responseHeaders}}}return{passed:!0,state:t.state,responseHeaders:t.responseHeaders}}function Is(e){let a=e.replace(/\\/g,"/").split("/").filter(Boolean),r=a.lastIndexOf("layouts"),n=r>=0?a[r+1]:a.at(-1);if(!n)return"app";return n.replace(/\.stx$/i,"")||"app"}function tt(e){let t=e.match(/<meta\b[^>]*name=["']stx-layout["'][^>]*content=["']([^"']+)["'][^>]*>/i),a=e.match(/<meta\b[^>]*name=["']stx-layout-group["'][^>]*content=["']([^"']+)["'][^>]*>/i),r=e.match(/<!--\s*stx-layout:\s*([^ ]+)\s*-->/i),n=t?.[1]||r?.[1]||"";return{layout:n,group:a?.[1]||Is(n)}}var A,T;function W(e){let t=[],a="log(",r=0;while(r<e.length){let n=e.indexOf("log(",r);if(n===-1){t.push(e.slice(r));break}let o=n>0?e[n-1]:" ",i=/\bfunction\s+$/.test(e.slice(Math.max(0,n-16),n));if(/[\w$.]/.test(o)||i){t.push(e.slice(r,n+4)),r=n+4;continue}t.push(e.slice(r,n));let c=1,s=n+4;while(s<e.length&&c>0){let l=e[s];if(l==='"'||l==="'"||l==="`"){let d=l;s++;while(s<e.length&&e[s]!==d){if(e[s]==="\\")s++;s++}s++;continue}if(l==="(")c++;else if(l===")")c--;s++}t.push("0"),r=s}return t.join("")}function U(e,t=!1){try{return new Bun.Transpiler(t?{loader:"js",minify:{whitespace:!0,identifiers:!0}}:{loader:"js",minifyWhitespace:!0}).transformSync(e).replace(/\}(var |let |const |function )/g,"};$1").trim()}catch{return e}}function H(){return`
2
+ import x from"fs";import u from"path";import p from"fs";import w from"path";var y=["components","layouts","partials","emails"];function M(e){return e.split(/[\\/]/).filter(Boolean).slice(0,-1).some((a)=>y.includes(a))}function b(e){return M(e.replace(/^\//,""))}function ii(e,t){let a=e.filter((i)=>!b(i.pattern)),r=["// Auto-generated by STX - do not edit"];if(a.length===0)r.push("// No page routes found \u2014 route paths stay typed as string.","export {}","");else{r.push("declare module '@stacksjs/stx' {"," interface KnownRoutes {");for(let i of a){let c=[];for(let l of i.params){let d=i.pattern.includes(`:${l}?`)?"?":"";c.push(`${l}${d}: string`)}let s=c.join("; ");r.push(` '${i.pattern}': { ${s} }`)}r.push(" }","}","","export {}","")}let n=r.join(`
3
+ `),o=w.join(t,"route-types.d.ts");try{if(p.existsSync(o)&&p.readFileSync(o,"utf8")===n)return;p.mkdirSync(t,{recursive:!0}),p.writeFileSync(o,n)}catch{}}function ai(e,t,a){let r=process.cwd(),n=w.relative(r,a),o=e.filter((c)=>!b(c.pattern)),i=["// Auto-generated by stx \u2014 do not edit",`// Source: ${n||"pages"}/`,"","export const routes = ["];for(let c of o){let s=w.relative(r,c.filePath).replace(/\\/g,"/"),l=JSON.stringify(c.params),d=c.layout?`, layout: '${w.relative(r,c.layout).replace(/\\/g,"/")}'`:"";i.push(` { pattern: '${c.pattern}', filePath: '${s}', isDynamic: ${c.isDynamic}, params: ${l}${d} },`)}i.push("] as const",""),i.push("export type RouteName = typeof routes[number]['pattern']",""),p.mkdirSync(t,{recursive:!0}),p.writeFileSync(w.join(t,"routes.ts"),i.join(`
4
+ `))}import I from"path";var N=Object.freeze(["ico","png","jpg","jpeg","gif","webp","avif","svg","bmp","tif","tiff","heic","css","js","mjs","cjs","map","wasm","webmanifest","json","xml","txt","rss","atom","woff","woff2","ttf","otf","eot","mp3","mp4","m4a","m4v","mov","webm","ogg","ogv","oga","wav","flac","avi","mkv","pdf","csv","doc","docx","xls","xlsx","ppt","pptx","rtf","odt","zip","gz","tgz","tar","rar","7z","bz2","xz","php","phtml","asp","aspx","jsp","cgi","env","ini","yml","yaml","toml","sql","bak","old","swp","log","conf","cfg","exe","dmg","pkg","apk","ipa","msi","iso","bin","dll"]),D=N.flatMap((e)=>e===e.toUpperCase()?[e]:[e,e.toUpperCase()]).join("|"),G=new RegExp(`\\.(?:${D})$`),E=`(?![^/]*\\.(?:${D})$)`;function kt(e){let t=e,a=t.search(/[?#]/);if(a!==-1)t=t.slice(0,a);let r=t.slice(t.lastIndexOf("/")+1);return r.length>0&&G.test(r)}function R(e,t){let r=I.relative(t,e).replace(/\.(stx|md)$/,"");if(r=r.split(I.sep).join("/"),r==="index")return"/";if(r.endsWith("/index"))r=r.slice(0,-6);return r=r.replace(/\[\[([^\]]+)\]\]/g,":$1?"),r=r.replace(/\[([^\]]+)\]/g,":$1"),r=r.replace(/:\.\.\.([^/]+)/g,":$1*"),`/${r}`}function de(e,t={}){let a=t.page?E:"",r=[],n="",o=0;while(o<e.length){let i=e.slice(o),c=/^\/:([^/?*]+)\?/.exec(i);if(c){r.push(c[1]);let d=o+c[0].length===e.length;n+=`(?:/${d?a:""}([^/]+))?`,o+=c[0].length;continue}let s=/^:([^/?*]+)\*/.exec(i);if(s){r.push(s[1]),n+="(.+)",o+=s[0].length;continue}let l=/^:([^/?*]+)/.exec(i);if(l){r.push(l[1]);let d=o+l[0].length===e.length;n+=`${d?a:""}([^/]+)`,o+=l[0].length;continue}n+=e[o].replace(/[.+^${}()|[\]\\*?]/g,"\\$&"),o+=1}return{regex:new RegExp(`^${n}$`),params:r}}function mr(e,t){let a=e===""?"/":e;for(let r of t){let n=a.match(r.regex);if(n){let o={};return r.params.forEach((i,c)=>{o[i]=n[c+1]}),{route:r,params:o}}}return null}function As(e,t={}){let a=e.replace(/\[\[([^\]]+)\]\]/g,":$1?").replace(/\[([^\]]+)\]/g,":$1").replace(/:\.\.\.([^/]+)/g,":$1*");return de(a,t)}import j from"fs";import L from"path";function _(e,t){let a=[],r=L.dirname(e);while(r.startsWith(t)||r===t){let n=L.join(r,"_layout.stx");if(j.existsSync(n))a.unshift(n);if(r===t)break;r=L.dirname(r)}return a}function B(e,t){let a=[];if(!x.existsSync(e))return a;let r=x.readdirSync(e,{withFileTypes:!0});for(let n of r){let o=u.join(e,n.name);if(n.isDirectory()){if(n.name.startsWith("."))continue;if(y.includes(n.name))continue;a.push(...B(o,t))}else if(n.isFile()){let i=u.extname(n.name);if(t.includes(i)){if(n.name.startsWith("_")&&n.name!=="_layout.stx")continue;if(n.name==="_layout.stx")continue;a.push(o)}}}return a}class hr{routes;pagesDir;pagesDirs;config;constructor(e,t={}){this.config=t;let a=t.pagesDirs&&t.pagesDirs.length>0?t.pagesDirs:[t.pagesDir||"pages"];this.pagesDirs=a.map((s)=>u.resolve(e,s)),this.pagesDir=this.pagesDirs[0];let r=t.extensions||[".stx"],n=(s)=>{let l=u.resolve(e,s);try{return x.realpathSync(l)}catch{return l}},o=(t.exclude??[]).filter((s)=>typeof s==="string"&&s.trim()!=="").map(n),i=(s)=>{if(o.length===0)return!1;let l=n(s);return o.some((d)=>l===d||l.startsWith(`${d}${u.sep}`))},c=new Set;this.routes=[];for(let s of this.pagesDirs){let l=B(s,r).filter((h)=>!i(h)),d=new Map;for(let h of l){let g=R(h,s),m=t.pagesDirs?g.replace(/:[\w]+/g,":param"):g;if(t.pagesDirs&&d.has(m))throw Error(`Conflicting layer pages for ${g}: ${d.get(m)} and ${h}`);if(d.set(m,h),c.has(m))continue;c.add(m);let{regex:X,params:P}=de(g,{page:!0}),C=t.layouts!==!1?_(h,s):[];this.routes.push({pattern:g,regex:X,params:P,filePath:h,isDynamic:P.length>0,layout:C.length>0?C[C.length-1]:void 0})}}if(this.routes.sort((s,l)=>{if(!s.isDynamic&&l.isDynamic)return-1;if(s.isDynamic&&!l.isDynamic)return 1;let d=s.pattern.split("/").length,h=l.pattern.split("/").length;if(d!==h)return h-d;return s.pattern.localeCompare(l.pattern)}),t.emit!==!1){let s=u.resolve(e,t.stateDir||process.env.STX_DIR?.trim()||".stx");ii(this.routes,s),ai(this.routes,s,this.pagesDir)}}match(e){let t=e===""?"/":e;for(let a of this.routes){let r=t.match(a.regex);if(r){let n={};return a.params.forEach((o,i)=>{n[o]=r[i+1]}),{route:a,params:n}}}return null}resolve(e,t){let a=this.routes.find((n)=>n.pattern===e||n.filePath.includes(e));if(!a)return"#not-found";let r=a.pattern;if(t)for(let[n,o]of Object.entries(t))r=r.replace(`:${n}`,encodeURIComponent(o));return r}addRoute(e){this.routes.push(e),this.routes.sort((t,a)=>{if(!t.isDynamic&&a.isDynamic)return-1;if(t.isDynamic&&!a.isDynamic)return 1;return t.pattern.localeCompare(a.pattern)})}getLayout(e){return e.layout??null}}function Ps(e,t){let a=[`${t}.stx`,"error.stx"];for(let r of a){let n=u.join(e,r);if(x.existsSync(n))return n}return null}function Is(e,t){return e.map((a)=>{let r=u.relative(t,a.filePath),n=a.isDynamic?" (dynamic)":"";return`${a.pattern} \u2192 ${r}${n}`})}var f={},k="";function Xf(e){k=e.replace(/\/$/,"")}function Gf(e,t,a={}){f[e]={path:t,name:e,params:a}}function Jf(e){for(let[t,a]of Object.entries(e))if(typeof a==="string")f[t]={path:a,name:t};else f[t]={...a,name:t}}function yr(e,t={},a=!1){let r=f[e];if(!r)return console.warn(`Route [${e}] not defined.`),"#undefined-route";let n={...r.params,...t},o=r.path;o=o.replace(/:(\w+)/g,(c,s)=>{let l=n[s];if(l===void 0)return console.warn(`Missing parameter [${s}] for route [${e}].`),`:${s}`;return delete n[s],encodeURIComponent(String(l))});let i=Object.entries(n);if(i.length>0){let c=i.map(([s,l])=>`${encodeURIComponent(s)}=${encodeURIComponent(String(l))}`).join("&");o+=(o.includes("?")?"&":"?")+c}return a&&k?`${k}${o}`:o}function Yf(){for(let e of Object.keys(f))delete f[e];k=""}import F from"fs";import q from"path";function Zf(e,t={}){return{type:"redirect",path:e,options:{replace:t.replace??!1,external:t.external??!1,redirectCode:t.redirectCode??302}}}function Qf(e){return{type:"abort",error:typeof e==="string"?{statusCode:500,message:e}:e}}function eg(e,t={}){return{handler:e,mode:t.mode??"universal"}}function O(e){let t={};if(!e)return t;let a=e.split(";");for(let r of a){let[n,...o]=r.split("=");if(n){let i=n.trim(),c=o.join("=").trim();if(i)t[i]=decodeURIComponent(c)}}return t}function S(e,t,a={}){let r=`${encodeURIComponent(e)}=${encodeURIComponent(t)}`;if(a.expires){let n=typeof a.expires==="number"?new Date(Date.now()+a.expires*1000):a.expires;r+=`; Expires=${n.toUTCString()}`}if(a.path)r+=`; Path=${a.path}`;if(a.domain)r+=`; Domain=${a.domain}`;if(a.secure)r+="; Secure";if(a.httpOnly)r+="; HttpOnly";if(a.sameSite)r+=`; SameSite=${a.sameSite}`;return r}function $c(e,t){let a=e.headers.get("cookie")||"",r=O(a);return{get(n){return r[n]},set(n,o,i={}){r[n]=o,t.append("Set-Cookie",S(n,o,i))},delete(n){delete r[n],t.append("Set-Cookie",S(n,"",{expires:new Date(0),path:"/"}))},getAll(){return{...r}}}}function Rc(){return{get(e){if(typeof document>"u")return;return O(document.cookie)[e]},set(e,t,a={}){if(typeof document>"u")return;document.cookie=S(e,t,a)},delete(e){if(typeof document>"u")return;document.cookie=S(e,"",{expires:new Date(0),path:"/"})},getAll(){if(typeof document>"u")return{};return O(document.cookie)}}}function Ac(){let e=typeof window<"u"&&typeof window.localStorage<"u";return{get(t){if(!e)return null;try{return window.localStorage.getItem(t)}catch{return null}},set(t,a){if(!e)return;try{window.localStorage.setItem(t,a)}catch{}},remove(t){if(!e)return;try{window.localStorage.removeItem(t)}catch{}},isAvailable(){return e}}}var v=new Map;function ci(e,t){v.set(e,t)}function Pc(e){return v.get(e)}function tg(e){return v.has(e)}function _t(){v.clear()}function Ct(){return Array.from(v.keys())}async function Et(e,t="middleware"){let a=q.resolve(e,t);if(!F.existsSync(a))return;let r=F.readdirSync(a);for(let n of r){if(!n.endsWith(".ts")&&!n.endsWith(".js"))continue;if(n.includes(".test.")||n.includes(".spec."))continue;let o=n.replace(/\.(ts|js)$/,""),i=q.join(a,n);try{let s=(await import(i)).default;if(s&&typeof s.handler==="function")ci(o,s);else if(typeof s==="function")ci(o,{handler:s,mode:"universal"})}catch(c){console.warn(`Failed to load middleware '${o}' from ${i}:`,c)}}}function K(e){let t={};if(!e)return t;let a=new URLSearchParams(e);for(let[r,n]of a)t[r]=n;return t}function Tt(e,t,a,r=""){return{path:e,params:t,query:K(r),fullPath:r?`${e}?${r}`:e,meta:a}}function $t(e,t,a,r){let n=r?.isServer??typeof window>"u",o=!n,i=new Headers;return{to:e,from:t,isClient:o,isServer:n,cookies:n&&a?$c(a,i):Rc(),storage:Ac(),state:{},request:a,responseHeaders:i}}async function Rt(e,t){let a=Array.isArray(e)?e:[e],r=t.isServer;for(let n of a){let o=Pc(n);if(!o)return console.error(`Route middleware '${n}' is not registered \u2014 failing the guard closed.`),{passed:!1,abort:{type:"abort",error:{statusCode:500,message:`Route middleware '${n}' is not registered`}},state:t.state,responseHeaders:t.responseHeaders};if(o.mode==="server"&&!r)continue;try{let i=await o.handler(t);if(i){if(i.type==="redirect")return{passed:!1,redirect:i,state:t.state,responseHeaders:t.responseHeaders};if(i.type==="abort")return{passed:!1,abort:i,state:t.state,responseHeaders:t.responseHeaders}}}catch(i){return console.error(`Error in middleware '${n}':`,i),{passed:!1,abort:{type:"abort",error:{statusCode:500,message:i instanceof Error?i.message:"Middleware error"}},state:t.state,responseHeaders:t.responseHeaders}}}return{passed:!0,state:t.state,responseHeaders:t.responseHeaders}}function Os(e){let a=e.replace(/\\/g,"/").split("/").filter(Boolean),r=a.lastIndexOf("layouts"),n=r>=0?a[r+1]:a.at(-1);if(!n)return"app";return n.replace(/\.stx$/i,"")||"app"}function tt(e){let t=e.match(/<meta\b[^>]*name=["']stx-layout["'][^>]*content=["']([^"']+)["'][^>]*>/i),a=e.match(/<meta\b[^>]*name=["']stx-layout-group["'][^>]*content=["']([^"']+)["'][^>]*>/i),r=e.match(/<!--\s*stx-layout:\s*([^ ]+)\s*-->/i),n=t?.[1]||r?.[1]||"";return{layout:n,group:a?.[1]||Os(n)}}var A,T;function W(e){let t=[],a="log(",r=0;while(r<e.length){let n=e.indexOf("log(",r);if(n===-1){t.push(e.slice(r));break}let o=n>0?e[n-1]:" ",i=/\bfunction\s+$/.test(e.slice(Math.max(0,n-16),n));if(/[\w$.]/.test(o)||i){t.push(e.slice(r,n+4)),r=n+4;continue}t.push(e.slice(r,n));let c=1,s=n+4;while(s<e.length&&c>0){let l=e[s];if(l==='"'||l==="'"||l==="`"){let d=l;s++;while(s<e.length&&e[s]!==d){if(e[s]==="\\")s++;s++}s++;continue}if(l==="(")c++;else if(l===")")c--;s++}t.push("0"),r=s}return t.join("")}function U(e,t=!1){try{return new Bun.Transpiler(t?{loader:"js",minify:{whitespace:!0,identifiers:!0}}:{loader:"js",minifyWhitespace:!0}).transformSync(e).replace(/\}(var |let |const |function )/g,"};$1").trim()}catch{return e}}function H(){return`
5
5
  ;(function(){
6
6
  'use strict';
7
7
  var ROUTER_REV=8;
@@ -4095,4 +4095,4 @@ else {
4095
4095
 
4096
4096
  if(document.readyState==='loading')document.addEventListener('DOMContentLoaded',init);else init();
4097
4097
  })();
4098
- `}function nt(){if(A)return A;return A=U(W(H()),!0),A}function tg(){if(T)return T;return T=U(H()),T}export{oi,ii,kt,de,gr,Rs,mr,As,Ps,Kf,Xf,Gf,hr,Jf,Yf,Zf,Qf,Tc,$c,Rc,ai,Ac,eg,_t,Ct,Et,Tt,$t,Rt,Is,tt,nt,tg};
4098
+ `}function nt(){if(A)return A;return A=U(W(H()),!0),A}function ng(){if(T)return T;return T=U(H()),T}export{ii,ai,kt,de,mr,As,hr,Ps,Is,Xf,Gf,Jf,yr,Yf,Zf,Qf,eg,$c,Rc,Ac,ci,Pc,tg,_t,Ct,Et,Tt,$t,Rt,Os,tt,nt,ng};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{Bo}from"./chunk-2a792g5e.js";export{Bo as warnUnbalancedTags};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{Fr,ao,Wg,Al,co}from"./chunk-zkn55966.js";export{Wg as buildModuleRegistryScript,co as buildSharedModuleRegistries,Al as exportsMutableBinding,Fr as registeredModuleIdsIn,ao as registeredModuleNamesIn};
@@ -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 Jm(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 Ym(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 Ym(){return`
53
+ `})}function Zm(){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{Jm,Ym};
71
+ export{Ym,Zm};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{lm,um,dm,pm,Ul,fm,gm,mm,hm,ym,bm,wm}from"./chunk-xj5j18nf.js";export{bm as Broadcast,wm as BroadcastServer,Ul as broadcast,hm as broadcastPresence,mm as broadcastPrivate,ym as channel,lm as getBroadcastServer,pm as loadChannels,um as startBroadcasting,dm as stopBroadcasting,fm as toUser,gm as toUsers};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{wu,To,Jn,vu,xu,Su,ku,_u,Cu,Eu,Tu,$u,Ru,Au,Pu,Iu,Ou,Nu,Du,Mu,Lu,ju,Bu,Fu,zu,Hu,Vu,Uu,Wu,qu,Ku,Xu,Gu,Ju,Yu,Zu,Qu,ed,td,nd,rd,sd,od,id,ad,cd,ld,ud,Yt,Na,dd,pd,fd,Da,gd,md,hd,yd,bd,wd,Ma,vd,xd,Sd,kd,_d,Cd,Ed,Td,$d,Yn,Rd,Ad,Pd,Id,Od,Nd,Dd,Md,Ld,jd,Bd,Fd,$o,zd,Hd,Vd,Ud,Wd,ns,rs,qd,Kd,Xd,Gd,Jd,La,Yd,Zd,Qd,ja,Ro,ep,tp,Ba,Fa,ss,za,np,Zt,rp,Ha,Va,Ao,sp,Po,op,ip,ap,cp,lp,up,dp,Ua,pp,fp,Wa,gp,mp,hp,yp,bp,wp,vp,xp,Sp,kp,_p,Cp,Ep,Tp,$p,Rp,Ap,Pp,Ip,Op,Np,Dp,Mp,Lp,qa,jp,Bp,Fp,zp,Hp,Vp,Up,Wp,qp,Kp,Xp,Zn,Ka,Xa,Gp,Qn,Jp,Yp,Zp,Ga,Ja,os,is,Qp,Io,ef,tf,nf,rf,sf,of,af,cf,lf,uf,df,pf,ff,gf,mf,hf,yf,bf,wf,vf,Ya,xf,Sf,Za,Qa,kf,_f}from"./chunk-mzyx6y1a.js";export{ld as AVAILABLE_COMPONENTS,La as AutoUpdater,ud as COMPONENT_STYLES,os as DEFAULT_WATCH_INTERVAL_MS,Ja as MAX_WATCH_INTERVAL_MS,Ga as MIN_WATCH_INTERVAL_MS,wd as MODAL_STYLES,$u as TOAST_STYLES,Ed as TRAY_MENU_STYLES,Ba as UPDATE_MANIFEST_ASSET,md as alert,Np as appInfo,of as appleScript,_f as applicationDataDirectory,sf as audio,Sf as backgroundDelay,Ap as battery,rf as biometric,Kp as bluetooth,df as bonjour,Zt as bundlePathForExecutable,sp as caffeinate,Yd as canReplaceBundle,Zd as clearQuarantine,xp as clipboard,bd as closeAllModals,Fd as closeAllWindows,gd as confirm,Lp as contextMenu,yf as continuityCamera,hf as coreml,Gd as craftBinaryNotFoundMessage,$o as craftWindowArguments,Zn as crashReporter,Yu as createAccordion,Uu as createAutocomplete,Du as createAvatar,Nu as createBadge,Ru as createButton,Mu as createCard,sd as createChart,Pu as createCheckbox,Ku as createChip,od as createCodeEditor,zu as createColorPicker,rd as createDataGrid,Hu as createDatePicker,rs as createDiskImage,ju as createDropdown,ad as createFileExplorer,np as createGitHubUpdateManifest,za as createGitHubUpdater,qu as createImageView,yp as createInterval,Wu as createLabel,ed as createListView,id as createMediaPlayer,vd as createMenubar,Qu as createModalComponent,kf as createNativeUpdateApi,Qa as createPantrySelfUpdater,lp as createPreferences,Ou as createProgressBar,Fu as createRadioButton,Bu as createRating,Gu as createScrollView,Ao as createSelfUpdater,Iu as createSlider,Ju as createSplitView,Zu as createStepper,Ma as createSystemTray,td as createTable,Lu as createTabs,Au as createTextInput,Vu as createTimePicker,hp as createTimer,Xu as createTooltip,nd as createTreeView,cd as createWebView,zd as createWindow,Vd as createWindowWithHTML,Po as decaffeinate,Rp as deepLinks,bp as delay,Cu as dismissAlertById,Eu as dismissAllAlerts,Tp as dragOut,Qd as extractBundle,af as fileAssociations,Io as focus,tf as focusShortcutsReady,vp as formatCompact,cp as formatDuration,ap as formatRemainingTime,pp as formatShortcut,wp as formatTime,kp as fs,ja as generateUpdateManifest,Tu as getActiveAlertCount,yd as getActiveModalCount,xd as getActiveTrayInstances,jd as getActiveWindowIds,ip as getCaffeinateStatus,vf as getCapabilities,Ya as getCapability,Md as getDesktopConfig,Nd as getDialogBridgeScript,mp as getRegisteredHotkeys,_d as getSimulatedTrayHTML,Cd as getTrayBridgeScript,Sd as getTrayInstance,Bd as getWindow,Wd as getWindowBridgeScript,Fa as githubLatestAssetUrl,ss as githubReleaseAssetUrl,Cp as globalShortcuts,Qn as handoff,ef as hasFocusShortcuts,Gp as iap,dp as isAutoLaunchEnabled,xf as isAvailable,op as isCaffeinated,$p as isDragOutAvailable,Ud as isWebviewAvailable,Fp as keychain,Jp as liveActivities,nf as localServer,Yp as location,uf as log,qd as macOSRuntimeExecutablePath,Mp as menu,mf as midi,Vp as nativeAutoLaunch,Up as nativeTray,Wp as nativeWindow,Pp as network,Sp as notifications,_u as notify,Hd as openDevWindow,Kd as pack,Xd as packageApp,Za as parsePantryUpdateManifest,Ua as parseShortcut,lf as pdf,zp as permissions,Hp as printing,hd as prompt,Ha as quitLauncher,Ro as readBundleIdentity,Ka as redactPII,fp as registerHotkey,Va as relaunchBundle,wu as requestNotificationPermission,Ld as resetDesktopConfig,Jd as resolveCraftBinary,ns as resolveCraftExecutablePath,rp as runningBundleTeamId,Bp as screen,Zp as screenCapture,is as screenSharing,wf as serial,bf as serviceMenu,up as setAutoLaunch,Dd as setDesktopConfig,_p as shell,To as showAlert,Ad as showAlertDialog,Rd as showColorPicker,Pd as showConfirmDialog,Id as showErrorDialog,pd as showErrorModal,ku as showErrorToast,Na as showInfoModal,vu as showInfoToast,Yn as showMessageBox,Yt as showModal,Td as showOpenDialog,Da as showQuestionModal,$d as showSaveDialog,fd as showSuccessModal,xu as showSuccessToast,Jn as showToast,Od as showWarningDialog,dd as showWarningModal,Su as showWarningToast,qa as sidebar,Xa as signPayload,Xp as speech,ff as speechRecognition,pf as spotlight,Dp as standardMenus,ep as swapBundle,jp as system,cf as tags,Ep as theme,qp as touchbar,kd as triggerTrayAction,gp as unregisterAllHotkeys,Wa as unregisterHotkey,Ip as updater,tp as verifyBundleTrust,gf as vision,Qp as watchScreenSharing,Op as windowEvents};