@stacksjs/stx 0.2.867 → 0.2.869

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 (131) hide show
  1. package/dist/app-shell.js +5 -4
  2. package/dist/chunk-05dtat6q.js +2 -0
  3. package/dist/{chunk-gxqcnn5r.js → chunk-05qpze12.js} +1 -1
  4. package/dist/{chunk-rnvw07ca.js → chunk-095cn3p0.js} +26 -26
  5. package/dist/chunk-0snga2v8.js +2 -0
  6. package/dist/{chunk-g0xn80gz.js → chunk-0tyyad6q.js} +9 -9
  7. package/dist/chunk-0xqefkqr.js +2 -0
  8. package/dist/{chunk-67dgp45w.js → chunk-1dt8e7ew.js} +2 -2
  9. package/dist/chunk-1t8tkryw.js +2 -0
  10. package/dist/{chunk-mzr29qkj.js → chunk-2wa1keyw.js} +1 -1
  11. package/dist/{chunk-5dvkphbe.js → chunk-311mrz2n.js} +1 -1
  12. package/dist/chunk-3eqa6hnx.js +2 -0
  13. package/dist/{chunk-z512gt4v.js → chunk-3f51tn2b.js} +3 -3
  14. package/dist/{chunk-8s6s6nd0.js → chunk-4068rmzv.js} +2 -2
  15. package/dist/chunk-4math14x.js +2 -0
  16. package/dist/{chunk-8arfg8kp.js → chunk-4vtw6f0c.js} +1 -1
  17. package/dist/{chunk-5kkq2eqr.js → chunk-5d0csn7w.js} +1 -1
  18. package/dist/chunk-5debppk8.js +2 -0
  19. package/dist/{chunk-3nyh76r3.js → chunk-5f9z82xp.js} +2 -2
  20. package/dist/{chunk-vvzys1x7.js → chunk-5h9d6jew.js} +3 -3
  21. package/dist/{chunk-qx8czb2j.js → chunk-5qk506kn.js} +1 -1
  22. package/dist/{chunk-h65shwe9.js → chunk-5sbtbfj3.js} +1 -1
  23. package/dist/{chunk-k32q90b2.js → chunk-60yppcbb.js} +2 -2
  24. package/dist/{chunk-eafqxbr0.js → chunk-6ggme8xx.js} +1 -1
  25. package/dist/{chunk-fmzyrg2e.js → chunk-6ksyrmpp.js} +1 -1
  26. package/dist/{chunk-x64afx6z.js → chunk-6mjd3pqd.js} +1 -1
  27. package/dist/{chunk-6k4ac74t.js → chunk-6vgr5g6d.js} +2 -2
  28. package/dist/{chunk-a76dtc8w.js → chunk-73vtvzb1.js} +1 -1
  29. package/dist/{chunk-xebx3ryb.js → chunk-7vc8b7c5.js} +1 -1
  30. package/dist/{chunk-6c5g6sv6.js → chunk-81kk8dnr.js} +1 -1
  31. package/dist/chunk-8veysx0v.js +2 -0
  32. package/dist/{chunk-k15hxcgs.js → chunk-9fk02w6v.js} +3 -3
  33. package/dist/{chunk-kandgxsh.js → chunk-9mkv1se7.js} +1 -1
  34. package/dist/{chunk-1vwgddct.js → chunk-9rjr7hvf.js} +1 -1
  35. package/dist/chunk-a9y9ghm2.js +2 -0
  36. package/dist/chunk-ac5sa72c.js +2 -0
  37. package/dist/{chunk-enxzwz0j.js → chunk-ajy9tjct.js} +2 -2
  38. package/dist/{chunk-jn335zs0.js → chunk-akv760py.js} +1 -1
  39. package/dist/{chunk-ea5pm30m.js → chunk-bfww6qxt.js} +1 -1
  40. package/dist/chunk-bv6rx5w4.js +2 -0
  41. package/dist/{chunk-efywv35k.js → chunk-cvpbgf6h.js} +1 -1
  42. package/dist/{chunk-1mmyxay3.js → chunk-d2m57nd1.js} +1 -1
  43. package/dist/{chunk-mcnwvh06.js → chunk-d9k8j44b.js} +5 -5
  44. package/dist/chunk-djdganvr.js +2 -0
  45. package/dist/{chunk-kh6njq2r.js → chunk-dy7vqv1x.js} +2 -2
  46. package/dist/chunk-f3d1y318.js +33 -0
  47. package/dist/chunk-f64wbr0j.js +2 -0
  48. package/dist/{chunk-b3wc86ez.js → chunk-fzz251r8.js} +9 -9
  49. package/dist/{chunk-ynkbv9jq.js → chunk-gcsy3z1e.js} +2 -2
  50. package/dist/{chunk-cr0msawk.js → chunk-gj16gta9.js} +6 -6
  51. package/dist/{chunk-9vzeea7p.js → chunk-gk8472hq.js} +2 -2
  52. package/dist/{chunk-7qmr1z81.js → chunk-gxq3jnkb.js} +1 -1
  53. package/dist/chunk-h2r54207.js +54 -0
  54. package/dist/{chunk-pqjmse0r.js → chunk-h8h97bcc.js} +1 -1
  55. package/dist/chunk-hb6r4pxp.js +2 -0
  56. package/dist/{chunk-yzh9rsqp.js → chunk-hvh7v5bx.js} +4 -4
  57. package/dist/{chunk-jbgj2hph.js → chunk-hvx6j4a2.js} +2 -2
  58. package/dist/{chunk-v5kjwkz2.js → chunk-j148k8rf.js} +1 -1
  59. package/dist/{chunk-w6k6nkvq.js → chunk-jsyrp1n2.js} +1 -1
  60. package/dist/{chunk-c6rcrh48.js → chunk-k3qh0esd.js} +7 -7
  61. package/dist/{chunk-5tt1xbeh.js → chunk-k4dcnc4e.js} +3 -3
  62. package/dist/{chunk-8me8hamk.js → chunk-k7m8659h.js} +2 -2
  63. package/dist/chunk-kdat1ht1.js +3 -0
  64. package/dist/{chunk-fpya25cc.js → chunk-kgh1xsfe.js} +74 -74
  65. package/dist/{chunk-cjy9cdm0.js → chunk-m4k6ndf5.js} +1 -1
  66. package/dist/{chunk-t5jfh1bs.js → chunk-mbp7j1a7.js} +2 -2
  67. package/dist/{chunk-7xhwqc0c.js → chunk-mnx6njd4.js} +4 -4
  68. package/dist/{chunk-7fg2sj1z.js → chunk-nqz4es8a.js} +1 -1
  69. package/dist/chunk-nrpqrqqe.js +2 -0
  70. package/dist/{chunk-qbf8re0y.js → chunk-p3yesft1.js} +1 -1
  71. package/dist/chunk-ps6m8n9n.js +2 -0
  72. package/dist/{chunk-aef82ns3.js → chunk-pxce4aag.js} +1 -1
  73. package/dist/{chunk-v2712w9b.js → chunk-qqvj5zra.js} +1 -1
  74. package/dist/{chunk-d0cjw1gn.js → chunk-r3eezdg4.js} +26 -26
  75. package/dist/chunk-r53eeyhv.js +42 -0
  76. package/dist/chunk-rhhq8k9f.js +2 -0
  77. package/dist/{chunk-bwdbj60y.js → chunk-rpep1ve3.js} +2 -2
  78. package/dist/{chunk-xfvedjvb.js → chunk-s6fe2wp6.js} +1 -1
  79. package/dist/{chunk-83tvkw4y.js → chunk-sbvkk4cn.js} +2 -2
  80. package/dist/{chunk-f6ypmk8x.js → chunk-stdddhk9.js} +1 -1
  81. package/dist/chunk-swp254eb.js +2 -0
  82. package/dist/chunk-szfh1sg3.js +2 -0
  83. package/dist/{chunk-d60bvtmy.js → chunk-tdd3765y.js} +39 -39
  84. package/dist/{chunk-6m6y9bbx.js → chunk-tjwzy9xq.js} +1 -1
  85. package/dist/{chunk-vdj4m9z2.js → chunk-tz7b6fdz.js} +1 -1
  86. package/dist/{chunk-gd56arnm.js → chunk-vrcr4b13.js} +1 -1
  87. package/dist/{chunk-rd751nw3.js → chunk-vzq77h80.js} +1 -1
  88. package/dist/{chunk-0v2yj490.js → chunk-w2hqjv5e.js} +1 -1
  89. package/dist/{chunk-mnf4gktz.js → chunk-wcq7a5pv.js} +3 -3
  90. package/dist/{chunk-q13dgfe1.js → chunk-wrgaxvxy.js} +3 -3
  91. package/dist/{chunk-vkb353c3.js → chunk-wxggf5aq.js} +1 -1
  92. package/dist/{chunk-3a4tfycz.js → chunk-xsbaha1z.js} +2 -2
  93. package/dist/{chunk-qvjxg8yz.js → chunk-xtcba3r1.js} +2 -2
  94. package/dist/chunk-ympa56f9.js +2 -0
  95. package/dist/{chunk-64ebysb4.js → chunk-yx3vghee.js} +1 -1
  96. package/dist/chunk-z2t6f4gt.js +2 -0
  97. package/dist/{chunk-73c3awyw.js → chunk-za61jaep.js} +2 -2
  98. package/dist/{chunk-2v0jdfhg.js → chunk-zfj8rfv2.js} +1 -1
  99. package/dist/cli.js +12 -12
  100. package/dist/craft-entry.js +1 -1
  101. package/dist/craft.js +1 -1
  102. package/dist/index.d.ts +1 -0
  103. package/dist/index.js +1 -0
  104. package/dist/pwa.js +2 -2
  105. package/dist/ssg.js +3 -3
  106. package/package.json +5 -5
  107. package/dist/chunk-031dn0yr.js +0 -2
  108. package/dist/chunk-0twkeh31.js +0 -2
  109. package/dist/chunk-23zpvmw5.js +0 -2
  110. package/dist/chunk-2h41y75x.js +0 -2
  111. package/dist/chunk-3gk1e2b1.js +0 -2
  112. package/dist/chunk-4yhd0mg6.js +0 -2
  113. package/dist/chunk-66eszw4f.js +0 -2
  114. package/dist/chunk-6d39636b.js +0 -33
  115. package/dist/chunk-9cwag0tk.js +0 -2
  116. package/dist/chunk-acrgy1m7.js +0 -2
  117. package/dist/chunk-apkna83n.js +0 -2
  118. package/dist/chunk-bx29jsqg.js +0 -2
  119. package/dist/chunk-c9mkbjk5.js +0 -2
  120. package/dist/chunk-cwdg0v05.js +0 -2
  121. package/dist/chunk-cwdvmvc6.js +0 -2
  122. package/dist/chunk-f0kcmckh.js +0 -2
  123. package/dist/chunk-fkbh874c.js +0 -2
  124. package/dist/chunk-h1hcjx7e.js +0 -42
  125. package/dist/chunk-kd82s3ry.js +0 -2
  126. package/dist/chunk-s21bj83r.js +0 -3
  127. package/dist/chunk-tzey0xq2.js +0 -54
  128. package/dist/chunk-x5ap19jt.js +0 -2
  129. package/dist/chunk-xzb0w6mf.js +0 -2
  130. package/dist/chunk-ywp7tmyg.js +0 -2
  131. package/dist/chunk-z1rs6b4x.js +0 -2
@@ -1,33 +0,0 @@
1
- // @bun
2
- import{An}from"./chunk-g0xn80gz.js";import{X,w,Bt,Ft,Pr,h,gl,$i,G,I}from"./chunk-fpya25cc.js";import{an}from"./chunk-qx8czb2j.js";import{n}from"./chunk-s21bj83r.js";import{Y}from"./chunk-bwdbj60y.js";import{D,c}from"./chunk-fd1bpv35.js";var J=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]);function K(t){let s=[],e=/<!--[\s\S]*?(?:-->|$)|<(script|style|textarea|title|template)\b[^>]*>[\s\S]*?<\/\1\s*>/gi,r;while((r=e.exec(t))!==null)s.push({start:r.index,end:r.index+r[0].length});return s}function N(t,s){return s.some((e)=>t>=e.start&&t<e.end)}function Z(t){let s=(t||"").trim();if(!s)return null;if(/[\s>+~,:]/.test(s))return null;let e={},r=s,i=r.match(/^[a-z][\w-]*/i);if(i)e.tag=i[0].toLowerCase(),r=r.slice(i[0].length);while(r.length>0){let o=r.match(/^\[([\w-]+)(?:=(["']?)([^\]"']*)\2)?\]/);if(o){if(e.attr=o[1],o[3]!==void 0&&o[3]!=="")e.attrValue=o[3];r=r.slice(o[0].length);continue}let l=r.match(/^#([\w-]+)/);if(l){e.id=l[1],r=r.slice(l[0].length);continue}let a=r.match(/^\.([\w-]+)/);if(a){e.className=a[1],r=r.slice(a[0].length);continue}return null}if(!e.tag&&!e.attr&&!e.id&&!e.className)return null;return e}function Q(t,s){if(s.attr){if(!(s.attrValue===void 0?new RegExp(`\\b${s.attr}(?=[\\s=>/]|$)`,"i"):new RegExp(`\\b${s.attr}\\s*=\\s*(["'])\\s*${s.attrValue}\\s*\\1`,"i")).test(t))return!1}if(s.id){if(!new RegExp(`\\bid\\s*=\\s*(["'])\\s*${s.id}\\s*\\1`,"i").test(t))return!1}if(s.className){let e=t.match(/\bclass\s*=\s*(["'])([\s\S]*?)\1/i);if(!e)return!1;if(!e[2].split(/\s+/).includes(s.className))return!1}return!0}function P(t,s="main"){let e=Z(s);if(!e)return null;let r=/<([a-z][\w-]*)\b([^>]*)>/gi,i=K(t),o;while((o=r.exec(t))!==null){if(N(o.index,i))continue;let l=o[1].toLowerCase(),a=o[2]||"";if(a.trimEnd().endsWith("/")||J.has(l))continue;if(e.tag&&e.tag!==l)continue;if(!Q(a,e))continue;let u=o[0],g=o.index+u.length,f=new RegExp(`<(/?)${l}\\b([^>]*)>`,"gi");f.lastIndex=g;let d=1,x;while((x=f.exec(t))!==null){if(N(x.index,i))continue;let y=x[1]==="/";if(!y&&(x[2]||"").trimEnd().endsWith("/"))continue;if(d+=y?-1:1,d===0)return{openTag:u,openIndex:o.index,start:g,end:x.index,tagName:l}}return null}return null}var wt="private, no-store";function en(t){return t.replace(/&#(\d+);/g,(s,e)=>F(Number(e),s)).replace(/&#x([0-9a-f]+);/gi,(s,e)=>F(Number.parseInt(e,16),s)).replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&quot;/g,'"').replace(/&apos;/g,"'").replace(/&amp;/g,"&")}function F(t,s){if(!Number.isInteger(t)||t<0||t>1114111)return s;try{return String.fromCodePoint(t)}catch{return s}}function Ae(t){return t.headers.get("X-STX-Router")==="true"}function tt(t,s){if(!t)return s;return t.split(",").some((r)=>r.trim().toLowerCase()===s.toLowerCase())?t:`${t}, ${s}`}function z(t){return{Vary:tt(t,"X-STX-Router")}}function E(t){return t.replace(/"/g,"&quot;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function L(t){let s=/<head\b[^>]*>([\s\S]*?)<\/head\s*>/i.exec(t)?.[1]??"",e=/<(meta|link)\b(?:[^>"']|"[^"]*"|'[^']*')*>|<title\b[^>]*>[\s\S]*?<\/title\s*>/giy;return w(s,(r,i)=>(e.lastIndex=i,e.exec(r)?e.lastIndex:-1)).map(({token:r})=>r)}function H(t){let s=Object.create(null),e=t.replace(/^<\w+\b|>$/g,"");for(let r of e.matchAll(/([^\s=/>]+)(?:\s*=\s*(?:"([^"]*)"|'([^']*)'|([^\s"'=<>`]+)))?/g)){let i=r[1].toLowerCase();if(!(i in s))s[i]=r[2]??r[3]??r[4]??""}return s}function Ln(t){let s=[];for(let e of L(t)){if(/^<title\b/i.test(e)){s.push(`<title>${E(e.replace(/^<title\b[^>]*>|<\/title\s*>$/gi,""))}</title>`);continue}let r=H(e);if(/^<meta\b/i.test(e)){let i=r.property?"property":"name",o=en(r[i]??"").toLowerCase();if(o==="description"||/^(?:og|twitter):[\w:]+$/.test(o))s.push(`<meta ${i}="${n(o)}" content="${E(r.content??"")}">`)}else{let i=en(r.rel??"").toLowerCase();if(i==="canonical"||i==="alternate"&&r.hreflang)s.push(`<link rel="${i}" href="${E(r.href??"")}"${i==="alternate"?` hreflang="${E(r.hreflang)}"`:""}>`)}}return`<template data-stx-page-head="1">${s.join("")}</template>
3
- `}var et=["media","crossorigin","integrity"];function jn(t){let s=[];for(let e of L(t)){if(!/^<link\b/i.test(e))continue;let r=H(e);if(en(r.rel??"").trim().toLowerCase()!=="stylesheet")continue;if(!r.href||"data-css"in r||"disabled"in r)continue;let i=et.filter((o)=>(o in r)).map((o)=>` ${o}="${E(r[o])}"`).join("");s.push(`<link rel="stylesheet" href="${E(r.href)}"${i}>`)}return s.length?`<template data-stx-page-css="1">${s.join("")}</template>
4
- `:""}import T from"path";var nt="stx-page-head:",rt=/<!--stx-page-head:([A-Za-z0-9+/=]+)-->\n?/,_={dev:null,prod:null};function st(){let t=Y()?"dev":"prod",s=_[t];if(s!==null)return s;try{let e=import.meta.require("./chunk-5kkq2eqr.js"),r=t==="dev"&&typeof e.getRouterScriptDev==="function"?e.getRouterScriptDev:e.getRouterScript;_[t]=`<script>${r()}</script>`}catch{_[t]=""}return _[t]}async function wa(t,s){if(s===!1)return null;if(s&&typeof s==="string"){let r=T.resolve(t,s);if(await Bun.file(r).exists())return r;return null}let e=T.join(t,"app.stx");if(await Bun.file(e).exists())return e;return null}async function So(t,s){try{let e=await Bun.file(t).text(),r=e,i=e.match(/<template\b[^>]*>([\s\S]*?)<\/template>/i);if(i)r=i[1].trim();let o=an(e),l=[...o.client.map((p)=>p.fullTag),...o.signals.map((p)=>p.fullTag)],a=[],u=/<style\b[^>]*>([\s\S]*?)<\/style>/gi,g;while((g=u.exec(e))!==null)a.push(g[0]);let f=r;for(let p of o.server)f=f.replace(p.fullTag,"");for(let p of o.client)f=f.replace(p.fullTag,"");f=f.replace(/<style\b[^>]*>[\s\S]*?<\/style>/gi,"");let d="<!--__STX_PAGE_SLOT__-->";if(f=f.replace(/<slot\s*\/>/gi,d).replace(/<slot\s*>\s*<\/slot>/gi,d),!f.includes(d))return console.warn(`[stx] Shell ${t} has no <slot /> \u2014 pages won't be injected`),null;let{processDirectives:x,extractVariables:y,defaultConfig:R,loadStxConfig:b}=await import("./chunk-bx29jsqg.js"),k=await b(),m={__filename:t,__dirname:T.dirname(t)};for(let p of l){let A=p.match(/<script\b[^>]*>([\s\S]*?)<\/script>/i);if(A&&!p.includes("client")&&!p.includes('type="module"'))await y(A[1],m,t)}let S=await x(f,m,t,{...R,...k,...s},new Set),C=S.indexOf(d);if(C===-1)return console.warn("[stx] Shell slot placeholder lost during processing"),null;return{beforeSlot:S.substring(0,C),afterSlot:S.substring(C+d.length),filePath:t,shellScripts:l,shellStyles:a}}catch(e){return console.error(`[stx] Error processing shell ${t}:`,e),null}}function Qr(t,s,e){let r,i="",o=s.match(rt);if(o){s=s.replace(o[0],"");try{let f=Buffer.from(o[1],"base64").toString("utf8"),d=f.match(/<title[^>]*>([\s\S]*?)<\/title>/i);if(d)r=d[1].trim();i=f.replace(/<title[^>]*>[\s\S]*?<\/title>/i,"").trim()}catch{}}let l=e||r||"stx App",a=st(),u="<script>window.__stxRouterConfig={container:'[data-stx-content]'};</script>";return`<!DOCTYPE html>
5
- <html lang="en">
6
- <head>
7
- <meta charset="UTF-8">
8
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
9
- <title>${l}</title>
10
- ${i?` ${i}
11
- `:""} ${t.shellStyles.join(`
12
- `)}
13
- </head>
14
- <body>
15
- ${t.beforeSlot}
16
- <div data-stx-content>${s}</div>
17
- ${t.afterSlot}
18
- ${t.shellScripts.filter((f)=>!f.includes("server")).join(`
19
- `)}
20
- ${u}
21
- ${a}
22
- </body>
23
- </html>`}function Je(t,s={}){let e=t.trim();if(!An(e))return t;let r=[],i=e.match(/<head\b[^>]*>([\s\S]*?)<\/head>/i);if(i){let u=i[1],g=/<style\b[^>]*>[\s\S]*?<\/style>/gi,f;while((f=g.exec(u))!==null)r.push(f[0]);let d=u.match(/<script\b[^>]*data-stx-server-data[^>]*>[\s\S]*?<\/script>/i);if(d)r.push(d[0]);let x=u.match(/<script\b[^>]*data-stx-runtime-config[^>]*>[\s\S]*?<\/script>/i);if(x)r.push(x[0])}if(s.preserveHead&&i){let u=[],g=/<title\b[^>]*>[\s\S]*?<\/title>|<meta\b[^>]*>|<link\b[^>]*>/gi,f;while((f=g.exec(i[1]))!==null){if(/<meta\b[^>]*(?:\bcharset|name="viewport")/i.test(f[0]))continue;u.push(f[0])}if(u.length>0)r.unshift(`<!--${nt}${Buffer.from(u.join(`
24
- `),"utf8").toString("base64")}-->`)}let o=e.match(/<body\b[^>]*>/i),l=c(e);if(o&&l!==-1){let u=o.index+o[0].length,g=e.slice(u,l).trim();if(r.length>0)return r.join(`
25
- `)+`
26
- `+g;return g}let a=e;if(a=a.replace(/<!DOCTYPE\b[^>]*>/i,""),a=a.replace(/<html\b[^>]*>/i,""),a=a.replace(/<\/html\s*>/i,""),i)a=a.replace(/<head\b[^>]*>[\s\S]*?<\/head>/i,r.join(`
27
- `));return a=a.replace(/<body\b[^>]*>/i,""),a=a.replace(/<\/body\s*>/i,""),a.trim()}var V=/^<script\b[^>]*\sdata-stx-(?:owner|instance)(?=[\s=/>])/i;function B(t,s,e,r){if(!V.test(s))return!1;let i=s.slice(0,s.indexOf(">")+1),o=/\sdata-stx-owner="([^"]+)"/i.exec(i)?.[1];if(!o)return!0;let l=`data-stx-scope="${o}"`;for(let a=t.indexOf(l);a!==-1;a=t.indexOf(l,a+l.length))if(a>=e&&a<r)return!1;return!0}function va(t){return Ae(t)}function it(t,s){let e=[],r=new Set;for(let i of w(t,X)){if(i.start>=s.start&&i.start<s.end)continue;let o=i.token.match(/^<script\b((?:"[^"]*"|'[^']*'|[^'">])*)>/i)?.[1]??"",l=new Map;for(let g of o.matchAll(/([^\s=/>]+)(?:\s*=\s*(?:"([^"]*)"|'([^']*)'|([^\s>]+)))?/g))l.set(g[1].toLowerCase(),g[2]??g[3]??g[4]??"");let a=l.get("src")?.trim(),u=l.get("type")?.trim().toLowerCase();if(!a||l.has("server")||u&&!["module","text/javascript","application/javascript"].includes(u))continue;if(l.has("data-stx-runtime")||l.has("data-stx-router")||/^\/_stx\/(?:runtime|router)(?:\.[a-f0-9]{16})?\.js(?:[?#]|$)/i.test(a))continue;if(B(t,i.token,s.start,s.end)||r.has(i.token))continue;r.add(i.token),e.push(i.token)}return e}function Ye(t,s="main"){return!!P(t.trim(),s)}function Pe(t,s="main",e=!1){let r=t.trim(),i=[],o=[],l=r.match(/<head\b[^>]*>([\s\S]*?)<\/head>/i);if(l){let S=l[1],C=/<style\b[^>]*>[\s\S]*?<\/style>/gi,p;while((p=C.exec(S))!==null)i.push(p[0]);let A=/<script\b[^>]*data-stx-(?:route-params|server-data|scoped|component-factories)[^>]*>[\s\S]*?<\/script>/gi;while((p=A.exec(S))!==null){if(V.test(p[0])||p[0].includes("__stx_early_mounts")||/^<script\b[^>]*\bdata-stx-runtime(?=[\s=>])/i.test(p[0]))continue;o.push(p[0])}}let a=P(r,s);if(!a)return(e?Ln(t)+jn(t):"")+Je(t);let u=it(r,a),g=new Set(u),{tagName:f,start:d,end:x}=a,y=r.slice(d,x).trim(),R=[],b=r.match(/<body\b[^>]*>/i),k=c(r);if(b&&b.index!==void 0&&k!==-1){let C=[[b.index+b[0].length,a.openIndex],[x+`</${f}>`.length,k]],p=/<script\b[^>]*>[\s\S]*?<\/script>/gi;for(let[A,j]of C){if(A>=j)continue;let W=r.slice(A,j),v;p.lastIndex=0;while((v=p.exec(W))!==null){if(B(r,v[0],d,x))continue;R.push(v[0])}}}let m=[];if(e)m.push(Ln(t)+jn(t));if(i.length>0)m.push(i.join(`
28
- `));if(u.length>0)m.push(u.join(`
29
- `));if(o.length>0)m.push(o.filter((S)=>!g.has(S)).join(`
30
- `));if(R.length>0)m.push(R.filter((S)=>!g.has(S)).join(`
31
- `));return m.push(y),m.join(`
32
- `)}import O from"fs";import q from"path";function xa(t,s,e){return{version:1,buildTime:new Date().toISOString(),routes:t,assets:s,outputDir:e}}function Sa(t,s){let e=q.join(s,"manifest.json");O.writeFileSync(e,JSON.stringify(t,null,2))}function ka(t){let s=q.join(t,"manifest.json");if(!O.existsSync(s))return null;try{let e=O.readFileSync(s,"utf-8"),r=JSON.parse(e);if(r.version!==1)return console.warn(`[stx] Manifest version mismatch: expected 1, got ${r.version}`),null;return r}catch(e){return console.warn("[stx] Failed to load manifest:",e),null}}function M(t,s,e={}){let r=`${encodeURIComponent(t)}=${encodeURIComponent(s)}`;if(e.maxAge!==void 0)r+=`; Max-Age=${e.maxAge}`;if(e.expires)r+=`; Expires=${e.expires.toUTCString()}`;if(e.path)r+=`; Path=${e.path}`;if(e.domain)r+=`; Domain=${e.domain}`;if(e.secure)r+="; Secure";if(e.httpOnly)r+="; HttpOnly";if(e.sameSite)r+=`; SameSite=${e.sameSite}`;return r}async function ot(t){let s=t.headers.get("content-type")||"",e={},r=(i,o)=>{let l=e[i];if(l===void 0)e[i]=o;else if(Array.isArray(l))l.push(o);else e[i]=[l,o]};if(s.includes("multipart/form-data")){let i=await t.formData();for(let[o,l]of i.entries())if(typeof l==="string")r(o,l);return e}if(s.includes("application/x-www-form-urlencoded")){for(let[i,o]of new URLSearchParams(await t.text()).entries())r(i,o);return e}return e}function ko(t){if(!t)return!1;let s=t.toUpperCase();return s!=="GET"&&s!=="HEAD"}async function U(t,s={}){let e=s.request,r=s.method??e?.method;if(!e||!ko(r))return{ran:!1};if(typeof t.action!=="function")return{ran:!1};let i={};try{i=await ot(e)}catch{}let o=await t.action({request:e,form:i,params:s.params??{},query:t.query??{},cookies:s.cookies??{}});if(o&&typeof o==="object"){let l=o,a=at(l.cookies),u=l.redirect;if(typeof u==="string"&&u)return{redirect:u,ran:!0,...a.length>0?{cookies:a}:{}};let{cookies:g,redirect:f,...d}=l;if(Object.assign(t,d),a.length>0)return{ran:!0,cookies:a}}return{ran:!0}}function at(t){if(!t||typeof t!=="object"||Array.isArray(t))return[];let s=[];for(let[e,r]of Object.entries(t)){if(!e)continue;if(typeof r==="string"){s.push(M(e,r));continue}if(r&&typeof r==="object"){let i=r;if(typeof i.value!=="string")continue;s.push(M(e,i.value,i))}}return s}function _a(t,s=[],e){let r=new Headers({Location:t,"Cache-Control":"no-store"});for(let i of s)r.append("Set-Cookie",i);for(let[i,o]of Object.entries(e??{}))if(i.toLowerCase()!=="location")r.set(i,o);return new Response(null,{status:303,headers:r})}async function Bn(t,s={}){let{html:e,context:r,redirect:i,cookies:o}=await ct(t,s),l=Bt(r),a=Ft(r);if(i)return{html:e,redirect:i,cookies:o,status:l,headers:a};let{extractStreamBoundaries:u}=await import("./chunk-cwdvmvc6.js"),g=u(r),f=t.streamTemplates;if(f&&Object.keys(f).length>0){let{processDirectives:d}=await import("./chunk-23zpvmw5.js"),{defaultConfig:x}=await import("./chunk-c9mkbjk5.js"),y=r.streamBoundaries||{},R={...x,autoShell:!1},b=Object.keys(f).map((m)=>({id:m,render:async()=>{let S=typeof y[m]==="function"?await y[m]():void 0;return d(f[m],{...r,$boundary:S},t.sourceFile,R,new Set)}})),k=new Set(b.map((m)=>m.id));g=[...(g||[]).filter((m)=>!k.has(m.id)),...b]}return{html:e,boundaries:g&&g.length>0?g:void 0,cookies:o,status:l,headers:a}}async function ct(t,s){let e={__filename:t.sourceFile,__dirname:t.sourceFile.replace(/[/\\][^/\\]+$/,""),...s};if(!t.hasServerScripts&&!$i(t.html))return{html:t.html,context:e};for(let l of t.serverScriptContent)try{await h(l,e,t.sourceFile)}catch(a){if(s.__stx_strict_hydration)throw a;console.warn(`[stx] Server script error in ${t.sourceFile}:`,a)}let r=await U(e,{request:s.request,method:s.method,params:s.params??{},cookies:s.cookies??{}}),i=(l)=>{let a=l.replace(/<script\b[^>]*\bdata-stx-server-data\b[^>]*>[\s\S]*?<\/script>/gi,""),u=Pr(e);if(!u)return a;let g=D(a);return g<0?u+a:a.slice(0,g)+u+a.slice(g)};if(r.redirect)return{html:t.html,context:e,redirect:r.redirect,cookies:r.cookies};if(!$i(t.html))return{html:i(t.html),context:e,cookies:r.cookies};let o=new Map;for(let[l,a]of Object.entries(t.placeholders))if(a.expression)try{let u=I(a.expression,e);if(a.type==="raw")o.set(l,u!==void 0&&u!==null?String(u):"");else o.set(l,u!==void 0&&u!==null?G(String(u)):"")}catch(u){if(s.__stx_strict_hydration)throw u;o.set(l,"")}return{html:i(gl(t.html,o)),context:e,cookies:r.cookies}}
33
- export{wt,en,Ae,z,Ln,jn,wa,So,Qr,Je,va,Ye,Pe,xa,Sa,ka,ko,_a,Bn};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{io,Hi,Fg,zg,Hg}from"./chunk-f6ypmk8x.js";import"./chunk-x64afx6z.js";export{zg as generateManifestLink,io as generatePwaTags,Fg as generateSwRegistrationScript,Hg as generateThemeColorMeta,Hi as injectPwaTags};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{La,ja,Ba,Fa,Bh}from"./chunk-b3wc86ez.js";import"./chunk-79y9amt1.js";import"./chunk-mnf4gktz.js";import"./chunk-vvzys1x7.js";import"./chunk-d60bvtmy.js";import"./chunk-73c3awyw.js";import"./chunk-tzey0xq2.js";import"./chunk-q1wxgw5s.js";import"./chunk-h1hcjx7e.js";import"./chunk-s21bj83r.js";import"./chunk-q13dgfe1.js";import"./chunk-jbgj2hph.js";import"./chunk-c6rcrh48.js";import"./chunk-cr0msawk.js";import"./chunk-5dvkphbe.js";import"./chunk-kandgxsh.js";import"./chunk-rnvw07ca.js";import"./chunk-t5jfh1bs.js";import"./chunk-tnp2ta5q.js";import"./chunk-rw5492e2.js";import"./chunk-83tvkw4y.js";import"./chunk-kh6njq2r.js";import"./chunk-fpya25cc.js";import"./chunk-pqjmse0r.js";import"./chunk-k32q90b2.js";import"./chunk-g0xn80gz.js";import"./chunk-farh4p7f.js";import"./chunk-qjey0jk6.js";export{La as buildNative,Bh as default,ja as findCraftBinary,Fa as getAvailableFormats,Ba as getAvailableTargets};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Eo,Eh,Th}from"./chunk-5tt1xbeh.js";import"./chunk-k15hxcgs.js";import"./chunk-3a4tfycz.js";import"./chunk-9zrvh3pz.js";import"./chunk-c6rcrh48.js";import"./chunk-cr0msawk.js";import"./chunk-5dvkphbe.js";import"./chunk-rnvw07ca.js";import"./chunk-t5jfh1bs.js";import"./chunk-tnp2ta5q.js";import"./chunk-rw5492e2.js";import"./chunk-83tvkw4y.js";import"./chunk-kh6njq2r.js";import"./chunk-fpya25cc.js";import"./chunk-pqjmse0r.js";import"./chunk-k32q90b2.js";import"./chunk-g0xn80gz.js";import"./chunk-farh4p7f.js";import"./chunk-qjey0jk6.js";export{Th as clearComposableCache,Eh as getComposableScript,Eo as listComposableModules};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Fl,zl}from"./chunk-d0cjw1gn.js";import"./chunk-v37zmez0.js";import"./chunk-qbf8re0y.js";import"./chunk-rd751nw3.js";import"./chunk-7qmr1z81.js";import"./chunk-nack2xs5.js";import"./chunk-mcnwvh06.js";import"./chunk-mzr29qkj.js";import"./chunk-v5kjwkz2.js";import"./chunk-6d39636b.js";import"./chunk-6ftee542.js";import"./chunk-gd56arnm.js";import"./chunk-ew5cey88.js";import"./chunk-jn335zs0.js";import"./chunk-8me8hamk.js";import"./chunk-ysfeg3cn.js";import"./chunk-01mwbg1r.js";import"./chunk-55zq2ha8.js";import"./chunk-hev4t4d5.js";import"./chunk-1mqcttg3.js";import"./chunk-ea5pm30m.js";import"./chunk-qvjxg8yz.js";import"./chunk-qcxrcypb.js";import"./chunk-gbtbfg7e.js";import"./chunk-cqhwzd9y.js";import"./chunk-j1efsjsb.js";import"./chunk-9vzeea7p.js";import"./chunk-5tt1xbeh.js";import"./chunk-7xhwqc0c.js";import"./chunk-mnf4gktz.js";import"./chunk-vvzys1x7.js";import"./chunk-v4xes880.js";import{an}from"./chunk-qx8czb2j.js";import{Ff}from"./chunk-k15hxcgs.js";import"./chunk-3a4tfycz.js";import"./chunk-9zrvh3pz.js";import{Ne,i}from"./chunk-d60bvtmy.js";import"./chunk-73c3awyw.js";import"./chunk-tzey0xq2.js";import"./chunk-q1wxgw5s.js";import"./chunk-h1hcjx7e.js";import"./chunk-s21bj83r.js";import"./chunk-q13dgfe1.js";import"./chunk-jbgj2hph.js";import"./chunk-c6rcrh48.js";import{_e}from"./chunk-cr0msawk.js";import"./chunk-5dvkphbe.js";import{hr,yr}from"./chunk-kandgxsh.js";import{$s,V,a}from"./chunk-rnvw07ca.js";import"./chunk-t5jfh1bs.js";import"./chunk-tnp2ta5q.js";import"./chunk-rw5492e2.js";import"./chunk-83tvkw4y.js";import"./chunk-kh6njq2r.js";import{h,He}from"./chunk-fpya25cc.js";import"./chunk-pqjmse0r.js";import"./chunk-k32q90b2.js";import"./chunk-g0xn80gz.js";import"./chunk-farh4p7f.js";import"./chunk-qjey0jk6.js";import{Ui}from"./chunk-fd1bpv35.js";import"./chunk-6m6y9bbx.js";import"./chunk-z512gt4v.js";export{$s as buildWebComponents,yr as cacheTemplate,hr as checkCache,an as classifyAllScripts,Fl as createMiddleware,zl as createRoute,V as defaultConfig,h as extractVariables,_e as injectRouterScript,Ui as insertBeforeBodyClose,a as loadStxConfig,He as processClientScript,i as processDirectives,Ne as readMarkdownFile,Ff as withinBundlerCallback};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{V,rg,ri,$c,a,M,iy,ay}from"./chunk-rnvw07ca.js";import"./chunk-t5jfh1bs.js";import"./chunk-tnp2ta5q.js";import"./chunk-rw5492e2.js";import"./chunk-83tvkw4y.js";import"./chunk-kh6njq2r.js";import"./chunk-fpya25cc.js";import"./chunk-pqjmse0r.js";import"./chunk-k32q90b2.js";import"./chunk-g0xn80gz.js";import"./chunk-farh4p7f.js";import"./chunk-qjey0jk6.js";export{M as config,V as defaultConfig,iy as defineStxConfig,ri as discoverConfig,a as loadStxConfig,$c as resolveInstalledPackage,rg as resolveStxDirectories,ay as validateConfig};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{dm}from"./chunk-7qmr1z81.js";import"./chunk-6d39636b.js";import"./chunk-qx8czb2j.js";import"./chunk-3a4tfycz.js";import"./chunk-s21bj83r.js";import"./chunk-cr0msawk.js";import"./chunk-rnvw07ca.js";import"./chunk-t5jfh1bs.js";import"./chunk-tnp2ta5q.js";import"./chunk-rw5492e2.js";import"./chunk-83tvkw4y.js";import"./chunk-kh6njq2r.js";import"./chunk-fpya25cc.js";import"./chunk-pqjmse0r.js";import"./chunk-k32q90b2.js";import"./chunk-g0xn80gz.js";import"./chunk-farh4p7f.js";import"./chunk-qjey0jk6.js";export{dm as startProductionServer};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Ym,Aa,_u,Zm,Qm,eh,th,nh,Cu,Eu,rh,sh,oh,ih}from"./chunk-qvjxg8yz.js";import"./chunk-d60bvtmy.js";import"./chunk-73c3awyw.js";import"./chunk-tzey0xq2.js";import"./chunk-q1wxgw5s.js";import"./chunk-h1hcjx7e.js";import"./chunk-s21bj83r.js";import"./chunk-q13dgfe1.js";import"./chunk-jbgj2hph.js";import"./chunk-c6rcrh48.js";import"./chunk-cr0msawk.js";import"./chunk-5dvkphbe.js";import"./chunk-kandgxsh.js";import"./chunk-rnvw07ca.js";import"./chunk-t5jfh1bs.js";import"./chunk-tnp2ta5q.js";import"./chunk-rw5492e2.js";import"./chunk-83tvkw4y.js";import"./chunk-kh6njq2r.js";import"./chunk-fpya25cc.js";import"./chunk-pqjmse0r.js";import"./chunk-k32q90b2.js";import"./chunk-g0xn80gz.js";import"./chunk-farh4p7f.js";import"./chunk-qjey0jk6.js";export{_u as SUSPENSE_RESOLVER_RUNTIME,Aa as buildSuspenseResolveScript,nh as createStreamRenderer,eh as extractStreamBoundaries,ih as generateHydrationRuntime,Eu as islandDirective,sh as processSectionDirectives,Qm as processStreamDirectives,rh as registerStreamingDirectives,Zm as renderStreamingPage,Ym as streamTemplate,th as streamTemplateSimple,oh as streamToResponse,Cu as streamingSuspenseDirective};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{qh,Gf,tt,wc,Kh,gs,ms,hs}from"./chunk-tzey0xq2.js";import"./chunk-h1hcjx7e.js";import"./chunk-s21bj83r.js";import"./chunk-jbgj2hph.js";import"./chunk-5dvkphbe.js";import"./chunk-fpya25cc.js";import"./chunk-pqjmse0r.js";import"./chunk-k32q90b2.js";import"./chunk-g0xn80gz.js";import"./chunk-farh4p7f.js";import"./chunk-qjey0jk6.js";export{Kh as clearOnceStore,wc as onceStore,tt as partialsCache,gs as processIncludes,ms as processStackPushDirectives,hs as processStackReplacements,qh as resetUnscopedSignalWarnings,Gf as topLevelElements};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{ya,mm,ba,hm,Yl,Zl,ym,bm}from"./chunk-mzr29qkj.js";import"./chunk-5tt1xbeh.js";import"./chunk-k15hxcgs.js";import"./chunk-3a4tfycz.js";import"./chunk-9zrvh3pz.js";import"./chunk-c6rcrh48.js";import"./chunk-cr0msawk.js";import"./chunk-5dvkphbe.js";import"./chunk-rnvw07ca.js";import"./chunk-t5jfh1bs.js";import"./chunk-tnp2ta5q.js";import"./chunk-rw5492e2.js";import"./chunk-83tvkw4y.js";import"./chunk-kh6njq2r.js";import{lt,gg}from"./chunk-fpya25cc.js";import"./chunk-pqjmse0r.js";import"./chunk-k32q90b2.js";import"./chunk-g0xn80gz.js";import"./chunk-farh4p7f.js";import"./chunk-qjey0jk6.js";export{ya as buildScriptVirtualFile,mm as buildVirtualSource,lt as extractScriptBlocks,gg as extractTemplateExpressions,Yl as findRuntimeTypeDeclarations,Zl as findStxModuleDeclarations,bm as formatTypecheckDiagnostics,hm as sourcePathFor,ym as typecheckStxFiles,ba as virtualPathFor};
@@ -1,42 +0,0 @@
1
- // @bun
2
- import{Tl,$l}from"./chunk-qjey0jk6.js";import{m,O,ut,p}from"./chunk-g0xn80gz.js";import{K,_r,Fs,zs,fi,mi,Hs,Lt,Be,ye,Q,Tr,$r,de,ee,L,ct,Rr,wi,Ir,We,s,g,G,En}from"./chunk-fpya25cc.js";import{n}from"./chunk-s21bj83r.js";import{le}from"./chunk-jbgj2hph.js";import{pr}from"./chunk-01c16zw4.js";import{r}from"./chunk-x7redxyd.js";import{b}from"./chunk-94mpe1ny.js";import{createHash as kt}from"crypto";import Y from"fs";import Z from"path";import Le from"fs";function Ae(e,i,t){let o=Buffer.alloc(t),a=Le.readSync(e,o,0,t,i);return o.subarray(0,a)}function ze(e){if(e.length<25)return!1;let i=(o,a)=>String.fromCharCode(...e.subarray(o,a));if(i(0,4)!=="RIFF"||i(8,12)!=="WEBP")return!1;let t=i(12,16);if(t==="VP8X")return(e[20]&16)!==0;if(t==="VP8L")return((e[21]|e[22]<<8|e[23]<<16|e[24]<<24)>>>28&1)===1;return!1}function Ue(e){let i;try{i=Le.openSync(e,"r");let t=Ae(i,0,33);if(t.length>=3&&t[0]===255&&t[1]===216&&t[2]===255)return"none";if(t.length>=26&&t[0]===137&&t.toString("latin1",1,4)==="PNG"){let o=t[25];if(o===4||o===6)return"possible";let a=8;for(let c=0;c<64;c++){let l=Ae(i,a,8);if(l.length<8)return"unknown";let u=l.toString("latin1",4,8);if(u==="tRNS")return"possible";if(u==="IDAT"||u==="IEND")return"none";a+=12+l.readUInt32BE(0)}return"unknown"}if(t.length>=25&&t.toString("latin1",0,4)==="RIFF"&&t.toString("latin1",8,12)==="WEBP"){if(ze(t))return"possible";let o=t.toString("latin1",12,16);return o==="VP8 "||o==="VP8X"?"none":"unknown"}return"unknown"}catch{return"unknown"}finally{if(i!==void 0)Le.closeSync(i)}}import rn from"fs";import Fe from"os";import{fileURLToPath as yt}from"url";var _e=Symbol("stx.image-worker.unavailable");function sn(e=typeof Fe.availableParallelism==="function"?Fe.availableParallelism():Fe.cpus().length){return Math.max(1,Math.min(2,e-1))}var Pe=0,xt=[];async function on(){if(Pe<sn()){Pe++;return}await new Promise((e)=>xt.push(e)),Pe++}function an(){Pe--,xt.shift()?.()}var cn="@stacksjs/stx/builtins/image-warmup-worker";function ln(e=process.cwd()){let i=import.meta.url.endsWith(".ts")?"ts":"js";try{let t=new URL(`./image-warmup-worker.${i}`,import.meta.url);if(t.protocol==="file:"&&rn.existsSync(yt(t)))return yt(t)}catch{}return pr(cn,e)}var bt=!1;function fe(e){if(!bt)bt=!0,console.warn(`[stx] image worker unavailable (${e}); running the image pass on the serving thread instead. Results are the same, but requests may stall while it runs.`);return _e}function Ie(e){return e instanceof Error?e.message:String(e)}async function He(e,i){let t;try{t=(await import("worker_threads")).Worker}catch(a){return fe(`could not load node:worker_threads: ${Ie(a)}`)}if(typeof t!=="function")return fe("node:worker_threads has no Worker in this runtime");let o=ln();if(!o)return fe("no image-warmup-worker entry beside this module or in the installed @stacksjs/stx");await on();try{return await new Promise((a,c)=>{let l;try{l=new t(o)}catch(h){a(fe(`could not start ${o}: ${Ie(h)}`));return}let u=!1,f=!1,x=(h)=>{if(f)return;f=!0,h(),l.terminate()};l.on("message",(h)=>{if(h.type==="ready"){u=!0,l.postMessage({task:e,args:i});return}if(h.type==="result"){x(()=>a(h.value));return}let d=Error(h.error?.message??"image worker failed");if(h.error?.name)d.name=h.error.name;if(h.error?.stack)d.stack=h.error.stack;x(()=>c(d))}),l.on("error",(h)=>{x(()=>u?c(h instanceof Error?h:Error(Ie(h)||"image worker crashed")):a(fe(`the worker failed before it was ready: ${Ie(h)}`)))}),l.on("exit",(h)=>{x(()=>u?c(Error("image worker exited before it finished")):a(fe(`the worker exited with code ${h} before it was ready`)))})})}finally{an()}}var un=new Set([".avif",".jpeg",".jpg",".png",".webp"]),fn=[320,640,960,1280,1920],ve="/_stx/images",dn=`stx:${ve}:alpha-1`,gn=`stx:${ve}:opaque-1`,pn=["@stacksjs/ts-webp","@stacksjs/ts-avif","ts-images"],Ee;function mn(e,i){let t=Z.dirname(Bun.resolveSync(e,i));while(t!==Z.dirname(t)){let o=Z.join(t,"package.json");if(Y.existsSync(o)){let a=JSON.parse(Y.readFileSync(o,"utf8"));if(a.name===e)return a.version}t=Z.dirname(t)}return}function vt(){if(Ee!==void 0)return Ee;let e;try{e=Z.dirname(Bun.resolveSync("ts-images",import.meta.dir))}catch{}return Ee=pn.map((i)=>{let t;try{t=e?mn(i,e):void 0}catch{}return`${i.replace("@stacksjs/","")}@${t??"unknown"}`}).join("+"),Ee}var wt=Symbol.for("stx.image-delivery");function we(){let e=globalThis;return e[wt]??={catalog:new Map,transparent:new Set},e[wt]}var $t=new Set;function hn(e){return`/${e.split(Z.sep).map(encodeURIComponent).join("/")}`}function yn(e){let i=Z.extname(e),t=e.slice(0,-i.length).replace(/[^a-zA-Z0-9_-]+/g,"-").replace(/^-+|-+$/g,""),o=kt("sha256").update(e).digest("hex").slice(0,8);return`${t||"image"}-${o}`}function St(e,i=`stx:${ve}`){let t=(o)=>`${ve}/${o.split("/").map(encodeURIComponent).join("/")}`;return{cacheNamespace:i,async stat(o){let a=Z.join(e,o);try{let c=await Y.promises.stat(a);return c.size>0?{bytes:c.size,path:a,url:t(o)}:null}catch{return null}},async write(o,a){let c=Z.join(e,o);await Y.promises.mkdir(Z.dirname(c),{recursive:!0});let l=`${c}.${process.pid}.tmp`;return await Y.promises.writeFile(l,a),await Y.promises.rename(l,c),{bytes:a.byteLength,path:c,url:t(o)}},url:t}}async function At(e,i=e){let t=await Y.promises.readdir(i,{withFileTypes:!0});t.sort((a,c)=>a.name.localeCompare(c.name));let o=[];for(let a of t){let c=Z.join(i,a.name);if(a.isDirectory()){o.push(...await At(e,c));continue}if(!a.isFile()||!un.has(Z.extname(a.name).toLowerCase()))continue;o.push({absolutePath:c,relativePath:Z.relative(e,c)})}return o}function Ct(e,i){return e.map((t)=>({key:hn(t.relativePath),input:t.absolutePath,name:yn(t.relativePath),...bn(t.absolutePath)?{options:{storage:i}}:{}}))}function bn(e){return Ue(e)==="possible"}function xn(e){for(let i=3;i<e.length;i+=4)if(e[i]!==255)return!0;return!1}async function vn(e){let i=Object.entries(e).filter(([,c])=>c.fallback.format==="png"),t=new Set,o=8;if(i.length===0)return t;let{decode:a}=await import("ts-images");for(let c=0;c<i.length;c+=8)await Promise.all(i.slice(c,c+8).map(async([l,u])=>{let f=u.variants.filter((x)=>x.format==="png").sort((x,h)=>x.width-h.width)[0];try{let x=await a(new Uint8Array(await Y.promises.readFile(f?.path??u.fallback.path)));if(xn(x.data))t.add(l)}catch{t.add(l)}}));return t}function wn(e,i){let t=[];for(let o of i){let a=e[o],c=a?.variants.filter((u)=>u.format==="webp")??[];if(!a||c.length===0)continue;if(!c.some((u)=>{let f;try{return f=Y.openSync(u.path,"r"),!ze(Ae(f,0,32))}catch{return!0}finally{if(f!==void 0)Y.closeSync(f)}}))continue;if(a.variants=a.variants.filter((u)=>u.format!=="webp"),delete a.sources.webp,t.push(o),!$t.has(o))$t.add(o),console.warn(`[stx-images] ${o} is transparent but its WebP variants have no alpha channel; serving PNG instead. Upgrade @stacksjs/ts-webp to 0.1.6 or later.`)}return t}async function $n(e){let i=[],t=8;if(e.length===0)return i;let{generateThumbHash:o}=await import("ts-images");for(let a=0;a<e.length;a+=8){let c=e.slice(a,a+8),l=await Promise.all(c.map(async(u)=>{try{return await o(u.absolutePath),u}catch{return console.warn(`[stx-images] Skipping unreadable raster: ${u.relativePath}`),null}}));i.push(...l.filter((u)=>u!==null))}return i}function qe(e){return Z.join(e,"undecodable.json")}function Sn(e){try{let i=Y.readFileSync(qe(e),"utf-8"),t=JSON.parse(i);return t&&typeof t==="object"?t:{}}catch{return{}}}function Cn(e,i){try{Y.mkdirSync(Z.dirname(qe(e)),{recursive:!0}),Y.writeFileSync(qe(e),JSON.stringify(i))}catch{}}function Rt(e){try{let i=Y.statSync(e);return{mtimeMs:i.mtimeMs,size:i.size}}catch{return}}function It(e){if(!e||e.startsWith("data:")||e.startsWith("blob:")||/^https?:\/\//i.test(e)||e.startsWith("//"))return;let i=e.split(/[?#]/,1)[0];if(!i)return;try{return`/${i.replace(/^\/+/,"").split("/").map(decodeURIComponent).map(encodeURIComponent).join("/")}`}catch{return}}function Uo(e){let i=It(e);return i?we().catalog.get(i):void 0}function Wo(e){let i=It(e);return i?we().transparent.has(i):!1}function qo(e){let i=(o)=>e.variants.filter((a)=>a.format===o).reduce((a,c)=>a+c.bytes,0),t=i(e.fallback.format);return["avif","webp"].map((o)=>({format:o,srcset:e.sources[o]||"",bytes:i(o)})).filter((o)=>o.srcset&&o.bytes>0&&o.bytes<t).sort((o,a)=>o.bytes-a.bytes).map(({format:o,srcset:a})=>({format:o,srcset:a}))}function Gh(e){let i=Uo(e);if(!i)return;return{src:i.fallback.url,srcset:i.sources[i.fallback.format]||"",sources:qo(i).map(({format:t,srcset:o})=>({type:`image/${t}`,srcset:o})),width:i.source.width,height:i.source.height,placeholder:Wo(e)?void 0:i.placeholder?.dataUrl}}function ys(){let e=we();e.catalog=new Map,e.transparent=new Set}function Rn(e){let i=we();i.catalog=new Map(e.entries),i.transparent=new Set(e.transparent)}async function Xh(e,i,t={}){if(!e||!Y.existsSync(e))return ys(),{count:0,fingerprint:""};if(t.offThread){let y=await He("delivery",{publicDir:e,outputDir:i});if(y!==_e)return Rn(y.state),y.result}let o=await At(e);if(o.length===0)return ys(),{count:0,fingerprint:""};let a=Sn(i),c=o.filter((y)=>{let w=a[y.relativePath];if(!w)return!0;let A=Rt(y.absolutePath);return!A||A.mtimeMs!==w.mtimeMs||A.size!==w.size});if(c.length===0)return ys(),{count:0,fingerprint:""};let l=St(Z.join(i,"_stx","images"),`${dn}:${vt()}`),u={outDir:Z.join(i,"_stx","images"),storage:St(Z.join(i,"_stx","images"),`${gn}:${vt()}`),baseUrl:ve,widths:fn,formats:["avif","webp"],quality:{avif:70,webp:78,jpeg:82,png:100},includeOriginal:!1,placeholder:!0,batchConcurrency:4,concurrency:4},{createImageDeliveryCatalog:f}=await import("ts-images/delivery"),x=c,h;try{h=await f({...u,entries:Ct(c,l)})}catch(y){if(x=await $n(c),x.length===c.length)throw y;let w=new Set(x.map((k)=>k.relativePath)),A=!1;for(let k of c){if(w.has(k.relativePath))continue;let R=Rt(k.absolutePath);if(!R)continue;a[k.relativePath]=R,A=!0}if(A)Cn(i,a);if(x.length===0)return ys(),{count:0,fingerprint:""};h=await f({...u,entries:Ct(x,l)})}let d=await vn(h.entries),C=wn(h.entries,d),v=we();v.catalog=new Map(Object.entries(h.entries)),v.transparent=d;let S=d.size===0&&C.length===0?h.fingerprint:kt("sha256").update(h.fingerprint).update(JSON.stringify({transparent:[...d].sort(),droppedWebp:C.sort()})).digest("hex");return{count:x.length,fingerprint:S}}class Pt{builtins=new Map;registerBuiltin(e){this.builtins.set(e.name.toLowerCase(),e);for(let i of e.aliases)this.builtins.set(i.toLowerCase(),e)}isBuiltin(e){return this.builtins.has(e.toLowerCase())}getBuiltin(e){return this.builtins.get(e.toLowerCase())??null}async resolveFile(e,i,t,o){let a=fi(e,o);if(a!==void 0)return a;for(let c of mi(e,i,t,o))if(await s(c))return c;return null}}var ge=new Pt;var se="\x00stx-boolean-attribute";function Xe(e){return e.indexOf("\x00")===-1?e:e.replace(/\0/g,"")}var kn=new Set(["accesskey","autocapitalize","autofocus","class","contenteditable","dir","draggable","enterkeyhint","exportparts","hidden","id","inert","inputmode","is","itemid","itemprop","itemref","itemscope","itemtype","lang","nonce","part","role","slot","spellcheck","style","tabindex","title","translate","accept","action","alt","autocomplete","capture","cite","cols","colspan","content","controls","datetime","default","download","enctype","for","form","formaction","formenctype","formmethod","formnovalidate","formtarget","height","href","hreflang","kind","label","loading","loop","max","maxlength","media","method","min","minlength","multiple","muted","name","open","pattern","placeholder","playsinline","poster","preload","readonly","referrerpolicy","rel","required","reversed","rows","rowspan","scope","selected","shape","size","span","src","srcdoc","srclang","srcset","start","step","target","type","usemap","value","width","wrap"]);function Ve(e){let i=e.toLowerCase();return i.startsWith("aria-")||i.startsWith("data-")||kn.has(i)}function ie(e,i){let t=[];for(let[o,a]of Object.entries(e.static)){if(i.has(o))continue;let c=e.staticNames?.[o]??o;if(typeof a==="boolean"){if(a)t.push(g(c));continue}if(a===se){t.push(g(c));continue}t.push(`${g(c)}="${En(c,Xe(String(a)))}"`)}return t}function oe(e,i){let t=[];for(let[o,a]of Object.entries(e.serverDynamic??{})){if(i.has(o))continue;if(a===null||a===void 0||a===!1)continue;let c=e.serverDynamicNames?.[o]??o;if(a===!0){t.push(g(c));continue}if(typeof a==="object")continue;t.push(`${g(c)}="${En(c,Xe(String(a)))}"`)}return t}function An(e){if(e.clientReactive.to)return{value:e.clientReactive.to,reactive:!0};if(e.serverDynamic.to!==void 0)return{value:String(e.serverDynamic.to),reactive:!1};if(typeof e.static.to==="string")return{value:e.static.to,reactive:!1};return{value:"#",reactive:!1}}var Ze={name:"StxLink",aliases:["stx-link"],render(e,i,t){let o=An(e),a=(typeof e.static.class==="string"?e.static.class:"")||(typeof e.static.className==="string"?e.static.className:""),c=typeof e.static.activeClass==="string"?e.static.activeClass:"active",l=typeof e.static.exactActiveClass==="string"?e.static.exactActiveClass:"exact-active",u=e.static.prefetch===!0||e.static.prefetch==="true"||e.serverDynamic.prefetch===!0,f=[];if(o.reactive)f.push(`:href="${n(o.value)}"`);else f.push(`href="${n(Tr(o.value,"navigable"))}"`);if(a)f.push(`class="${n(a)}"`);if(f.push("data-stx-link"),f.push(`data-stx-active-class="${n(c)}"`),f.push(`data-stx-exact-active-class="${n(l)}"`),u)f.push("data-stx-prefetch");let x=typeof e.static.activeMatch==="string"?e.static.activeMatch.trim():"";if(x)f.push(`data-stx-active-match="${n(x)}"`);let h=new Set(["to","class","className","activeClass","exactActiveClass","activeMatch","prefetch"]);return f.push(...ie(e,h)),f.push(...oe(e,h)),`<a ${f.join(" ")}>${i}</a>`}};var In=new Map;function Ge(e){if(!e)return;let i=e.split("?")[0].split("#")[0];return In.get(i)}var Pn={sm:640,md:768,lg:1024,xl:1280,"2xl":1536},Ke=[320,640,768,1024,1280,1536,1920];function H(e,i){if(e.serverDynamic[i]!==void 0)return String(e.serverDynamic[i]);let t=e.static[i];if(typeof t==="string")return t;return}function Ne(e,i,t=!1){let o=e.serverDynamic[i];if(o!==void 0)return o!==!1&&o!=="false";let a=e.static[i];if(a!==void 0)return a!=="false"&&a!==!1;return t}function Je(e){if(e.includes("(")||e.includes(","))return e;let i=e.trim().split(/\s+/),t=[];for(let o of i)if(o.includes(":")){let[a,c]=o.split(":"),l=Pn[a];if(l)t.push(`(max-width: ${l}px) ${c}`);else{let u=Number.parseInt(a);if(!Number.isNaN(u))t.push(`(max-width: ${u}px) ${c}`)}}else t.push(o);return t.join(", ")}function Ye(e,i,t,o){return i.map((a)=>`${$e(e,a,void 0,t,o)} ${a}w`).join(", ")}function _n(e,i,t,o,a){return i.map((c)=>{let l=t?t*c:void 0;return`${$e(e,l,void 0,o,a)} ${c}x`}).join(", ")}function $e(e,i,t,o,a){if(!o||o==="local"||o==="static")return e;if(o==="cloudinary"){let c=[];if(i)c.push(`w_${i}`);if(t)c.push(`h_${t}`);if(a)c.push(`f_${a}`);c.push("q_auto");let l=c.join(",");return e.replace("/upload/",`/upload/${l}/`)}if(o==="imgix"){let c=new URLSearchParams;if(i)c.set("w",String(i));if(t)c.set("h",String(t));if(a)c.set("fm",a);c.set("auto","format");let l=e.includes("?")?"&":"?";return`${e}${l}${c.toString()}`}if(o==="bunny"){let c=new URLSearchParams;if(i)c.set("width",String(i));if(t)c.set("height",String(t));if(a)c.set("format",a);let l=e.includes("?")?"&":"?";return`${e}${l}${c.toString()}`}return e}function Nn(e){return`var s=this.style;${e.map((i)=>`s.${i}=''`).join(";")}`}function On(e,i,t="#e5e7eb"){let o=`<svg xmlns="http://www.w3.org/2000/svg" width="${e}" height="${i}"><rect width="100%" height="100%" fill="${t}"/></svg>`;return`data:image/svg+xml;base64,${btoa(o)}`}var Qe={name:"StxImage",aliases:["Image","stx-image","stx-img"],render(e,i,t){let o=H(e,"src")||"",a=Uo(o),c=H(e,"alt")||"",l=H(e,"width")||(a?String(a.source.width):void 0),u=H(e,"height")||(a?String(a.source.height):void 0),f=H(e,"sizes"),x=H(e,"srcset"),h=H(e,"densities"),d=H(e,"format"),C=Wo(o)||Ge(o)?.transparent===!0,v=H(e,"placeholder")||(a&&!C?"thumbhash":void 0),S=H(e,"placeholderColor")||"#e5e7eb",y=H(e,"provider"),w=H(e,"class")||H(e,"className")||"",A=H(e,"style")||"",k=H(e,"objectFit")||H(e,"fit"),R=H(e,"objectPosition")||H(e,"position"),E=H(e,"quality"),J=Ne(e,"lazy",!0),M=Ne(e,"preload",!1),U=Ne(e,"priority",!1),z=H(e,"loading"),N=H(e,"decoding")||"async",q=!!a||Ne(e,"picture",!1)||!!d,I=l?Number.parseInt(l):void 0,_=u?Number.parseInt(u):void 0,T=x||"",F="";if(a)T=a.sources[a.fallback.format]||"",F=f?Je(f):"100vw";else if(!T&&f&&y&&y!=="local"&&y!=="static")T=Ye(o,Ke,y,d),F=Je(f);else if(!T&&h){let V=h.split(/\s+/).map((P)=>Number.parseFloat(P.replace("x","")));T=_n(o,V,I,y,d)}else if(f)F=Je(f);let D=[];if(A)D.push(A);if(k)D.push(`object-fit:${k}`);if(R)D.push(`object-position:${R}`);if(I&&_)D.push(`aspect-ratio:${I}/${_}`);let re=[],ae=v==="blur"||v==="color"||v==="thumbhash";if(ae&&!C){let V=a?.placeholder?{dataUrl:a.placeholder.dataUrl,color:S}:Ge(o);if(V&&v==="color")D.push(`background-color:${V.color}`),re.push("backgroundColor");else if(V)D.push(`background-color:${V.color}`),D.push(`background-image:url(${V.dataUrl})`),D.push("background-size:cover"),D.push("background-repeat:no-repeat"),re.push("backgroundColor","backgroundImage");else{let P=On(I||16,_||9,S);D.push(`background-image:url(${P})`),D.push("background-size:cover"),D.push("background-repeat:no-repeat"),re.push("backgroundImage")}}else if(!ae&&v&&v!=="empty"&&v!=="none")D.push(`background-image:url(${n(v)})`),D.push("background-size:cover"),D.push("background-repeat:no-repeat"),re.push("backgroundImage");let j=a?.fallback.url||$e(o,I,_,y,d),X=[];if(X.push(`src="${n(Tr(j,"fetched"))}"`),X.push(`alt="${n(c)}"`),l)X.push(`width="${n(l)}"`);if(u)X.push(`height="${n(u)}"`);let Re=z||(U||M?"eager":J?"lazy":"");if(Re)X.push(`loading="${n(Re)}"`);if(U)X.push('fetchpriority="high"');if(X.push(`decoding="${n(N)}"`),w)X.push(`class="${n(w)}"`);if(D.length>0)X.push(`style="${n(D.join(";"))}"`);if(T)X.push(`srcset="${n(Tr(T,"fetched"))}"`);if(F)X.push(`sizes="${n(F)}"`);let xe=new Set(["src","alt","width","height","lazy","sizes","srcset","placeholder","placeholderColor","class","className","style","objectFit","objectPosition","fit","position","format","provider","quality","densities","preload","priority","picture","loading","decoding"]);if(re.length>0){let V=typeof e.static.onload==="string"?e.static.onload:"",P=Nn(re)+(V?`;${V}`:"");X.push(`onload="${n(P)}"`),xe.add("onload")}X.push(...ie(e,xe)),X.push(...oe(e,xe));let ue=`<img ${X.join(" ")} />`,te="";if(M){let P=d==="webp"?"image/webp":d==="avif"?"image/avif":"";te=`<link rel="preload" as="image" href="${n(j)}"${P?` type="${P}"`:""}${T?` imagesrcset="${n(T)}"`:""}${F?` imagesizes="${n(F)}"`:""} />
3
- `}if(q){let V=[];if(a)for(let P of qo(a))V.push(`<source type="image/${P.format}" srcset="${n(P.srcset)}"${F?` sizes="${n(F)}"`:""} />`);if(!a&&(d==="avif"||d==="auto")){let P=$e(o,I,_,y,"avif"),B=T?Ye(o,Ke,y,"avif"):`${P}`;V.push(`<source type="image/avif" srcset="${n(B)}"${F?` sizes="${n(F)}"`:""} />`)}if(!a&&(d==="webp"||d==="auto")){let P=$e(o,I,_,y,"webp"),B=T?Ye(o,Ke,y,"webp"):`${P}`;V.push(`<source type="image/webp" srcset="${n(B)}"${F?` sizes="${n(F)}"`:""} />`)}return`${te}<picture>
4
- ${V.join(`
5
- `)}
6
- ${ue}
7
- </picture>`}return`${te}${ue}`}};var _t="/images/safe-image-default.svg";function pe(e,i){if(e.serverDynamic[i]!==void 0)return String(e.serverDynamic[i]);let t=e.static[i];if(typeof t==="string")return t;return}var Bn=`<script>window.__stxSafeImageHandler||(window.__stxSafeImageHandler=function(i){if(i.__stx_fb)return;i.__stx_fb=1;var f=i.getAttribute('data-fallback')||'${_t}';var c=i.getAttribute('data-fallback-class');i.src=f;if(c)i.className=c;});</script>`,et={name:"SafeImage",aliases:["safe-image","safe-img"],render(e,i,t){let o=pe(e,"src")||"",a=pe(e,"alt")||"",c=pe(e,"fallback")||_t,l=pe(e,"class")||pe(e,"className")||"",u=pe(e,"fallbackClassName")||"",f=[];if(f.push(`src="${n(o)}"`),f.push(`alt="${n(a)}"`),l)f.push(`class="${n(l)}"`);if(f.push(`data-fallback="${n(c)}"`),u)f.push(`data-fallback-class="${n(u)}"`);f.push('onerror="window.__stxSafeImageHandler(this)"');let x=new Set(["src","alt","fallback","class","className","fallbackClassName"]);f.push(...ie(e,x)),f.push(...oe(e,x));let h=`<img ${f.join(" ")} />`,d=t.context;if(!d.__safeImageHandlerEmitted)return d.__safeImageHandlerEmitted=!0,`${Bn}${h}`;return h}};function tt(e){return e.replace(/[;{}()]/g,"").replace(/url/gi,"")}function Se(e,i){if(e.serverDynamic[i]!==void 0)return String(e.serverDynamic[i]);let t=e.static[i];if(typeof t==="string")return t;return}function Oe(e,i,t){let o=Se(e,i);if(o!==void 0){let a=Number.parseInt(o,10);if(!Number.isNaN(a))return a}return t}var nt={name:"StxLoadingIndicator",aliases:["stx-loading-indicator"],render(e,i,t){let o=tt(Se(e,"color")||"#6366f1"),a=tt(Se(e,"initialColor")||Se(e,"initial-color")||""),c=tt(Se(e,"height")||"3px"),l=Oe(e,"duration",2000),u=Oe(e,"throttle",200),f=Oe(e,"zIndex",999999)||Oe(e,"z-index",999999),x=a?`linear-gradient(to right, ${a}, ${o})`:o;return`
8
- <div id="stx-loading-indicator" style="position:fixed;top:0;left:0;right:0;height:${c};background:${x};z-index:${f};transform:scaleX(0);transform-origin:left;transition:transform 0.1s ease-out,opacity 0.3s ease;opacity:0;pointer-events:none">
9
- <div style="position:absolute;top:0;left:0;right:0;bottom:0;background:linear-gradient(90deg,transparent 0%,rgba(255,255,255,0.4) 50%,transparent 100%);animation:stx-shimmer 1.5s infinite"></div>
10
- </div>
11
- <style>@keyframes stx-shimmer{0%{transform:translateX(-100%)}100%{transform:translateX(100%)}}</style>
12
- <script>
13
- (function(){var el=document.getElementById('stx-loading-indicator'),p=0,l=!1,i=null;function u(v){p=Math.min(Math.max(v,0),100);if(el){el.style.opacity=p>0?'1':'0';el.style.transform='scaleX('+(p/100)+')'}}window.stxLoading={start:function(){l=!0;p=0;u(10);if(i)clearInterval(i);i=setInterval(function(){if(!l)return;var r=90-p,inc=Math.max(0.5,r*0.1);if(p<90)u(p+inc)},${u})},finish:function(){l=!1;if(i){clearInterval(i);i=null}u(100);setTimeout(function(){if(el)el.style.opacity='0';setTimeout(function(){p=0;if(el)el.style.transform='scaleX(0)'},300)},200)},set:function(v){u(v)},clear:function(){l=!1;p=0;if(i){clearInterval(i);i=null}if(el){el.style.opacity='0';el.style.transform='scaleX(0)'}}};document.addEventListener('click',function(e){var a=e.target.closest&&e.target.closest('a');if(!a)return;var h=a.getAttribute('href');if(!h||h.startsWith('http')||h.startsWith('#')||h.startsWith('mailto:')||h.startsWith('tel:')||a.target==='_blank')return;window.stxLoading.start()});window.addEventListener('popstate',function(){window.stxLoading.start()});window.addEventListener('load',function(){window.stxLoading.finish()})})();
14
- </script>`}};function Nt(e,i){if(e.serverDynamic[i]!==void 0)return String(e.serverDynamic[i]);let t=e.static[i];if(typeof t==="string")return t;return}function Tn(e,i,t){let o=Nt(e,i);if(o!==void 0){let a=Number.parseInt(o,10);if(!Number.isNaN(a))return a}return t}var Et={"top-right":"top:1rem;right:1rem","top-left":"top:1rem;left:1rem","top-center":"top:1rem;left:50%;transform:translateX(-50%)","bottom-right":"bottom:1rem;right:1rem","bottom-left":"bottom:1rem;left:1rem","bottom-center":"bottom:1rem;left:50%;transform:translateX(-50%)"},rt={name:"StxToast",aliases:["stx-toast"],render(e,i,t){let o=n(Nt(e,"position")||"top-right"),a=Tn(e,"max",5),c=Et[o]||Et["top-right"];return`<div id="stx-toast-container" data-stx-toast-position="${o}" data-stx-toast-max="${a}" style="position:fixed;${c};z-index:999999;display:flex;flex-direction:column;gap:0.5rem;pointer-events:none;max-width:24rem;width:100%"></div>
15
- <style>
16
- @keyframes stx-toast-in{from{opacity:0;transform:translateX(100%)}to{opacity:1;transform:translateX(0)}}
17
- @keyframes stx-toast-out{from{opacity:1;transform:translateX(0)}to{opacity:0;transform:translateX(100%)}}
18
- @keyframes stx-toast-in-left{from{opacity:0;transform:translateX(-100%)}to{opacity:1;transform:translateX(0)}}
19
- @keyframes stx-toast-out-left{from{opacity:1;transform:translateX(0)}to{opacity:0;transform:translateX(-100%)}}
20
- @keyframes stx-toast-in-center{from{opacity:0;transform:translateY(-1rem)}to{opacity:1;transform:translateY(0)}}
21
- @keyframes stx-toast-out-center{from{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(-1rem)}}
22
- </style>`}};function Te(e,i){if(e.serverDynamic[i]!==void 0)return String(e.serverDynamic[i]);let t=e.static[i];if(typeof t==="string")return t;return}var Ot={sm:"max-width:24rem",md:"max-width:32rem",lg:"max-width:42rem",xl:"max-width:56rem",full:"max-width:calc(100vw - 2rem);max-height:calc(100vh - 2rem)"},st={name:"StxModal",aliases:["stx-modal"],render(e,i,t){let o=Te(e,"id");if(!o)return console.warn('[stx] <StxModal> requires an "id" prop'),"<!-- StxModal: missing id prop -->";let a=n(o),c=Te(e,"size")||"md",l=Te(e,"closeOnBackdrop")!=="false",u=Te(e,"closeOnEscape")!=="false",f=Ot[c]||Ot.md;return`<div id="stx-modal-${a}" class="stx-modal-backdrop" data-stx-modal="${a}" data-close-backdrop="${l}" data-close-escape="${u}" style="display:none;position:fixed;inset:0;z-index:99999;align-items:center;justify-content:center;background:rgba(0,0,0,0.5);backdrop-filter:blur(2px);opacity:0;transition:opacity 0.2s ease" aria-modal="true" role="dialog">
23
- <div class="stx-modal-panel" style="${f};width:100%;margin:1rem;border-radius:0.75rem;box-shadow:0 20px 60px rgba(0,0,0,0.3);overflow:hidden;transform:scale(0.95) translateY(8px);transition:transform 0.2s ease,opacity 0.2s ease;opacity:0;background:var(--stx-modal-bg,#fff);color:var(--stx-modal-text,#1f2937)">
24
- <div style="padding:1.5rem">${i}</div>
25
- </div>
26
- </div>
27
- <style>
28
- @media(prefers-color-scheme:dark){[data-stx-modal]{--stx-modal-bg:#1f2937;--stx-modal-text:#f3f4f6}}
29
- .stx-modal-backdrop[data-stx-modal-open]{display:flex!important;opacity:1}
30
- .stx-modal-backdrop[data-stx-modal-open] .stx-modal-panel{transform:scale(1) translateY(0);opacity:1}
31
- </style>`}};function me(e,i){if(e.serverDynamic[i]!==void 0)return String(e.serverDynamic[i]);let t=e.static[i];if(typeof t==="string")return t;return}var Bt={sm:"16rem",md:"24rem",lg:"32rem",xl:"40rem"},it={name:"StxDrawer",aliases:["stx-drawer"],render(e,i,t){let o=me(e,"id");if(!o)return console.warn('[stx] <StxDrawer> requires an "id" prop'),"<!-- StxDrawer: missing id prop -->";let a=n(o),c=me(e,"side")||"right",l=me(e,"size")||"md",u=me(e,"closeOnBackdrop")!=="false",f=me(e,"closeOnEscape")!=="false",x=me(e,"overlay")!=="false",h=Bt[l]||Bt.md,d=c==="left",C=d?"left:0":"right:0",v=d?"translateX(-100%)":"translateX(100%)",S=d?"stx-drawer-slide-left":"stx-drawer-slide-right";return`<div id="stx-drawer-${a}" class="stx-drawer-backdrop" data-stx-drawer="${a}" data-close-backdrop="${u}" data-close-escape="${f}" style="display:none;position:fixed;inset:0;z-index:99999;${x?"background:rgba(0,0,0,0.5);backdrop-filter:blur(2px)":"background:transparent;pointer-events:none"};opacity:0;transition:opacity 0.2s ease" role="dialog" aria-modal="true">
32
- <div class="stx-drawer-panel" style="position:fixed;top:0;bottom:0;${C};width:${h};max-width:100vw;transform:${v};transition:transform 0.3s cubic-bezier(0.4,0,0.2,1);background:var(--stx-drawer-bg,#fff);color:var(--stx-drawer-text,#1f2937);box-shadow:0 20px 60px rgba(0,0,0,0.3);overflow-y:auto;pointer-events:auto">
33
- <div style="padding:1.5rem">${i}</div>
34
- </div>
35
- </div>
36
- <style>
37
- @media(prefers-color-scheme:dark){[data-stx-drawer]{--stx-drawer-bg:#1f2937;--stx-drawer-text:#f3f4f6}}
38
- .stx-drawer-backdrop[data-stx-drawer-open]{display:block!important;opacity:1}
39
- .stx-drawer-backdrop[data-stx-drawer-open] .stx-drawer-panel{transform:translateX(0)}
40
- </style>`}};import{existsSync as Dn,readFileSync as jn}from"fs";var De=new Map,Tt=new Set;function Mn(e){if(Tt.has(e))return;Tt.add(e),console.warn(`[stx] icon collection "${e}" is not installed, so its icons render as nothing. Install it with \`bun add -d @iconify-json/${e}\`.`)}function Ln(e){let i=process.cwd();for(let t of[`${i}/node_modules/@iconify-json/${e}/icons.json`,`${i}/pantry/@iconify-json/${e}/icons.json`,`${i}/node_modules/@iconify/json/json/${e}.json`,`${i}/pantry/@iconify/json/json/${e}.json`])if(Dn(t))return t;for(let t of[`@iconify-json/${e}/icons.json`,`@iconify/json/json/${e}.json`])try{return b.resolve(t)}catch{}return null}function zn(e){if(De.has(e))return De.get(e);let i=Ln(e);if(!i)return Mn(e),null;try{let t=JSON.parse(jn(i,"utf8"));return De.set(e,t),t}catch{return null}}function Un(e,i,t,o){let a=[];if(i.rotate)a.push(`rotate(${i.rotate*90} ${t/2} ${o/2})`);if(i.hFlip)a.push(`translate(${t} 0) scale(-1 1)`);if(i.vFlip)a.push(`translate(0 ${o}) scale(1 -1)`);return a.length?`<g transform="${a.join(" ")}">${e}</g>`:e}function Fn(e,i){let t=i,o=e.icons[t],a={hFlip:!1,vFlip:!1,rotate:0};for(let u=0;!o&&u<8;u++){let f=e.aliases?.[t];if(!f)return null;if(f.hFlip)a.hFlip=!a.hFlip;if(f.vFlip)a.vFlip=!a.vFlip;if(f.rotate)a.rotate=((a.rotate+f.rotate)%4+4)%4;t=f.parent,o=e.icons[t]}if(!o)return null;let c=o.width??e.width??24,l=o.height??e.height??24;return{body:Un(o.body,a,c,l),width:c,height:l}}function he(e,i){if(e.serverDynamic[i]!==void 0)return String(e.serverDynamic[i]);if(e.static[i]!==void 0)return String(e.static[i]);if(e.clientReactive[i]!==void 0)return e.clientReactive[i];return}var ot={name:"Icon",aliases:["icon","stx-icon"],render(e,i,t){let o=he(e,"name")??he(e,"icon");if(!o)return"<!-- Icon: missing name/icon prop -->";let a="lucide",c=o;if(o.includes(":")){let w=o.split(":");a=w[0],c=w[1]}let l=n(he(e,"size")||"24"),u=n(he(e,"color")||"currentColor"),f=n(he(e,"class")||""),x=n(he(e,"style")||""),h=De.get(a)??zn(a);if(!h)return`<!-- Icon: collection "${a}" not loaded -->`;let d=Fn(h,c);if(!d)return`<!-- Icon: "${c}" not found in ${a} -->`;let C=`0 0 ${d.width} ${d.height}`,v=d.body;if(u!=="currentColor")v=v.replace(/currentColor/g,u);let S=f?` class="${f}"`:"",y=x?` style="${x}"`:"";return`<svg xmlns="http://www.w3.org/2000/svg" width="${l}" height="${l}" viewBox="${C}" fill="none"${S}${y}>${v}</svg>`}};function Dt(e,...i){for(let t of i){if(e.serverDynamic[t]!==void 0)return String(e.serverDynamic[t]);let o=e.static[t];if(typeof o==="string")return o}return}function jt(e,i){let t=new RegExp(`<(template|div|span)[^>]*\\bslot=["']${i}["'][^>]*>([\\s\\S]*?)<\\/\\1>`,"i"),o=e.match(t);if(!o)return{region:null,rest:e};return{region:o[2],rest:e.replace(o[0],"")}}var at={name:"Suspense",aliases:["suspense"],render(e,i,t){let o=jt(i,"fallback"),a=o.rest,c=jt(a,"error"),l=c.rest,u=o.region??Dt(e,"fallback")??'<div class="stx-suspense-loading">Loading\u2026</div>',f=c.region??Dt(e,"errorFallback","error-fallback")??'<div class="stx-suspense-error">Something went wrong.</div>';return`<div data-stx-suspense><div data-stx-suspense-fallback>${u}</div><div data-stx-suspense-error hidden>${f}</div><div data-stx-suspense-content hidden>${l}</div></div>`}};function je(e,...i){for(let t of i){if(e.serverDynamic[t]!==void 0)return String(e.serverDynamic[t]);let o=e.static[t];if(typeof o==="string")return o}return}var lt={name:"TransitionGroup",aliases:["transition-group"],render(e,i,t){let o=(je(e,"name")||"v").replace(/["'<>]/g,""),a=(je(e,"tag")||"div").replace(/[^a-z0-9-]/gi,"")||"div",c=je(e,"class"),l=je(e,"id"),u=[`data-stx-transition-group="${o}"`,c?`class="${c}"`:"",l?`id="${l}"`:""].filter(Boolean).join(" ");return`<${a} ${u}>${i}</${a}>`}};function Mt(e=ge){e.registerBuiltin(Ze),e.registerBuiltin(Qe),e.registerBuiltin(et),e.registerBuiltin(nt),e.registerBuiltin(rt),e.registerBuiltin(st),e.registerBuiltin(it),e.registerBuiltin(ot),e.registerBuiltin(at),e.registerBuiltin(lt)}var zt=new Map;function Wn(e){let i=zt.get(e.source);if(!i)i=new RegExp(`(${e.source})(?![\\w.:-])`,"y"),zt.set(e.source,i);return i}var Ut=new WeakMap;function Ft(e){let i=Ut.get(e);if(!i)i=new Set([...e].map((o)=>o.toLowerCase())),Ut.set(e,i);let t=i;return(o)=>!/[a-z]/.test(o)&&t.has(o.toLowerCase())}function Hn(e,i){let t="";for(let o=i;o<e.length;o++){let a=e[o];if(t){if(a==="\\")o++;else if(a===t)t=""}else if(a==='"'||a==="'")t=a;else if(a===">")return o}return e.length}function Wt(e,i,t){let o=[],a=0,c=typeof t==="function"?t:t?(l)=>t.has(l.toLowerCase()):void 0;while(a<e.length){let l=e.indexOf("<",a);if(l===-1)break;let u=Wn(i);u.lastIndex=l+1;let f=u.exec(e);if(!f){a=l+1;continue}let x=f[1];if(c&&c(x)){let w=l+1+x.length;while(w<e.length&&e[w]!==">")w++;a=w+1;continue}let h=l+1+x.length,d=null,C=h,v=-1,S=!1;while(h<e.length){let w=e[h];if(d){if(w==="\\"&&h+1<e.length){h+=2;continue}if(w===d)d=null;h++;continue}if(w==='"'||w==="'"){d=w,h++;continue}if(w==="/"&&h+1<e.length&&e[h+1]===">"){v=h+2,S=!0;break}if(w===">"){v=h+1;break}h++}if(v===-1){a=l+1;continue}let y=e.slice(C,S?v-2:v-1).trim();if(S)o.push({fullMatch:e.slice(l,v),tagName:x,attributes:y,content:"",startIndex:l,endIndex:v,isSelfClosing:!0}),a=v;else{let w=`<${x}`,A=`</${x}>`,k=1,R=v,E=-1;while(k>0&&R<e.length){let U=e.indexOf(w,R),z=e.indexOf(A,R);if(z===-1)break;if(U!==-1&&U<z){let N=e[U+w.length];if(N===" "||N===">"||N==="/"||N===`
41
- `||N==="\t"){let q=Hn(e,U+w.length);if(e[q-1]!=="/")k++;R=q+1}else R=U+w.length}else{if(k--,k===0){E=z;break}R=z+A.length}}if(E===-1){a=v;continue}let J=e.slice(v,E),M=E+A.length;o.push({fullMatch:e.slice(l,M),tagName:x,attributes:y,content:J,startIndex:l,endIndex:M,isSelfClosing:!1}),a=M}}return o}function ft(e){return e.replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&quot;/g,'"').replace(/&#0?39;/g,"'").replace(/&#x27;/gi,"'").replace(/&amp;/g,"&")}function Ht(e,i){try{let t=Buffer.from(e,"base64").toString("utf8");return JSON.parse(t)}catch{}try{let t=e.replace(/&quot;/g,'"').replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&amp;/g,"&");return JSON.parse(t)}catch(t){if(i?.debug)console.error("Error decoding __stx_ prop:",t);return e}}function Me(e,i){let t=0,o="",a=i;while(a<e.length){let c=e[a];if(o){if(c==="\\")a++;else if(c===o)o=""}else if(c==='"'||c==="'"||c==="`")o=c;else if(c==="{")t++;else if(c==="}"){if(t--,t===0)return e.slice(i,a+1)}a++}return e.slice(i)}function qt(e){let i=e.trim();if(!i.startsWith("{")||!i.endsWith("}"))return null;if(Me(i,0).length!==i.length)return null;return i.slice(1,-1).trim()}function Xt(e){let i=[],t=0,o=e.length;while(t<o){while(t<o&&/\s/.test(e[t]))t++;if(t>=o)break;let a="";while(t<o&&!/[\s=]/.test(e[t]))a+=e[t],t++;if(!a)break;while(t<o&&/\s/.test(e[t]))t++;if(t<o&&e[t]==="="){t++;while(t<o&&/\s/.test(e[t]))t++;let c="";if(t<o&&(e[t]==='"'||e[t]==="'")){let l=e[t];t++;while(t<o&&e[t]!==l){if(e[t]==="\\"&&t+1<o)t++,c+=e[t];else c+=e[t];t++}if(t<o)t++}else if(e[t]==="{")c=Me(e,t),t+=c.length;else while(t<o&&!/\s/.test(e[t]))c+=e[t],t++;i.push({name:a,value:c})}else i.push({name:a,value:!0})}return i}var qn=new Set(["disabled","checked","readonly","required","autofocus","autoplay","controls","default","defer","formnovalidate","hidden","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","reversed","selected"]),Xn=new Set([":for","x-for","v-for","@for"]),Vt=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]);function Vn(e){return dt(e).map((i)=>[i.start,i.end])}function dt(e){let i=[],t=new Map;for(let o of Lt(e)){let a=o.name.toLowerCase();if(o.closing){let x=t.get(a)?.pop();if(x)x.end=o.end;continue}let l=/(?::for|x-for|v-for|@for)\s*=/.test(o.attributes)?Xt(o.attributes).find((x)=>Xn.has(x.name)):void 0,u=typeof l?.value==="string"?l.value:null,f=u!==null?{start:o.start,end:o.end,names:ee(u),tag:a}:null;if(f)i.push(f);if(!o.selfClosing&&!Vt.has(a)){let x=t.get(a);if(!x)x=[],t.set(a,x);x.push(f)}}return i}var Zn=/(?:^|\s)((?:[\w-]+:)*-?space-[xy]-(?!reverse(?:\s|$))[\w./[\]-]+)(?=\s|$)/;function Zt(e){let i=new Map,t=[];for(let o of Lt(e)){let a=o.name.toLowerCase();if(o.closing){for(let l=t.length-1;l>=0;l--)if(t[l].name===a){t.length=l;break}continue}let c=t.at(-1);if(c){if(c.utility&&c.children>0)i.set(o.start,c.utility);if(!/(?:^|\s)hidden(?=[\s=]|$)/.test(o.attributes))c.children++}if(!o.selfClosing&&!Vt.has(a)){let l=/(?:^|\s)class\s*=\s*(["'])([\s\S]*?)\1/.exec(o.attributes)?.[2];t.push({name:a,utility:l?Zn.exec(l)?.[1]??null:null,children:0})}}return i}function Gt(e){if(typeof e==="string")return e;if(Array.isArray(e))return e.filter(Boolean).map((i)=>Gt(i)).join(" ");if(e&&typeof e==="object")return Object.entries(e).filter(([,i])=>i).map(([i])=>i).join(" ");return e?String(e):""}function vc(e,i){if(!/:[\w-]+=/.test(e))return e;let t=e,o=/<(script|style)\b[^>]*>[\s\S]*?<\/\1>/gi,a=[],c;while((c=o.exec(e))!==null)a.push([c.index,c.index+c[0].length]);a.push(...Vn(e));let l=new Set([...ct(i),...Array.isArray(i.__stx_client_declared_names)?i.__stx_client_declared_names:[]]);function u(d){return a.some(([C,v])=>d>=C&&d<v)}let f=[],x=new Map,h=256;for(let d of Lt(t)){if(d.closing||u(d.start))continue;let C=d.attributes.trimEnd();if(!C||!C.includes(":"))continue;let v=/(?:^|\s)data-native(?:\s|=|$)/i.test(C.replace(/"[^"]*"|'[^']*'/g,"")),S=/\s:([a-zA-Z_][\w-]*)\s*=\s*"([^"]*)"/g,y,w=C,A=!1;while((y=S.exec(C))!==null){if($r(C,y.index,!0)?.kind==="attribute")continue;let k=y[1],R=y[2];if(Tl(k))continue;if(L(R,l))continue;if(R.includes("()")&&!R.includes(".get(")||R.includes("$store")||R.includes("$ref"))continue;try{let E=Object.keys(i),J=Object.values(i),M=R.match(/^([a-zA-Z_$][\w$]*)/);if(M&&!E.includes(M[1])&&!["true","false","null","undefined","Math","JSON","String","Number","Array","Object","Date","parseInt","parseFloat"].includes(M[1]))continue;let U=JSON.stringify([E,R]),z=x.get(U);if(!z){if(z=Function(...E,`return (${R})`),x.size>=h)x.clear();x.set(U,z)}let N=z(...J);if(k==="class"){let q=G(Gt(N));if(q){let I=w.match(/\sclass="([^"]*)"/);if(I)w=w.replace(I[0],()=>` class="${I[1]} ${q}"`);else w=w.replace(y[0],()=>` class="${q}"`)}else w=w.replace(y[0],"");A=!0;continue}if(qn.has(k)){if(N)w=w.replace(y[0],` ${k}`);else w=w.replace(y[0],"");A=!0;continue}if(N===null||N===void 0||N===!1)w=w.replace(y[0],"");else{let q=v&&typeof N==="object"?JSON.stringify(N):String(N),I=En(k,q);w=w.replace(y[0],()=>` ${k}="${I}"`)}A=!0}catch(E){if(E instanceof de)throw E;continue}}if(A){let k=d.selfClosing?" /":"",E=`<${d.name}${w}${k}>`;f.push({start:d.start,end:d.end,replacement:E})}}if(f.length>0){let d=Array(f.length*2+1),C=0;for(let v=0;v<f.length;v++){let{start:S,end:y,replacement:w}=f[v];d[v*2]=t.slice(C,S),d[v*2+1]=w,C=y}d[f.length*2]=t.slice(C),t=d.join("")}return t}import Kt from"fs";import Jt from"path";var Yt=!1;function Gn(e,i,t,o=!1,a=new Set){let c={static:{},staticNames:{},serverDynamic:{},serverDynamicNames:{},clientReactive:{},events:{}},l=new Set(Array.isArray(i.__stx_client_signal_names)?i.__stx_client_signal_names:[]),u=(d)=>{if(l.size===0)return!1;let C=r(d),v=C.match(/^\s*[!+~(-]*\s*([a-zA-Z_$][\w$]*)/)?.[1];if(v&&l.has(v))return!0;for(let S of l){let y=S.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");if(new RegExp(`(?:^|[^\\w$.])${y}\\s*\\(`).test(C))return!0}return!1},f=new Set($l),x=(d)=>{if(!d.includes("-")||d.startsWith("@")||d.startsWith(":")||d.startsWith("x-")||d.startsWith("__"))return d;if(d.startsWith("aria-")||d.startsWith("data-"))return d;return d.replace(/-([a-z0-9])/g,(C,v)=>v.toUpperCase())},h=(d,C)=>{let v=x(d);if(c.static[v]=C,v!==d)c.staticNames[v]=d};for(let[d,C]of Object.entries(e)){let v=d.startsWith("x-")&&!f.has(d)&&!d.startsWith("x-bind:")&&!d.startsWith("x-on:")?`:${d.slice(2)}`:d;if(v.startsWith("@")){c.events[v]=C;continue}if(v.startsWith("__stx_")){let S=x(v.slice(6));c.serverDynamic[S]=Ht(C,t);continue}if(v.startsWith(":")){let S=x(v.slice(1)),y=C===se?S:C;if(S==="if"||S==="for"||S==="show"){c.clientReactive[S]=y;continue}if(o){c.clientReactive[S]=y;continue}if(L(y,a)){c.clientReactive[S]=y;continue}if(u(y)){c.clientReactive[S]=y;continue}try{if(!m(y)){if(t.debug)console.error(`Unsafe expression in :${S} binding: ${y}`);c.clientReactive[S]=y;continue}let w=Object.keys(i),A=new Set(["true","false","null","undefined","typeof","instanceof","in","of","new","this","return","void","delete","throw","if","else"]),k=new Set(Array.isArray(i.__stx_client_declared_names)?i.__stx_client_declared_names:[]);if(ut(y).some((M)=>!A.has(M)&&!w.includes(M)&&(!(M in globalThis)||k.has(M)))){c.clientReactive[S]=y;continue}let J=p(y,w)(...Object.values(i));if(c.serverDynamic[S]=J,S!==v.slice(1)&&c.serverDynamicNames)c.serverDynamicNames[S]=v.slice(1)}catch{c.clientReactive[S]=y}continue}if(typeof C==="string"&&C.includes("{{")&&C.includes("}}")){let S=Qn(C,a);if(S!==null){c.clientReactive[x(v)]=S;continue}let y=C.match(/^\{\{\s*([\s\S]+?)\s*\}\}$/);if(y)try{let w=y[1];if(m(w)){let k=p(w,Object.keys(i))(...Object.values(i));h(v,k!=null?String(k):"")}else{if(t.debug)console.error(`Unsafe expression in ${v}: ${w}`);h(v,C)}}catch(w){if(t.debug)console.error(`Error evaluating expression for ${v}:`,w);h(v,C)}else{let w=C,A=/\{\{\s*([\s\S]+?)\s*\}\}/g,k;while((k=A.exec(C))!==null)try{let R=k[1];if(!m(R)){if(t.debug)console.error(`Unsafe expression in ${v}: ${R}`);continue}let J=p(R,Object.keys(i))(...Object.values(i));w=w.replace(k[0],String(J??""))}catch(R){if(t.debug)console.error(`Error evaluating expression in ${v}:`,R)}h(v,w)}continue}h(v,C===se?"true":ft(C))}return c}var gt=new Set;function Jh(){gt.clear()}function Kn(e){let i=/^\s*(?:<!--[\s\S]*?-->\s*)*<(?:div|span)\b((?:[^>"']|"[^"]*"|'[^']*')*)>/.exec(e);return!!i&&/\sdata-stx-component-wrapper(?=[\s=]|$)/.test(i[1])&&!/\sstx-hydrate(?=[\s=]|$)/.test(i[1])}function Jn(e,i,t){let o=`${t}\x00${e}\x00${i}`;if(gt.has(o))return;gt.add(o);let a=/space-x-/.test(i)?"flex":"flex flex-col",c=i.replace(/space-[xy]-/,"gap-");console.warn(`[stx] <${e}> in ${t} is a later child of a "${i}" stack, so it gets no spacing: the utility puts its margin on the component's scope wrapper, which generates no box. Use "${a} ${c}" on the parent instead -- gap reaches through the wrapper.`)}var pt=new Set;function Yh(){pt.clear()}function Yn(e,i){let t=`${i}\x00${e}`;if(pt.has(t))return;pt.add(t),console.warn(`[stx] <${e}> in ${i} is inside a <template :for>, so its props and slot expressions will not see the loop variables and render empty. Put the directive on the element the loop repeats instead -- <tr :for="..."> or <span :for="..." class="contents"> -- which binds correctly.`)}function Qn(e,i){if(i.size===0)return null;let t=/\{\{\s*([\s\S]+?)\s*\}\}/g,o=[...e.matchAll(t)];if(!o.some((u)=>L(u[1],i)))return null;let a=e.match(/^\{\{\s*([\s\S]+?)\s*\}\}$/);if(a&&o.length===1)return a[1];let c="",l=0;for(let u of o)c+=e.slice(l,u.index).replace(/[`\\$]/g,(f)=>`\\${f}`),c+=`\${${u[1]}}`,l=u.index+u[0].length;return c+=e.slice(l).replace(/[`\\$]/g,(u)=>`\\${u}`),`\`${c}\``}var er=[[/@if\s*\(/,"@endif"],[/@unless\s*\(/,"@endunless"]];function tr(e,i,t){if(!e.includes("@"))return e;if(!er.some(([a,c])=>a.test(e)&&e.includes(c)))return e;try{return le(e,i,t)}catch{return e}}function be(e){let i={},t=0,o=e.length;while(t<o){while(t<o&&/\s/.test(e[t]))t++;if(t>=o)break;let a="";while(t<o&&!/[\s=]/.test(e[t]))a+=e[t],t++;if(!a)break;while(t<o&&/\s/.test(e[t]))t++;if(t<o&&e[t]==="="){t++;while(t<o&&/\s/.test(e[t]))t++;let c="";if(t<o&&(e[t]==='"'||e[t]==="'")){let l=e[t];t++;while(t<o){let u=e[t];if(u==="\\"&&t+1<o){t++,c+=e[t],t++;continue}if(u===l){t++;break}c+=u,t++}}else if(e[t]==="{"){c=Me(e,t),t+=c.length;let l=qt(c);if(l!==null){i[`:${a}`]=l;continue}}else while(t<o&&!/\s/.test(e[t]))c+=e[t],t++;i[a]=c}else i[a]=se}return i}function Qt(e){return Object.entries(e).map(([i,t])=>t===se?i:`${i}="${nr(t)}"`).join(" ")}function nr(e){return e.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function rr(e){let i=new Set,t=/<([A-Z][A-Za-z0-9]*|stx-[a-z0-9-]+)\b[^>]*>/g,o;while((o=t.exec(e))!==null){let a=o[1];if(ge.isBuiltin(a))i.add(a)}return[...i].sort()}async function Xf(e,i,t,o,a){if(!/import\s/.test(e))return e;if(!i.__importedComponents)i.__importedComponents=new Map;let c=i.__importedComponents,l=Jt.dirname(t),u=[],f=/<script\b([^>]*)>([\s\S]*?)<\/script>/gi;for(let d of e.matchAll(f)){let[C,v,S]=d,y=/import\s+(?:(\{[^}]*\})|([A-Za-z_$][\w$]*))\s+from\s+['"]([^'"]+)['"]\s*;?\s*\n?/g,w=S,A,k=[];while((A=y.exec(S))!==null){let[R,E,J,M]=A,U=null,z=null;if(M.startsWith(".")||M.startsWith("/")){let I=Jt.resolve(l,M);if(I.endsWith(".stx"))z=I;else{let _=`${I}.stx`;try{if(Kt.statSync(_).isFile())z=_}catch{try{if(Kt.statSync(I).isDirectory())U=I}catch{}}}}else U=Fs(M,l);if(!U&&!z)continue;let N=!1,q=(I,_)=>{c.set(I,_),c.set(I.toLowerCase(),_);let T=I.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();c.set(T,_),a.add(_)};if(J&&z)q(J,z),N=!0;else if(E){let I=E.slice(1,-1).split(",").map((T)=>T.trim()).filter(Boolean).map((T)=>{let F=T.match(/^([A-Za-z_$][\w$]*)\s+as\s+([A-Za-z_$][\w$]*)$/);if(F)return{source:F[1],local:F[2]};return{source:T,local:T}}),_=U?_r(U):null;for(let{source:T,local:F}of I){let D=null;if(z)D=z;else if(_)D=_.get(T)??_.get(T.toLowerCase())??_.get(T.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase())??null;if(D)q(F,D),N=!0}}if(N)k.push({start:A.index,end:A.index+R.length})}if(k.length===0)continue;for(let R=k.length-1;R>=0;R--)w=w.slice(0,k[R].start)+w.slice(k[R].end);u.push({start:d.index,end:d.index+C.length,value:`<script${v}>${w}</script>`})}if(u.length===0)return e;let x=[],h=0;for(let d of u)x.push(e.slice(h,d.start),d.value),h=d.end;return x.push(e.slice(h)),x.join("")}async function sr(e,i,t,o,a){let c=e;if(!i.__importedComponents)i.__importedComponents=new Map;let l=i.__importedComponents,u=/@import\s*\(\s*([^)]+)\s*\)/g,f;while((f=u.exec(c))!==null){let[x,h]=f,d=h.split(",").map((C)=>C.trim().replace(/^['"]|['"]$/g,"")).filter((C)=>C.length>0);for(let C of d){let v=C.split("/"),y=v[v.length-1].replace(/\.stx$/,""),w=y.includes("-")?y.split("-").map((R)=>R.charAt(0).toUpperCase()+R.slice(1)).join(""):y.charAt(0).toUpperCase()+y.slice(1),A=null,k=zs(C,t,o);for(let R of k)try{if(await Bun.file(R).exists()){A=R;break}}catch{}if(A){l.set(w,A),l.set(y,A),l.set(y.toLowerCase(),A);let R=w.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();if(l.set(R,A),a.add(A),o.debug)console.log(`Imported component: ${w} -> ${A}`)}else if(o.debug)console.warn(`Could not resolve imported component: ${C}`)}c=c.replace(x,""),u.lastIndex=0}return c}async function ir(e,i,t,o,a){let c=e,l=o.componentsDir||"components";if(!i.__processedComponents)i.__processedComponents=new Set;let u=i.__processedComponents,f=/@component\s*\(/g,x;while((x=f.exec(c))!==null){let h=x.index,d=h+x[0].length-1,C=1,v=d+1;while(v<c.length&&C>0){if(c[v]==="(")C++;else if(c[v]===")"){if(C--,C===0)break}v++}if(C!==0)break;let S=c.substring(d+1,v),y=v+1,w=S.match(/^\s*['"]([^'"]+)['"]/);if(!w){f.lastIndex=y;continue}let A=w[1],k,R=S.slice(w[0].length),E=R.match(/^\s*,\s*/);if(E)k=R.slice(E[0].length).trim();let J={};if(k)try{J=O(k,i)}catch(I){let _=I instanceof Error?I.message:String(I);c=c.replace(c.substring(h,y),`[Error parsing component props: ${_}]`);continue}let M="",U=y,N=c.substring(y).match(/^([\s\S]*?)@endcomponent/);if(N)M=N[1].trim(),U=y+N[0].length;let q=await We(A,J,M,l,i,t,o,u,a);c=c.substring(0,h)+q+c.substring(U),f.lastIndex=0}return c}async function or(e,i,t,o,a){if(!e)return e;let c=e,l=o.componentsDir||"components";if(!i.__processedComponents)i.__processedComponents=new Set;let u=i.__processedComponents,f=lr(c);if(f.size>0){let y=Array.isArray(i.__stx_client_declared_names)?i.__stx_client_declared_names:[];i.__stx_client_declared_names=[...new Set([...y,...f])]}let x=Q(c);c=x.output;let h=ct(i);return c=await S(c,/[a-z][a-z0-9]*-[a-z0-9-]*/,!1),c=await S(c,/[A-Z][a-zA-Z0-9]*/,!0,Ft(Rr)),c=await S(c,/[a-z][a-z0-9]*/,!1,Rr),c=x.restore(c),c;async function S(y,w,A,k){if(!y)return y;let R=y,E=Wt(R,w,k),J=dt(R),M=!o._nativeHostAttrs&&/space-[xy]-/.test(R),U,z=new Map;for(let I=E.length-1;I>=0;I--){let _=E[I],T=A?K(_.tagName):_.tagName,F=be(tr(_.attributes,i,t)),D=J.filter(({start:B,end:W})=>_.startIndex>=B&&_.startIndex<W);if(D.some((B)=>B.tag==="template"))Yn(_.tagName,t);let re=D.length>0,ae=new Set(h);for(let B of D)for(let W of B.names)ae.add(W);let j=Gn(F,i,o,re,ae);if(typeof j.clientReactive.for==="string")for(let B of ee(j.clientReactive.for))ae.add(B);let X=ge.getBuiltin(_.tagName),Re=X?await Ir(_.tagName,l,i,t,o):!1,xe=_.tagName==="Image"&&Hs([...Object.keys(j.static),...Object.keys(j.serverDynamic),...Object.keys(j.clientReactive)],Object.keys(j.events),{...j.static,...j.serverDynamic})&&(o._pluginComponentDirs??[]).some((B)=>_r(B).has("Image"));if(X&&!Re&&!xe){let B={context:i,filePath:t,options:o,dependencies:a},W=X.render(j,_.content,B);if(Object.keys(j.events).length>0){let ce=Qt(j.events);W=W.replace(/^(\s*<[a-zA-Z][a-zA-Z0-9-]*)/,`$1 ${ce}`)}if(Object.keys(j.clientReactive).length>0)W=en(W,j.clientReactive);z.set(I,W);continue}if(!A&&_.tagName.includes("-")&&!await Ir(T,l,i,t,o))continue;let ue={};for(let[B,W]of Object.entries(j.static))ue[B]=W;for(let[B,W]of Object.entries(j.serverDynamic))ue[B]=W;let te={declaredProps:new Set,consumedProps:new Set,reactiveProps:Object.keys(j.clientReactive),events:Object.keys(j.events)},V=await We(T,ue,x.restore(_.content),l,i,t,o,u,a,[...ae],te,_.tagName);if(M&&Kn(V)){U??=Zt(R);let B=U.get(_.startIndex);if(B)Jn(_.tagName,B,t)}let P=V;if(P=ar(P,j,te.declaredProps,te.consumedProps,o._nativeHostAttrs),o._nativeHostAttrs){let B=te.reactiveProps.filter((ne)=>!te.consumedProps.has(ne)&&!["if","for","show","key","ref"].includes(ne)).map(K),W=mt(P,!0);if(B.length&&W){if(!Object.hasOwn(be(P.slice(W.insertPos,W.tagEnd)),"data-stx-native-host-root"))P=P.slice(0,W.insertPos)+' data-stx-native-host-root="true"'+P.slice(W.insertPos);let ne=Ce(P);P=P.slice(0,ne.insertPos)+` data-stx-native-forward="${B.join(" ")}"`+P.slice(ne.insertPos)}let ce=mt(P,!0);if(ce){let ne=be(P.slice(ce.insertPos,ce.tagEnd)),ke=Ce(P),nn=be(P.slice(ke.insertPos,ke.tagEnd));if(Object.hasOwn(ne,"data-stx-native-host-root")&&!Object.hasOwn(nn,"data-stx-native-host-owner"))P=P.slice(0,ke.insertPos)+" data-stx-native-host-owner"+P.slice(ke.insertPos)}}if(Object.keys(j.events).length>0){let B=Ce(P);if(B){let W=Qt(j.events),ce=Object.keys(j.events).map((ne)=>ne.replace(/^@/,"").split(".")[0]).join(" ");P=P.substring(0,B.insertPos)+` data-stx-parent-events="${ce}" ${W}`+P.substring(B.insertPos)}}if(Object.keys(j.clientReactive).length>0)P=en(P,j.clientReactive);z.set(I,P)}if(z.size===0)return R;let N="",q=0;for(let I=0;I<E.length;I++){let _=z.get(I);if(_===void 0)continue;N+=R.slice(q,E[I].startIndex),N+=_,q=E[I].endIndex}return N+=R.slice(q),N}}function en(e,i){let t=new Set(["if","for"]),o=new Set(["show"]),a=Object.entries(i).filter(([h])=>!t.has(h)),c=a.filter(([h])=>!o.has(h)).map(([h])=>K(h)).join(" "),l=e,u=a.length>0?Ce(l):null;if(u){let h=a.map(([C,v])=>`:${K(C)}="${v.replace(/"/g,"&quot;")}"`).join(" "),d=c?` data-stx-parent-bindings="${c}"`:"";l=l.substring(0,u.insertPos)+`${d} ${h}`+l.substring(u.insertPos)}let f=i.if;if(f)l=`<template :if="${f.replace(/"/g,"&quot;")}">${l}</template>`;let x=i.for;if(x){let h=i.key,d=h?` :key="${h.replace(/"/g,"&quot;")}"`:"";l=`<template :for="${x.replace(/"/g,"&quot;")}"${d}>${l}</template>`}return l}function ar(e,i,t=new Set,o=new Set,a=!1){let c=mt(e,a);if(!c)return e;let l=e.slice(c.insertPos,c.tagEnd),u=i.serverDynamic.class??i.static.class;if(a&&typeof u==="string"&&u&&!o.has("class")){let S=/(^|\s)class\s*=\s*(?:"([^"]*)"|'([^']*)'|([^\s>]+))/i,y=S.test(l)?l.replace(S,(w,A,k,R,E)=>`${A}class="${n(`${ft(k??R??E)} ${u}`)}"`):` class="${n(u)}"${l}`;e=e.slice(0,c.insertPos)+y+e.slice(c.tagEnd),c.tagEnd+=y.length-l.length,l=y}let f=a||/\bdata-native(?:\s|=)/i.test(l),x=f?o:t,h=new Set(Object.keys(be(l))),d=new Set(["class","className"]);for(let S of Object.keys(i.static)){let y=i.staticNames[S]??S;if(h.has(y)||x.has(S)||!f&&!Ve(y))d.add(S)}for(let S of Object.keys(i.serverDynamic)){let y=i.serverDynamicNames?.[S]??S;if(h.has(y)||x.has(S)||!f&&!Ve(y))d.add(S)}let C=[];if(f){for(let[S,y]of Object.entries(i.static)){if(d.has(S)||y!==!0&&y!==se)continue;d.add(S),C.push(`${n(i.staticNames?.[S]??S)}="true"`)}for(let[S,y]of Object.entries(i.serverDynamic)){if(d.has(S)||y!==!0)continue;d.add(S),C.push(`${n(i.serverDynamicNames?.[S]??S)}="true"`)}}let v=[...ie(i,d),...oe(i,d),...C];if(f){for(let[S,y]of Object.entries(i.serverDynamic)){if(d.has(S)||y!==!1)continue;let w=i.serverDynamicNames?.[S]??S;v.push(`${n(w)}="false"`)}for(let[S,y]of Object.entries(i.serverDynamic)){if(d.has(S)||y===null||typeof y!=="object")continue;let w=JSON.stringify(y);if(w!==void 0){let A=i.serverDynamicNames?.[S]??S;v.push(`${n(A)}="${n(w)}"`)}}}if(v.length===0)return e;return`${e.slice(0,c.insertPos)} ${v.join(" ")}${e.slice(c.insertPos)}`}function Ce(e){let i=tn(e,0);if(i)return i;let t=/<([a-zA-Z][a-zA-Z0-9-]*)\b[^>]*\bdata-stx-scope(?:\s|=|>)/i.exec(e);if(t)return{insertPos:t.index+1+t[1].length,tagEnd:ht(e,t.index+1+t[1].length)};return null}function mt(e,i=!1){let t=Ce(e);if(!t)return null;let o=e.slice(t.insertPos,t.tagEnd),a=/\bdata-stx-component-wrapper(?:\s|=|>|$)/i.test(o)?tn(e,t.tagEnd+1):t;return a&&i?cr(e,a)??a:a}function cr(e,i){if(!e.includes("data-stx-native-host-root"))return null;let t=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),o=e.lastIndexOf("<",i.insertPos),a=0,c;while(o>=0&&o<e.length){if(e.startsWith("<!--",o)){let h=e.indexOf("-->",o+4);if(h<0)return null;o=e.indexOf("<",h+3);continue}let l=/^<(\/?)([a-z][\w-]*)\b/i.exec(e.slice(o));if(!l){o=e.indexOf("<",o+1);continue}let u=l[2].toLowerCase(),f=o+l[0].length,x=ht(e,f);if(l[1]){if(a--,c!==void 0&&a<c)c=void 0;if(a<=0)return null}else if(u==="script"||u==="style"){let h=new RegExp(`</${u}\\s*>`,"gi");if(h.lastIndex=x+1,!h.exec(e))return null;o=e.indexOf("<",h.lastIndex);continue}else{let h=be(e.slice(f,x)),d=a>0&&(Object.hasOwn(h,"data-stx-component-wrapper")||Object.hasOwn(h,"data-stx-native-host-owner"));if(c===void 0&&!d&&Object.hasOwn(h,"data-stx-native-host-root"))return{insertPos:f,tagEnd:x};if(!t.has(u)&&e[x-1]!=="/"){if(a++,c===void 0&&d)c=a}else if(a===0)return null}o=e.indexOf("<",x+1)}return null}function tn(e,i){let t=i;while(t<e.length){let o=e.slice(t),a=o.match(/^\s+/);if(a){t+=a[0].length;continue}if(o.startsWith("<!--")){let u=e.indexOf("-->",t+4);if(u===-1)return null;t=u+3;continue}let c=o.match(/^<(script|style)\b[^>]*>/i);if(c){let u=`</${c[1].toLowerCase()}>`,f=e.toLowerCase().indexOf(u,t+c[0].length);if(f===-1)return null;t=f+u.length;continue}let l=o.match(/^<([a-zA-Z][a-zA-Z0-9-]*)(?:\s|>|\/)/);if(!l)return null;return{insertPos:t+1+l[1].length,tagEnd:ht(e,t+1+l[1].length)}}return null}function ht(e,i){let t="";for(let o=i;o<e.length;o++){let a=e[o];if(t){if(a==="\\")o++;else if(a===t)t=""}else if(a==='"'||a==="'")t=a;else if(a===">")return o}return e.length}function lr(e){let i=new Set;for(let t of e.matchAll(/<script\b([^>]*)>([\s\S]*?)<\/script>/gi)){let o=t[1];if(!/\bclient\b/.test(o)||/\bserver\b/.test(o))continue;for(let a of wi(t[2]))i.add(a);for(let a of t[2].matchAll(/^\s*import\s+(?:type\s+)?(?:([\w$]+)\s*,?\s*)?(?:\{([^}]*)\}|\*\s+as\s+([\w$]+))?\s*from\s/gm)){if(a[1])i.add(a[1]);if(a[3])i.add(a[3]);for(let c of(a[2]??"").split(",")){let l=c.replace(/^\s*type\s+/,"").split(/\s+as\s+/).pop().trim();if(/^[A-Za-z_$][\w$]*$/.test(l))i.add(l)}}}return i}async function bs(e,i,t,o,a){if(!Yt)Mt(ge),Yt=!0;let c=await Xf(e,i,t,o,a);c=await sr(c,i,t,o,a),c=await ir(c,i,t,o,a);let l=[];for(let u=0;u<3;u++){let f=l.length,x=ye(c,Be,(d,C)=>`\x00STX_COMPONENT_COMMENT_${f+C}\x00`,`STX_COMPONENT_COMMENT:${f}`);l.push(...x.tokens);let h=c;if(c=await or(x.output,i,t,o,a),c===h)break}if(l.length>0)c=c.replace(/\x00STX_COMPONENT_COMMENT_(\d+)\x00/g,(u,f)=>l[Number(f)]??"");if(o.debug){let u=rr(c);if(u.length>0)console.warn(`[stx] ${t}: unresolved component tag(s) after render passes: ${u.join(", ")}. Check nested component output for malformed root tags or recursive component markup.`)}return c}
42
- export{Uo,Wo,qo,Gh,ys,Xh,vc,Jh,Yh,Xf,bs};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{tu,Im,nu,ru,Om,Nm}from"./chunk-jn335zs0.js";import"./chunk-fpya25cc.js";import"./chunk-pqjmse0r.js";import"./chunk-k32q90b2.js";import"./chunk-g0xn80gz.js";import"./chunk-farh4p7f.js";import"./chunk-qjey0jk6.js";export{Nm as applySlots,Om as extractSlotContent,Im as parseSlotElement,tu as parseSlots,ru as processSlots,nu as renderSlot};
@@ -1,3 +0,0 @@
1
- // @bun
2
- import{G}from"./chunk-fpya25cc.js";function n(t){return G(t)}
3
- export{n};
@@ -1,54 +0,0 @@
1
- // @bun
2
- import{P,d,m,O,p,J}from"./chunk-g0xn80gz.js";import{q,js,je,he,Mt,Ar,Ve,Ue,s,y,Te,R}from"./chunk-fpya25cc.js";import{ft}from"./chunk-qjey0jk6.js";import{N}from"./chunk-farh4p7f.js";import{le}from"./chunk-jbgj2hph.js";import{H,nt}from"./chunk-8s6s6nd0.js";import{A,Pn}from"./chunk-bwdbj60y.js";import M from"path";import{existsSync as ye}from"fs";function ce(c,e){let a=0;for(let r=e;r<c.length;r++){let b=c[r];if(b==="("||b==="["||b==="{")a++;else if(b===")"||b==="]"||b==="}")a--;else if(b===","&&a===0)return r}return-1}function $e(c,e,a){let r=c,b=new RegExp(`${e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}\\s*\\(`,"g"),n=b.exec(r);while(n){let u=n.index,t=u+n[0].length-1,T=1,L=t+1;while(L<r.length&&T>0){if(r[L]==="(")T++;else if(r[L]===")")T--;L++}if(T!==0)break;let re=r.substring(t+1,L-1),B=`${a}(${re})`;r=r.substring(0,u)+B+r.substring(L),b.lastIndex=u+B.length,n=b.exec(r)}return r}function Ee(c){return/\b(state|derived|effect)\s*(?:<[^<>()]*>)?\s*\(/.test(c)}function me(c){let e=c,a=[],r=new Set,b=0,n=0,u=e.length,t=(B)=>{n++;while(n<u){if(e[n]==="\\"){n+=2;continue}if(e[n]===B){n++;return}n++}},T=()=>{n++;while(n<u){if(e[n]==="\\"){n+=2;continue}if(e[n]==="`"){n++;return}if(e[n]==="$"&&e[n+1]==="{"){n+=2;let B=1;while(n<u&&B>0)if(e[n]==="{")B++,n++;else if(e[n]==="}")B--,n++;else if(e[n]==="'"||e[n]==='"')t(e[n]);else if(e[n]==="`")T();else n++;continue}n++}},L=()=>{if(e[n]==="/"&&e[n+1]==="/"){while(n<u&&e[n]!==`
3
- `)n++;return!0}if(e[n]==="/"&&e[n+1]==="*"){n+=2;while(n<u-1&&!(e[n]==="*"&&e[n+1]==="/"))n++;return n+=2,!0}return!1},re=()=>{if(b!==0)return;let B=e.slice(n).match(/^(const|let|var)\s+([a-zA-Z_$][a-zA-Z0-9_$]*)\s*=/);if(B){let U=B[2];if(!r.has(U))a.push(U),r.add(U);return}let te=e.slice(n).match(/^function\s+([a-zA-Z_$][a-zA-Z0-9_$]*)\s*\(/);if(te){let U=te[1];if(!r.has(U))a.push(U),r.add(U);return}let Y=e.slice(n).match(/^async\s+function\s+([a-zA-Z_$][a-zA-Z0-9_$]*)\s*\(/);if(Y){let U=Y[1];if(!r.has(U))a.push(U),r.add(U)}};while(n<u){if(L())continue;if(e[n]==="'"||e[n]==='"'){t(e[n]);continue}if(e[n]==="`"){T();continue}if(e[n]==="{"){b++,n++;continue}if(e[n]==="}"){b--,n++;continue}if(b===0&&/[a-z]/i.test(e[n])&&(n===0||/\s|[;{}()]/.test(e[n-1])))re();n++}return a.join(", ")}function ve(c,e=""){let a=me(c).split(",").map((r)=>r.trim()).filter(Boolean);return`
4
- (function() {
5
- ${ft("var",a)}
6
- var __destroyHooks = [];
7
- var __origOnDestroy = onDestroy;
8
- onDestroy = function(fn) { __origOnDestroy(fn); __destroyHooks.push(fn); };
9
-
10
- ${c}
11
- ${e}})();
12
- `}function Re(c,e){let r=me(c).split(",").map((u)=>u.trim()).filter(Boolean),b=new Set(q(c,!0).split(",").map((u)=>u.trim())),n=r.map((u)=>b.has(u)?` try { ${u}; Object.defineProperty(__scopeRegistration, ${JSON.stringify(u)}, ${js(u)}); } catch (e) { /* not actually top-level */ }`:` try { __scopeRegistration[${JSON.stringify(u)}] = ${u}; } catch (e) { /* not actually top-level */ }`).join(`
13
- `);return`
14
- // Register scope variables for STX runtime
15
- if (!window.stx._scopes) window.stx._scopes = {};
16
- var __scopeRegistration = window.stx._scopes['${e}'] || { __destroyCallbacks: __destroyHooks };
17
- ${n}
18
- // #1767: when the bundler renamed a component const that collided with an
19
- // inlined import (foo -> foo2), rebind the ORIGINAL template name to the
20
- // renamed declaration so it resolves to the component's value, not the
21
- // shadowing import. __stxScopeRenames is emitted by bundleClientScript.
22
- try { if (typeof __stxScopeRenames !== 'undefined' && __stxScopeRenames) { for (var __stxRK in __stxScopeRenames) __scopeRegistration[__stxRK] = __stxScopeRenames[__stxRK]; } } catch (e) { /* no renames */ }
23
- if (typeof __stxLiveBindings !== 'undefined') Object.defineProperties(__scopeRegistration, Object.getOwnPropertyDescriptors(__stxLiveBindings));
24
- window.stx._scopes['${e}'] = __scopeRegistration;
25
- `}function ke(c,e){return c.replace(/<script data-stx-scoped data-stx-run="always" data-stx-owner="([^"]*)"/g,(a,r)=>r===e?a:'<script data-stx-scoped data-stx-run="always"')}function ge(c,e){let a=Re(c,e);return Ie(ve(c,a),e)}function Ie(c,e){let a=`
26
- (function() {
27
- var __stxScopeEl = (typeof document !== 'undefined') ? document.querySelector('[data-stx-scope="${e}"]') : null;
28
- var __stxPrevEl = (typeof window !== 'undefined') ? window.__STX_CURRENT_ELEMENT__ : undefined;
29
- if (__stxScopeEl && typeof window !== 'undefined') window.__STX_CURRENT_ELEMENT__ = __stxScopeEl;
30
- if (__stxScopeEl && typeof window !== 'undefined' && window.stx) {
31
- if (!window.stx._scopes) window.stx._scopes = {};
32
- window.stx._scopes['${e}'] = {};
33
- }
34
- var __stxEndEffects = (typeof window !== 'undefined' && window.stx && window.stx._beginEffects) ? window.stx._beginEffects() : null;
35
- try {`,r=`
36
- } finally {
37
- // The body's effects end where its onDestroy callbacks run: with the scope
38
- // when the partial has a root, with the page when it has none.
39
- if (__stxEndEffects) {
40
- var __stxDisposeEffects = __stxEndEffects();
41
- var __stxRegistered = __stxScopeEl && window.stx._scopes && window.stx._scopes['${e}'];
42
- if (__stxRegistered) __stxRegistered.__disposeEffects = __stxDisposeEffects;
43
- else if (window.stx._destroyCallbacks) window.stx._destroyCallbacks.push(__stxDisposeEffects);
44
- }
45
- if (typeof window !== 'undefined') window.__STX_CURRENT_ELEMENT__ = __stxPrevEl;
46
- }
47
- })();`;return a+c+r}function Me(c,e){if(H(c)){let n=H(c).tag.match(/data-stx-scope="([^"]*)"/);if(n)return{html:c,mergedIntoExisting:n[1],stamped:!0,root:"body"};return{html:nt(c,(u,t)=>`<body${t} data-stx-scope="${e}">`),mergedIntoExisting:null,stamped:!0,root:"body"}}let a=Mt(c),r=c.slice(a).match(/^(<[a-zA-Z][a-zA-Z0-9-]*)(\s[^>]*>|>)/s);if(r){let b=r[1]+r[2],n=r[1].slice(1),u=b.match(/data-stx-scope="([^"]*)"/);if(u)return{html:c,mergedIntoExisting:u[1],stamped:!0,root:n};let t=c.slice(0,a),T=r[1],L=r[2];return{html:`${t}${T} data-stx-scope="${e}"${L}${c.slice(a+r[0].length)}`,mergedIntoExisting:null,stamped:!0,root:n}}return{html:c,mergedIntoExisting:null,stamped:!1,root:null}}var Ae=0;function ue(c,e){let a=M.basename(c,".stx").replace(/[^a-zA-Z0-9]/g,"_"),r=e.__stx_scope_seq;return r?`stx_scope_${a}_${++r.n}_${r.key}`:`stx_scope_${a}_${++Ae}`}var ae=new Set,pe=new Set;function qh(){ae.clear(),pe.clear()}var Ce=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]);function Gf(c){let e=(t)=>t.replace(/[^\n]/g," "),a=c.replace(/<script\b[^>]*>[\s\S]*?<\/script>/gi,e).replace(/<style\b[^>]*>[\s\S]*?<\/style>/gi,e).replace(/<!--[\s\S]*?-->/g,e).replace(/\x00STX_HTML_COMMENT_\d+\x00/g,e).replace(/\{\{[\s\S]*?\}\}/g,e).replace(/\{!![\s\S]*?!!\}/g,e),r=[],b=0,n=/<(\/?)([A-Za-z][\w-]*)\b(?:[^<>"']|"[^"]*"|'[^']*')*?(\/?)>/g,u;while((u=n.exec(a))!==null){let t=u[1]==="/",T=u[2],L=u[3]==="/"||Ce.has(T.toLowerCase());if(t){b=Math.max(0,b-1);continue}if(b===0)r.push(T);if(!L)b++}return r}function fe(c){return/\btype\s*=\s*["'](?!(?:text\/javascript|application\/javascript|module)["'])[^"']*["']/i.test(c)}var tt=new P(500),wc=new Set;function Kh(){wc.clear()}function De(c){if(c.__onceStore instanceof Set)return c.__onceStore;return wc}async function gs(c,e,a,r,b,n=new Set){let u=r.partialsDir||M.join(M.dirname(a),"partials");if(u&&!M.isAbsolute(u))u=M.resolve(process.cwd(),u);let t=$e(c,"@partial","@include"),T=De(e);t=t.replace(/@once([\s\S]*?)@endonce/g,(f,v,h)=>{let g=v.trim(),i=`${a}:${g}`;if(T.has(i))return"";return T.add(i),v});{let f=/@includeIf\s*\(/g,v;while((v=f.exec(t))!==null){let h=v.index,g=h+v[0].length-1,i=1,x=g+1;while(x<t.length&&i>0){if(t[x]==="(")i++;else if(t[x]===")")i--;x++}if(i!==0)break;let l=t.substring(g+1,x-1),o=l.match(/^\s*['"]([^'"]+)['"]/);if(!o){f.lastIndex=x;continue}let C=o[1],W=L(C,u,a),E="";if(W&&await Bun.file(W).exists())b.add(W),E=`@include(${l})`;t=t.substring(0,h)+E+t.substring(x),f.lastIndex=0}}for(let[f,v]of[["@includeWhen",!1],["@includeUnless",!0]]){let h=new RegExp(`${f.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}\\s*\\(`,"g"),g;while((g=h.exec(t))!==null){let i=g.index,x=i+g[0].length-1,l=1,o=x+1;while(o<t.length&&l>0){if(t[o]==="(")l++;else if(t[o]===")")l--;o++}if(l!==0)break;let C=t.substring(x+1,o-1),W=ce(C,0);if(W===-1){h.lastIndex=o;continue}let E=C.substring(0,W).trim(),Z=C.substring(W+1).trim(),z=Z.match(/^\s*['"]([^'"]+)['"]/);if(!z){h.lastIndex=o;continue}let _=z[1],K=Z.substring(z[0].length),D,k=ce(K,0);if(k!==-1)D=K.substring(k+1).trim();try{let I=`Boolean(${E})`,j;if(m(I)){let ie=p(I,Object.keys(e));j=Boolean(ie(...Object.values(e)))}else j=Boolean(d(I,e));let ee=v?!j:j,ne="";if(ee){let ie=L(_,u,a);if(ie&&await Bun.file(ie).exists())b.add(ie);ne=`@include('${_}'${D?`, ${D}`:""})`}t=t.substring(0,i)+ne+t.substring(o),h.lastIndex=0}catch(I){let j=I instanceof Error?I.message:String(I),ee=y("Include",`Error evaluating ${f} condition: ${j}`,a,c,i);t=t.substring(0,i)+ee+t.substring(o),h.lastIndex=0}}}{let f=/@each\s*\(/g,v;while((v=f.exec(t))!==null){let h=v.index,g=h+v[0].length-1,i=1,x=g+1;while(x<t.length&&i>0){if(t[x]==="(")i++;else if(t[x]===")"){if(i--,i===0)break}x++}if(i!==0)break;let l=t.substring(g+1,x),o=t.substring(h,x+1),C=l.match(/^\s*['"]([^'"]+)['"]\s*,\s*([^,]+)\s*,\s*['"]([^'"]+)['"](?:\s*,\s*['"]([^'"]+)['"])?\s*$/);if(!C){f.lastIndex=0,t=t.replace(o,"");continue}let[,W,E,Z,z]=C;try{let _,K=E.trim();if(m(K))_=p(K,Object.keys(e))(...Object.values(e));else _=d(K,e);let D="";if(Array.isArray(_)&&_.length>0)for(let k of _){let I={...e,[Z]:k},j=await te(W,I,c,h);D+=j}else if(z)D=await te(z,{},c,h);t=t.substring(0,h)+D+t.substring(x+1),f.lastIndex=0}catch(_){let K=_ instanceof Error?_.message:String(_);t=t.substring(0,h)+y("Each",`Error in @each: ${K}`,a,c,h)+t.substring(x+1),f.lastIndex=0}}}{let f=/@includeFirst\s*\(/g,v;while((v=f.exec(t))!==null){let h=v.index,g=h+v[0].length-1,i=1,x=g+1;while(x<t.length&&i>0){if(t[x]==="(")i++;else if(t[x]===")"){if(i--,i===0)break}x++}if(i!==0)break;let l=t.substring(g+1,x),o=t.substring(h,x+1),C=l.match(/^\s*(\[[^\]]+\])/);if(!C){f.lastIndex=0,t=t.replace(o,"");continue}let W=C[1],E=l.slice(C[0].length),Z,z=E.match(/^\s*,\s*\{/);if(z){E=E.slice(z[0].length-1);let D=1,k=1;while(k<E.length&&D>0){if(E[k]==="{")D++;else if(E[k]==="}"){if(D--,D===0)break}k++}Z=E.substring(0,k+1),E=E.slice(k+1)}let _,K=E.match(/^\s*,\s*['"]([^'"]*)['"]\s*$/);if(K)_=K[1];try{let D=JSON.parse(W.replace(/'/g,'"')),k={};if(Z)try{k=O(Z,e)}catch(j){let ee=j instanceof Error?j.message:String(j);if(r.debug){let ne=y("Include",`Error parsing includeFirst variables: ${ee}`,a,c,h,o);t=t.replace(o,()=>ne)}else t=t.replace(o,()=>_||"");continue}let I=!1;for(let j of D){let ee=L(j,u,a);if(!ee)continue;if(await s(ee)){let ne=await te(j,k,c,h);t=t.replace(o,()=>ne),I=!0;break}}if(!I)if(_!==void 0)t=t.replace(o,()=>_);else if(r.debug){let j=y("Include",`None of the includeFirst paths exist: ${W}`,a,c,h,o);t=t.replace(o,()=>j)}else t=t.replace(o,"")}catch(D){let k=D instanceof Error?D.message:String(D),I=y("Include",`Error processing @includeFirst: ${k}`,a,c,h,o);t=t.replace(o,()=>I)}f.lastIndex=0}}function L(f,v,h){try{let g=f;if(!f.endsWith(".stx"))g=`${f}.stx`;let i=M.resolve(v),x=M.resolve(M.dirname(h)),l;if(!g.startsWith("./")&&!g.startsWith("../")){for(let z of r._layerPartialDirs??[]){let _=M.resolve(z,g);if(_.startsWith(`${M.resolve(z)}${M.sep}`)&&ye(_))return _}l=M.resolve(v,g)}else l=M.resolve(x,g);let o=M.normalize(l),C=o.startsWith(i+M.sep)||o===i,W=o.startsWith(x+M.sep)||o===x,E=!1,Z=M.dirname(x);if(o.startsWith(Z+M.sep)){if(!M.relative(Z,o).split(M.sep).some((D)=>D.startsWith(".")&&D!=="."&&D!==".."))E=!0}if(!C&&!W&&!E)return console.error(`Security: Path traversal attempt blocked for include path: ${f}`),console.error(` Resolved to: ${o}`),console.error(` Allowed dirs: ${i}, ${x}`),null;return o}catch(g){return console.error(`Error resolving path ${f}: ${g}`),null}}let re=M.resolve(a);n.add(re);function B(f,v,h,g){return r.onIncludeError?.({includePath:f,templatePath:a,message:v,partialsDir:u}),y("Include",v,a,h,g)}async function te(f,v={},h,g){let i=L(f,u,a);if(!i)return B(f,`Could not resolve path for include: ${f}`,h,g);let x=M.resolve(i);if(n.has(x)){let l=[...n,x].map((o)=>M.basename(o)).join(" -> ");return B(f,`Circular include detected: ${l}`,h,g)}try{b.add(i);let l;if(!l)try{l=await Bun.file(i).text()}catch(S){let X=S instanceof Error?S.message:String(S);return B(f,`Error loading include file ${f}: ${X}`,h,g)}if(l)l=l.replace(/\{\{--[\s\S]*?--\}\}/g,"");if(l&&l.includes("@stream")){let{processStreamDirectives:S}=await import("./chunk-cwdvmvc6.js");l=S(l,e)}if(l&&(r.debug||!A()&&!Pn()))try{let{warnUnbalancedTags:S}=await import("./chunk-vk98r75z.js");S(l,i)}catch{}try{let{processESImports:S}=await import("./chunk-x5ap19jt.js");l=await S(l,e,i,r,b)}catch(S){if(r.debug)console.warn(`[stx] partial ES import extraction skipped for ${i}:`,S instanceof Error?S.message:S)}let o=l,C=he(o);if(C)o=C.content.trim();let E=l.replace(/<script\b[^>]*>[\s\S]*?<\/script>/gi,"").match(/<style\b([^>]*)>([\s\S]*?)<\/style>/i),Z="";if(E)Z=`<style${E[1]}>${E[2]}</style>`;let z=[];o=o.replace(/<script\b([^>]*)>([\s\S]*?)<\/script>/gi,(S,X,w)=>{if(!fe(X))return"";return z.push({attrs:X,body:w}),`__STX_DATA_BLOCK_${z.length-1}__`}),o=o.replace(/<style\b[^>]*>[\s\S]*?<\/style>/gi,"");let _={...e};_.__stx_signals_gate=Te(l,i);for(let[S,X]of Object.entries(v))_[S]=X;let K=/<script\b([^>]*)>([\s\S]*?)<\/script>/gi,D=[...l.matchAll(K)].sort((S,X)=>{let w=(S[1]||"").includes("server"),V=(X[1]||"").includes("server");return Number(V)-Number(w)}),k="",I=null,j=!1,ee=!1;for(let S of D){let X=S[1]||"",w=S[2]||"";if(fe(X))continue;let V=X.includes("server"),be=Ve(X);if(!V&&!/\bsrc\s*=/i.test(X))je(w,i,r.strict);if(!V&&w.trim()){let{interpolateScriptExpressions:F}=await import("./chunk-v2712w9b.js");w=F(w,_,f)}let oe="";try{let{extractAndStripCssImports:F,renderVendorStyleTags:Q}=await import("./chunk-1mmyxay3.js"),se=F(w,{filePath:i,projectRoot:process.cwd()});w=se.code,oe=Q(se.styles)}catch(F){if(r.debug)console.warn(`[stx] vendor-css extractor skipped for ${i}:`,F instanceof Error?F.message:F)}if(be&&w.trim())w=Ue(w);if(!V){try{let{injectBrowserCoreAutoImports:Q}=await import("./chunk-1mmyxay3.js");w=Q(w).code;let{hasUserImports:se,bundleClientScript:Se}=await import("./chunk-7fg2sj1z.js");if(se(w))w=await Se(w,i,{projectRoot:process.cwd()})}catch(Q){if(r.debug)console.warn(`[stx] bundler skipped for ${i}:`,Q instanceof Error?Q.message:Q)}let{stripStxRuntimeImports:F}=await import("./chunk-xfvedjvb.js");w=F(w)}let de=Ee(w);if(!V){let{extractBridgeData:F,generateServerDataBridge:Q}=await import("./chunk-1mmyxay3.js"),se=Q(w,F(_));if(se)w=`${se}
48
- ${w}`}if(de&&!V){j=!0,I=ue(i,e);let F=N(w),Q=ge(F,I);k+=`${oe}<script data-stx-scoped data-stx-run="always" data-stx-owner="${I}">${Q}</script>
49
- `;continue}if(V)try{let{extractVariables:F}=await import("./chunk-1vwgddct.js");await F(w,_,i)}catch(F){if(r.debug)console.warn(`Warning: Could not extract variables from server script in ${i}:`,F)}if(!V&&!de){let F=X.replace(/\bclient\b/i,"").trim();I=ue(i,e);let Q=N(w),se=ge(Q,I);if(/__scopeRegistration\["(?!__stx)[^"]+"\]\s*=|Object\.defineProperty\(__scopeRegistration, "(?!__stx)/.test(se))ee=!0;k+=`${oe}<script data-stx-scoped data-stx-run="always" data-stx-owner="${I}"${F?` ${F}`:""}>${se}</script>
50
- `}}if(z.length>0){let{interpolateScriptExpressions:S}=await import("./chunk-v2712w9b.js");o=o.replace(/__STX_DATA_BLOCK_(\d+)__/g,(X,w)=>{let V=z[Number(w)];return`<script${V.attrs}>${S(V.body,_,f)}</script>`})}if(I){let S=Me(o,I);if(o=S.html,S.mergedIntoExisting){let w=I,V=S.mergedIntoExisting;k=k.split(`'${w}'`).join(`'${V}'`).split(`"${w}"`).join(`"${V}"`),I=V}else if(!S.stamped&&j&&!ae.has(i))ae.add(i),console.warn(`[stx] ${M.relative(process.cwd(),i)} declares signals but has no element to scope them to, so nothing in it will hydrate. Wrap the partial's markup in a single root element.`);if(S.stamped&&S.root!=="body"&&(j||ee)&&!pe.has(i)){let w=Gf(o);if(w.length>1)pe.add(i),console.warn(`[stx] ${M.relative(process.cwd(),i)} declares ${j?"signals":"bindings"} and has ${w.length} top-level elements (${w.map((V)=>`<${V}>`).join(", ")}). Only the first is scoped, so bindings in the others cannot see what this partial's script declares. Wrap the partial's markup in a single root element.`)}let X=S.stamped&&S.root!==null&&Ar(S.root);k=ke(k,X?I:null)}if(o.includes("@include")||o.includes("@partial"))o=await gs(o,_,i,r,b,n);let{processLoops:ne,reportDeferredLoopWarnings:ie}=await import("./chunk-66eszw4f.js"),G=ne(o,_,i,void 0,!0);G=le(G,_,i),G=ie(G);let{processMetaDirectives:xe,processSeoDirective:_e,processStructuredData:we}=await import("./chunk-fmzyrg2e.js");if(G=xe(G,_,i,r),G=we(G,_,i),G=_e(G,_,i,r),G=R(G,_,i),Z)G+=`
51
- `+Z;if(k)G+=`
52
- `+k;return G}catch(l){if(l instanceof J)throw l;let o=l instanceof Error?l.message:String(l);return B(f,`Error processing include ${f}: ${o}`,h,g)}}let Y=/@include\s*\(/g,U;while((U=Y.exec(t))!==null){let f=U.index,v=f+U[0].length-1,h=1,g=v+1;while(g<t.length&&h>0){if(t[g]==="(")h++;else if(t[g]===")")h--;g++}if(h!==0)break;let i=t.substring(f,g),x=t.substring(v+1,g-1),l=x.match(/^\s*['"]([^'"]+)['"]/);if(!l){Y.lastIndex=g;continue}let o=l[1],C,W=x.substring(l[0].length),E=ce(W,0);if(E!==-1)C=W.substring(E+1).trim();let Z={};if(C)try{Z=O(C,e)}catch(_){let K=_ instanceof Error?_.message:String(_);t=t.replace(i,y("Include",`Error parsing include variables for ${o}: ${K}`,a,c,f)),Y.lastIndex=0;continue}let z=await te(o,Z,c,f);t=t.substring(0,f)+z+t.substring(g),Y.lastIndex=0}return t}function ms(c,e){let a=c;function r(b,n,u,t){let T=b,L=!0;while(L){L=!1;let re=new RegExp(`@${n}\\(['"]([^'"]+)['"]\\)`),B=T.match(re);if(!B||B.index===void 0)break;let te=B.index,Y=B[1],U=te+B[0].length,f=new RegExp(`@${n}\\(`),v=new RegExp(`@${u}(?![a-z])`),h=1,g=U,i=-1;while(h>0&&g<T.length){let l=T.slice(g),o=l.match(f),C=l.match(v),W=o?g+o.index:1/0,E=C?g+C.index:1/0;if(W<E)h++,g=W+(o[0].length||1);else if(E<1/0){if(h--,h===0){i=E;break}g=E+u.length+1}else break}if(i===-1)break;let x=T.slice(U,i);if(!e[Y])e[Y]=[];if(t)e[Y].unshift(x);else e[Y].push(x);T=T.substring(0,te)+T.substring(i+`@${u}`.length),L=!0}return T}return a=r(a,"push","endpush",!1),a=r(a,"prepend","endprepend",!0),a}function hs(c,e){return c.replace(/@stack\(['"]([^'"]+)['"]\)/g,(a,r)=>{if(!e[r]||e[r].length===0)return"";return e[r].join(`
53
- `)})}
54
- export{qh,Gf,tt,wc,Kh,gs,ms,hs};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Jh,Yh,Xf,bs}from"./chunk-h1hcjx7e.js";import"./chunk-s21bj83r.js";import"./chunk-jbgj2hph.js";import"./chunk-5dvkphbe.js";import{Ar}from"./chunk-fpya25cc.js";import"./chunk-pqjmse0r.js";import"./chunk-k32q90b2.js";import{ut}from"./chunk-g0xn80gz.js";import"./chunk-farh4p7f.js";import"./chunk-qjey0jk6.js";export{ut as freeIdentifiers,bs as processComponents,Xf as processESImports,Ar as rendersAsElement,Jh as resetMarginStackWarnings,Yh as resetTemplateLoopWarnings};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{xh,Co,Sh,kh,_h,Ch}from"./chunk-9vzeea7p.js";import"./chunk-k15hxcgs.js";import"./chunk-3a4tfycz.js";import"./chunk-9zrvh3pz.js";import"./chunk-c6rcrh48.js";import"./chunk-cr0msawk.js";import"./chunk-5dvkphbe.js";import"./chunk-rnvw07ca.js";import"./chunk-t5jfh1bs.js";import"./chunk-tnp2ta5q.js";import"./chunk-rw5492e2.js";import"./chunk-83tvkw4y.js";import"./chunk-kh6njq2r.js";import"./chunk-fpya25cc.js";import"./chunk-pqjmse0r.js";import"./chunk-k32q90b2.js";import"./chunk-g0xn80gz.js";import"./chunk-farh4p7f.js";import"./chunk-qjey0jk6.js";export{Ch as clearStoreCache,xh as getStoreScript,_h as getStoreScriptFor,kh as pageStoresAll,Co as storesRead,Sh as storesReadInFiles};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{um}from"./chunk-rd751nw3.js";import"./chunk-rnvw07ca.js";import"./chunk-t5jfh1bs.js";import"./chunk-tnp2ta5q.js";import"./chunk-rw5492e2.js";import"./chunk-83tvkw4y.js";import"./chunk-kh6njq2r.js";import"./chunk-fpya25cc.js";import"./chunk-pqjmse0r.js";import"./chunk-k32q90b2.js";import"./chunk-g0xn80gz.js";import"./chunk-farh4p7f.js";import"./chunk-qjey0jk6.js";export{um as buildApp};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Ca,eu}from"./chunk-gd56arnm.js";import"./chunk-8me8hamk.js";import"./chunk-vvzys1x7.js";export{eu as createImageHandler,Ca as handleImageRequest};