@stacksjs/stx 0.2.908 → 0.2.909

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 (80) hide show
  1. package/dist/chunk-0b0y695e.js +2 -0
  2. package/dist/{chunk-vkxrsy13.js → chunk-162e363h.js} +1 -1
  3. package/dist/{chunk-xwarwkaw.js → chunk-2epswh9w.js} +1 -1
  4. package/dist/{chunk-zk6qmkhb.js → chunk-2pagy1jn.js} +1 -1
  5. package/dist/{chunk-zkp5awqw.js → chunk-376714qg.js} +1 -1
  6. package/dist/{chunk-cjntf1jg.js → chunk-3b8epemd.js} +1 -1
  7. package/dist/{chunk-f3msm5tk.js → chunk-3dx77nfw.js} +1 -1
  8. package/dist/{chunk-xqe3c7pa.js → chunk-3khg2ats.js} +1 -1
  9. package/dist/{chunk-1x0wcskp.js → chunk-440epzas.js} +1 -1
  10. package/dist/{chunk-yjhktn0b.js → chunk-4nkzj2pj.js} +2 -2
  11. package/dist/{chunk-qpf782pt.js → chunk-581qafp7.js} +1 -1
  12. package/dist/{chunk-6mw288vd.js → chunk-59wq842b.js} +1 -1
  13. package/dist/{chunk-3qneemwh.js → chunk-5crybqrs.js} +1 -1
  14. package/dist/{chunk-mrx20xza.js → chunk-5g2svr3g.js} +1 -1
  15. package/dist/{chunk-5baag5dz.js → chunk-66tpsdpm.js} +4 -4
  16. package/dist/{chunk-4jmztn9d.js → chunk-69yqdxck.js} +1 -1
  17. package/dist/{chunk-4hrryats.js → chunk-73py4qeh.js} +1 -1
  18. package/dist/{chunk-rdeje2dd.js → chunk-8njqq95v.js} +5 -5
  19. package/dist/{chunk-14497kj1.js → chunk-8zx8zgwe.js} +1 -1
  20. package/dist/{chunk-kt3f4rpy.js → chunk-9mmdtd5q.js} +1 -1
  21. package/dist/{chunk-xn8eabng.js → chunk-9yb1hke7.js} +1 -1
  22. package/dist/{chunk-av45fw8a.js → chunk-c43kvce7.js} +1 -1
  23. package/dist/{chunk-f2yqqpvr.js → chunk-drmp871t.js} +1 -1
  24. package/dist/{chunk-vqys4n8f.js → chunk-dyg45v6h.js} +1 -1
  25. package/dist/{chunk-q4nk8sq2.js → chunk-e5n8wfj2.js} +1 -1
  26. package/dist/{chunk-3npzxjr4.js → chunk-e6za83ty.js} +1 -1
  27. package/dist/chunk-e99ccfbw.js +2 -0
  28. package/dist/{chunk-59bbk5gx.js → chunk-eavaz8vm.js} +2 -2
  29. package/dist/{chunk-45326z5v.js → chunk-fkm2bf2x.js} +1 -1
  30. package/dist/chunk-g9dxcxk0.js +2 -0
  31. package/dist/{chunk-cfbmjgd0.js → chunk-gjk0nzyy.js} +1 -1
  32. package/dist/{chunk-yvp5tfrz.js → chunk-gmjsnh5h.js} +1 -1
  33. package/dist/chunk-jvpnd7zd.js +2 -0
  34. package/dist/{chunk-a0esj80g.js → chunk-k3eab0c5.js} +1 -1
  35. package/dist/{chunk-y9xq82ep.js → chunk-kp957mbs.js} +1 -1
  36. package/dist/{chunk-c0kgwh4k.js → chunk-m2t2gpjb.js} +2 -2
  37. package/dist/{chunk-tpryfx8t.js → chunk-mv1hr9d4.js} +4 -4
  38. package/dist/chunk-n73v0pcq.js +2 -0
  39. package/dist/chunk-p7rwa0xw.js +2 -0
  40. package/dist/{chunk-jg5xc2m1.js → chunk-p8p0xs8g.js} +2 -2
  41. package/dist/{chunk-v25gm9d9.js → chunk-pbs4db9n.js} +4 -4
  42. package/dist/chunk-pdfnq2gs.js +3 -0
  43. package/dist/{chunk-s91tcznf.js → chunk-q7k0eha6.js} +1 -1
  44. package/dist/{chunk-pb2mztar.js → chunk-q91hentn.js} +1 -1
  45. package/dist/{chunk-6756txp1.js → chunk-r3hb020a.js} +1 -1
  46. package/dist/chunk-r643mp2v.js +2 -0
  47. package/dist/{chunk-d8mnaesb.js → chunk-r8gv2pcy.js} +4 -4
  48. package/dist/{chunk-hg4vfrxr.js → chunk-rgrh0fpj.js} +1 -1
  49. package/dist/{chunk-skxkqh9a.js → chunk-rmz99qwk.js} +1 -1
  50. package/dist/{chunk-0ek3s3b6.js → chunk-snhsh171.js} +107 -107
  51. package/dist/{chunk-69wpv1pr.js → chunk-t9ad2qwm.js} +2 -2
  52. package/dist/{chunk-1pdntpwe.js → chunk-tcytjgh5.js} +1 -1
  53. package/dist/{chunk-kydh790y.js → chunk-tktgaz78.js} +1 -1
  54. package/dist/{chunk-sxqha69q.js → chunk-tszsy2pv.js} +2 -2
  55. package/dist/chunk-tw1rbnc3.js +2 -0
  56. package/dist/{chunk-ddn98yz4.js → chunk-txsre59k.js} +1 -1
  57. package/dist/{chunk-f74qzgp8.js → chunk-va00ve6h.js} +1 -1
  58. package/dist/{chunk-9343arqn.js → chunk-w83rcgej.js} +1 -1
  59. package/dist/{chunk-7xpez9tc.js → chunk-x6n0r41y.js} +1 -1
  60. package/dist/{chunk-4ajsp5dp.js → chunk-xf3j14d6.js} +1 -1
  61. package/dist/{chunk-amye7vb0.js → chunk-xprmhc0y.js} +1 -1
  62. package/dist/{chunk-am610nan.js → chunk-y7caf6hd.js} +3 -3
  63. package/dist/{chunk-trnw1tg5.js → chunk-yqxhy0nq.js} +1 -1
  64. package/dist/{chunk-p2b90rz9.js → chunk-yy71cxxj.js} +1 -1
  65. package/dist/cli.js +7 -7
  66. package/dist/craft-entry.js +1 -1
  67. package/dist/craft.js +1 -1
  68. package/dist/pwa.js +1 -1
  69. package/dist/ssg.js +2 -2
  70. package/dist/stx-virtual-ts.js +5 -9
  71. package/package.json +5 -5
  72. package/dist/chunk-7hgqyea0.js +0 -2
  73. package/dist/chunk-7m5rpqjy.js +0 -2
  74. package/dist/chunk-b25twdd7.js +0 -2
  75. package/dist/chunk-b7fmkwz2.js +0 -2
  76. package/dist/chunk-cssvev8r.js +0 -2
  77. package/dist/chunk-g67xjfe6.js +0 -3
  78. package/dist/chunk-naj7m2av.js +0 -2
  79. package/dist/chunk-qn9rrwp8.js +0 -2
  80. package/dist/chunk-z8e2m6kz.js +0 -2
@@ -0,0 +1,3 @@
1
+ // @bun
2
+ import{Y}from"./chunk-snhsh171.js";function r(t){return Y(t)}
3
+ export{r};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{gy,my,gg,Ps}from"./chunk-f74qzgp8.js";import"./chunk-g67xjfe6.js";import"./chunk-9bexzgws.js";import"./chunk-v0yay1kw.js";import{Fr}from"./chunk-0ek3s3b6.js";import"./chunk-4hrryats.js";import"./chunk-w98yt4d4.js";import{Ee}from"./chunk-c08jvjqt.js";import"./chunk-phzhmnnm.js";import"./chunk-ck4ypzet.js";import"./chunk-0jdz31q1.js";import"./chunk-4b110x6r.js";export{Ee as freeIdentifiers,Ps as processComponents,gg as processESImports,Fr as rendersAsElement,gy as resetMarginStackWarnings,my as resetTemplateLoopWarnings};
2
+ import{gy,my,gg,Ps}from"./chunk-va00ve6h.js";import"./chunk-pdfnq2gs.js";import"./chunk-9bexzgws.js";import"./chunk-v0yay1kw.js";import{Fr}from"./chunk-snhsh171.js";import"./chunk-73py4qeh.js";import"./chunk-w98yt4d4.js";import{Ee}from"./chunk-c08jvjqt.js";import"./chunk-phzhmnnm.js";import"./chunk-ck4ypzet.js";import"./chunk-0jdz31q1.js";import"./chunk-4b110x6r.js";export{Ee as freeIdentifiers,Ps as processComponents,gg as processESImports,Fr as rendersAsElement,gy as resetMarginStackWarnings,my as resetTemplateLoopWarnings};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{Qf,eg,$e,tg,Rc,mn,hn,sy,Ac,yn,hr,ng,rg,sg,Cs,og,ig,Pc,bn,ag,wn,Ic,oy}from"./chunk-1pdntpwe.js";import"./chunk-ddn98yz4.js";import"./chunk-cwcmmgvz.js";import"./chunk-13awnyq0.js";import"./chunk-jg5xc2m1.js";import"./chunk-cfbmjgd0.js";import"./chunk-razwegar.js";import"./chunk-mpfm5ctr.js";import"./chunk-eca022er.js";import"./chunk-b234w3mf.js";import"./chunk-0ek3s3b6.js";import"./chunk-4hrryats.js";import"./chunk-w98yt4d4.js";import"./chunk-c08jvjqt.js";import"./chunk-phzhmnnm.js";import"./chunk-ck4ypzet.js";import"./chunk-0jdz31q1.js";import"./chunk-4b110x6r.js";export{hr as MODULE_SPECIFIER_PREFIX,Pc as assertBundleBuildCanSettle,Qf as bundleCacheDir,eg as bundleCacheEntryLimit,oy as bundleClientEntriesSplit,wn as bundleClientScript,hn as clearBundleFailures,$e as clientBundleDependencies,mn as getBundleFailures,yn as hasUserImports,ig as isWithinBundlerCallback,bn as moduleSubstitutionKey,rg as normalizeRegistrySpecifiers,ag as queueClientBundleBuild,Rc as recordBundleFailure,ng as registryIdForPath,Ac as resolveBundlerFallback,sg as rewriteRegistryImports,sy as setBundlerFallbackMode,tg as shouldLogBundlerDiagnostics,Ic as tempBuildName,Cs as withModuleSubstitutes,og as withinBundlerCallback};
2
+ import{Qf,eg,$e,tg,Rc,mn,hn,sy,Ac,yn,hr,ng,rg,sg,Cs,og,ig,Pc,bn,ag,wn,Ic,oy}from"./chunk-tcytjgh5.js";import"./chunk-txsre59k.js";import"./chunk-cwcmmgvz.js";import"./chunk-13awnyq0.js";import"./chunk-p8p0xs8g.js";import"./chunk-gjk0nzyy.js";import"./chunk-razwegar.js";import"./chunk-mpfm5ctr.js";import"./chunk-eca022er.js";import"./chunk-b234w3mf.js";import"./chunk-snhsh171.js";import"./chunk-73py4qeh.js";import"./chunk-w98yt4d4.js";import"./chunk-c08jvjqt.js";import"./chunk-phzhmnnm.js";import"./chunk-ck4ypzet.js";import"./chunk-0jdz31q1.js";import"./chunk-4b110x6r.js";export{hr as MODULE_SPECIFIER_PREFIX,Pc as assertBundleBuildCanSettle,Qf as bundleCacheDir,eg as bundleCacheEntryLimit,oy as bundleClientEntriesSplit,wn as bundleClientScript,hn as clearBundleFailures,$e as clientBundleDependencies,mn as getBundleFailures,yn as hasUserImports,ig as isWithinBundlerCallback,bn as moduleSubstitutionKey,rg as normalizeRegistrySpecifiers,ag as queueClientBundleBuild,Rc as recordBundleFailure,ng as registryIdForPath,Ac as resolveBundlerFallback,sg as rewriteRegistryImports,sy as setBundlerFallbackMode,tg as shouldLogBundlerDiagnostics,Ic as tempBuildName,Cs as withModuleSubstitutes,og as withinBundlerCallback};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{wg,yy,by,wy,vy,vg,xg,xy,Sy,wi,ky,Er,Tr,Bs}from"./chunk-45326z5v.js";import{gt}from"./chunk-zkwkhesc.js";import"./chunk-0ek3s3b6.js";import"./chunk-4hrryats.js";import"./chunk-w98yt4d4.js";import"./chunk-c08jvjqt.js";import"./chunk-phzhmnnm.js";import"./chunk-ck4ypzet.js";import"./chunk-0jdz31q1.js";import"./chunk-4b110x6r.js";export{vy as __setSignalsGeneratorsForTest,gt as cacheEngineFingerprint,Tr as cacheTemplate,Er as checkCache,ky as clearDevCaches,xg as getCachedRouterScript,vg as getCachedSignalsRuntime,xy as getServeClientAsset,wi as getServeModuleBundle,Bs as hashFilePath,by as invalidateFileCache,wy as invalidateFileCacheByDir,yy as readFileCached,Sy as registerServeModuleBundle,wg as templateCache};
2
+ import{wg,yy,by,wy,vy,vg,xg,xy,Sy,wi,ky,Er,Tr,Bs}from"./chunk-fkm2bf2x.js";import{gt}from"./chunk-zkwkhesc.js";import"./chunk-snhsh171.js";import"./chunk-73py4qeh.js";import"./chunk-w98yt4d4.js";import"./chunk-c08jvjqt.js";import"./chunk-phzhmnnm.js";import"./chunk-ck4ypzet.js";import"./chunk-0jdz31q1.js";import"./chunk-4b110x6r.js";export{vy as __setSignalsGeneratorsForTest,gt as cacheEngineFingerprint,Tr as cacheTemplate,Er as checkCache,ky as clearDevCaches,xg as getCachedRouterScript,vg as getCachedSignalsRuntime,xy as getServeClientAsset,wi as getServeModuleBundle,Bs as hashFilePath,by as invalidateFileCache,wy as invalidateFileCacheByDir,yy as readFileCached,Sy as registerServeModuleBundle,wg as templateCache};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{ec,tc,nc,rc,ry}from"./chunk-162e363h.js";import"./chunk-wbsbrm6n.js";import"./chunk-tszsy2pv.js";import"./chunk-0vyytd9v.js";import"./chunk-r8gv2pcy.js";import"./chunk-4nkzj2pj.js";import"./chunk-mv1hr9d4.js";import"./chunk-fs43342z.js";import"./chunk-va00ve6h.js";import"./chunk-pdfnq2gs.js";import"./chunk-440epzas.js";import"./chunk-9bexzgws.js";import"./chunk-m2t2gpjb.js";import"./chunk-66tpsdpm.js";import"./chunk-v0yay1kw.js";import"./chunk-fkm2bf2x.js";import"./chunk-13awnyq0.js";import"./chunk-p8p0xs8g.js";import"./chunk-gjk0nzyy.js";import"./chunk-razwegar.js";import"./chunk-mpfm5ctr.js";import"./chunk-eca022er.js";import"./chunk-b234w3mf.js";import"./chunk-snhsh171.js";import"./chunk-73py4qeh.js";import"./chunk-w98yt4d4.js";import"./chunk-c08jvjqt.js";import"./chunk-phzhmnnm.js";import"./chunk-ck4ypzet.js";import"./chunk-0jdz31q1.js";import"./chunk-4b110x6r.js";export{ec as buildNative,ry as default,tc as findCraftBinary,rc as getAvailableFormats,nc as getAvailableTargets};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{en,we,R}from"./chunk-0jdz31q1.js";import{Z}from"./chunk-13awnyq0.js";import{Mi,ol,o,A,Ke,Ne,Tn,Xe,ke,se,Dr,O,Rn,ao,ml,hl,Pn,zr,lo,uo,yl,Hi,bl,wl,vl,xl,Ge,Je,po,Qe,s,On,b,g,Y,ae,Me,P,Gi}from"./chunk-0ek3s3b6.js";import{d,m,M,n,ce,te,u,De,Qi,K,jn,ea,Zt,ta,Nl,qr,Ml,wt,Dl,Kr,Ll,Bn,na,jl,Xr,Jr,Le,ra}from"./chunk-c08jvjqt.js";import{Jt}from"./chunk-w98yt4d4.js";import{Dn}from"./chunk-4hrryats.js";import{S}from"./chunk-yjhktn0b.js";import{Pr,Cn}from"./chunk-b234w3mf.js";import{Hc,Uc,$r,pt,Vc,j}from"./chunk-jg5xc2m1.js";import{ki,_i,Ci,Ei}from"./chunk-eca022er.js";import{kn,Lc,Ps}from"./chunk-f74qzgp8.js";import{Ts,$s,Rs}from"./chunk-tpryfx8t.js";import{Ns,mi,hi,Ms,Ds,yi}from"./chunk-c0kgwh4k.js";import{Is,ui}from"./chunk-1x0wcskp.js";import{ii}from"./chunk-fs43342z.js";import{ge,di,pi,fi}from"./chunk-9bexzgws.js";import{_r,Ae,Bc,Cr,Fc}from"./chunk-5baag5dz.js";import{W,ut}from"./chunk-1jxkc6d0.js";import{qc,Kc}from"./chunk-cfbmjgd0.js";import{I,Fn,sa}from"./chunk-e5rag6rh.js";import{Un}from"./chunk-ahf9j8wb.js";import{L,c,f}from"./chunk-8tfpv6zf.js";function Ve(r){return/\bimport\s*\.\s*meta\b/.test(Un(r))}function Br(r){let e=Ne(r),l=[],a=0;for(let h=0;h<e.length;h++){let t=e[h],p=t.name.toLowerCase();if(p==="template")a+=t.closing?-1:1;if(p!=="script"||t.closing)continue;let w=e[h+1];if(w?.name.toLowerCase()!=="script"||!w.closing)continue;l.push({start:t.start,end:w.end,attrs:t.attributes,body:r.slice(t.end,w.start),inert:a>0})}return l}function nt(r){return[...r].map(([e,l])=>l===!0?e:`${e}="${l.replace(/"/g,"&quot;")}"`).join(" ")}function vt(r){let e=Br(r);if(e.some((y)=>O(y.attrs).has("data-stx-module-bootstrap")))return r;let l=(y)=>{if(Ve(y))return!0;try{return Z(y)}catch{return!1}};if(!e.some((y)=>l(y.body)||O(y.attrs).get("type")==="module"))return r;let a=new Bun.CryptoHasher("md5").update(r).digest("hex").slice(0,16),h="",t=0,p=!1,w=0;for(let y of e){let v=O(y.attrs),x=v.get("type");if(y.inert||v.has("data-stx-module-job")||v.has("data-stx-runtime")||v.has("data-stx-router"))continue;if(typeof x==="string"&&!["module","text/javascript","application/javascript"].includes(x.toLowerCase()))continue;if(![...v.keys()].some((T)=>/^data-stx-(?:scoped|modules|stores|(?:framework-)?composables)$/.test(T)))continue;let _=x==="module"||l(y.body);if(_)p=!0;if(!p)continue;if(!_&&(v.has("data-stx-owner")||v.has("data-stx-instance")))continue;h+=r.slice(t,y.start);let E=y.body,D=v.get("src");if(typeof D==="string")v.delete("src"),v.set("data-stx-source-url",D),E=`${_?"await":"return"} new Promise(function(resolve,reject){
2
+ import{en,we,R}from"./chunk-0jdz31q1.js";import{Z}from"./chunk-13awnyq0.js";import{Mi,ol,o,A,Ke,Ne,Tn,Xe,ke,se,Dr,O,Rn,ao,ml,hl,Pn,zr,lo,uo,yl,Hi,bl,wl,vl,xl,Ge,Je,po,Qe,s,On,b,g,Y,ae,Me,P,Gi}from"./chunk-snhsh171.js";import{d,m,M,n,ce,te,u,De,Qi,K,jn,ea,Zt,ta,Nl,qr,Ml,wt,Dl,Kr,Ll,Bn,na,jl,Xr,Jr,Le,ra}from"./chunk-c08jvjqt.js";import{Jt}from"./chunk-w98yt4d4.js";import{Dn}from"./chunk-73py4qeh.js";import{S}from"./chunk-4nkzj2pj.js";import{Pr,Cn}from"./chunk-b234w3mf.js";import{Hc,Uc,$r,pt,Vc,j}from"./chunk-p8p0xs8g.js";import{ki,_i,Ci,Ei}from"./chunk-eca022er.js";import{kn,Lc,Ps}from"./chunk-va00ve6h.js";import{Ts,$s,Rs}from"./chunk-mv1hr9d4.js";import{Ns,mi,hi,Ms,Ds,yi}from"./chunk-m2t2gpjb.js";import{Is,ui}from"./chunk-440epzas.js";import{ii}from"./chunk-fs43342z.js";import{ge,di,pi,fi}from"./chunk-9bexzgws.js";import{_r,Ae,Bc,Cr,Fc}from"./chunk-66tpsdpm.js";import{W,ut}from"./chunk-1jxkc6d0.js";import{qc,Kc}from"./chunk-gjk0nzyy.js";import{I,Fn,sa}from"./chunk-e5rag6rh.js";import{Un}from"./chunk-ahf9j8wb.js";import{L,c,f}from"./chunk-8tfpv6zf.js";function Ve(r){return/\bimport\s*\.\s*meta\b/.test(Un(r))}function Br(r){let e=Ne(r),l=[],a=0;for(let h=0;h<e.length;h++){let t=e[h],p=t.name.toLowerCase();if(p==="template")a+=t.closing?-1:1;if(p!=="script"||t.closing)continue;let w=e[h+1];if(w?.name.toLowerCase()!=="script"||!w.closing)continue;l.push({start:t.start,end:w.end,attrs:t.attributes,body:r.slice(t.end,w.start),inert:a>0})}return l}function nt(r){return[...r].map(([e,l])=>l===!0?e:`${e}="${l.replace(/"/g,"&quot;")}"`).join(" ")}function vt(r){let e=Br(r);if(e.some((y)=>O(y.attrs).has("data-stx-module-bootstrap")))return r;let l=(y)=>{if(Ve(y))return!0;try{return Z(y)}catch{return!1}};if(!e.some((y)=>l(y.body)||O(y.attrs).get("type")==="module"))return r;let a=new Bun.CryptoHasher("md5").update(r).digest("hex").slice(0,16),h="",t=0,p=!1,w=0;for(let y of e){let v=O(y.attrs),x=v.get("type");if(y.inert||v.has("data-stx-module-job")||v.has("data-stx-runtime")||v.has("data-stx-router"))continue;if(typeof x==="string"&&!["module","text/javascript","application/javascript"].includes(x.toLowerCase()))continue;if(![...v.keys()].some((T)=>/^data-stx-(?:scoped|modules|stores|(?:framework-)?composables)$/.test(T)))continue;let _=x==="module"||l(y.body);if(_)p=!0;if(!p)continue;if(!_&&(v.has("data-stx-owner")||v.has("data-stx-instance")))continue;h+=r.slice(t,y.start);let E=y.body,D=v.get("src");if(typeof D==="string")v.delete("src"),v.set("data-stx-source-url",D),E=`${_?"await":"return"} new Promise(function(resolve,reject){
3
3
  var source=globalThis.__stxExecutingScript,script=document.createElement('script');
4
4
  for(var attr of source.attributes)if(!['type','src','data-stx-module-job'].includes(attr.name))script.setAttribute(attr.name,attr.value);
5
5
  ${_?"script.type='module';":""}
@@ -1435,7 +1435,7 @@ ${C}
1435
1435
  </style>`;a=a.replace(v,N),w.lastIndex=0}catch(C){}}}return a}import gt from"path";var os=/(\bfrom\s*|\bimport\s*\(\s*|\bimport\s+)(['"])(\.\.?\/[^'"]*)\2/g,as=/(<script\b[^>]*>)([\s\S]*?)(<\/script>)/gi;function cs(r,e){if(!e||!r.includes("/"))return r;let l=gt.dirname(e);return r.replace(os,(a,h,t,p)=>{let w=gt.resolve(l,p);return`${h}${t}${w.split(gt.sep).join("/")}${t}`})}function wr(r,e){if(!e||!r.includes("<script"))return r;return r.replace(as,(l,a,h,t)=>`${a}${cs(h,e)}${t}`)}var Re="<!--PARENT_CONTENT_PLACEHOLDER-->";function vr(r){return r.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function Mr(r,e){let l=r.length,a=e,h=!0,t=[],p=(w)=>w+9<=l&&r[w]==="<"&&r[w+1]==="/"&&(r[w+2]==="s"||r[w+2]==="S")&&(r[w+3]==="c"||r[w+3]==="C")&&(r[w+4]==="r"||r[w+4]==="R")&&(r[w+5]==="i"||r[w+5]==="I")&&(r[w+6]==="p"||r[w+6]==="P")&&(r[w+7]==="t"||r[w+7]==="T")&&(r[w+8]===">"||/\s/.test(r[w+8]));while(a<l){let w=r[a];if(p(a))return a;if(w==="/"&&r[a+1]==="/"){if(a=r.indexOf(`
1436
1436
  `,a+2),a===-1)return-1;a+=1,h=!0;continue}if(w==="/"&&r[a+1]==="*"){let y=r.indexOf("*/",a+2);if(y===-1)return-1;a=y+2,h=!0;continue}if(w==="/"&&h){let y=a+1,v=!1;while(y<l){let x=r[y];if(x==="\\"){y+=2;continue}if(x==="[")v=!0;else if(x==="]")v=!1;else if(x==="/"&&!v){y++;break}else if(x===`
1437
1437
  `){y=-1;break}y++}if(y===-1){a++,h=!1;continue}while(y<l&&/[a-z]/.test(r[y]))y++;a=y,h=!1;continue}if(w==="'"||w==='"'){let y=w;a++;while(a<l){if(r[a]==="\\"){a+=2;continue}if(r[a]===y){a++;break}if(r[a]===`
1438
- `)break;a++}h=!1;continue}if(w==="`"){a++;while(a<l){if(r[a]==="\\"){a+=2;continue}if(r[a]==="`"){a++;break}if(r[a]==="$"&&r[a+1]==="{"){t.push(!0),a+=2,h=!0;break}a++}if(t.length===0)h=!1;continue}if(w==="}"&&t.length>0){t.pop(),a++;while(a<l){if(r[a]==="\\"){a+=2;continue}if(r[a]==="`"){a++,h=!1;break}if(r[a]==="$"&&r[a+1]==="{"){t.push(!0),a+=2,h=!0;break}a++}continue}if(/\s/.test(w));else if(/[)\].\w$]/.test(w))h=!1;else h=!0;a++}return-1}function Rr(r,e){let l=e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),a=new RegExp(`<script\\b(?=[^>]*\\b${l}(?:\\s|=|/?>))[^>]*>`,"i").exec(r);if(!a)return null;let h=a.index+a[0].length,t=r.indexOf("</script>",h);if(t===-1)return null;let p=r.indexOf(">",t);if(p===-1)return null;return{start:a.index,end:p+1}}var us=4096;async function mt(r,e,l){if(Ve(e)||Z(e)||l.buildMode!=="serve"||e.length<us)return null;let{registerServeModuleBundle:a}=await import("./chunk-6756txp1.js");return`<script ${r} src="${a(e)}"></script>`}async function br(r,e,l,a){try{let{registeredModuleIdsIn:h,buildModuleRegistryScript:t}=await o("stx/client-module-registry",()=>import("./chunk-7xpez9tc.js")),p=[],w=await t(h(...r),{minify:sa(e.buildMode,e.minifyClient),collectInputs:p});for(let y of p)l?.add(y);if(a)a.inputs=p,a.code=w??void 0;if(!w)return null;if(e.buildMode==="serve"&&!Ve(w)&&!Z(w)){let{registerServeModuleBundle:y}=await import("./chunk-6756txp1.js");return`<script data-stx-scoped data-stx-run="always" data-stx-modules src="${y(w)}"></script>`}return`<script data-stx-scoped data-stx-run="always" data-stx-modules>${w.replace(/<\/script/gi,"<\\/script")}</script>`}catch{return null}}async function ds(r,e,l,a){let h={modulesTag:null,modulesCode:null,storeTag:null,storeCode:null,composableTag:null,composableCode:null,frameworkScript:null};try{let{getFrameworkComposableScript:_}=await o("stx/framework-composables",()=>import("./chunk-trnw1tg5.js"));h.frameworkScript=await _(r)}catch{}let t=null;try{t=await o("stx/store-loader",()=>import("./chunk-f3msm5tk.js"))}catch{}let p=e.storesDir,w=!!a.__stx_native_screen||(t?.pageStoresAll()??!0),y=w?"":r.replace(/<script\b[^>]*\bdata-stx-(?:runtime|router|hmr)\b[^>]*>[\s\S]*?<\/script>/gi,""),v=[],x=[],k=null;for(let _=0;_<8;_++){let E=null,D="",T=!1;try{if(t){let q=w?await t.getStoreScript(p).then((V)=>V?{code:V,stores:["*"],functions:null}:null):await t.getStoreScriptFor(p,[y],{reads:t.storesReadInFiles([...v,...x]),runOnce:!0});if(q)E=q.code,D=q.stores.join(","),T=!!q.functions&&!w}}catch{}if(k!==null&&D===k)break;k=D;let C=T?'data-stx-scoped data-stx-run="always" data-stx-stores':"data-stx-stores",N=E?`<script ${C}>${E}</script>`:null;h.storeCode=E,h.storeTag=E?await mt(C,E,e)??N:null;let F={};h.modulesTag=await br([r,N],e,l,F),h.modulesCode=F.code??null,v=F.inputs??[],h.composableTag=null,h.composableCode=null,x=[];try{let{getComposableScript:q}=await o("stx/composable-loader",()=>import("./chunk-qn9rrwp8.js")),V=e.composablesDir,H=[h.modulesCode??h.modulesTag,N,h.frameworkScript].filter((U)=>U!==null),B=await q(e._layerComposableDirs??V,r,H,x);if(B)h.composableCode=B,h.composableTag=await mt('data-stx-scoped data-stx-run="always" data-stx-composables',B,e)??`<script data-stx-scoped data-stx-run="always" data-stx-composables>${B.replace(/<\/script/gi,"<\\/script")}</script>`}catch{}if(w||!t)break}return h}async function ps(r,e,l,a={}){let{withModuleSubstitutes:h,moduleSubstitutionKey:t}=await import("./chunk-pb2mztar.js"),p=await import("./chunk-bprjp80g.js"),{messages:w,webModules:y}=e,v=null,x=null,k=t()===""&&!a.__stx_native_screen;if(w&&p.pageMessagesEnabled(e)&&k)try{v=await p.loadPageMessages(process.cwd(),w)}catch(C){fs(C)}if(y&&Object.keys(y).length&&k)try{x=await(await import("./chunk-6w9av0n9.js")).loadWebModules(process.cwd(),y)}catch(C){gs(C)}let _=new Map([...x??[],...v?.stubs??[]]),E=()=>ds(r,e,l,a),D=_.size?await h(_,E):await E(),T=null;if(v){let C=p.messageAreasIn(D.modulesCode,D.storeCode,D.composableCode),N=p.pageMessagesScript(v,p.pageLanguages(r,v),C);if(N)T=await mt('data-stx-scoped data-stx-run="always" data-stx-messages',N,e)??`<script data-stx-scoped data-stx-run="always" data-stx-messages>${N.replace(/<\/script/gi,"<\\/script")}</script>`}return[T,D.modulesTag,D.storeTag,D.composableTag,D.frameworkScript].filter((C)=>C!==null)}var xr=!1;function fs(r){if(xr)return;xr=!0,console.warn(`[stx] messages: ${r instanceof Error?r.message:String(r)}; pages ship every language`)}var Sr=!1;function gs(r){if(Sr)return;Sr=!0,console.warn(`[stx] ${r instanceof Error?r.message:String(r)}; pages bundle the real modules`)}function ms(r,e=""){let l=Rr(r,"data-stx-runtime");if(!l)return r;let a=_r(r);if(a===-1||a===l.start){if(!e)return r;return r.slice(0,l.end)+e+r.slice(l.end)}if(a<l.start)return r.slice(0,a)+r.slice(l.start,l.end)+e+`
1438
+ `)break;a++}h=!1;continue}if(w==="`"){a++;while(a<l){if(r[a]==="\\"){a+=2;continue}if(r[a]==="`"){a++;break}if(r[a]==="$"&&r[a+1]==="{"){t.push(!0),a+=2,h=!0;break}a++}if(t.length===0)h=!1;continue}if(w==="}"&&t.length>0){t.pop(),a++;while(a<l){if(r[a]==="\\"){a+=2;continue}if(r[a]==="`"){a++,h=!1;break}if(r[a]==="$"&&r[a+1]==="{"){t.push(!0),a+=2,h=!0;break}a++}continue}if(/\s/.test(w));else if(/[)\].\w$]/.test(w))h=!1;else h=!0;a++}return-1}function Rr(r,e){let l=e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),a=new RegExp(`<script\\b(?=[^>]*\\b${l}(?:\\s|=|/?>))[^>]*>`,"i").exec(r);if(!a)return null;let h=a.index+a[0].length,t=r.indexOf("</script>",h);if(t===-1)return null;let p=r.indexOf(">",t);if(p===-1)return null;return{start:a.index,end:p+1}}var us=4096;async function mt(r,e,l){if(Ve(e)||Z(e)||l.buildMode!=="serve"||e.length<us)return null;let{registerServeModuleBundle:a}=await import("./chunk-r3hb020a.js");return`<script ${r} src="${a(e)}"></script>`}async function br(r,e,l,a){try{let{registeredModuleIdsIn:h,buildModuleRegistryScript:t}=await o("stx/client-module-registry",()=>import("./chunk-x6n0r41y.js")),p=[],w=await t(h(...r),{minify:sa(e.buildMode,e.minifyClient),collectInputs:p});for(let y of p)l?.add(y);if(a)a.inputs=p,a.code=w??void 0;if(!w)return null;if(e.buildMode==="serve"&&!Ve(w)&&!Z(w)){let{registerServeModuleBundle:y}=await import("./chunk-r3hb020a.js");return`<script data-stx-scoped data-stx-run="always" data-stx-modules src="${y(w)}"></script>`}return`<script data-stx-scoped data-stx-run="always" data-stx-modules>${w.replace(/<\/script/gi,"<\\/script")}</script>`}catch{return null}}async function ds(r,e,l,a){let h={modulesTag:null,modulesCode:null,storeTag:null,storeCode:null,composableTag:null,composableCode:null,frameworkScript:null};try{let{getFrameworkComposableScript:_}=await o("stx/framework-composables",()=>import("./chunk-yqxhy0nq.js"));h.frameworkScript=await _(r)}catch{}let t=null;try{t=await o("stx/store-loader",()=>import("./chunk-3dx77nfw.js"))}catch{}let p=e.storesDir,w=!!a.__stx_native_screen||(t?.pageStoresAll()??!0),y=w?"":r.replace(/<script\b[^>]*\bdata-stx-(?:runtime|router|hmr)\b[^>]*>[\s\S]*?<\/script>/gi,""),v=[],x=[],k=null;for(let _=0;_<8;_++){let E=null,D="",T=!1;try{if(t){let q=w?await t.getStoreScript(p).then((V)=>V?{code:V,stores:["*"],functions:null}:null):await t.getStoreScriptFor(p,[y],{reads:t.storesReadInFiles([...v,...x]),runOnce:!0});if(q)E=q.code,D=q.stores.join(","),T=!!q.functions&&!w}}catch{}if(k!==null&&D===k)break;k=D;let C=T?'data-stx-scoped data-stx-run="always" data-stx-stores':"data-stx-stores",N=E?`<script ${C}>${E}</script>`:null;h.storeCode=E,h.storeTag=E?await mt(C,E,e)??N:null;let F={};h.modulesTag=await br([r,N],e,l,F),h.modulesCode=F.code??null,v=F.inputs??[],h.composableTag=null,h.composableCode=null,x=[];try{let{getComposableScript:q}=await o("stx/composable-loader",()=>import("./chunk-p7rwa0xw.js")),V=e.composablesDir,H=[h.modulesCode??h.modulesTag,N,h.frameworkScript].filter((U)=>U!==null),B=await q(e._layerComposableDirs??V,r,H,x);if(B)h.composableCode=B,h.composableTag=await mt('data-stx-scoped data-stx-run="always" data-stx-composables',B,e)??`<script data-stx-scoped data-stx-run="always" data-stx-composables>${B.replace(/<\/script/gi,"<\\/script")}</script>`}catch{}if(w||!t)break}return h}async function ps(r,e,l,a={}){let{withModuleSubstitutes:h,moduleSubstitutionKey:t}=await import("./chunk-q91hentn.js"),p=await import("./chunk-bprjp80g.js"),{messages:w,webModules:y}=e,v=null,x=null,k=t()===""&&!a.__stx_native_screen;if(w&&p.pageMessagesEnabled(e)&&k)try{v=await p.loadPageMessages(process.cwd(),w)}catch(C){fs(C)}if(y&&Object.keys(y).length&&k)try{x=await(await import("./chunk-6w9av0n9.js")).loadWebModules(process.cwd(),y)}catch(C){gs(C)}let _=new Map([...x??[],...v?.stubs??[]]),E=()=>ds(r,e,l,a),D=_.size?await h(_,E):await E(),T=null;if(v){let C=p.messageAreasIn(D.modulesCode,D.storeCode,D.composableCode),N=p.pageMessagesScript(v,p.pageLanguages(r,v),C);if(N)T=await mt('data-stx-scoped data-stx-run="always" data-stx-messages',N,e)??`<script data-stx-scoped data-stx-run="always" data-stx-messages>${N.replace(/<\/script/gi,"<\\/script")}</script>`}return[T,D.modulesTag,D.storeTag,D.composableTag,D.frameworkScript].filter((C)=>C!==null)}var xr=!1;function fs(r){if(xr)return;xr=!0,console.warn(`[stx] messages: ${r instanceof Error?r.message:String(r)}; pages ship every language`)}var Sr=!1;function gs(r){if(Sr)return;Sr=!0,console.warn(`[stx] ${r instanceof Error?r.message:String(r)}; pages bundle the real modules`)}function ms(r,e=""){let l=Rr(r,"data-stx-runtime");if(!l)return r;let a=_r(r);if(a===-1||a===l.start){if(!e)return r;return r.slice(0,l.end)+e+r.slice(l.end)}if(a<l.start)return r.slice(0,a)+r.slice(l.start,l.end)+e+`
1439
1439
  `+r.slice(a,l.start)+r.slice(l.end);let h=r.slice(l.start,l.end),t=r.slice(0,l.start)+r.slice(l.end),p=_r(t);if(p===-1)return h+e+`
1440
1440
  `+t;return t.slice(0,p)+h+e+`
1441
1441
  `+t.slice(p)}function hs(r){let e=/\x00STX_ESC_MUSTACHE_OPEN\x00([\s\S]*?)\x00STX_ESC_MUSTACHE_CLOSE\x00/g;return r.replace(e,(l,a,h)=>{let t=r.slice(0,h);return t.lastIndexOf("<")>t.lastIndexOf(">")?`{{${a}}}`:`{<!--stx-literal-->{${a}}}`})}async function i(r,e,l,a,h){if(await R(),a.ssr===!1&&!a.autoShell&&a.buildMode==="spa")return r;if(e.__stx_signals_gate===void 0)e.__stx_signals_gate=Me(r,l);let t=!e.__stxProcessingDepth;Pn(e);for(let p of a._layerGraph?.configDependencies??[])h.add(p);if(t&&a.runtimeConfig)await Dn(e,l,a.runtimeConfig);if(t)vl(e),e.__stx_scope_seq??={n:0,key:po(String(e.__filename??l))},e.__stx_head_injections=ta(),e.__stx_seo_staged=!1;if(!e.__stxProcessingDepth)e.__stxProcessingDepth=0;if(e.__stxProcessingDepth++,!e.__onceStore)e.__onceStore=new Set;if((a.debug||!I()&&!Fn())&&l&&l.endsWith(".stx"))ii(r,l);try{return await we.timeAsync("template-processing",async()=>{let p=await ys(r,e,l,a,h);if(t)p=Hi(p);if(t&&a.autoShell&&a.buildMode!=="compile"){let w=Le(a.app?.head,{known:Jr,source:"app.head"}),v=(e.__stx_runtime_head||null)??ra(),x=(e.__stx_head_raw||"").trim(),k,_=x.match(/<title[^>]*>([\s\S]*?)<\/title>/i);if(_)k=_[1].trim(),x=x.replace(_[0],"").trim();let E=e.__sections?.title,D=E?P(E,e,l):void 0,T=v.title||k||D,C=!v.title&&(!!k||!!D),N=v.meta||[],F=new Set(N.map((J)=>wt(J)).filter(Boolean)),q={...w,...T&&{title:T},meta:[...(w.meta||[]).filter((J)=>!F.has(wt(J))),...N],link:[...w.link||[],...v.link||[]],script:[...w.script||[],...v.script||[]],headRaw:[w.headRaw,x].filter(Boolean).join(`
@@ -1450,7 +1450,7 @@ ${y.trim()}
1450
1450
  @endsection`}}if(N&&y.includes("<script")){let H=se(y),B=H.scripts.map((U)=>kr(U,l)??U);y=Dr(H.output,B)}if(y=y.replace(/@section\(\s*['"]([^'"]+)['"]\s*,\s*['"]([^'"]+)['"]\s*\)/g,(H,B,U)=>(C[B]=U,"")),y=y.replace(/@section\(\s*['"]([^'"]+)['"]\s*,\s*([^)]+?)\s*\)/g,(H,B,U)=>{if(/^(['"]).*\1$/.test(U.trim()))return H;try{let J=d(U.trim(),e);if(J===void 0)return H;let G=(e.__stx_inline_section_values??=[]).push(J)-1;return C[B]=`{{ __stx_inline_section_values[${G}] }}`,""}catch{return H}}),y=y.replace(/@section\(\s*['"]([^'"]+)['"]\s*\)([\s\S]*?)(?:@endsection|@show)/g,(H,B,U)=>{if(U.includes("@parent"))C[B]=U.replace("@parent",Re);else C[B]=U.trim();return""}),e.__sections=C,y=y.replace(/@(?:yield|slot)\(\s*['"]([^'"]+)['"](?:,\s*['"]([^'"]+)['"])?\)/g,(H,B,U)=>C[B]||U||""),!("slot"in e)||e.slot===void 0)y=y.replace(/\{\{\s*slot\s*\}\}/g,()=>C.content||"");if(y=Rs(y,T),N){let H=[],B=se(y),U=ke(B.output,Tn,(J,de)=>`\x00STX_ORPHAN_STYLE_${de}\x00`);if(y=U.output.replace(/\x00STX_(SCRIPT|ORPHAN_STYLE)_(\d+)\x00/g,(J,de,G)=>{let pe=de==="SCRIPT"?kr(B.scripts[Number(G)],l):U.tokens[Number(G)];if(pe)H.push(pe);return""}),H.length>0){let J=H.join(`
1451
1451
  `);C.content=C.content?`${C.content}
1452
1452
  ${J}`:J,e.__sections=C}}if(N)try{let H;if(le.isAbsolute(N))H=N,h.add(N);else H=await De(()=>On(N,l,p,h),null,()=>{throw new ce(`Failed to resolve layout path: ${N}`,l,void 0,void 0,`Layout referenced from ${l}`)});if(!H){let ue=(Q)=>{if(!Q)return[];try{let xe=le.isAbsolute(Q)?Q:le.resolve(process.cwd(),Q);return ls.readdirSync(xe).filter(($e)=>$e.endsWith(".stx")).map(($e)=>$e.replace(/\.stx$/,""))}catch{return[]}},ne=[...ue(p.layoutsDir),...ue(p.fallbackLayoutsDir)].filter((Q,xe,$e)=>$e.indexOf(Q)===xe).sort(),ve=[p.layoutsDir,p.fallbackLayoutsDir].filter((Q)=>typeof Q==="string"&&Q.length>0),me=ve.length>0?` Searched: ${ve.join(", ")} (set \`layoutsDir\` to look elsewhere).`:"",ie=`Layout not found: ${N} (referenced from ${l})`+(ne.length>0?`. Available layouts: ${ne.join(", ")}`:p.layoutsDir?`. No .stx layouts found in ${p.layoutsDir}`:"")+me;if(K.log(Error(ie),{layoutPath:N,filePath:l,available:ne},"error"),console.error(`[stx] ${ie}`),p.debug)throw new ce(ie,l);return y}let B=await De(()=>Bun.file(H).text(),"",()=>{throw new ce(`Failed to read layout file: ${H}`,l,void 0,void 0,"Layout content could not be loaded")});B=wr(B,H),B=B.replace(/\{\{--[\s\S]*?--\}\}/g,"");let U=Array.isArray(e.__layoutChain)?e.__layoutChain:[];if(U.includes(H)){let ue=[...U.slice(U.indexOf(H)),H];throw new ce(ue.length===2?`Circular layout: ${H} extends itself`:`Circular layout: ${ue.join(" -> ")}`,l,void 0,void 0,"Remove the @extends or @layout line that points back at a layout already in use")}let J=B.match(/@(?:layout|extends)\(\s*['"]([^'"]+)['"]\s*\)/);if(J){if(p.debug)console.log(`Found nested layout: ${J[1]} in ${H}`);let ue={},ne=B.replace(/@section\(\s*['"]([^'"]+)['"]\s*\)([\s\S]*?)(?:@show|@endsection)/g,(ie,Q,xe)=>(ue[Q]=xe.trim(),""));for(let[ie,Q]of Object.entries(ue))if(C[ie]&&C[ie].includes(Re)){let xe=C[ie].indexOf(Re);C[ie]=C[ie].slice(0,xe)+Q+C[ie].slice(xe+Re.length)}else if(!C[ie])C[ie]=Q;let ve={...e,__sections:C,__layoutChain:[...U,H]},me=`@layout('${J[1]}')${ne}`;return await i(me,ve,H,p,h)}let de=B.replace(/\{\{--[\s\S]*?--\}\}/g,""),G=$s(de,T),pe={};return G=G.replace(/@section\(\s*['"]([^'"]+)['"]\s*\)([\s\S]*?)(?:@show|@endsection)/g,(ue,ne,ve)=>(pe[ne]=ve.trim(),`@slot('${ne}')`)),G=G.replace(/@(?:yield|slot)\(\s*['"]([^'"]+)['"]\s*(?:,\s*['"]([^'"]+)['"]\s*)?\)/g,(ue,ne,ve)=>{if(C[ne]){let me=C[ne];if(me.includes(Re)){let ie=pe[ne]||"",Q=me.indexOf(Re);me=me.slice(0,Q)+ie+me.slice(Q+Re.length)}return me}return ve||""}),G=bs(G,C),G=G.replace(/\{\{\s*slot\s*\}\}/g,()=>C.content||""),G=Rs(G,T),e.__originalFilePath=l,y=await Ar(G,e,H,p,h),y=`<!-- stx-layout: ${N} -->
1453
- ${y}`,k(y)}catch(H){if(H instanceof te)throw H;throw new ce(`Error processing layout ${N}: ${H instanceof Error?H.message:String(H)}`,l)}return k(await Ar(y,e,l,p,h))}function bs(r,e){return r.replace(/@(?:yield|slot)\(\s*['"]([^'"]+)['"]\s*(?:,\s*['"]([^'"]+)['"]\s*)?\)/g,(l,a,h)=>{let t=e[a];if(t!==void 0){if(!new RegExp(`@(?:yield|slot)\\(\\s*['"]${a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}['"]`).test(t))return t}return h||""})}function ws(r,e){if(r.__stx_sfc_mode=!0,r.__stx_options=e,e.buildMode)r.__stx_buildMode=e.buildMode;let l=e.envPrefix||"STX_PUBLIC_",a={};for(let[h,t]of Object.entries(process.env))if(h.startsWith(l)&&t!==void 0)a[h]=t;r.$env=a}async function vs(r,e){await De(()=>nr(r,e),void 0,(l)=>{K.log(l,{filePath:r,phase:"view-composer"},"warning"),console.warn(`[stx] view composer failed for ${r}: ${l.message}`)})}var ht="data-stx-source";function kr(r,e){if(!r)return r;let l=/^<script\b([^>]*)>/i.exec(r);if(!l||!/\bserver\b/.test(l[1])||l[1].includes(ht))return r;return`<script ${ht}="${encodeURIComponent(e)}"${r.slice(7)}`}function xs(r){let e=new RegExp(`${ht}="([^"]*)"`).exec(r);return e?decodeURIComponent(e[1]):void 0}function Er(r){return r.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}function Tr(r,e,l){return`<div data-stx-server-script-error role="alert" style="padding:12px 14px;border:1px solid #f0b4b4;border-left-width:4px;background:#fff5f5;color:#7a1f1f;font:13px/1.5 ui-monospace,SFMono-Regular,Menlo,monospace"><strong style="display:block;margin-bottom:4px">stx: a &lt;script server&gt; ${e==="module-resolution"?"imports a module that does not resolve":e==="syntax"?"does not parse":"names something that does not exist"}, so this component rendered nothing.</strong><span style="display:block;opacity:.85">${Er(r)}</span><span style="display:block;margin-top:4px">${Er(l)}</span></div>`}async function Ss(r,e,l,a){let{scanScriptTags:h}=await o("stx/signal-processing",()=>import("./chunk-zk6qmkhb.js")),t=[],p=!I()&&!Fn();for(let y of h(r)){let v=y.attrs;if(!/\bserver\b/.test(v))continue;let x=y.start+y.fullMatch.indexOf(">")+1,k=Mr(r,x);if(k===-1)continue;let _=r.slice(x,k);if(!_.trim())continue;let E=xs(v)??l,D={index:y.start,length:k+9-y.start};try{let{extractVariables:T}=await o("stx/variable-extractor",()=>import("./chunk-amye7vb0.js"));await T(_,e,E,{preserveExisting:!0,onFailure:(C)=>{if(C.kind==="unknown")return;if(a?.onServerScriptError?.({sourcePath:E,kind:C.kind,message:C.message}),!p)return;t.push({...D,markup:Tr(E,C.kind,C.message)})}})}catch(T){let C=T instanceof Error?T:Error(String(T));if(K.log(C,{filePath:E,phase:"server-script-extraction"},"warning"),console.warn(`[stx] server <script> extraction failed in ${E}: ${C.message}`),p)t.push({...D,markup:Tr(E,"unknown",C.message)})}}if(t.length===0)return r;let w=r;for(let y of t.sort((v,x)=>x.index-v.index))w=w.slice(0,y.index)+y.markup+w.slice(y.index+y.length);return w}async function ks(r,e,l){try{let{interpolateScriptsInTemplate:a}=await o("stx/expressions",()=>import("./chunk-4jmztn9d.js"));return a(r,e,{skipServer:!0})}catch(a){let h=a instanceof Error?a:Error(String(a));return K.log(h,{filePath:l,phase:"script-expression-interpolation"},"warning"),console.warn(`[stx] script expression interpolation failed in ${l}: ${h.message}`),r}}async function Ar(r,e,l,a,h){let t=r;await R();let p=a;if(t=await Ss(t,e,l,a),t=await zt(t,e,l),t=await Kt(t,e,l),t=await ks(t,e,l),await R(),t=await Nt(t,e,l,p),Me(t))t=mi(t,e),t=Ds(t,e),t=Ms(t,e);t=hi(t),await R();let{processStreamDirectives:w}=await o("stx/streaming",()=>import("./chunk-b25twdd7.js"));t=w(t,e),t=await ui(t,e,l,p,!0),await R(),t=await ur(t,e,l,p,h),t=await Ps(t,e,l,p,h),await R(),t=Hc(t,e,l,p);let{processDeferDirectives:y}=await o("stx/defer",()=>import("./chunk-n62nqhey.js"));t=y(t,e,l);let{processTeleportDirectives:v}=await o("stx/teleport",()=>import("./chunk-2fyey6pn.js"));t=v(t,e,l);let{processTransitionDirectives:x,processTransitionAttributes:k}=await o("stx/transitions",()=>import("./chunk-c60egpe6.js"));t=x(t,e,l),t=k(t);let{processErrorBoundaryDirectives:_,stripRenderFailedMarkers:E}=await o("stx/error-boundaries",()=>import("./chunk-h85hrwkq.js"));t=_(t,e,l),t=E(t);let{processSuspenseDirectives:D}=await o("stx/suspense",()=>import("./chunk-fzh73jtc.js"));t=D(t,e,l);let{processAsyncDirectives:T}=await o("stx/async-components",()=>import("./chunk-jnk3nk5k.js"));t=T(t,e,l);let{processKeepAliveDirectives:C}=await o("stx/keep-alive",()=>import("./chunk-7k1thytm.js"));t=C(t,e,l);let{processVirtualListDirectives:N,processVirtualGridDirectives:F,processInfiniteListDirectives:q}=await o("stx/virtual-scrolling",()=>import("./chunk-x1svtz8k.js"));t=N(t,e,l),t=F(t,e,l),t=q(t,e,l),await R();let{processPartialHydrationDirectives:V,processStaticDirectives:H}=await o("stx/partial-hydration",()=>import("./chunk-mgcakk1m.js"));t=V(t,e,l),t=H(t);let{processComputedDirectives:B,processWatchDirectives:U}=await o("stx/computed",()=>import("./chunk-1xdzcy9d.js"));t=B(t,e,l),t=U(t,e,l);let{processFormValidationDirectives:J}=await o("stx/forms-validation",()=>import("./chunk-xwarwkaw.js"));t=J(t,e,l);let{processHeadDirective:de,processTitleDirective:G,processMetaDirective:pe,resetHead:ue}=await o("stx/head",()=>import("./chunk-qjkpwjg6.js"));if(!e.__stx_head_preset&&!e.__stx_runtime_head)ue();let ne=de(t);if(t=ne.content,ne.headContent)e.__stx_head_raw=`${e.__stx_head_raw||""}${ne.headContent}
1453
+ ${y}`,k(y)}catch(H){if(H instanceof te)throw H;throw new ce(`Error processing layout ${N}: ${H instanceof Error?H.message:String(H)}`,l)}return k(await Ar(y,e,l,p,h))}function bs(r,e){return r.replace(/@(?:yield|slot)\(\s*['"]([^'"]+)['"]\s*(?:,\s*['"]([^'"]+)['"]\s*)?\)/g,(l,a,h)=>{let t=e[a];if(t!==void 0){if(!new RegExp(`@(?:yield|slot)\\(\\s*['"]${a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}['"]`).test(t))return t}return h||""})}function ws(r,e){if(r.__stx_sfc_mode=!0,r.__stx_options=e,e.buildMode)r.__stx_buildMode=e.buildMode;let l=e.envPrefix||"STX_PUBLIC_",a={};for(let[h,t]of Object.entries(process.env))if(h.startsWith(l)&&t!==void 0)a[h]=t;r.$env=a}async function vs(r,e){await De(()=>nr(r,e),void 0,(l)=>{K.log(l,{filePath:r,phase:"view-composer"},"warning"),console.warn(`[stx] view composer failed for ${r}: ${l.message}`)})}var ht="data-stx-source";function kr(r,e){if(!r)return r;let l=/^<script\b([^>]*)>/i.exec(r);if(!l||!/\bserver\b/.test(l[1])||l[1].includes(ht))return r;return`<script ${ht}="${encodeURIComponent(e)}"${r.slice(7)}`}function xs(r){let e=new RegExp(`${ht}="([^"]*)"`).exec(r);return e?decodeURIComponent(e[1]):void 0}function Er(r){return r.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}function Tr(r,e,l){return`<div data-stx-server-script-error role="alert" style="padding:12px 14px;border:1px solid #f0b4b4;border-left-width:4px;background:#fff5f5;color:#7a1f1f;font:13px/1.5 ui-monospace,SFMono-Regular,Menlo,monospace"><strong style="display:block;margin-bottom:4px">stx: a &lt;script server&gt; ${e==="module-resolution"?"imports a module that does not resolve":e==="syntax"?"does not parse":"names something that does not exist"}, so this component rendered nothing.</strong><span style="display:block;opacity:.85">${Er(r)}</span><span style="display:block;margin-top:4px">${Er(l)}</span></div>`}async function Ss(r,e,l,a){let{scanScriptTags:h}=await o("stx/signal-processing",()=>import("./chunk-2pagy1jn.js")),t=[],p=!I()&&!Fn();for(let y of h(r)){let v=y.attrs;if(!/\bserver\b/.test(v))continue;let x=y.start+y.fullMatch.indexOf(">")+1,k=Mr(r,x);if(k===-1)continue;let _=r.slice(x,k);if(!_.trim())continue;let E=xs(v)??l,D={index:y.start,length:k+9-y.start};try{let{extractVariables:T}=await o("stx/variable-extractor",()=>import("./chunk-xprmhc0y.js"));await T(_,e,E,{preserveExisting:!0,onFailure:(C)=>{if(C.kind==="unknown")return;if(a?.onServerScriptError?.({sourcePath:E,kind:C.kind,message:C.message}),!p)return;t.push({...D,markup:Tr(E,C.kind,C.message)})}})}catch(T){let C=T instanceof Error?T:Error(String(T));if(K.log(C,{filePath:E,phase:"server-script-extraction"},"warning"),console.warn(`[stx] server <script> extraction failed in ${E}: ${C.message}`),p)t.push({...D,markup:Tr(E,"unknown",C.message)})}}if(t.length===0)return r;let w=r;for(let y of t.sort((v,x)=>x.index-v.index))w=w.slice(0,y.index)+y.markup+w.slice(y.index+y.length);return w}async function ks(r,e,l){try{let{interpolateScriptsInTemplate:a}=await o("stx/expressions",()=>import("./chunk-69yqdxck.js"));return a(r,e,{skipServer:!0})}catch(a){let h=a instanceof Error?a:Error(String(a));return K.log(h,{filePath:l,phase:"script-expression-interpolation"},"warning"),console.warn(`[stx] script expression interpolation failed in ${l}: ${h.message}`),r}}async function Ar(r,e,l,a,h){let t=r;await R();let p=a;if(t=await Ss(t,e,l,a),t=await zt(t,e,l),t=await Kt(t,e,l),t=await ks(t,e,l),await R(),t=await Nt(t,e,l,p),Me(t))t=mi(t,e),t=Ds(t,e),t=Ms(t,e);t=hi(t),await R();let{processStreamDirectives:w}=await o("stx/streaming",()=>import("./chunk-jvpnd7zd.js"));t=w(t,e),t=await ui(t,e,l,p,!0),await R(),t=await ur(t,e,l,p,h),t=await Ps(t,e,l,p,h),await R(),t=Hc(t,e,l,p);let{processDeferDirectives:y}=await o("stx/defer",()=>import("./chunk-n62nqhey.js"));t=y(t,e,l);let{processTeleportDirectives:v}=await o("stx/teleport",()=>import("./chunk-2fyey6pn.js"));t=v(t,e,l);let{processTransitionDirectives:x,processTransitionAttributes:k}=await o("stx/transitions",()=>import("./chunk-c60egpe6.js"));t=x(t,e,l),t=k(t);let{processErrorBoundaryDirectives:_,stripRenderFailedMarkers:E}=await o("stx/error-boundaries",()=>import("./chunk-h85hrwkq.js"));t=_(t,e,l),t=E(t);let{processSuspenseDirectives:D}=await o("stx/suspense",()=>import("./chunk-fzh73jtc.js"));t=D(t,e,l);let{processAsyncDirectives:T}=await o("stx/async-components",()=>import("./chunk-jnk3nk5k.js"));t=T(t,e,l);let{processKeepAliveDirectives:C}=await o("stx/keep-alive",()=>import("./chunk-7k1thytm.js"));t=C(t,e,l);let{processVirtualListDirectives:N,processVirtualGridDirectives:F,processInfiniteListDirectives:q}=await o("stx/virtual-scrolling",()=>import("./chunk-x1svtz8k.js"));t=N(t,e,l),t=F(t,e,l),t=q(t,e,l),await R();let{processPartialHydrationDirectives:V,processStaticDirectives:H}=await o("stx/partial-hydration",()=>import("./chunk-mgcakk1m.js"));t=V(t,e,l),t=H(t);let{processComputedDirectives:B,processWatchDirectives:U}=await o("stx/computed",()=>import("./chunk-1xdzcy9d.js"));t=B(t,e,l),t=U(t,e,l);let{processFormValidationDirectives:J}=await o("stx/forms-validation",()=>import("./chunk-2epswh9w.js"));t=J(t,e,l);let{processHeadDirective:de,processTitleDirective:G,processMetaDirective:pe,resetHead:ue}=await o("stx/head",()=>import("./chunk-qjkpwjg6.js"));if(!e.__stx_head_preset&&!e.__stx_runtime_head)ue();let ne=de(t);if(t=ne.content,ne.headContent)e.__stx_head_raw=`${e.__stx_head_raw||""}${ne.headContent}
1454
1454
  `;if(t=G(t,e),t=pe(t,e,l),t=rr(t),t=di(t,e),t=jt(t),t=Qt(t),t=await Ts(t,e,l,p,h),t=await Ps(t,e,l,p,h),await R(),t=t.replace(/@push\s*\(\s*['"][^'"]+['"]\s*\)[\s\S]*?@endpush/g,""),t=Hi(t),t=ge(t,e,l),t=Is(t),await R(),e.__stxProcessingDepth===1)t=xl(t,e);if(t=ml(t,e,{filePath:l,buildMode:p.buildMode}),t=pi(t,e),t=fi(t,e),t=et(t,e),t=Vt(t,e),t=Xt(t,e),t=await Ct(t,e,l,p),t=await Vc(t,e,l),t=await qc(t,e,l,p),await R(),t=Kc(t,e,l,p),t=ki(t,e,l,p),t=_i(t,e,l),t=Ci(t,e,l,p),t=Ot(t,e,l,p),t=lo(t,e),t=uo(t),t=yl(t),!p.skipEventDirectives)t=ol(t,e,l);if(t=hl(t,e,l,a.skipSignalsRuntime===!0&&Number(e.__stxProcessingDepth)>0),await R(),p.debug){let X=/\bx-data\s*=/.test(t),z=Ns(r);if(X&&z)console.warn(`[stx] ${l}: Template mixes Alpine-style (x-data) and signals (state/derived/effect) reactivity.
1455
1455
  Both work on the same page, but they manage separate scopes.
1456
1456
  Prefer signals (state/derived/effect) for new components.`)}t=Lc(t,e),t=await Gi(t,e,l),await R(),t=bl(t),t=wl(t),t=$t(t);let{processXElementDirectives:ve}=await o("stx/x-element",()=>import("./chunk-va4xam1q.js"));t=ve(t);let me=e.__originalFilePath||l,ie=Ge(e);if(t=await yi(t,p,me,ie),await R(),t=Ut(t,e),t=await tr(t,e,l,p),await R(),p.media?.image?.autoSiblings){let X=p.publicDir||"public",{rewriteImagesWithSiblings:z}=await o("stx/image-optimization/auto-sibling",()=>import("./chunk-abxwggen.js"));t=await z(t,{publicDir:X})}if(p.seo?.enabled)t=Ei(t,e,p);let Q=(X,z,ee=!0)=>{if(!z)return X;let be=z.match(/<title\b[^>]*>[\s\S]*?<\/title>/i),oe=/<head\b[^>]*>[\s\S]*?(?:<\/head\s*>|<body\b|$)/i.exec(X),he=oe?/<title\b[^>]*>[\s\S]*?<\/title>/i.exec(oe[0]):null;if(be&&oe&&he){if(ee){let Ie=oe.index+he.index;X=X.slice(0,Ie)+be[0]+X.slice(Ie+he[0].length)}if(z=z.replace(be[0],"").trim(),!z)return X}if(/<\/head>/i.test(X))return f(X,z);if(/<head\b[^>]*>/i.test(X))return X.replace(/(<head\b[^>]*>)/i,`$1
@@ -1462,6 +1462,6 @@ ${St()}
1462
1462
  </script>`;if(t.includes("</head>")){let ee=L(t),oe=t.slice(0,ee).indexOf("<script");if(oe!==-1){let he=t.slice(0,oe),Ie=t.slice(oe);t=he+z+`
1463
1463
  `+Ie}else t=f(t,z)}else if(t.includes("<body"))t=t.replace(/<body([^>]*)>/,`<body$1>
1464
1464
  ${z}`);else t=z+`
1465
- `+t}{let{scanScriptTags:X}=await o("stx/signal-processing",()=>import("./chunk-zk6qmkhb.js")),z=[];for(let ee of X(t)){if(!/\bserver\b/i.test(ee.attrs))continue;let be=ee.start+ee.fullMatch.indexOf(">")+1,oe=Mr(t,be);if(oe===-1)continue;let he=oe+9;while(he<t.length&&/\s/.test(t[he]))he++;z.push({start:ee.start,end:he})}if(z.length>0){let ee=Array(z.length+1),be=0;for(let oe=0;oe<z.length;oe++){let{start:he,end:Ie}=z[oe];ee[oe]=t.slice(be,he),be=Ie}ee[z.length]=t.slice(be),t=ee.join("")}}let yt=ao(t,l);if(yt.hasScoped)t=yt.html;let jr=e.__stx_event_bindings||[],rt=!1,bt=[],Nr=/\s:[a-z][\w.-]*\s*=/.test(t),{scanScriptTags:Hr}=await o("stx/signal-processing",()=>import("./chunk-zk6qmkhb.js"));for(let X of Hr(t,{skipAttrs:/\bserver\b|\bsrc\s*=|\bdata-stx-scoped\b|\bdata-stx-router\b|\btype\s*=\s*["'](?!(?:text\/javascript|application\/javascript|module)["'])[^"']*["']/}))bt.push({match:X.fullMatch,attrs:X.attrs,content:X.body});for(let{match:X,attrs:z,content:ee}of bt){rt=!0;let be=ee;Ke(ee,l,a.strict,e.__originalFilePath);let oe=await Je(ee,{eventBindings:jr,attrs:z,hasColonDirectives:Nr,templateContent:r,filePath:l,projectRoot:process.cwd(),production:sa(a.buildMode,a.minifyClient),serverData:ie});t=t.replace(X,()=>oe)}if(rt)e.__stx_event_bindings=[];if(!rt&&e.__stxProcessingDepth===1){let X=e.__stx_event_bindings||[];if(X.length>0){let z=Mi(X);if(z){let ee=c(t);t=ee===-1?t+z:t.slice(0,ee)+z+`
1465
+ `+t}{let{scanScriptTags:X}=await o("stx/signal-processing",()=>import("./chunk-2pagy1jn.js")),z=[];for(let ee of X(t)){if(!/\bserver\b/i.test(ee.attrs))continue;let be=ee.start+ee.fullMatch.indexOf(">")+1,oe=Mr(t,be);if(oe===-1)continue;let he=oe+9;while(he<t.length&&/\s/.test(t[he]))he++;z.push({start:ee.start,end:he})}if(z.length>0){let ee=Array(z.length+1),be=0;for(let oe=0;oe<z.length;oe++){let{start:he,end:Ie}=z[oe];ee[oe]=t.slice(be,he),be=Ie}ee[z.length]=t.slice(be),t=ee.join("")}}let yt=ao(t,l);if(yt.hasScoped)t=yt.html;let jr=e.__stx_event_bindings||[],rt=!1,bt=[],Nr=/\s:[a-z][\w.-]*\s*=/.test(t),{scanScriptTags:Hr}=await o("stx/signal-processing",()=>import("./chunk-2pagy1jn.js"));for(let X of Hr(t,{skipAttrs:/\bserver\b|\bsrc\s*=|\bdata-stx-scoped\b|\bdata-stx-router\b|\btype\s*=\s*["'](?!(?:text\/javascript|application\/javascript|module)["'])[^"']*["']/}))bt.push({match:X.fullMatch,attrs:X.attrs,content:X.body});for(let{match:X,attrs:z,content:ee}of bt){rt=!0;let be=ee;Ke(ee,l,a.strict,e.__originalFilePath);let oe=await Je(ee,{eventBindings:jr,attrs:z,hasColonDirectives:Nr,templateContent:r,filePath:l,projectRoot:process.cwd(),production:sa(a.buildMode,a.minifyClient),serverData:ie});t=t.replace(X,()=>oe)}if(rt)e.__stx_event_bindings=[];if(!rt&&e.__stxProcessingDepth===1){let X=e.__stx_event_bindings||[];if(X.length>0){let z=Mi(X);if(z){let ee=c(t);t=ee===-1?t+z:t.slice(0,ee)+z+`
1466
1466
  `+t.slice(ee)}e.__stx_event_bindings=[]}}if(!p.skipSignalsRuntime&&!Ae(t)&&Bc(t))t=await Cr(t,p);if(t=Fc(t),p.csp?.enabled&&p.csp.useNonce&&typeof e.cspNonce==="string")t=It(t,e.cspNonce);return t}
1467
1467
  export{Pt,Ue,Oc,Es,si,oi,br,i};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{cg,Nc,ay,Mc,lg,ug,Sn,xr,cy,dg,pg,ly,S}from"./chunk-yjhktn0b.js";import"./chunk-45326z5v.js";import"./chunk-0ek3s3b6.js";import"./chunk-4hrryats.js";import"./chunk-w98yt4d4.js";import"./chunk-c08jvjqt.js";import"./chunk-phzhmnnm.js";import"./chunk-ck4ypzet.js";import"./chunk-0jdz31q1.js";import"./chunk-4b110x6r.js";export{Sn as buildCss,dg as extractClassNames,ug as fingerprintConfig,pg as generateCss,cy as getCachedCSS,cg as getCssServeAsset,S as injectCss,Nc as loadCssEngine,Mc as loadCssEngineConfig,xr as rebuildCss,ay as resetCssCache,lg as resolveUserCssConfig,ly as withLinkedModuleBundles};
2
+ import{cg,Nc,ay,Mc,lg,ug,Sn,xr,cy,dg,pg,ly,S}from"./chunk-4nkzj2pj.js";import"./chunk-fkm2bf2x.js";import"./chunk-snhsh171.js";import"./chunk-73py4qeh.js";import"./chunk-w98yt4d4.js";import"./chunk-c08jvjqt.js";import"./chunk-phzhmnnm.js";import"./chunk-ck4ypzet.js";import"./chunk-0jdz31q1.js";import"./chunk-4b110x6r.js";export{Sn as buildCss,dg as extractClassNames,ug as fingerprintConfig,pg as generateCss,cy as getCachedCSS,cg as getCssServeAsset,S as injectCss,Nc as loadCssEngine,Mc as loadCssEngineConfig,xr as rebuildCss,ay as resetCssCache,lg as resolveUserCssConfig,ly as withLinkedModuleBundles};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{m,p}from"./chunk-c08jvjqt.js";import{oe,F,g}from"./chunk-0ek3s3b6.js";function z(t,o){let i=1,r=o,e="<template",n="</template";while(r<t.length&&i>0){let s=t.indexOf("<",r);if(s===-1)break;if(r=s,t.startsWith(e,r)&&(r+e.length>=t.length||/[\s>\/]/.test(t[r+e.length]))){i++,r+=e.length;continue}if(t.startsWith(n,r)){let a=t.indexOf(">",r+n.length);if(a!==-1){if(i--,i===0)return a+1;r=a+1;continue}}r++}return i===0?r:-1}var N=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]);function k(t,o){let i=null;for(let r=o;r<t.length;r++){let e=t[r];if(i){if(e==="\\"){r++;continue}if(e===i)i=null;continue}if(e==='"'||e==="'"){i=e;continue}if(e===">")return r+1}return-1}function B(t,o,i){let r=o.toLowerCase(),e=1,n=i;while(n<t.length){let s=t.indexOf("<",n);if(s===-1)return-1;if(t.startsWith("<!--",s)){let f=t.indexOf("-->",s+4);n=f===-1?t.length:f+3;continue}let a=k(t,s+1);if(a===-1)return-1;let u=t.slice(s,a),c=u.match(/^<\s*(\/?)\s*([a-zA-Z][\w-]*)/);if(c&&c[2].toLowerCase()===r){if(c[1]==="/"){if(e--,e===0)return a}else if(!/\/\s*>$/.test(u))e++}n=a}return-1}function Z(t){let o=[],i=[],r=/\bslot\s*=\s*(?:"([^"]+)"|'([^']+)')/i,e=0;while(e<t.length){let n=t.indexOf("<",e);if(n===-1)break;if(t.startsWith("<!--",n)){let l=t.indexOf("-->",n+4);e=l===-1?t.length:l+3;continue}let s=k(t,n+1);if(s===-1)break;let a=t.slice(n,s),u=a.match(/^<\s*(\/?)\s*([a-zA-Z][\w-]*)/);if(!u){e=s;continue}let c=u[2].toLowerCase();if(u[1]==="/"){let l=i.lastIndexOf(c);if(l!==-1)i.splice(l);e=s;continue}let f=/\/\s*>$/.test(a),d=i.length===0?a.match(r):null;if(d){let l=d[1]||d[2],h=a.replace(r,"").replace(/\s+(?=\/?>$)/,"").replace(/\s{2,}/g," "),S=f||N.has(c)?-1:B(t,c,s);if(S===-1)o.push({start:n,end:s,slotName:l,element:h}),e=s;else o.push({start:n,end:S,slotName:l,element:h+t.slice(s,S)}),e=S;continue}if(!f&&!N.has(c)){if(i.push(c),c==="script"||c==="style"){let l=t.toLowerCase().indexOf(`</${c}>`,s);if(l!==-1){e=l;continue}}}e=s}return o}function L(t){let o=[],i=[],r=/^<template\s+(?:#([a-zA-Z][\w-]*)|v-slot:([a-zA-Z][\w-]*)|slot="([a-zA-Z][\w-]*)")(?:\s*=\s*"([^"]*)")?[^>]*>$/i,e=0;while(e<t.length){let n=t.indexOf("<",e);if(n===-1)break;if(t.startsWith("<!--",n)){let l=t.indexOf("-->",n+4);e=l===-1?t.length:l+3;continue}let s=k(t,n+1);if(s===-1)break;let a=t.slice(n,s),u=a.match(/^<\s*(\/?)\s*([a-zA-Z][\w-]*)/);if(!u){e=s;continue}let c=u[1]==="/",f=u[2].toLowerCase();if(c){let l=i.lastIndexOf(f);if(l!==-1)i.splice(l);e=s;continue}if(f==="template"&&i.length===0){let l=a.match(r);if(l){let h=z(t,s);if(h!==-1){let S=l[1]||l[2]||l[3];o.push({start:n,end:h,slotName:S,content:t.slice(s,h-11).trim(),propsBinding:l[4]||void 0}),e=h;continue}}}if(!/\/\s*>$/.test(a)&&!N.has(f)){if(i.push(f),f==="script"||f==="style"){let l=t.toLowerCase().indexOf(`</${f}>`,s);if(l!==-1){e=l;continue}}}e=s}return o}function vu(t){let o={default:"",named:new Map},i=t,r=L(t);for(let n of r)o.named.set(n.slotName,{name:n.slotName,content:n.content,propsBinding:n.propsBinding});r.sort((n,s)=>s.start-n.start);for(let n of r)i=i.slice(0,n.start)+i.slice(n.end);let e=Z(i);for(let n of e){let s=o.named.get(n.slotName);if(s)s.content+=n.element;else o.named.set(n.slotName,{name:n.slotName,content:n.element})}for(let n=e.length-1;n>=0;n--){let s=e[n];i=i.slice(0,s.start)+i.slice(s.end)}return o.default=i.trim(),o}function Jm(t){let o=t.match(/name\s*=\s*["']([^"']+)["']/),i=o?o[1]:"",r={},e=/:([a-zA-Z][\w-]*)\s*=\s*["']([^"']+)["']/g,n;while((n=e.exec(t))!==null)r[n[1]]=n[2];let s=t.match(/<slot[^>]*>([\s\S]*?)<\/slot>/i),a=s?s[1].trim():"";return{name:i,props:r,defaultContent:a}}async function xu(t,o,i,r){if(!t)return i;let e=t.content;if(t.propsBinding&&Object.keys(o).length>0){let n=t.propsBinding.trim(),s={...r},a=new Set,u=new Set;if(n.startsWith("{")&&n.endsWith("}")){let c=n.slice(1,-1).split(",").map((f)=>f.trim()).filter(Boolean);for(let f of c){let[d,l]=f.split(":").map((S)=>S.trim()),h=l||d;if(s[h]=o[d],o[d]!==void 0)u.add(h);else a.add(h)}}else if(s[n]=o,Object.values(o).some((c)=>c===void 0))a.add(n);else u.add(n);e=j(e,s,a,u)}return e}function j(t,o,i,r){return t.replace(/\{\{\s*([^}]+)\s*\}\}/g,(e,n)=>{try{let s=n.trim();if(F(s,i))return e;if(Array.isArray(o.__stx_preserved_client_expressions)&&o.__stx_preserved_client_expressions.includes(s)&&!F(s,r))return e;let a=_(s,o);if(a===void 0)return e;return g(String(a??""))}catch{return`{{ ${n} }}`}})}function _(t,o){if(/^[a-zA-Z_$][\w$]*(\.[a-zA-Z_$][\w$]*)*$/.test(t)){let r=t.split("."),e=o;for(let n of r)if(e&&typeof e==="object"&&n in e)e=e[n];else return;return e}let i=t.match(/^([a-zA-Z_$][\w$]*)\s*([+\-*/])\s*(\d+)$/);if(i){let[,r,e,n]=i,s=o[r],a=parseInt(n,10);if(typeof s==="number")switch(e){case"+":return s+a;case"-":return s-a;case"*":return s*a;case"/":return s/a}}try{if(!m(t))return;return p(t,Object.keys(o))(...Object.values(o))}catch{return}}async function Su(t,o,i,r){let e=t;e=await I(e,/<slot\s+name\s*=\s*["']([^"']+)["']([^>]*?)(?:\/>|>([\s\S]*?)<\/slot>)/gi,async(a,u,c,f)=>{let d=o.named.get(u),l=f?.trim()||"",h=c||"",S={},E=[],C=/:([a-zA-Z_$][\w$-]*)\s*=\s*["']([^"']+)["']/g,b;while((b=C.exec(h))!==null){let w=b[1],x=b[2];S[w]=_(x,i),E.push([w,x])}if(r!==void 0&&d?.propsBinding&&Object.values(S).some((w)=>w===void 0)){let w=d.propsBinding.trim(),x=oe(`${w} in []`),y="__stx_slot_props";while(x.includes(y))y+="_";let M=E.map(([A,P])=>{let O=S[A],R;try{R=O===void 0?void 0:JSON.stringify(O)}catch{}return`${JSON.stringify(A)}:(${R??P})`}).join(","),v=g(JSON.stringify({binding:w,names:x,owner:r}));return`<template :for="${g(`${y} in [{${M}}]`)}" data-stx-slot-binding="${encodeURIComponent(w)}" data-stx-slot-scope="${v}">${d.content}</template>`}return await xu(d,S,l,i)});let s=/<slot\b((?:"[^"]*"|'[^']*'|[^>"'])*?)\s*(?:\/>|>([\s\S]*?)<\/slot>)/gi;return e=e.replace(s,(a,u,c)=>{if(/\bname\s*=/.test(u||""))return a;let f=c?.trim()||"";return o.default||f}),e}async function I(t,o,i){let r=[],e=[];t.replace(o,(a,...u)=>{let c=u[u.length-2];return e.push({match:a,index:c}),r.push(i(a,...u.slice(0,-2))),a});let n=await Promise.all(r),s=t;for(let a=e.length-1;a>=0;a--){let{match:u,index:c}=e[a];s=s.slice(0,c)+n[a]+s.slice(c+u.length)}return s}function Ym(t){let o=vu(t);return{defaultSlot:o.default,namedSlots:o.named}}async function Zm(t,o,i,r,e){return await Su(t,{default:o,named:i},r,e)}
2
+ import{m,p}from"./chunk-c08jvjqt.js";import{oe,F,g}from"./chunk-snhsh171.js";function z(t,o){let i=1,r=o,e="<template",n="</template";while(r<t.length&&i>0){let s=t.indexOf("<",r);if(s===-1)break;if(r=s,t.startsWith(e,r)&&(r+e.length>=t.length||/[\s>\/]/.test(t[r+e.length]))){i++,r+=e.length;continue}if(t.startsWith(n,r)){let a=t.indexOf(">",r+n.length);if(a!==-1){if(i--,i===0)return a+1;r=a+1;continue}}r++}return i===0?r:-1}var N=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]);function k(t,o){let i=null;for(let r=o;r<t.length;r++){let e=t[r];if(i){if(e==="\\"){r++;continue}if(e===i)i=null;continue}if(e==='"'||e==="'"){i=e;continue}if(e===">")return r+1}return-1}function B(t,o,i){let r=o.toLowerCase(),e=1,n=i;while(n<t.length){let s=t.indexOf("<",n);if(s===-1)return-1;if(t.startsWith("<!--",s)){let f=t.indexOf("-->",s+4);n=f===-1?t.length:f+3;continue}let a=k(t,s+1);if(a===-1)return-1;let u=t.slice(s,a),c=u.match(/^<\s*(\/?)\s*([a-zA-Z][\w-]*)/);if(c&&c[2].toLowerCase()===r){if(c[1]==="/"){if(e--,e===0)return a}else if(!/\/\s*>$/.test(u))e++}n=a}return-1}function Z(t){let o=[],i=[],r=/\bslot\s*=\s*(?:"([^"]+)"|'([^']+)')/i,e=0;while(e<t.length){let n=t.indexOf("<",e);if(n===-1)break;if(t.startsWith("<!--",n)){let l=t.indexOf("-->",n+4);e=l===-1?t.length:l+3;continue}let s=k(t,n+1);if(s===-1)break;let a=t.slice(n,s),u=a.match(/^<\s*(\/?)\s*([a-zA-Z][\w-]*)/);if(!u){e=s;continue}let c=u[2].toLowerCase();if(u[1]==="/"){let l=i.lastIndexOf(c);if(l!==-1)i.splice(l);e=s;continue}let f=/\/\s*>$/.test(a),d=i.length===0?a.match(r):null;if(d){let l=d[1]||d[2],h=a.replace(r,"").replace(/\s+(?=\/?>$)/,"").replace(/\s{2,}/g," "),S=f||N.has(c)?-1:B(t,c,s);if(S===-1)o.push({start:n,end:s,slotName:l,element:h}),e=s;else o.push({start:n,end:S,slotName:l,element:h+t.slice(s,S)}),e=S;continue}if(!f&&!N.has(c)){if(i.push(c),c==="script"||c==="style"){let l=t.toLowerCase().indexOf(`</${c}>`,s);if(l!==-1){e=l;continue}}}e=s}return o}function L(t){let o=[],i=[],r=/^<template\s+(?:#([a-zA-Z][\w-]*)|v-slot:([a-zA-Z][\w-]*)|slot="([a-zA-Z][\w-]*)")(?:\s*=\s*"([^"]*)")?[^>]*>$/i,e=0;while(e<t.length){let n=t.indexOf("<",e);if(n===-1)break;if(t.startsWith("<!--",n)){let l=t.indexOf("-->",n+4);e=l===-1?t.length:l+3;continue}let s=k(t,n+1);if(s===-1)break;let a=t.slice(n,s),u=a.match(/^<\s*(\/?)\s*([a-zA-Z][\w-]*)/);if(!u){e=s;continue}let c=u[1]==="/",f=u[2].toLowerCase();if(c){let l=i.lastIndexOf(f);if(l!==-1)i.splice(l);e=s;continue}if(f==="template"&&i.length===0){let l=a.match(r);if(l){let h=z(t,s);if(h!==-1){let S=l[1]||l[2]||l[3];o.push({start:n,end:h,slotName:S,content:t.slice(s,h-11).trim(),propsBinding:l[4]||void 0}),e=h;continue}}}if(!/\/\s*>$/.test(a)&&!N.has(f)){if(i.push(f),f==="script"||f==="style"){let l=t.toLowerCase().indexOf(`</${f}>`,s);if(l!==-1){e=l;continue}}}e=s}return o}function vu(t){let o={default:"",named:new Map},i=t,r=L(t);for(let n of r)o.named.set(n.slotName,{name:n.slotName,content:n.content,propsBinding:n.propsBinding});r.sort((n,s)=>s.start-n.start);for(let n of r)i=i.slice(0,n.start)+i.slice(n.end);let e=Z(i);for(let n of e){let s=o.named.get(n.slotName);if(s)s.content+=n.element;else o.named.set(n.slotName,{name:n.slotName,content:n.element})}for(let n=e.length-1;n>=0;n--){let s=e[n];i=i.slice(0,s.start)+i.slice(s.end)}return o.default=i.trim(),o}function Jm(t){let o=t.match(/name\s*=\s*["']([^"']+)["']/),i=o?o[1]:"",r={},e=/:([a-zA-Z][\w-]*)\s*=\s*["']([^"']+)["']/g,n;while((n=e.exec(t))!==null)r[n[1]]=n[2];let s=t.match(/<slot[^>]*>([\s\S]*?)<\/slot>/i),a=s?s[1].trim():"";return{name:i,props:r,defaultContent:a}}async function xu(t,o,i,r){if(!t)return i;let e=t.content;if(t.propsBinding&&Object.keys(o).length>0){let n=t.propsBinding.trim(),s={...r},a=new Set,u=new Set;if(n.startsWith("{")&&n.endsWith("}")){let c=n.slice(1,-1).split(",").map((f)=>f.trim()).filter(Boolean);for(let f of c){let[d,l]=f.split(":").map((S)=>S.trim()),h=l||d;if(s[h]=o[d],o[d]!==void 0)u.add(h);else a.add(h)}}else if(s[n]=o,Object.values(o).some((c)=>c===void 0))a.add(n);else u.add(n);e=j(e,s,a,u)}return e}function j(t,o,i,r){return t.replace(/\{\{\s*([^}]+)\s*\}\}/g,(e,n)=>{try{let s=n.trim();if(F(s,i))return e;if(Array.isArray(o.__stx_preserved_client_expressions)&&o.__stx_preserved_client_expressions.includes(s)&&!F(s,r))return e;let a=_(s,o);if(a===void 0)return e;return g(String(a??""))}catch{return`{{ ${n} }}`}})}function _(t,o){if(/^[a-zA-Z_$][\w$]*(\.[a-zA-Z_$][\w$]*)*$/.test(t)){let r=t.split("."),e=o;for(let n of r)if(e&&typeof e==="object"&&n in e)e=e[n];else return;return e}let i=t.match(/^([a-zA-Z_$][\w$]*)\s*([+\-*/])\s*(\d+)$/);if(i){let[,r,e,n]=i,s=o[r],a=parseInt(n,10);if(typeof s==="number")switch(e){case"+":return s+a;case"-":return s-a;case"*":return s*a;case"/":return s/a}}try{if(!m(t))return;return p(t,Object.keys(o))(...Object.values(o))}catch{return}}async function Su(t,o,i,r){let e=t;e=await I(e,/<slot\s+name\s*=\s*["']([^"']+)["']([^>]*?)(?:\/>|>([\s\S]*?)<\/slot>)/gi,async(a,u,c,f)=>{let d=o.named.get(u),l=f?.trim()||"",h=c||"",S={},E=[],C=/:([a-zA-Z_$][\w$-]*)\s*=\s*["']([^"']+)["']/g,b;while((b=C.exec(h))!==null){let w=b[1],x=b[2];S[w]=_(x,i),E.push([w,x])}if(r!==void 0&&d?.propsBinding&&Object.values(S).some((w)=>w===void 0)){let w=d.propsBinding.trim(),x=oe(`${w} in []`),y="__stx_slot_props";while(x.includes(y))y+="_";let M=E.map(([A,P])=>{let O=S[A],R;try{R=O===void 0?void 0:JSON.stringify(O)}catch{}return`${JSON.stringify(A)}:(${R??P})`}).join(","),v=g(JSON.stringify({binding:w,names:x,owner:r}));return`<template :for="${g(`${y} in [{${M}}]`)}" data-stx-slot-binding="${encodeURIComponent(w)}" data-stx-slot-scope="${v}">${d.content}</template>`}return await xu(d,S,l,i)});let s=/<slot\b((?:"[^"]*"|'[^']*'|[^>"'])*?)\s*(?:\/>|>([\s\S]*?)<\/slot>)/gi;return e=e.replace(s,(a,u,c)=>{if(/\bname\s*=/.test(u||""))return a;let f=c?.trim()||"";return o.default||f}),e}async function I(t,o,i){let r=[],e=[];t.replace(o,(a,...u)=>{let c=u[u.length-2];return e.push({match:a,index:c}),r.push(i(a,...u.slice(0,-2))),a});let n=await Promise.all(r),s=t;for(let a=e.length-1;a>=0;a--){let{match:u,index:c}=e[a];s=s.slice(0,c)+n[a]+s.slice(c+u.length)}return s}function Ym(t){let o=vu(t);return{defaultSlot:o.default,namedSlots:o.named}}async function Zm(t,o,i,r,e){return await Su(t,{default:o,named:i},r,e)}
3
3
  export{vu,Jm,xu,Su,Ym,Zm};