@stacksjs/stx 0.2.239 → 0.2.241

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 (142) hide show
  1. package/dist/{chunk-4awxsp8f.js → chunk-092sm06a.js} +2 -2
  2. package/dist/{chunk-11mxy34t.js → chunk-0cznrnwk.js} +2 -2
  3. package/dist/{chunk-mbwe1z12.js → chunk-0kq46rxg.js} +1 -1
  4. package/dist/{chunk-p4a35r71.js → chunk-0ks60fk1.js} +1 -1
  5. package/dist/{chunk-cjhpwef8.js → chunk-0s88j6n8.js} +1 -1
  6. package/dist/{chunk-bskzz385.js → chunk-15rgmdtq.js} +1 -1
  7. package/dist/{chunk-hk8j3eps.js → chunk-19m7hed6.js} +1 -1
  8. package/dist/chunk-1fj21pgq.js +2 -0
  9. package/dist/{chunk-n7w8kgfw.js → chunk-1p0r6k2f.js} +1 -1
  10. package/dist/{chunk-xgtcq9bj.js → chunk-1px4xey5.js} +1 -1
  11. package/dist/{chunk-p56hfz00.js → chunk-20q757q9.js} +1 -1
  12. package/dist/{chunk-h3paff80.js → chunk-2fj2ah1z.js} +1 -1
  13. package/dist/{chunk-8t7w323q.js → chunk-2p5qa9pm.js} +1 -1
  14. package/dist/{chunk-msxcd1kp.js → chunk-2qkasmq1.js} +2 -2
  15. package/dist/chunk-2vjheprp.js +2 -0
  16. package/dist/{chunk-hv6hat6p.js → chunk-33pdtz6a.js} +1 -1
  17. package/dist/{chunk-0e1pt5my.js → chunk-37nm0f2v.js} +2 -2
  18. package/dist/{chunk-9778d23n.js → chunk-3sq662pg.js} +1 -1
  19. package/dist/chunk-404eam50.js +2 -0
  20. package/dist/chunk-4t43nqtn.js +2 -0
  21. package/dist/chunk-4x8sm71j.js +2 -0
  22. package/dist/{chunk-5q44vwmg.js → chunk-5w362c8x.js} +1 -1
  23. package/dist/chunk-6fdg7043.js +2 -0
  24. package/dist/chunk-6h4f19sb.js +2 -0
  25. package/dist/{chunk-qygqf2zb.js → chunk-6mk7fd7v.js} +1 -1
  26. package/dist/{chunk-frh6b2q7.js → chunk-6qtx7w2r.js} +1 -1
  27. package/dist/{chunk-wdwf3wzg.js → chunk-78bpc81t.js} +1 -1
  28. package/dist/{chunk-4tybm7fx.js → chunk-7djq40jk.js} +1 -1
  29. package/dist/{chunk-z0y4gcsp.js → chunk-7mqbw6qv.js} +1 -1
  30. package/dist/chunk-8dsf2scw.js +2 -0
  31. package/dist/{chunk-rkhfhfas.js → chunk-8g7xy48w.js} +1 -1
  32. package/dist/{chunk-1jcyfxq5.js → chunk-8x4h673x.js} +1 -1
  33. package/dist/{chunk-k46js7bz.js → chunk-9228drk4.js} +1 -1
  34. package/dist/{chunk-n0kbk2ge.js → chunk-98pkw4t1.js} +1 -1
  35. package/dist/chunk-9h74bkfh.js +2 -0
  36. package/dist/{chunk-2fspj91j.js → chunk-a8fx6wcb.js} +1 -1
  37. package/dist/{chunk-ggsxz07y.js → chunk-adj1k3w7.js} +1 -1
  38. package/dist/{chunk-a6m63ra1.js → chunk-ae85dv6n.js} +1 -1
  39. package/dist/{chunk-cs9cynxh.js → chunk-ajjwrrmz.js} +1 -1
  40. package/dist/{chunk-5a1b5kjt.js → chunk-ax56kn66.js} +1 -1
  41. package/dist/{chunk-8k7evyhh.js → chunk-b212gjes.js} +1 -1
  42. package/dist/{chunk-nnd1hqht.js → chunk-b220zqbz.js} +3 -3
  43. package/dist/{chunk-m2v35nze.js → chunk-bn0td54v.js} +1 -1
  44. package/dist/{chunk-7qgt3b5t.js → chunk-bx4nptd2.js} +1 -1
  45. package/dist/{chunk-1xgva25g.js → chunk-by3zs4ag.js} +1 -1
  46. package/dist/{chunk-sbpzt8yd.js → chunk-c0apssp7.js} +1 -1
  47. package/dist/{chunk-v65nfy32.js → chunk-c9843bnq.js} +1 -1
  48. package/dist/{chunk-mccyah24.js → chunk-cda7v05f.js} +1 -1
  49. package/dist/chunk-cj3zqzd0.js +2 -0
  50. package/dist/{chunk-jz3cjfz1.js → chunk-d6aa7ghq.js} +1 -1
  51. package/dist/{chunk-fee1k8c5.js → chunk-etx5vb1n.js} +1 -1
  52. package/dist/chunk-eyfmvy7z.js +2 -0
  53. package/dist/chunk-fethffrc.js +2 -0
  54. package/dist/chunk-fg2h6r32.js +2 -0
  55. package/dist/{chunk-yf04htgs.js → chunk-fnty12j5.js} +1 -1
  56. package/dist/{chunk-qa8qmer5.js → chunk-g553n48p.js} +1 -1
  57. package/dist/{chunk-s8bx0wv7.js → chunk-gaj725dz.js} +1 -1
  58. package/dist/{chunk-8p8qa1s9.js → chunk-k26kt6fp.js} +1 -1
  59. package/dist/{chunk-2k9xsqnx.js → chunk-kq9abgx2.js} +1 -1
  60. package/dist/{chunk-x58dcsjw.js → chunk-m0xp6xjr.js} +1 -1
  61. package/dist/{chunk-vtfzc29r.js → chunk-m8h6km5v.js} +1 -1
  62. package/dist/{chunk-1kg9sz9a.js → chunk-mv2v3g62.js} +1 -1
  63. package/dist/{chunk-sqe4sz8r.js → chunk-mvxgpycn.js} +1 -1
  64. package/dist/{chunk-g6bdbdvj.js → chunk-myqyr2dp.js} +1 -1
  65. package/dist/{chunk-4s11yb67.js → chunk-n07dds2d.js} +1 -1
  66. package/dist/{chunk-6x3jqwxp.js → chunk-n3tj3h1q.js} +1 -1
  67. package/dist/{chunk-mxva4zmq.js → chunk-nhn7qftp.js} +1 -1
  68. package/dist/chunk-np6b30jn.js +2 -0
  69. package/dist/{chunk-hx0zj6c9.js → chunk-nzser3gj.js} +1 -1
  70. package/dist/chunk-p6gb0bak.js +2 -0
  71. package/dist/{chunk-frv8qh41.js → chunk-p7a8mgns.js} +1 -1
  72. package/dist/{chunk-a0zaf8r9.js → chunk-phj11c6x.js} +1 -1
  73. package/dist/{chunk-5e2j8d7r.js → chunk-q9vxc3gc.js} +1 -1
  74. package/dist/chunk-qmww6n4b.js +2 -0
  75. package/dist/{chunk-j4ze77e0.js → chunk-qs0fp63n.js} +1 -1
  76. package/dist/{chunk-9hcw5zsr.js → chunk-qv3g8tde.js} +1 -1
  77. package/dist/chunk-r0dajh6g.js +22 -0
  78. package/dist/chunk-r2zcdk2f.js +2 -0
  79. package/dist/chunk-r4wxxggc.js +2 -0
  80. package/dist/chunk-ryjpew5v.js +2 -0
  81. package/dist/{chunk-7y7dp1ba.js → chunk-sdfe1xce.js} +1 -1
  82. package/dist/{chunk-j2pmv4jw.js → chunk-shh4byc3.js} +1 -1
  83. package/dist/chunk-sxx50f3k.js +2 -0
  84. package/dist/{chunk-s2smc4wv.js → chunk-szchgak8.js} +1 -1
  85. package/dist/chunk-t2fwnrw9.js +2 -0
  86. package/dist/chunk-tx9zv1xv.js +2 -0
  87. package/dist/{chunk-w9yfvb4d.js → chunk-v0tmvq31.js} +1 -1
  88. package/dist/{chunk-spnkgsft.js → chunk-v2vv4etv.js} +22 -22
  89. package/dist/chunk-v8mxhfp7.js +2 -0
  90. package/dist/chunk-vd3w4q9e.js +2 -0
  91. package/dist/{chunk-04tp3hjf.js → chunk-vg03m8ah.js} +10 -10
  92. package/dist/chunk-vgnjrgnk.js +2 -0
  93. package/dist/{chunk-d1pp19wx.js → chunk-w3pzxz3m.js} +1 -1
  94. package/dist/chunk-wjebx46w.js +2 -0
  95. package/dist/chunk-wz1gwj81.js +2 -0
  96. package/dist/{chunk-wr17wgn4.js → chunk-x0nymj9r.js} +1 -1
  97. package/dist/{chunk-evv58hf5.js → chunk-x41v697c.js} +1 -1
  98. package/dist/{chunk-v4t1kxm7.js → chunk-xddvx94h.js} +1 -1
  99. package/dist/{chunk-7hfjv9ej.js → chunk-xj05xmfg.js} +1 -1
  100. package/dist/chunk-yawygkph.js +2 -0
  101. package/dist/{chunk-r2kag877.js → chunk-z2gmz9ew.js} +2 -2
  102. package/dist/{chunk-jjehgxtc.js → chunk-z8t5cs8f.js} +1 -1
  103. package/dist/cli.js +14 -14
  104. package/dist/client-script.d.ts +6 -0
  105. package/dist/client-script.js +1 -2
  106. package/dist/craft-entry.js +1 -1
  107. package/dist/craft.js +1 -1
  108. package/dist/database.js +1 -1
  109. package/dist/pwa.js +2 -2
  110. package/dist/ssg.js +2 -2
  111. package/dist/stx-virtual-ts.js +24 -2
  112. package/dist/visual-testing.js +1 -1
  113. package/package.json +5 -5
  114. package/dist/chunk-0b88ky9d.js +0 -2
  115. package/dist/chunk-0prbc65y.js +0 -2
  116. package/dist/chunk-38nq2ymv.js +0 -2
  117. package/dist/chunk-412apa52.js +0 -2
  118. package/dist/chunk-5kmwyys8.js +0 -2
  119. package/dist/chunk-9scfmhph.js +0 -2
  120. package/dist/chunk-a0aqpzm6.js +0 -2
  121. package/dist/chunk-cff5gpvr.js +0 -2
  122. package/dist/chunk-csjhh5t2.js +0 -2
  123. package/dist/chunk-dcc04y1t.js +0 -2
  124. package/dist/chunk-e4gycrtb.js +0 -2
  125. package/dist/chunk-f7se90b8.js +0 -2
  126. package/dist/chunk-g98vjcbj.js +0 -2
  127. package/dist/chunk-h451yyp6.js +0 -2
  128. package/dist/chunk-hd1hr94w.js +0 -2
  129. package/dist/chunk-hfc4afre.js +0 -2
  130. package/dist/chunk-hr7hvaf0.js +0 -2
  131. package/dist/chunk-j5rmhyqr.js +0 -2
  132. package/dist/chunk-je7cvg5j.js +0 -2
  133. package/dist/chunk-jqnckvbk.js +0 -2
  134. package/dist/chunk-mdk3c8n2.js +0 -2
  135. package/dist/chunk-n27c7jvr.js +0 -2
  136. package/dist/chunk-nrzx6d77.js +0 -2
  137. package/dist/chunk-pz3n5qde.js +0 -2
  138. package/dist/chunk-tpc0vwvz.js +0 -22
  139. package/dist/chunk-wc5385mg.js +0 -2
  140. package/dist/chunk-x21s75kv.js +0 -2
  141. package/dist/chunk-yzftmbry.js +0 -2
  142. package/dist/chunk-z54ans51.js +0 -2
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{hi as a,ii as b,ji as c,ki as d,li as e}from"./chunk-1gdzz04h.js";import"./chunk-j4ze77e0.js";export{c as renderSSRSuspense,a as processSuspenseDirectives,e as generateSuspenseRuntime,d as generateSuspenseCSS,b as createSSRSuspense};
2
+ import{hi as a,ii as b,ji as c,ki as d,li as e}from"./chunk-1gdzz04h.js";import"./chunk-qs0fp63n.js";export{c as renderSSRSuspense,a as processSuspenseDirectives,e as generateSuspenseRuntime,d as generateSuspenseCSS,b as createSSRSuspense};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import"./chunk-j4ze77e0.js";var Y=null,S=[],F=new WeakMap;function I(z){let K=z,B=new Set,G={get value(){if(Y){let H=F.get(G);if(!H)H=new Set,F.set(G,H);H.add(Y)}return K},set value(H){if(!Object.is(K,H)){K=H,B.forEach((J)=>J(H));let L=F.get(G);if(L)L.forEach((J)=>J())}},subscribe(H){return B.add(H),()=>B.delete(H)},peek(){return K}};return G}function W(z){return z!==null&&typeof z==="object"&&"value"in z&&"subscribe"in z&&"peek"in z}function P(z){return W(z)?z.value:z}function j(z){let K={};for(let B in z)if(Object.prototype.hasOwnProperty.call(z,B))K[B]=I(z[B]);return K}function D(z){return I(z)}function U(z){let K=typeof z==="function",B=K?z:z.get,G=K?void 0:z.set,H=K?Object.is:z.equals||Object.is,L,J=!0,Q=new Set,X=new Set,_=()=>{if(J=!0,X.size>0){let N=T.value;X.forEach(($)=>$(N))}};function Z(){Q.clear();let N=Y;Y=_,S.push(_);try{return B()}finally{S.pop(),Y=N}}let T={get value(){if(Y){let N=F.get(T);if(!N)N=new Set,F.set(T,N);N.add(Y)}if(J){let N=Z();if(!H(L,N))L=N;J=!1}return L},set value(N){if(G)G(N);else console.warn("Computed property is readonly")},subscribe(N){return X.add(N),()=>X.delete(N)},peek(){if(J)L=B(),J=!1;return L},invalidate(){J=!0},get dirty(){return J},get deps(){return Q}};return T}function x(z,K,B={}){let{immediate:G=!1,deep:H=!1,flush:L="pre",once:J=!1}=B,Q,X=!0,_=!1,Z=()=>{if(W(z))return H?q(z.value):z.value;return z()},T=()=>{if(!X||_)return;let M=Z();if(Q!==void 0&&Object.is(Q,M)&&!H)return;let A=()=>{if(K(M,Q),Q=H?q(M):M,J)$()};if(L==="sync")A();else if(L==="post")queueMicrotask(A);else Promise.resolve().then(A)},N=null;if(W(z))N=z.subscribe(()=>T());else N=U(z).subscribe(()=>T());if(G)Q=void 0,T();else Q=Z();let $=()=>{if(X=!1,N)N(),N=null};return $.pause=()=>{_=!0},$.resume=()=>{_=!1},$}function E(z,K,B={}){let{immediate:G=!1,once:H=!1}=B,L=z.map((T)=>W(T)?T.value:void 0),J=!0,Q=!1,X=()=>{if(!J||Q)return;let T=z.map((N)=>W(N)?N.value:void 0);if(K(T,L),L=[...T],H)Z()},_=z.map((T)=>{if(W(T))return T.subscribe(()=>X());return()=>{}});if(G)X();let Z=()=>{J=!1,_.forEach((T)=>T())};return Z.pause=()=>{Q=!0},Z.resume=()=>{Q=!1},Z}function y(z,K={}){let{flush:B="pre"}=K,G,H=!0,L=!1,J=()=>{if(!H||L)return;if(G)G();let X=Y;Y=J,S.push(J);try{G=z()}finally{S.pop(),Y=X}};if(B==="sync")J();else if(B==="post")queueMicrotask(J);else Promise.resolve().then(J);let Q=()=>{if(H=!1,G)G()};return Q.pause=()=>{L=!0},Q.resume=()=>{L=!1},Q}function C(z,K={},B){let G=/@computed\s*\(\s*(\w+)\s*,\s*(.+?)\s*\)/gi;return z.replace(G,(H,L,J)=>{try{let X=Function(...Object.keys(K),`return ${J}`)(...Object.values(K));return K[L]=X,`<!-- computed: ${L} = ${X} -->`}catch(Q){return`<!-- computed error: ${L} - ${Q} -->`}})}function R(z,K={},B){let G=/@watch\s*\(\s*(\w+)\s*\)\s*([\s\S]*?)@endwatch/gi;return z.replace(G,(H,L,J)=>{return`
2
+ import"./chunk-qs0fp63n.js";var Y=null,S=[],F=new WeakMap;function I(z){let K=z,B=new Set,G={get value(){if(Y){let H=F.get(G);if(!H)H=new Set,F.set(G,H);H.add(Y)}return K},set value(H){if(!Object.is(K,H)){K=H,B.forEach((J)=>J(H));let L=F.get(G);if(L)L.forEach((J)=>J())}},subscribe(H){return B.add(H),()=>B.delete(H)},peek(){return K}};return G}function W(z){return z!==null&&typeof z==="object"&&"value"in z&&"subscribe"in z&&"peek"in z}function P(z){return W(z)?z.value:z}function j(z){let K={};for(let B in z)if(Object.prototype.hasOwnProperty.call(z,B))K[B]=I(z[B]);return K}function D(z){return I(z)}function U(z){let K=typeof z==="function",B=K?z:z.get,G=K?void 0:z.set,H=K?Object.is:z.equals||Object.is,L,J=!0,Q=new Set,X=new Set,_=()=>{if(J=!0,X.size>0){let N=T.value;X.forEach(($)=>$(N))}};function Z(){Q.clear();let N=Y;Y=_,S.push(_);try{return B()}finally{S.pop(),Y=N}}let T={get value(){if(Y){let N=F.get(T);if(!N)N=new Set,F.set(T,N);N.add(Y)}if(J){let N=Z();if(!H(L,N))L=N;J=!1}return L},set value(N){if(G)G(N);else console.warn("Computed property is readonly")},subscribe(N){return X.add(N),()=>X.delete(N)},peek(){if(J)L=B(),J=!1;return L},invalidate(){J=!0},get dirty(){return J},get deps(){return Q}};return T}function x(z,K,B={}){let{immediate:G=!1,deep:H=!1,flush:L="pre",once:J=!1}=B,Q,X=!0,_=!1,Z=()=>{if(W(z))return H?q(z.value):z.value;return z()},T=()=>{if(!X||_)return;let M=Z();if(Q!==void 0&&Object.is(Q,M)&&!H)return;let A=()=>{if(K(M,Q),Q=H?q(M):M,J)$()};if(L==="sync")A();else if(L==="post")queueMicrotask(A);else Promise.resolve().then(A)},N=null;if(W(z))N=z.subscribe(()=>T());else N=U(z).subscribe(()=>T());if(G)Q=void 0,T();else Q=Z();let $=()=>{if(X=!1,N)N(),N=null};return $.pause=()=>{_=!0},$.resume=()=>{_=!1},$}function E(z,K,B={}){let{immediate:G=!1,once:H=!1}=B,L=z.map((T)=>W(T)?T.value:void 0),J=!0,Q=!1,X=()=>{if(!J||Q)return;let T=z.map((N)=>W(N)?N.value:void 0);if(K(T,L),L=[...T],H)Z()},_=z.map((T)=>{if(W(T))return T.subscribe(()=>X());return()=>{}});if(G)X();let Z=()=>{J=!1,_.forEach((T)=>T())};return Z.pause=()=>{Q=!0},Z.resume=()=>{Q=!1},Z}function y(z,K={}){let{flush:B="pre"}=K,G,H=!0,L=!1,J=()=>{if(!H||L)return;if(G)G();let X=Y;Y=J,S.push(J);try{G=z()}finally{S.pop(),Y=X}};if(B==="sync")J();else if(B==="post")queueMicrotask(J);else Promise.resolve().then(J);let Q=()=>{if(H=!1,G)G()};return Q.pause=()=>{L=!0},Q.resume=()=>{L=!1},Q}function C(z,K={},B){let G=/@computed\s*\(\s*(\w+)\s*,\s*(.+?)\s*\)/gi;return z.replace(G,(H,L,J)=>{try{let X=Function(...Object.keys(K),`return ${J}`)(...Object.values(K));return K[L]=X,`<!-- computed: ${L} = ${X} -->`}catch(Q){return`<!-- computed error: ${L} - ${Q} -->`}})}function R(z,K={},B){let G=/@watch\s*\(\s*(\w+)\s*\)\s*([\s\S]*?)@endwatch/gi;return z.replace(G,(H,L,J)=>{return`
3
3
  <script data-watch="${`watch-${Math.random().toString(36).substring(2,9)}`}">
4
4
  (function() {
5
5
  // Watch implementation for ${L}
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{Sh as x,Xh as B,Yh as c,Zh as u,_h as n}from"./chunk-j93x5fzs.js";import{Nu as v}from"./chunk-j4ze77e0.js";import{resolve as JJ,basename as WJ,extname as _J,join as LJ}from"path";import{mkdir as QJ}from"fs/promises";var ZJ={enabled:!0,directory:".stx/media-cache",maxAge:30,maxSize:2000,cacheTranscoded:!0,cacheThumbnails:!0,cacheManifests:!0};class V{config;constructor(K={}){this.config={...ZJ,...K}}async get(K,J){return c(K,J,"video",this.config)}async set(K,J,X){return u(K,J,X,"video",this.config)}async clear(){return n("video",this.config)}updateConfig(K){this.config={...this.config,...K}}}var S=null;function D(K){if(!S)S=new V(K);else if(K)S.updateConfig(K);return S}async function q(K,J,X){let N=X?{directory:`${X.outputDir}/../.cache`}:{};return D(N).get(K,J)}async function b(K,J,X,N){let Z=N?{directory:`${N.outputDir}/../.cache`}:{};return D(Z).set(K,J,X)}async function $J(){return D().clear()}import{resolve as y,basename as P,extname as f,join as U}from"path";import{mkdir as g}from"fs/promises";async function m(){try{return await import("ts-videos")}catch{return null}}async function h(K,J,X,N){let Z=await m();if(!Z)return console.warn("[stx-media] ts-videos not installed, cannot generate poster"),null;try{let $=y(K);if(!await B($))return null;await g(X,{recursive:!0});let Y=await x($),z=P(K,f(K)),G=J.format||"webp",M=J.timestamp||0,E=`${z}-poster-${Y}.${G}`,W=U(X,E),Q=await Z.extractThumbnails($,{timestamps:[M],width:J.width||1280,height:J.height,format:G,quality:J.quality||85,outputDir:X,outputPattern:E.replace(`.${G}`,"")});if(Q&&Q.length>0){let _=Q[0];return{path:W,url:`${N}/${E}`,width:_.width||J.width||1280,height:_.height||720,timestamp:M,size:_.size||0}}return null}catch($){return console.warn(`[stx-media] Failed to generate poster: ${$}`),null}}async function d(K,J,X,N){let Z=await m();if(!Z)return[];try{let $=y(K);if(!await B($))return[];await g(X,{recursive:!0});let Y=await x($),z=P(K,f(K)),G=J.format||"webp",W=(await new Z.Input($).getInfo()).duration||60,Q=J.count||10,_=J.interval||W/Q,O=[];for(let w=0;w<Q&&w*_<W;w++)O.push(w*_);let L=await Z.extractThumbnails($,{timestamps:O,width:J.width||320,format:G,quality:J.quality||80,outputDir:X,outputPattern:`${z}-thumb-${Y}`});if(L&&L.length>0)return L.map((w,j)=>({path:w.path||U(X,`${z}-thumb-${Y}-${j}.${G}`),url:`${N}/${z}-thumb-${Y}-${j}.${G}`,width:w.width||J.width||320,height:w.height||180,timestamp:O[j],size:w.size||0}));return[]}catch($){return console.warn(`[stx-media] Failed to generate thumbnails: ${$}`),[]}}async function zJ(K,J,X,N){let Z=await m();if(!Z)return console.warn("[stx-media] ts-videos not installed, cannot generate sprite sheet"),null;try{let $=y(K);if(!await B($))return null;await g(X,{recursive:!0});let Y=await x($),z=P(K,f(K)),E=(await new Z.Input($).getInfo()).duration||60,W=J.columns||10,Q=J.interval||5,_=J.thumbnailWidth||160,O=J.thumbnailHeight||90,L=J.format||"jpeg",w=Math.ceil(E/Q),j=Math.ceil(w/W),F=`${z}-sprite-${Y}.${L}`,k=U(X,F),T=[];for(let I=0;I<w;I++)T.push(I*Q);let A=await Z.extractThumbnails($,{timestamps:T,width:_,height:O,format:L,quality:J.quality||70,outputDir:U(X,".temp")});if(!A||A.length===0)return null;try{let I=await import("ts-images"),H=W*_,kJ=j*O,jJ=await I.createSprite({images:A.map((YJ)=>YJ.path),columns:W,padding:0,outputPath:k,format:L,quality:J.quality||70});return{url:`${N}/${F}`,path:k,columns:W,rows:j,thumbnailWidth:_,thumbnailHeight:O,interval:Q,totalFrames:w}}catch{return console.warn("[stx-media] ts-images not installed, sprite sheet generation skipped"),null}}catch($){return console.warn(`[stx-media] Failed to generate sprite sheet: ${$}`),null}}import{resolve as r,basename as e,extname as i,join as C}from"path";import{mkdir as R,writeFile as o}from"fs/promises";async function t(){try{return await import("ts-videos")}catch{return null}}var s=[{label:"1080p",width:1920,height:1080,bitrate:5000000,audioBitrate:192000},{label:"720p",width:1280,height:720,bitrate:2500000,audioBitrate:128000},{label:"480p",width:854,height:480,bitrate:1e6,audioBitrate:96000},{label:"360p",width:640,height:360,bitrate:600000,audioBitrate:64000}];async function p(K,J,X,N,Z){let $=await t();if(!$)return console.warn("[stx-media] ts-videos not installed, cannot generate HLS manifest"),null;try{let Y=r(K);if(!await B(Y))return null;let z=await x(Y),G=e(K,i(K)),M=C(X,`${G}-${z}-hls`);await R(M,{recursive:!0});let E=J.length>0?J:s,W=Z?.segmentDuration||6,O=(await new $.Input(Y).getInfo()).duration||0,L=[],w=0;for(let k of E){let T=C(M,k.label);await R(T,{recursive:!0});let A=`${k.label}.m3u8`,I=C(T,A);try{let H=await $.generateHLS(Y,{outputDir:T,segmentDuration:W,width:k.width,height:k.height,videoBitrate:k.bitrate,audioBitrate:k.audioBitrate,playlistName:k.label});if(H)L.push({quality:k,url:`${N}/${G}-${z}-hls/${k.label}/${A}`,path:I}),w+=H.segmentCount||Math.ceil(O/W)}catch(H){console.warn(`[stx-media] Failed to generate HLS for ${k.label}: ${H}`)}}if(L.length===0)return null;let j=C(M,"master.m3u8"),F=GJ(L,N,G,z);return await o(j,F),{manifestUrl:`${N}/${G}-${z}-hls/master.m3u8`,manifestPath:j,playlists:L,segmentCount:w,duration:O}}catch(Y){return console.warn(`[stx-media] Failed to generate HLS manifest: ${Y}`),null}}function GJ(K,J,X,N){let Z=["#EXTM3U","#EXT-X-VERSION:3"];for(let $ of K){let{quality:Y}=$,z=Y.bitrate+(Y.audioBitrate||128000),G=`${Y.width}x${Y.height||Math.round(Y.width*9/16)}`;Z.push(`#EXT-X-STREAM-INF:BANDWIDTH=${z},RESOLUTION=${G},NAME="${Y.label}"`,`${Y.label}/${Y.label}.m3u8`)}return Z.join(`
2
+ import{Sh as x,Xh as B,Yh as c,Zh as u,_h as n}from"./chunk-j93x5fzs.js";import{Ou as v}from"./chunk-qs0fp63n.js";import{resolve as JJ,basename as WJ,extname as _J,join as LJ}from"path";import{mkdir as QJ}from"fs/promises";var ZJ={enabled:!0,directory:".stx/media-cache",maxAge:30,maxSize:2000,cacheTranscoded:!0,cacheThumbnails:!0,cacheManifests:!0};class V{config;constructor(K={}){this.config={...ZJ,...K}}async get(K,J){return c(K,J,"video",this.config)}async set(K,J,X){return u(K,J,X,"video",this.config)}async clear(){return n("video",this.config)}updateConfig(K){this.config={...this.config,...K}}}var S=null;function D(K){if(!S)S=new V(K);else if(K)S.updateConfig(K);return S}async function q(K,J,X){let N=X?{directory:`${X.outputDir}/../.cache`}:{};return D(N).get(K,J)}async function b(K,J,X,N){let Z=N?{directory:`${N.outputDir}/../.cache`}:{};return D(Z).set(K,J,X)}async function $J(){return D().clear()}import{resolve as y,basename as P,extname as f,join as U}from"path";import{mkdir as g}from"fs/promises";async function m(){try{return await import("ts-videos")}catch{return null}}async function h(K,J,X,N){let Z=await m();if(!Z)return console.warn("[stx-media] ts-videos not installed, cannot generate poster"),null;try{let $=y(K);if(!await B($))return null;await g(X,{recursive:!0});let Y=await x($),z=P(K,f(K)),G=J.format||"webp",M=J.timestamp||0,E=`${z}-poster-${Y}.${G}`,W=U(X,E),Q=await Z.extractThumbnails($,{timestamps:[M],width:J.width||1280,height:J.height,format:G,quality:J.quality||85,outputDir:X,outputPattern:E.replace(`.${G}`,"")});if(Q&&Q.length>0){let _=Q[0];return{path:W,url:`${N}/${E}`,width:_.width||J.width||1280,height:_.height||720,timestamp:M,size:_.size||0}}return null}catch($){return console.warn(`[stx-media] Failed to generate poster: ${$}`),null}}async function d(K,J,X,N){let Z=await m();if(!Z)return[];try{let $=y(K);if(!await B($))return[];await g(X,{recursive:!0});let Y=await x($),z=P(K,f(K)),G=J.format||"webp",W=(await new Z.Input($).getInfo()).duration||60,Q=J.count||10,_=J.interval||W/Q,O=[];for(let w=0;w<Q&&w*_<W;w++)O.push(w*_);let L=await Z.extractThumbnails($,{timestamps:O,width:J.width||320,format:G,quality:J.quality||80,outputDir:X,outputPattern:`${z}-thumb-${Y}`});if(L&&L.length>0)return L.map((w,j)=>({path:w.path||U(X,`${z}-thumb-${Y}-${j}.${G}`),url:`${N}/${z}-thumb-${Y}-${j}.${G}`,width:w.width||J.width||320,height:w.height||180,timestamp:O[j],size:w.size||0}));return[]}catch($){return console.warn(`[stx-media] Failed to generate thumbnails: ${$}`),[]}}async function zJ(K,J,X,N){let Z=await m();if(!Z)return console.warn("[stx-media] ts-videos not installed, cannot generate sprite sheet"),null;try{let $=y(K);if(!await B($))return null;await g(X,{recursive:!0});let Y=await x($),z=P(K,f(K)),E=(await new Z.Input($).getInfo()).duration||60,W=J.columns||10,Q=J.interval||5,_=J.thumbnailWidth||160,O=J.thumbnailHeight||90,L=J.format||"jpeg",w=Math.ceil(E/Q),j=Math.ceil(w/W),F=`${z}-sprite-${Y}.${L}`,k=U(X,F),T=[];for(let I=0;I<w;I++)T.push(I*Q);let A=await Z.extractThumbnails($,{timestamps:T,width:_,height:O,format:L,quality:J.quality||70,outputDir:U(X,".temp")});if(!A||A.length===0)return null;try{let I=await import("ts-images"),H=W*_,kJ=j*O,jJ=await I.createSprite({images:A.map((YJ)=>YJ.path),columns:W,padding:0,outputPath:k,format:L,quality:J.quality||70});return{url:`${N}/${F}`,path:k,columns:W,rows:j,thumbnailWidth:_,thumbnailHeight:O,interval:Q,totalFrames:w}}catch{return console.warn("[stx-media] ts-images not installed, sprite sheet generation skipped"),null}}catch($){return console.warn(`[stx-media] Failed to generate sprite sheet: ${$}`),null}}import{resolve as r,basename as e,extname as i,join as C}from"path";import{mkdir as R,writeFile as o}from"fs/promises";async function t(){try{return await import("ts-videos")}catch{return null}}var s=[{label:"1080p",width:1920,height:1080,bitrate:5000000,audioBitrate:192000},{label:"720p",width:1280,height:720,bitrate:2500000,audioBitrate:128000},{label:"480p",width:854,height:480,bitrate:1e6,audioBitrate:96000},{label:"360p",width:640,height:360,bitrate:600000,audioBitrate:64000}];async function p(K,J,X,N,Z){let $=await t();if(!$)return console.warn("[stx-media] ts-videos not installed, cannot generate HLS manifest"),null;try{let Y=r(K);if(!await B(Y))return null;let z=await x(Y),G=e(K,i(K)),M=C(X,`${G}-${z}-hls`);await R(M,{recursive:!0});let E=J.length>0?J:s,W=Z?.segmentDuration||6,O=(await new $.Input(Y).getInfo()).duration||0,L=[],w=0;for(let k of E){let T=C(M,k.label);await R(T,{recursive:!0});let A=`${k.label}.m3u8`,I=C(T,A);try{let H=await $.generateHLS(Y,{outputDir:T,segmentDuration:W,width:k.width,height:k.height,videoBitrate:k.bitrate,audioBitrate:k.audioBitrate,playlistName:k.label});if(H)L.push({quality:k,url:`${N}/${G}-${z}-hls/${k.label}/${A}`,path:I}),w+=H.segmentCount||Math.ceil(O/W)}catch(H){console.warn(`[stx-media] Failed to generate HLS for ${k.label}: ${H}`)}}if(L.length===0)return null;let j=C(M,"master.m3u8"),F=GJ(L,N,G,z);return await o(j,F),{manifestUrl:`${N}/${G}-${z}-hls/master.m3u8`,manifestPath:j,playlists:L,segmentCount:w,duration:O}}catch(Y){return console.warn(`[stx-media] Failed to generate HLS manifest: ${Y}`),null}}function GJ(K,J,X,N){let Z=["#EXTM3U","#EXT-X-VERSION:3"];for(let $ of K){let{quality:Y}=$,z=Y.bitrate+(Y.audioBitrate||128000),G=`${Y.width}x${Y.height||Math.round(Y.width*9/16)}`;Z.push(`#EXT-X-STREAM-INF:BANDWIDTH=${z},RESOLUTION=${G},NAME="${Y.label}"`,`${Y.label}/${Y.label}.m3u8`)}return Z.join(`
3
3
  `)}async function l(K,J,X,N,Z){let $=await t();if(!$)return console.warn("[stx-media] ts-videos not installed, cannot generate DASH manifest"),null;try{let Y=r(K);if(!await B(Y))return null;let z=await x(Y),G=e(K,i(K)),M=C(X,`${G}-${z}-dash`);await R(M,{recursive:!0});let E=J.length>0?J:s,W=Z?.segmentDuration||4,Q=Z?.minBufferTime||2,L=(await new $.Input(Y).getInfo()).duration||0,w=[],j=[];for(let A of E){let I=C(M,A.label);await R(I,{recursive:!0});try{if(await $.generateDASH(Y,{outputDir:I,segmentDuration:W,width:A.width,height:A.height,videoBitrate:A.bitrate,audioBitrate:A.audioBitrate})){if(w.push({bandwidth:A.bitrate,width:A.width,height:A.height||Math.round(A.width*9/16),url:`${N}/${G}-${z}-dash/${A.label}/video`}),A.audioBitrate)j.push({bandwidth:A.audioBitrate,url:`${N}/${G}-${z}-dash/${A.label}/audio`})}}catch(H){console.warn(`[stx-media] Failed to generate DASH for ${A.label}: ${H}`)}}if(w.length===0)return null;let F=C(M,"manifest.mpd"),k=NJ(w,j,L,W,Q);await o(F,k);let T=[{type:"video",representations:w}];if(j.length>0)T.push({type:"audio",representations:j});return{manifestUrl:`${N}/${G}-${z}-dash/manifest.mpd`,manifestPath:F,adaptationSets:T,duration:L}}catch(Y){return console.warn(`[stx-media] Failed to generate DASH manifest: ${Y}`),null}}function NJ(K,J,X,N,Z){let $=a(X),Y=a(Z),z=`<?xml version="1.0" encoding="UTF-8"?>
4
4
  <MPD xmlns="urn:mpeg:dash:schema:mpd:2011"
5
5
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
@@ -1,3 +1,3 @@
1
1
  // @bun
2
2
  import{existsSync as U,statSync as V}from"fs";import z from"path";var W=/[*?[\]{}]/;function X(D){return W.test(D)}async function $(D,E={}){let H=E.cwd??process.cwd(),N=E.recursive!==!1,Q=E.ignorePaths??[],J=globalThis.Bun.Glob,K=new Set,F=(j)=>{if(j.includes(`${z.sep}node_modules${z.sep}`)||j.includes(`${z.sep}dist${z.sep}`))return;if(Q.some((q)=>q&&j.includes(z.normalize(q))))return;K.add(j)},R=async(j)=>{try{for await(let q of new J(j).scan({cwd:H,absolute:!0}))F(q)}catch{}};for(let j of D){if(!j)continue;if(X(j)){await R(j);continue}let q=z.resolve(H,j);if(!U(q))continue;if(V(q).isDirectory()){for await(let T of new J(N?"**/*.stx":"*.stx").scan({cwd:q,absolute:!0}))F(T);continue}F(q)}return[...K].sort()}
3
- export{X as Fs,$ as Gs};
3
+ export{X as Gs,$ as Hs};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{hg as a,ig as b}from"./chunk-1p0r6k2f.js";import"./chunk-9228drk4.js";import"./chunk-qs0fp63n.js";export{a as handleImageRequest,b as createImageHandler};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{Ku as W,Lu as k,Mu as G}from"./chunk-j4ze77e0.js";import A from"fs";import B from"path";function h(j){let q=0;for(let K=0;K<j.length;K++){let Q=j[K];q=(q<<5)-q+Q,q=q&q}return Math.abs(q).toString(16).padStart(8,"0")}function u(j,q){let K=B.basename(j);for(let Q of q)if(Q.startsWith("*.")){let Y=Q.slice(1);if(K.endsWith(Y))return!0}else if(Q.includes("*")){let Y=new RegExp(`^${Q.replace(/\*/g,".*")}$`);if(Y.test(K)||Y.test(j))return!0}else if(K===Q||j.includes(Q))return!0;return!1}function f(j,q,K){let Q=B.extname(j).toLowerCase(),Y=l[Q],X=(K.maxFileSizeKB||500)*1024;if(q>X)return!1;if(K.exclude&&u(j,K.exclude))return!1;if(K.include&&K.include.length>0){for(let Z of K.include)if(Z.startsWith("*.")){if(j.endsWith(Z.slice(1)))return!0}else if(j.includes(Z))return!0}if(Y&&K[Y]===!0)return!0;if(!Y)return!1;return!1}function T(j,q,K,Q){let Y=A.readdirSync(j,{withFileTypes:!0});for(let X of Y){let Z=B.join(j,X.name);if(X.isDirectory()){if(["node_modules",".git",".stx"].includes(X.name))continue;T(Z,q,K,Q)}else if(X.isFile()){let O=A.statSync(Z),_=B.relative(q,Z);if(f(_,O.size,K)){let $=A.readFileSync(Z),L=h($),V=`/${_.replace(/\\/g,"/")}`;Q.push({url:V,revision:L,size:O.size})}}}}function U(j,q){let K=q.pwa?.precache,Q=[];if(!K?.enabled)return{entries:[],totalSize:0,fileCount:0};if(!A.existsSync(j))return{entries:[],totalSize:0,fileCount:0};T(j,j,K,Q),Q.sort((X,Z)=>X.url.localeCompare(Z.url));let Y=Q.reduce((X,Z)=>X+Z.size,0);return{entries:Q,totalSize:Y,fileCount:Q.length}}function J(j){if(j.entries.length===0)return"[]";return`[
2
+ import{Lu as W,Mu as k,Nu as G}from"./chunk-qs0fp63n.js";import A from"fs";import B from"path";function h(j){let q=0;for(let K=0;K<j.length;K++){let Q=j[K];q=(q<<5)-q+Q,q=q&q}return Math.abs(q).toString(16).padStart(8,"0")}function u(j,q){let K=B.basename(j);for(let Q of q)if(Q.startsWith("*.")){let Y=Q.slice(1);if(K.endsWith(Y))return!0}else if(Q.includes("*")){let Y=new RegExp(`^${Q.replace(/\*/g,".*")}$`);if(Y.test(K)||Y.test(j))return!0}else if(K===Q||j.includes(Q))return!0;return!1}function f(j,q,K){let Q=B.extname(j).toLowerCase(),Y=l[Q],X=(K.maxFileSizeKB||500)*1024;if(q>X)return!1;if(K.exclude&&u(j,K.exclude))return!1;if(K.include&&K.include.length>0){for(let Z of K.include)if(Z.startsWith("*.")){if(j.endsWith(Z.slice(1)))return!0}else if(j.includes(Z))return!0}if(Y&&K[Y]===!0)return!0;if(!Y)return!1;return!1}function T(j,q,K,Q){let Y=A.readdirSync(j,{withFileTypes:!0});for(let X of Y){let Z=B.join(j,X.name);if(X.isDirectory()){if(["node_modules",".git",".stx"].includes(X.name))continue;T(Z,q,K,Q)}else if(X.isFile()){let O=A.statSync(Z),_=B.relative(q,Z);if(f(_,O.size,K)){let $=A.readFileSync(Z),L=h($),V=`/${_.replace(/\\/g,"/")}`;Q.push({url:V,revision:L,size:O.size})}}}}function U(j,q){let K=q.pwa?.precache,Q=[];if(!K?.enabled)return{entries:[],totalSize:0,fileCount:0};if(!A.existsSync(j))return{entries:[],totalSize:0,fileCount:0};T(j,j,K,Q),Q.sort((X,Z)=>X.url.localeCompare(Z.url));let Y=Q.reduce((X,Z)=>X+Z.size,0);return{entries:Q,totalSize:Y,fileCount:Q.length}}function J(j){if(j.entries.length===0)return"[]";return`[
3
3
  ${j.entries.map((K)=>` { url: '${K.url}', revision: '${K.revision}' }`).join(`,
4
4
  `)}
5
5
  ]`}function E(j){if(j<1024)return`${j} B`;if(j<1048576)return`${(j/1024).toFixed(1)} KB`;return`${(j/1048576).toFixed(2)} MB`}var l;var F=G(()=>{l={".html":"includeHtml",".htm":"includeHtml",".js":"includeJs",".mjs":"includeJs",".css":"includeCss",".png":"includeImages",".jpg":"includeImages",".jpeg":"includeImages",".gif":"includeImages",".webp":"includeImages",".svg":"includeImages",".ico":"includeImages",".woff":"includeFonts",".woff2":"includeFonts",".ttf":"includeFonts",".eot":"includeFonts",".otf":"includeFonts"}});function g(j){let q={"cache-first":{className:"CacheFirst",importFrom:"workbox-strategies"},"network-first":{className:"NetworkFirst",importFrom:"workbox-strategies"},"stale-while-revalidate":{className:"StaleWhileRevalidate",importFrom:"workbox-strategies"},"network-only":{className:"NetworkOnly",importFrom:"workbox-strategies"},"cache-only":{className:"CacheOnly",importFrom:"workbox-strategies"}};return q[j]||q["network-first"]}function R(j){return g(j).className}function M(j){let q=j.pwa;if(!q?.enabled)return"";let K=q.routes||[],Q=q.cacheStorage,Y=[];for(let X of K){let Z=R(X.strategy),O=[];if(X.maxAgeSeconds||X.maxEntries||Q?.maxEntries){let $=X.maxEntries||Q?.maxEntries||100,L=X.maxAgeSeconds||(Q?.maxAge?Q.maxAge*24*60*60:void 0);O.push(`new ExpirationPlugin({
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{Bt as a,Ct as b}from"./chunk-x41v697c.js";import"./chunk-qs0fp63n.js";export{b as warnUnbalancedTags,a as findUnbalancedTags};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{$f as e,Xf as a,Yf as b,Zf as c,_f as d,ag as f,bg as g,cg as h,dg as i,eg as j,fg as k,gg as l}from"./chunk-d19bydks.js";import"./chunk-j4ze77e0.js";export{g as toUsers,f as toUser,c as stopBroadcasting,b as startBroadcasting,d as loadChannels,a as getBroadcastServer,j as channel,h as broadcastPrivate,i as broadcastPresence,e as broadcast,l as BroadcastServer,k as Broadcast};
2
+ import{$f as e,Xf as a,Yf as b,Zf as c,_f as d,ag as f,bg as g,cg as h,dg as i,eg as j,fg as k,gg as l}from"./chunk-d19bydks.js";import"./chunk-qs0fp63n.js";export{g as toUsers,f as toUser,c as stopBroadcasting,b as startBroadcasting,d as loadChannels,a as getBroadcastServer,j as channel,h as broadcastPrivate,i as broadcastPresence,e as broadcast,l as BroadcastServer,k as Broadcast};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{gl as _,hl as h}from"./chunk-r84h7wxw.js";import{Pl as m,bs as p}from"./chunk-spnkgsft.js";import{it as N}from"./chunk-xgtcq9bj.js";import K from"path";import q from"fs";var l=5,u=1;function i(J=process.env){return J.STX_DEBUG==="true"||J.STX_DEBUG==="1"}function L(...J){if(i())console.log("[stx:bundler]",...J)}var D=[];function v(J,z,Y){D.push({filePath:J||"<inline>",message:z,details:Y})}function Yw(){return D.slice()}function Zw(){D.length=0}var F;function $w(J){F=J}function b(){if(F)return F;try{let J=p.strict;return typeof J==="object"&&J!==null?J.bundlerFallback??"warn":"warn"}catch{return"warn"}}var f=[/^stx$/,/^@stacksjs\/stx$/,/^@stores$/,/^stx\/stores$/,/^@composables$/];function Qw(J){let z=/^[ \t]*import[ \t]+(?!type(?:[ \t]|{))[\s\S]*?\s+from\s+['"]([^'"]+)['"][ \t]*;?/gm,Y;while((Y=z.exec(J))!==null){let M=Y[1];if(!f.some((w)=>w.test(M)))return L("detected user import:",M),!0}let Z=/^[ \t]*import[ \t]+['"]([^'"]+)['"]/gm;while((Y=Z.exec(J))!==null){let M=Y[1];if(/\.css(?:\?.*)?$/.test(M))continue;if(!f.some((w)=>w.test(M)))return L("detected side-effect import:",M),!0}return!1}function t(J,z,Y,Z){let M=($,w)=>{let G=$===Y?z:K.dirname($),W=K.resolve(G,w),H=[W,`${W}.ts`,`${W}.tsx`,`${W}.js`,`${W}.mjs`,`${W}.jsx`,K.join(W,"index.ts"),K.join(W,"index.tsx"),K.join(W,"index.js"),K.join(W,"index.mjs")];for(let j of H)try{if(q.existsSync(j)&&q.statSync(j,{throwIfNoEntry:!1})?.isFile())return j}catch{}return W};return{name:"stx-client-bundle",setup($){$.onResolve({filter:/^(stx|@stacksjs\/stx)$/},(w)=>({path:w.path,external:!0})),$.onResolve({filter:/^(@stores|@composables|stx\/stores)$/},(w)=>({path:w.path,external:!0})),$.onResolve({filter:/^\//},(w)=>{if(q.existsSync(w.path))return{path:w.path};return{path:w.path,external:!0}}),$.onResolve({filter:/^\.\.?\//},(w)=>{let G=M(w.importer,w.path);return Z.add(G),{path:G}}),$.onResolve({filter:/^[@~]\//},(w)=>{let G=K.resolve(J,w.path.slice(2)),W=[G,`${G}.ts`,`${G}.tsx`,`${G}.js`,`${G}.mjs`,`${G}.jsx`,K.join(G,"index.ts"),K.join(G,"index.tsx"),K.join(G,"index.js"),K.join(G,"index.mjs")];for(let H of W)if(q.existsSync(H)&&q.statSync(H,{throwIfNoEntry:!1})?.isFile())return L(`resolved ${w.path[0]}/ import:`,w.path,"\u2192",H),Z.add(H),{path:H};return console.warn(`[stx:bundler] could not resolve ${w.path[0]}/ import:`,w.path),{path:G}}),$.onLoad({filter:/\.(?:[cm]?[jt]sx?|json)$/},(w)=>{let G=K.extname(w.path).toLowerCase(),W=G===".json"?"json":G===".tsx"?"tsx":G===".jsx"?"jsx":G===".ts"||G===".mts"||G===".cts"?"ts":"js";if(w.path!==Y)Z.add(w.path);return{contents:q.readFileSync(w.path,"utf8"),loader:W}})}}}var R=new Map,g=Symbol.for("stx.client-bundle-build-queue");function s(J){let z=globalThis,Z=(z[g]??Promise.resolve()).then(J,J);return z[g]=Z.then(()=>{return},()=>{return}),Z}async function Xw(J,z,Y={}){let Z=Y.projectRoot||process.cwd(),M=Y.minify??!1,$=Y.cacheDir||N(Z,"bundle-cache"),w=new Bun.CryptoHasher("md5");w.update(`${l}\x00${J}\x00${z}`);let G=w.digest("hex").slice(0,12),W=K.join($,`${G}.js`),H=K.join($,`${G}.deps.json`),j=Bun.file(W);if(await j.exists()){let V=Bun.file(H),O=!0;if(await V.exists())try{let y=JSON.parse(await V.text());if(y.metadataVersion!==u||!Array.isArray(y.files))O=!1;for(let S of Array.isArray(y.files)?y.files:[])try{if(q.statSync(S.path).mtimeMs!==S.mtimeMs){O=!1;break}}catch{O=!1;break}}catch{O=!1}if(O)return L("cache hit:",G),await j.text();L("cache invalidated by dep change:",G)}let T=R.get(G);if(T)return await T;let x=s(()=>a(J,z,{projectRoot:Z,minify:M,cacheDir:$,hash:G,cachePath:W,depsPath:H}));R.set(G,x);try{return await x}finally{R.delete(G)}}async function a(J,z,Y){let{projectRoot:Z,minify:M,cacheDir:$,hash:w,cachePath:G,depsPath:W}=Y,H=N(Z,"bundle-tmp"),j=K.join(H,`${w}.ts`),T=K.join(H,"out",w);q.mkdirSync(H,{recursive:!0}),q.mkdirSync(T,{recursive:!0});let x=K.dirname(z),V=[],O=/^[ \t]*(export\s+)?(?:const|let|var)\s+(?:\{([^}]+)\}|(\w+))/gm,y=/^[ \t]*(export\s+)?(?:async\s+)?function\s+(\w+)/gm,S;while((S=O.exec(J))!==null){if(S[1])continue;if(S[2])S[2].split(",").forEach((I)=>{let X=e(I);if(X)V.push(X)});else if(S[3])V.push(S[3])}while((S=y.exec(J))!==null){if(S[1])continue;V.push(S[2])}let B=V.length>0?`
2
+ import{gl as _,hl as h}from"./chunk-r84h7wxw.js";import{Pl as m,cs as p}from"./chunk-v2vv4etv.js";import{jt as N}from"./chunk-1px4xey5.js";import K from"path";import q from"fs";var l=5,u=1;function i(J=process.env){return J.STX_DEBUG==="true"||J.STX_DEBUG==="1"}function L(...J){if(i())console.log("[stx:bundler]",...J)}var D=[];function v(J,z,Y){D.push({filePath:J||"<inline>",message:z,details:Y})}function Yw(){return D.slice()}function Zw(){D.length=0}var F;function $w(J){F=J}function b(){if(F)return F;try{let J=p.strict;return typeof J==="object"&&J!==null?J.bundlerFallback??"warn":"warn"}catch{return"warn"}}var f=[/^stx$/,/^@stacksjs\/stx$/,/^@stores$/,/^stx\/stores$/,/^@composables$/];function Qw(J){let z=/^[ \t]*import[ \t]+(?!type(?:[ \t]|{))[\s\S]*?\s+from\s+['"]([^'"]+)['"][ \t]*;?/gm,Y;while((Y=z.exec(J))!==null){let M=Y[1];if(!f.some((w)=>w.test(M)))return L("detected user import:",M),!0}let Z=/^[ \t]*import[ \t]+['"]([^'"]+)['"]/gm;while((Y=Z.exec(J))!==null){let M=Y[1];if(/\.css(?:\?.*)?$/.test(M))continue;if(!f.some((w)=>w.test(M)))return L("detected side-effect import:",M),!0}return!1}function t(J,z,Y,Z){let M=($,w)=>{let G=$===Y?z:K.dirname($),W=K.resolve(G,w),H=[W,`${W}.ts`,`${W}.tsx`,`${W}.js`,`${W}.mjs`,`${W}.jsx`,K.join(W,"index.ts"),K.join(W,"index.tsx"),K.join(W,"index.js"),K.join(W,"index.mjs")];for(let j of H)try{if(q.existsSync(j)&&q.statSync(j,{throwIfNoEntry:!1})?.isFile())return j}catch{}return W};return{name:"stx-client-bundle",setup($){$.onResolve({filter:/^(stx|@stacksjs\/stx)$/},(w)=>({path:w.path,external:!0})),$.onResolve({filter:/^(@stores|@composables|stx\/stores)$/},(w)=>({path:w.path,external:!0})),$.onResolve({filter:/^\//},(w)=>{if(q.existsSync(w.path))return{path:w.path};return{path:w.path,external:!0}}),$.onResolve({filter:/^\.\.?\//},(w)=>{let G=M(w.importer,w.path);return Z.add(G),{path:G}}),$.onResolve({filter:/^[@~]\//},(w)=>{let G=K.resolve(J,w.path.slice(2)),W=[G,`${G}.ts`,`${G}.tsx`,`${G}.js`,`${G}.mjs`,`${G}.jsx`,K.join(G,"index.ts"),K.join(G,"index.tsx"),K.join(G,"index.js"),K.join(G,"index.mjs")];for(let H of W)if(q.existsSync(H)&&q.statSync(H,{throwIfNoEntry:!1})?.isFile())return L(`resolved ${w.path[0]}/ import:`,w.path,"\u2192",H),Z.add(H),{path:H};return console.warn(`[stx:bundler] could not resolve ${w.path[0]}/ import:`,w.path),{path:G}}),$.onLoad({filter:/\.(?:[cm]?[jt]sx?|json)$/},(w)=>{let G=K.extname(w.path).toLowerCase(),W=G===".json"?"json":G===".tsx"?"tsx":G===".jsx"?"jsx":G===".ts"||G===".mts"||G===".cts"?"ts":"js";if(w.path!==Y)Z.add(w.path);return{contents:q.readFileSync(w.path,"utf8"),loader:W}})}}}var R=new Map,g=Symbol.for("stx.client-bundle-build-queue");function s(J){let z=globalThis,Z=(z[g]??Promise.resolve()).then(J,J);return z[g]=Z.then(()=>{return},()=>{return}),Z}async function Xw(J,z,Y={}){let Z=Y.projectRoot||process.cwd(),M=Y.minify??!1,$=Y.cacheDir||N(Z,"bundle-cache"),w=new Bun.CryptoHasher("md5");w.update(`${l}\x00${J}\x00${z}`);let G=w.digest("hex").slice(0,12),W=K.join($,`${G}.js`),H=K.join($,`${G}.deps.json`),j=Bun.file(W);if(await j.exists()){let V=Bun.file(H),O=!0;if(await V.exists())try{let y=JSON.parse(await V.text());if(y.metadataVersion!==u||!Array.isArray(y.files))O=!1;for(let S of Array.isArray(y.files)?y.files:[])try{if(q.statSync(S.path).mtimeMs!==S.mtimeMs){O=!1;break}}catch{O=!1;break}}catch{O=!1}if(O)return L("cache hit:",G),await j.text();L("cache invalidated by dep change:",G)}let T=R.get(G);if(T)return await T;let x=s(()=>a(J,z,{projectRoot:Z,minify:M,cacheDir:$,hash:G,cachePath:W,depsPath:H}));R.set(G,x);try{return await x}finally{R.delete(G)}}async function a(J,z,Y){let{projectRoot:Z,minify:M,cacheDir:$,hash:w,cachePath:G,depsPath:W}=Y,H=N(Z,"bundle-tmp"),j=K.join(H,`${w}.ts`),T=K.join(H,"out",w);q.mkdirSync(H,{recursive:!0}),q.mkdirSync(T,{recursive:!0});let x=K.dirname(z),V=[],O=/^[ \t]*(export\s+)?(?:const|let|var)\s+(?:\{([^}]+)\}|(\w+))/gm,y=/^[ \t]*(export\s+)?(?:async\s+)?function\s+(\w+)/gm,S;while((S=O.exec(J))!==null){if(S[1])continue;if(S[2])S[2].split(",").forEach((I)=>{let X=e(I);if(X)V.push(X)});else if(S[3])V.push(S[3])}while((S=y.exec(J))!==null){if(S[1])continue;V.push(S[2])}let B=V.length>0?`
3
3
  export { ${V.join(", ")} }`:"";await Bun.write(j,J+B),L("bundling:",w,"from:",K.basename(z));let P=new Set;try{let I=await Bun.build({entrypoints:[j],outdir:T,target:"browser",format:"esm",minify:M,plugins:[t(Z,x,j,P)],define:{"process.env.NODE_ENV":M?'"production"':'"development"',...m()},root:Z});if(!I.success){let C=I.logs.filter((U)=>U.level==="error").map((U)=>U.message).join(", ")||`Unable to bundle ${K.basename(z)}`,A=_(I.logs,z||void 0);if(console.warn("[stx:bundler] build failed:",C),v(z||"",C,A),b()==="error")throw Error(C);return J}let X="";for(let Q of I.outputs){X=await Q.text();break}let k=[];for(let Q of X.matchAll(/^\s*export\s*\{([^}]*)\}\s*;?\s*$/gm))for(let C of Q[1].split(",")){let A=C.trim().match(/^([A-Za-z_$][\w$]*)\s+as\s+([A-Za-z_$][\w$]*)$/);if(A){k.push([A[2],A[1]]);continue}let U=C.trim();if(/^[A-Za-z_$][\w$]*$/.test(U))k.push([U,U])}let c=X.match(/^\s*import\s+[^;]+;?\s*$/gm)||[];X=X.replace(/^\s*import\s+[^;]+;?\s*$/gm,"").replace(/^\s*export\s*\{[^}]*\}\s*;?\s*$/gm,"").replace(/^\s*export\s+default\s+.*$/gm,"").trim();let E=`__stxBundle_${w}`,o=k.map(([Q,C])=>`${JSON.stringify(Q)}: ${C}`).join(", "),n=k.map(([Q])=>`var ${Q} = undefined;`).join(`
4
4
  `),r=k.map(([Q])=>`${Q} = ${E}[${JSON.stringify(Q)}];`).join(`
5
5
  `);if(X=`${c.join(`
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{l as a,m as b,n as c}from"./chunk-q9n5swx7.js";import"./chunk-j4ze77e0.js";export{c as updateContextTree,b as updateContextStoryFiles,a as createContext};
2
+ import{l as a,m as b,n as c}from"./chunk-q9n5swx7.js";import"./chunk-qs0fp63n.js";export{c as updateContextTree,b as updateContextStoryFiles,a as createContext};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{Wi as a,Xi as b,Yi as c}from"./chunk-5w362c8x.js";import"./chunk-ht51fz7w.js";import"./chunk-v2vv4etv.js";import"./chunk-092sm06a.js";import"./chunk-19m7hed6.js";import"./chunk-nhn7qftp.js";import"./chunk-mv2v3g62.js";import"./chunk-b220zqbz.js";import"./chunk-2qkasmq1.js";import"./chunk-1px4xey5.js";import"./chunk-a8fx6wcb.js";import"./chunk-x41v697c.js";import"./chunk-ax56kn66.js";import"./chunk-z2gmz9ew.js";import"./chunk-k26kt6fp.js";import"./chunk-qs0fp63n.js";export{a as listComposableModules,b as getComposableScript,c as clearComposableCache};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
2
  var{defineProperty:e,getOwnPropertyNames:g,getOwnPropertyDescriptor:h}=Object,i=Object.prototype.hasOwnProperty;function j(a){return this[a]}var m=(a)=>{var b=(f??=new WeakMap).get(a),c;if(b)return b;if(b=e({},"__esModule",{value:!0}),a&&typeof a==="object"||typeof a==="function"){for(var d of g(a))if(!i.call(b,d))e(b,d,{get:j.bind(a,d),enumerable:!(c=h(a,d))||c.enumerable})}return f.set(a,b),b},f;var k=(a)=>a;function l(a,b){this[a]=k.bind(null,b)}var n=(a,b)=>{for(var c in b)e(a,c,{get:b[c],enumerable:!0,configurable:!0,set:l.bind(b,c)})};var o=(a,b)=>()=>(a&&(b=a(a=0)),b);var p=import.meta.require;
3
- export{m as Ku,n as Lu,o as Mu,p as Nu};
3
+ export{m as Lu,n as Mu,o as Nu,p as Ou};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{Is as _}from"./chunk-1kg9sz9a.js";import"./chunk-j4ze77e0.js";function W(j,G,H=240){return j.slice(G,G+H)}var v=[{rule:"route-params",pattern:/\blocation\s*\.\s*pathname\s*\.\s*(?:match|split)\s*\(/g,primitive:"useRoute() / useRouteParams() / useRouteParam(name)",why:"parsing the URL by hand re-implements the router and does not update on SPA navigation"},{rule:"alert",pattern:/(?<![.#\w$])(?:(?:window|globalThis)\s*\.\s*)?alert\s*\(/g,primitive:"stxAlert(message)",why:"themed, focus-trapped and non-blocking \u2014 but `await` it if the code after it "+"depended on the native dialog blocking until dismissal",reject:(j)=>/\b(?:async\s+)?function\s+alert\s*\(/.test(j)||/\b(?:const|let|var)\s+alert\s*=/.test(j)},{rule:"search-params",pattern:/new\s+URLSearchParams\s*\(/g,primitive:"useSearchParams()",why:"reactive, and writes back through the router instead of history.replaceState",reject:(j,G)=>{let H=j.indexOf("(",G);if(H===-1)return!0;let Q=j.slice(H+1,j.indexOf(")",H)+1);return!/\b(?:location|search|href|url)\b/i.test(Q)}},{rule:"navigate",pattern:/\blocation\s*\.\s*(?:assign|replace)\s*\(|\blocation\s*\.\s*href\s*=/g,primitive:"navigate(path) / goBack()",why:"a full document load throws away every store and the scroll position; navigate() is an SPA transition",reject:(j,G)=>/^[^\n]*?(?:['"`]\s*)?(?:mailto:|tel:|sms:|https?:\/\/|\/\/)/.test(W(j,G,160))},{rule:"fetch",pattern:/new\s+AbortController\s*\(/g,primitive:"useFetch(url) / useAsyncData(key, fn)",why:"cancellation, loading and error state are already wired; hand-rolling them is where the races live"},{rule:"polling",pattern:/setInterval\s*\(/g,primitive:"useEventSource() / useSSE() / useWebSocket() / useChannel()",why:"polling burns requests and lags; the push primitives are delivered",reject:(j,G)=>!/\bfetch\s*\(|\$fetch\b|useFetch\b|\.get\s*\(|axios\b/.test(W(j,G))},{rule:"debounce",pattern:/\bclearTimeout\s*\(/g,primitive:"useDebounce(fn, ms) / useThrottle(fn, ms)",why:"a hand-held timer handle per call site is the usual source of stale-result bugs",requires:(j)=>/setTimeout\s*\(/.test(j)},{rule:"click-outside",pattern:/document\s*\.\s*addEventListener\s*\(\s*['"](?:click|mousedown|pointerdown)['"]/g,primitive:"useClickOutside(ref, fn)",why:"the document-level listener plus the blur race is exactly what this composable exists to remove"},{rule:"focus",pattern:/\.\s*(?:getElementById|querySelector)\s*\([^)]*\)\s*(?:\?\.)?\s*\.?focus\s*\(/g,primitive:"useFocus(ref) with x-ref",why:"a query by id breaks under nested scopes and SPA navigation; a ref does not"},{rule:"clipboard",pattern:/navigator\s*\.\s*(?:clipboard|share)\b/g,primitive:"useClipboard() / useShare()",why:"permission state, the copied flag and the unsupported-browser fallback are already handled"},{rule:"watch",pattern:/\beffect\s*\(\s*\(\s*\)\s*=>\s*\{[^}]*\bvoid\s+\w+\s*\(\s*\)/g,primitive:"watch(source, cb) / watchMultiple([...], cb)",why:"the `void a(); void b()` dance is a manual dependency list; watch takes one directly"}],U=["confirm","tooltip",...v.map((j)=>j.rule)];function N(j,G){let H=1;for(let Q=0;Q<G;Q++)if(j[Q]===`
2
+ import{Js as _}from"./chunk-mv2v3g62.js";import"./chunk-qs0fp63n.js";function W(j,G,H=240){return j.slice(G,G+H)}var v=[{rule:"route-params",pattern:/\blocation\s*\.\s*pathname\s*\.\s*(?:match|split)\s*\(/g,primitive:"useRoute() / useRouteParams() / useRouteParam(name)",why:"parsing the URL by hand re-implements the router and does not update on SPA navigation"},{rule:"alert",pattern:/(?<![.#\w$])(?:(?:window|globalThis)\s*\.\s*)?alert\s*\(/g,primitive:"stxAlert(message)",why:"themed, focus-trapped and non-blocking \u2014 but `await` it if the code after it "+"depended on the native dialog blocking until dismissal",reject:(j)=>/\b(?:async\s+)?function\s+alert\s*\(/.test(j)||/\b(?:const|let|var)\s+alert\s*=/.test(j)},{rule:"search-params",pattern:/new\s+URLSearchParams\s*\(/g,primitive:"useSearchParams()",why:"reactive, and writes back through the router instead of history.replaceState",reject:(j,G)=>{let H=j.indexOf("(",G);if(H===-1)return!0;let Q=j.slice(H+1,j.indexOf(")",H)+1);return!/\b(?:location|search|href|url)\b/i.test(Q)}},{rule:"navigate",pattern:/\blocation\s*\.\s*(?:assign|replace)\s*\(|\blocation\s*\.\s*href\s*=/g,primitive:"navigate(path) / goBack()",why:"a full document load throws away every store and the scroll position; navigate() is an SPA transition",reject:(j,G)=>/^[^\n]*?(?:['"`]\s*)?(?:mailto:|tel:|sms:|https?:\/\/|\/\/)/.test(W(j,G,160))},{rule:"fetch",pattern:/new\s+AbortController\s*\(/g,primitive:"useFetch(url) / useAsyncData(key, fn)",why:"cancellation, loading and error state are already wired; hand-rolling them is where the races live"},{rule:"polling",pattern:/setInterval\s*\(/g,primitive:"useEventSource() / useSSE() / useWebSocket() / useChannel()",why:"polling burns requests and lags; the push primitives are delivered",reject:(j,G)=>!/\bfetch\s*\(|\$fetch\b|useFetch\b|\.get\s*\(|axios\b/.test(W(j,G))},{rule:"debounce",pattern:/\bclearTimeout\s*\(/g,primitive:"useDebounce(fn, ms) / useThrottle(fn, ms)",why:"a hand-held timer handle per call site is the usual source of stale-result bugs",requires:(j)=>/setTimeout\s*\(/.test(j)},{rule:"click-outside",pattern:/document\s*\.\s*addEventListener\s*\(\s*['"](?:click|mousedown|pointerdown)['"]/g,primitive:"useClickOutside(ref, fn)",why:"the document-level listener plus the blur race is exactly what this composable exists to remove"},{rule:"focus",pattern:/\.\s*(?:getElementById|querySelector)\s*\([^)]*\)\s*(?:\?\.)?\s*\.?focus\s*\(/g,primitive:"useFocus(ref) with x-ref",why:"a query by id breaks under nested scopes and SPA navigation; a ref does not"},{rule:"clipboard",pattern:/navigator\s*\.\s*(?:clipboard|share)\b/g,primitive:"useClipboard() / useShare()",why:"permission state, the copied flag and the unsupported-browser fallback are already handled"},{rule:"watch",pattern:/\beffect\s*\(\s*\(\s*\)\s*=>\s*\{[^}]*\bvoid\s+\w+\s*\(\s*\)/g,primitive:"watch(source, cb) / watchMultiple([...], cb)",why:"the `void a(); void b()` dance is a manual dependency list; watch takes one directly"}],U=["confirm","tooltip",...v.map((j)=>j.rule)];function N(j,G){let H=1;for(let Q=0;Q<G;Q++)if(j[Q]===`
3
3
  `)H++;return H}function P(j,G){let H=j.lastIndexOf(`
4
4
  `,G)+1,Q=j.indexOf(`
5
5
  `,G);return j.slice(H,Q===-1?j.length:Q).trim().slice(0,120)}function q(j,G){let H=j.slice(0,G),Q=H.lastIndexOf("function"),X=H.lastIndexOf("=>"),M=Math.max(Q,X);if(M===-1)return!1;let z=j.slice(Math.max(0,M-120),M);return/\basync\b[^;{}]*$/.test(z)}function L(j){return/\b(?:async\s+)?function\s+confirm\s*\(/.test(j)||/\b(?:const|let|var)\s+confirm\s*=/.test(j)||/\bimport\s*\{[^}]*\bconfirm\b[^}]*\}/.test(j)}function O(j,G,H){if(L(j))return j;let Q=/(^|[^\w$.])(?:(?:window|globalThis)\s*\.\s*)?confirm\s*\(/g,X=F(j),M="",z=0,Y;while((Y=Q.exec(X))!==null){let Z=Y.index+Y[1].length,$=N(j,Z),J=P(j,Z);if(/stxConfirm\s*\($/.test(j.slice(0,Z+8)))continue;let D=q(j,Z);if(H.push({file:G,line:$,rule:"confirm",applied:D,snippet:J,reason:D?void 0:"stxConfirm() returns a Promise and native confirm() is synchronous, so this needs `await` inside an async function. Rewriting it here would make the condition always true."}),D)M+=j.slice(z,Z)+"await stxConfirm(",z=Z+(Y[0].length-Y[1].length)}return M+j.slice(z)}function w(j,G,H){let Q=/(<[a-z][\w-]*\b[^>]*?)\stitle=(["'])(.*?)\2/gis,X=C(j),M="",z=0,Y;while((Y=Q.exec(X))!==null){let[Z,$,J,D]=Y,K=N(j,Y.index),B=P(j,Y.index),V=$.match(/^<([A-Za-z][\w-]*)/)?.[1]??"";if(/^[A-Z]/.test(V)){H.push({file:G,line:K,rule:"tooltip",applied:!1,snippet:B,reason:`\`title\` on <${V}> is a component prop, not an HTML attribute \u2014 `+"adding x-tooltip here would put a tooltip on a component and may duplicate text it already renders."});continue}if(/\bx-tooltip[=\s]/.test($)||D.trim()===""){H.push({file:G,line:K,rule:"tooltip",applied:!1,snippet:B,reason:/\bx-tooltip[=\s]/.test($)?"already has x-tooltip":"empty title"});continue}H.push({file:G,line:K,rule:"tooltip",applied:!0,snippet:B}),M+=j.slice(z,Y.index)+`${$} x-tooltip=${J}${D}${J} title=${J}${D}${J}`,z=Y.index+Z.length}return M+j.slice(z)}function C(j){return j.replace(/<!--[\s\S]*?-->/g,(G)=>G.replace(/[^\n]/g," ")).replace(/\{\{--[\s\S]*?--\}\}/g,(G)=>G.replace(/[^\n]/g," "))}function E(j){let G=(H)=>H.replace(/[^\n]/g," ");return j.replace(/\/\*[\s\S]*?\*\//g,G).replace(/\/\/[^\n]*/g,G)}function F(j,G=!1){let H=C(j);return(G?E(H):_(H)).replace(/<script\b([^>]*)>([\s\S]*?)<\/script\s*>/gi,(X,M)=>/\bclient\b/i.test(M)?X:X.replace(/[^\n]/g," "))}function S(j,G,H,Q){let X=F(j),M=F(j,!0);for(let z of v){if(!H.includes(z.rule))continue;if(z.requires&&!z.requires(j))continue;z.pattern.lastIndex=0;let Y,Z=/['"]/.test(z.pattern.source)?M:X;z.pattern.lastIndex=0;while((Y=z.pattern.exec(Z))!==null){if(z.reject?.(j,Y.index))continue;Q.push({file:G,line:N(j,Y.index),rule:z.rule,applied:!1,snippet:P(j,Y.index),reason:`${z.primitive} \u2014 ${z.why}`})}}}function k(j,G={}){let H=G.rules??U,Q=G.file??"<source>",X=[];S(j,Q,H,X);let M=j;if(H.includes("confirm"))M=O(M,Q,X);if(H.includes("tooltip"))M=w(M,Q,X);X.sort((Z,$)=>Z.line-$.line);let z=new Set,Y=X.filter((Z)=>{let $=`${Z.rule}:${Z.line}`;if(z.has($))return!1;return z.add($),!0});return{code:M,findings:Y}}var I=new Set(["confirm","tooltip"]);function A(j,G){if(j.length===0)return"No hand-rolled equivalents found.";let H=j.filter((z)=>z.applied),Q=j.filter((z)=>!z.applied&&I.has(z.rule)),X=j.filter((z)=>!z.applied&&!I.has(z.rule)),M=[];if(H.length>0){M.push(G?`Rewrote ${H.length} site(s):`:`Would rewrite ${H.length} site(s) (pass --fix):`);for(let z of H)M.push(` ${z.file}:${z.line} [${z.rule}] ${z.snippet}`)}if(Q.length>0){M.push("",`Needs a human \u2014 ${Q.length} site(s):`);for(let z of Q)M.push(` ${z.file}:${z.line} [${z.rule}] ${z.snippet}
@@ -0,0 +1,22 @@
1
+ // @bun
2
+ import{Ul as C}from"./chunk-v2vv4etv.js";import{Js as Y}from"./chunk-mv2v3g62.js";import{Dt as D}from"./chunk-ax56kn66.js";import u from"path";var g=/<script(\s[^>]*)?>([\s\S]*?)<\/script>/gi;function h(K){let J=(Z)=>Z.replace(/[^\n]/g," ");return K.replace(/<!--[\s\S]*?-->/g,J).replace(/\{\{--[\s\S]*?--\}\}/g,J)}function p(K){let J=[],Z=h(K);g.lastIndex=0;let $;while(($=g.exec(Z))!==null){let j=($[1]||"").trim(),F=($[0].match(/^<script(?:\s[^>]*)?>/i)?.[0]??"<script>").length,z=($[0].match(/<\/script\s*>$/i)?.[0]??"</script>").length,W=$.index+F,Q=$.index+$[0].length-z,U=K.slice(W,Q);if(/\bsrc\s*=/.test(j))continue;let q=j.match(/\btype\s*=\s*["']([^"']+)["']/i);if(q&&!/^(?:module|text\/(?:javascript|typescript))$/i.test(q[1]))continue;let X=/\bserver\b/.test(j)?"server":/\bclient\b/.test(j)?"client":"plain",G=B(K,W);J.push({kind:X,code:U,startLine:G,attrs:j})}return J}function B(K,J){let Z=1;for(let $=0;$<J&&$<K.length;$++)if(K.charCodeAt($)===10)Z++;return Z}function N(K,J){let Z=K.lastIndexOf(`
3
+ `,J-1)+1;return J-Z+1}function P(K){let J=K.split(""),Z=(j,F)=>{for(let z=j;z<F&&z<J.length;z++)if(J[z]!==`
4
+ `)J[z]=" "},$=[/<script(?:\s[^>]*)?>[\s\S]*?<\/script>/gi,/<style(?:\s[^>]*)?>[\s\S]*?<\/style>/gi,/<!--[\s\S]*?-->/g,/\{\{--[\s\S]*?--\}\}/g,/@verbatim\b[\s\S]*?@endverbatim\b/g];for(let j of $){j.lastIndex=0;let F;while((F=j.exec(K))!==null)Z(F.index,F.index+F[0].length)}return J.join("")}function m(K){let J=0,Z="";for(let $=0;$<K.length;$++){let j=K[$];if(Z){if(j==="\\"){$++;continue}if(j===Z)Z="";continue}if(j==='"'||j==="'"||j==="`"){Z=j;continue}if(j==="("||j==="["||j==="{"){J++;continue}if(j===")"||j==="]"||j==="}"){J--;continue}if(j==="|"&&J===0){if(K[$+1]==="|"){$++;continue}if(K[$-1]==="|")continue;return K.slice(0,$)}}return K}var R=new Set([":for","x-for","v-for"]),w=/(?:^|\s)((?::|x-|v-|@)[\w.:-]+)\s*=\s*(["'])([\s\S]*?)\2/g,O="__stx_interpolated",S="__StxElement",f="__StxTemplateValue",l=`type ${f}<T> = T extends { readonly _isSignal: true } | { readonly _isDerived: true } ? (T extends () => infer V ? T & V : T) : T`;function L(K){return K.replace(/\{\{[\s\S]*?\}\}/g,O).replace(/\{!![\s\S]*?!!\}/g,O)}function Vj(K){return K.replace(/\{\{[\s\S]*?\}\}|\{!![\s\S]*?!!\}/g,(J)=>{let Z=J.split(`
5
+ `).length-1,$=J.length-Z;return`0${" ".repeat(Math.max(0,$-1))}${`
6
+ `.repeat(Z)}`})}var d=["foreach","endforeach","forelse","endforelse","for","endfor","while","endwhile","empty","if","elseif","else","endif","unless","endunless","isset","endisset","switch","case","default","endswitch","auth","endauth","guest","endguest","env","endenv","once","endonce","break","continue"],i=new RegExp(String.raw`^[ \t]*@(?:${d.join("|")})\b[ \t]*(\([^\n)]*\))?[ \t]*$`,"gm");function Yj(K){return K.replace(i,(J)=>J.replace(/[^\n]/g," "))}var I=new Set(["x-cloak","x-ref","x-transition","x-teleport","v-slot","x-hydrate",":key","x-tooltip","x-tooltip-position"]);function c(K){let J=P(K),Z=[],$=/(@?)\{\{([\s\S]*?)\}\}|(@?)\{!!([\s\S]*?)!!\}/g,j;while((j=$.exec(J))!==null){if(j[1]||j[3])continue;let z=j[2]??j[4]??"",W=j[2]!==void 0?2:3,Q=m(z);if(!Q.trim())continue;let U=j.index+W+(Q.length-Q.trimStart().length);Z.push({code:Q.trim(),line:B(J,U),column:N(J,U),offset:U,kind:"interpolation"})}w.lastIndex=0;while((j=w.exec(J))!==null){let F=j[1],z=j[3]??"",W=F.replace(/\..*$/,"").replace(/^([^:].*?):.*$/,"$1");if(I.has(W)||I.has(F))continue;if(!z.trim())continue;let Q=j.index+j[0].indexOf(j[2],j[0].indexOf(F)+F.length)+1;if(R.has(W)){let q=z.match(/\s+(?:in|of)\s+/);if(!q||q.index===void 0)continue;let X=z.slice(q.index+q[0].length),G=q.index+q[0].length+(X.length-X.trimStart().length);Z.push({code:L(X.trim()),line:B(J,Q+G),column:N(J,Q+G),offset:Q+G,kind:"directive",attribute:W});continue}let U=z.length-z.trimStart().length;Z.push({code:L(z.trim()),line:B(J,Q+U),column:N(J,Q+U),offset:Q+U,kind:"directive",attribute:W})}return Z.sort((F,z)=>F.line-z.line||F.column-z.column),Z}var o=2000;function r(K,J){let Z=0,$=Math.min(K.length,J+o);for(let j=J;j<$;j++){let F=K[j];if(F==="(")Z++;else if(F===")"){if(Z--,Z===0)return K.slice(J+1,j)}}return null}function n(K){let J=new Map,Z=(W,Q)=>{let U=W.split(/[,[\]{}()\s]+/).filter(Boolean);for(let q of U){let X=q.replace(/^\.\.\./,"").trim();if(!/^\$?[A-Z_$][\w$]*$/i.test(X))continue;let G=U.length===1?Q:void 0,H=J.get(X);if(!H)J.set(X,{name:X,iterable:G});else if(H.iterable!==G)H.iterable=void 0}},$=/^\$?[A-Z_$][\w$]*$/i,j=(W)=>{let Q=W.trim();return $.test(Q)?Q:void 0};for(let W of K.matchAll(/@for(?:each|else)\s*\(/g)){let Q=r(K,W.index+W[0].length-1);if(Q===null)continue;let U=Q.match(/^([\s\S]*?)\bas\b([\s\S]*)$/);if(!U)continue;Z(U[2].replace(/=>/g," "),j(U[1]))}for(let W of K.matchAll(/@for\s*\(\s*(?:let|const|var)\s+([\w$]+)/g))Z(W[1]);let F=P(K);w.lastIndex=0;let z;while((z=w.exec(F))!==null){let W=z[1].replace(/\..*$/,"");if(!R.has(W))continue;let Q=z[3].match(/\s+(?:in|of)\s+/);if(!Q||Q.index===void 0)continue;Z(z[3].slice(0,Q.index),j(z[3].slice(Q.index+Q[0].length)))}for(let W of K.matchAll(/@(?:php|js|ts)\b([\s\S]*?)@end(?:php|js|ts)\b/g))for(let Q of W[1].matchAll(/\b(?:const|let|var|function|class)\s+([\w$]+)/g))Z(Q[1]);return[...J.values()].sort((W,Q)=>W.name.localeCompare(Q.name))}function V(K){let J=new Set;for(let Z of K.matchAll(/^\s*(?:export\s+)?(?:const|let|var)\s+([\w$]+)/gm))J.add(Z[1]);for(let Z of K.matchAll(/^\s*(?:export\s+)?(?:async\s+)?function\s*\*?\s*([\w$]+)/gm))J.add(Z[1]);for(let Z of K.matchAll(/^\s*(?:export\s+)?class\s+([\w$]+)/gm))J.add(Z[1]);for(let Z of K.matchAll(/^\s*(?:export\s+)?(?:const|let|var)\s*[[{]([^\]}]*)[\]}]/gm))for(let $ of Z[1].split(",")){let j=$.split(":").pop().split("=")[0].replace(/^\.\.\./,"").trim();if(/^[A-Z_$][\w$]*$/i.test(j))J.add(j)}return[...J].sort()}function a(){return["declare var window: any",...D.map((K)=>`declare var ${K}: any`)].join(`
7
+ `)}var s=["params","query","cookies","host","ip","setResponseStatus","setResponseHeader","notFound","request","url","definePageMeta","defineClientPayload","defineStore","props","$props"];function t(){return s.map((K)=>`declare var ${K}: any`).join(`
8
+ `)}function T(K){let J=/\bdefineClientPayload\s*\(\s*\{([\s\S]*?)\}\s*\)/g,Z,$=!1,j=new Set,F=Y(K);while((Z=J.exec(F))!==null){$=!0;for(let z of e(Z[1])){let W=z.split(":")[0].trim();if(/^[A-Za-z_$][\w$]*$/.test(W))j.add(W)}}return $?[...j]:null}function e(K){let J=[],Z=0,$="";for(let j of K){if(j===","&&Z===0){J.push($),$="";continue}if(j==="("||j==="["||j==="{")Z++;else if(j===")"||j==="]"||j==="}")Z--;$+=j}return J.push($),J.filter((j)=>j.trim().length>0)}function jj(K){let J=/^[ \t]*import\b[\s\S]*?(?:from\s*['"][^'"]*['"]|['"][^'"]*['"])[ \t]*;?[ \t]*$/gm,Z=[],$=K.replace(J,(j)=>{return Z.push(j.trim()),j.split(`
9
+ `).map(()=>"").join(`
10
+ `)});return{imports:Z.join(`
11
+ `),body:$}}function x(K){let J=Y(K),Z=Array(J.length),$=0;for(let W=0;W<J.length;W++){let Q=J[W];if(Q==="}"||Q===")"||Q==="]")$=Math.max(0,$-1);if(Z[W]=$,Q==="{"||Q==="("||Q==="[")$++}let j=[],F=/^[ \t]*(?:export[ \t]+)?(interface|type)[ \t]+([A-Za-z_$][\w$]*)/gm,z;while((z=F.exec(J))!==null){if(Z[z.index]!==0)continue;let W=z[1],Q=z[2],U;if(W==="interface"){let q=J.indexOf("{",z.index);if(q===-1)continue;let X=0;U=-1;for(let G=q;G<J.length;G++)if(J[G]==="{")X++;else if(J[G]==="}"&&--X===0){U=G+1;break}if(U===-1)continue}else{let q=0;U=J.length;for(let X=J.indexOf("=",z.index)+1;X<J.length;X++){let G=J[X];if(G==="{"||G==="["||G==="("||G==="<")q++;else if(G==="}"||G==="]"||G===")"||G===">")q--;else if(q<=0&&(G===";"||G===`
12
+ `&&!/[=|&,<([{]\s*$/.test(J.slice(Math.max(0,X-40),X)))){U=G===";"?X+1:X;break}}}j.push({name:Q,text:K.slice(z.index,U).replace(/^[ \t]*export[ \t]+/,"")}),F.lastIndex=U}return j}function Jj(K){return new Set(x(K).map((J)=>J.name))}function Bj(K,J=""){let Z=T(K),$=Jj(J),j=x(K).filter((U)=>!$.has(U.name)).map((U)=>U.text);if(!Z){let U=V(K);if(U.length===0&&j.length===0)return"";return["",`// ${Qj}`,...j,...U.map((q)=>`declare var ${q}: any`)].join(`
13
+ `)}if(Z.length===0)return j.length>0?["",`// ${k}`,...j].join(`
14
+ `):"";let{imports:F,body:z}=jj(K),W=z.replace(/^[ \t]*export[ \t]+(?=(?:const|let|var|function|async|class)\b)/gm,""),Q=["",`// ${k}`];if(F)Q.push(F);return Q.push(...j),Q.push(`async function ${A}() {`,W,` return { ${Z.join(", ")} }`,"}",`type ${_} = Awaited<ReturnType<typeof ${A}>>`,...Z.map((U)=>`declare var ${U}: ${_}[${JSON.stringify(U)}]`)),Q.join(`
15
+ `)}function Kj(K){let Z=Y(K).split(""),$=0;for(let j=0;j<Z.length;j++){let F=Z[j];if(F==="{"||F==="("||F==="["){$++;continue}if(F==="}"||F===")"||F==="]"){$=Math.max(0,$-1);continue}if($>0&&F!==`
16
+ `)Z[j]=" "}return V(Z.join(""))}function wj(K,J){if(T(K)!==null)return[];let Z=Y(J),$=new Set(D);return Kj(K).filter((j)=>{if($.has(j))return!1;if(V(J).includes(j))return!1;return new RegExp(`(?<![.#\\w$])${j}(?![\\w$])`).test(Z)})}var k="stx: types for the declared client payload (#1868)",Qj="stx: untyped bridge names \u2014 declare a defineClientPayload to check these (#1868)",A="__stxServerScope",_="__StxClientPayload";var Zj=["$env","$user","$slot","$slots","$attrs","$props","$page","$route","$loop","loop","$errors","$csrf","props","slot"];var $j=/^\s*[A-Z_$][\w$]*\s*=[^=]/i;function zj(K,J){let Z=/@(if|unless|elseif|else|endif|endunless)\b\s*(\()?/g,$=[],j;while((j=Z.exec(K))!==null){if(j.index>=J)break;let F=j[1];if(F==="endif"||F==="endunless"){$.pop();continue}let z="";if(j[2]==="("){let W=0,Q=j.index+j[0].length-1,U=Q+1;for(;Q<K.length;Q++){let q=K[Q];if(q==="(")W++;else if(q===")"){if(W--,W===0)break}}z=K.slice(U,Q).trim(),Z.lastIndex=Q+1}if(F==="if")$.push({conditions:[z]});else if(F==="unless")$.push({conditions:[`!(${z})`]});else if(F==="elseif"||F==="else"){let W=$[$.length-1];if(!W)continue;let Q=W.conditions.map((U)=>`!(${U})`);W.conditions=F==="elseif"?[...Q,z]:Q}}return $.flatMap((F)=>F.conditions).filter(Boolean)}function Wj(K){let J=K.code.trim();if(!J)return null;if(K.attribute?.startsWith("@")){if($j.test(J))return null;let $=";(($event: any): void => { ";return{text:`${$}${J} });`,prefixLength:$.length}}let Z=";void ((";return{text:`${Z}${J}));`,prefixLength:Z.length}}var Fj=/(\bfrom\s*|\bimport\s*\(\s*|\bimport\s+)(['"])(\.{1,2}\/[^'"\n]*)\2/g;function Uj(K,J){if(!J)return K;return K.replace(Fj,(Z,$,j,F)=>{let z=u.resolve(J,F).replace(/\\/g,"/");return`${$}${j}${z}${j}`})}function Mj(K,J={}){let Z=p(K),$=K.split(`
17
+ `),j=Array.from({length:$.length},()=>""),F=new Map;for(let W of Z)Uj(W.code,J.originDir??"").split(`
18
+ `).forEach((U,q)=>{let X=W.startLine-1+q;if(X<j.length)j[X]=U});let z=(W,Q)=>{if(j.push(W),Q)F.set(j.length,Q)};if(J.globals!==!1){if(z(""),J.runtimeGlobals!==!1)for(let Q of a().split(`
19
+ `))z(Q);for(let Q of t().split(`
20
+ `))z(Q);for(let Q of C)z(`declare var ${Q}: any`);for(let Q of Zj)z(`declare var ${Q}: any`);z(`declare var ${O}: any`);let W=new Set(Z.flatMap((Q)=>V(Q.code)));z(`type ${S}<T> = T extends readonly (infer E)[] ? E : T extends Iterable<infer E2> ? E2 : any`);for(let Q of n(K)){if(W.has(Q.name))continue;let U=Q.iterable&&W.has(Q.iterable)?`${S}<typeof ${Q.iterable}>`:"any";z(`declare var ${Q.name}: ${U}`)}}if(J.templateExpressions!==!1){let W=c(K).map((Q)=>({expression:Q,statement:Wj(Q)})).filter((Q)=>Q.statement!==null);if(W.length>0){let Q=P(K),q=[...new Set(Z.flatMap((G)=>V(G.code)))].filter((G)=>/^[A-Z_$][\w$]*$/i.test(G)),X=0;if(q.length>0){z(l);for(let G of q)z(`type __StxT_${G} = ${f}<typeof ${G}>`);z(`;((${q.map((G)=>`${G}: __StxT_${G}`).join(", ")}) => {`),X=1}for(let{expression:G,statement:H}of W){let v=" ".repeat(X),M=G.offset===void 0?[]:zj(Q,G.offset),y=M.length>0?`${M.map((b)=>`if (${b}) `).join("")}{ `:"",E=M.length>0?" }":"";z(v+y+H.text+E,{line:G.line,column:G.column,expression:G,prefixLength:H.prefixLength+v.length+y.length})}if(X>0)z("});")}}return z("export {}"),{text:j.join(`
21
+ `),lineMap:F,sourceLineCount:$.length}}function Nj(K,J,Z){let $=K.lineMap.get(J);if(!$)return J<=K.sourceLineCount?{line:J,column:Z}:null;let j=Math.max(0,Z-1-($.prefixLength??0));return{line:$.line,column:$.column+j,expression:$.expression}}
22
+ export{p as Mf,Vj as Nf,Yj as Of,c as Pf,V as Qf,t as Rf,Bj as Sf,wj as Tf,Uj as Uf,Mj as Vf,Nj as Wf};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{aj as a}from"./chunk-fvjh7rx0.js";import"./chunk-qs0fp63n.js";export{a as processDeferDirectives};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{$r as a,as as b,bs as c,cs as d,ds as e,es as f}from"./chunk-v2vv4etv.js";import"./chunk-092sm06a.js";import"./chunk-19m7hed6.js";import"./chunk-nhn7qftp.js";import"./chunk-mv2v3g62.js";import"./chunk-b220zqbz.js";import"./chunk-2qkasmq1.js";import"./chunk-1px4xey5.js";import"./chunk-a8fx6wcb.js";import"./chunk-x41v697c.js";import"./chunk-ax56kn66.js";import"./chunk-z2gmz9ew.js";import"./chunk-k26kt6fp.js";import"./chunk-qs0fp63n.js";export{f as validateConfig,b as resolveStxDirectories,c as loadStxConfig,e as defineStxConfig,a as defaultConfig,d as config};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{vg as a}from"./chunk-d6aa7ghq.js";import"./chunk-2fj2ah1z.js";import"./chunk-v2vv4etv.js";import"./chunk-092sm06a.js";import"./chunk-19m7hed6.js";import"./chunk-nhn7qftp.js";import"./chunk-mv2v3g62.js";import"./chunk-b220zqbz.js";import"./chunk-2qkasmq1.js";import"./chunk-1px4xey5.js";import"./chunk-a8fx6wcb.js";import"./chunk-x41v697c.js";import"./chunk-ax56kn66.js";import"./chunk-z2gmz9ew.js";import"./chunk-k26kt6fp.js";import"./chunk-qs0fp63n.js";export{a as startProductionServer};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{Jh as a,Kh as b,Lh as c,Mh as d,Nh as e,Oh as f,Ph as g,Qh as h,Rh as i}from"./chunk-wdwf3wzg.js";import"./chunk-j93x5fzs.js";import"./chunk-j4ze77e0.js";export{c as setCachedImageResult,e as processImage,f as optimizeImage,b as getCachedImageResult,i as generateSrcset,h as generateResponsiveVariants,d as clearImageCache,g as applyTransformations,a as ImageProcessorCache};
2
+ import{Jh as a,Kh as b,Lh as c,Mh as d,Nh as e,Oh as f,Ph as g,Qh as h,Rh as i}from"./chunk-78bpc81t.js";import"./chunk-j93x5fzs.js";import"./chunk-qs0fp63n.js";export{c as setCachedImageResult,e as processImage,f as optimizeImage,b as getCachedImageResult,i as generateSrcset,h as generateResponsiveVariants,d as clearImageCache,g as applyTransformations,a as ImageProcessorCache};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{dh as L,eh as w,fh as x,gh as p,hh as F,ih as T,lh as I,mh as f,nh as l,oh as n,ph as i,qh as P,rh as o,sh as a}from"./chunk-k46js7bz.js";import{As as ZG}from"./chunk-hk8j3eps.js";function HG(X,Z={}){let{src:G,alt:J,width:q,height:$,sizes:K="100vw",loading:Q="lazy",priority:Y=!1,quality:M=x,placeholder:N="none",formats:j=w,widths:C=L,decoding:B="async",fetchpriority:V,objectFit:O,objectPosition:W}=X,H=X.class,z=X.style,{processedImage:R,variants:_,optimize:E=!0,isDev:S=!1}=Z;if(_&&_.length>0)return OG(X,_,R);if(S||!E)return MG(X);return VG(X)}function OG(X,Z,G){let{src:J,alt:q,width:$,height:K,sizes:Q="100vw",loading:Y="lazy",priority:M=!1,decoding:N="async",fetchpriority:j,objectFit:C,objectPosition:B,placeholder:V="none"}=X,O=X.class,W=X.style,H=n(Z),z=l(Z),R=typeof Q==="object"?f(Q):Q,_=G?G.aspectRatio:$&&K?Number($)/Number(K):void 0,E=[];if(_)E.push(`aspect-ratio: ${_}`);if(C)E.push(`object-fit: ${C}`);if(B)E.push(`object-position: ${B}`);if(W)E.push(W);let S=E.length>0?` style="${E.join("; ")}"`:"",b=O?` class="${O}"`:"",u=M?"":` loading="${Y}"`,d=` decoding="${N}"`,h=j?` fetchpriority="${j}"`:M?' fetchpriority="high"':"",r=["avif","webp","jpeg","png"],s=[];for(let U of r){let D=H.get(U);if(D&&D.length>0){let m=I(D),QG=P(U);s.push(` <source type="${QG}" srcset="${m}" sizes="${R}" />`)}}let e="",t="",g;if(V!=="none"&&G?.placeholder){let U=`img-${Math.random().toString(36).slice(2,8)}`;if(e=`<div class="stx-image-wrapper" id="${U}">`,t="</div>",V==="blur")g=`
2
+ import{dh as L,eh as w,fh as x,gh as p,hh as F,ih as T,lh as I,mh as f,nh as l,oh as n,ph as i,qh as P,rh as o,sh as a}from"./chunk-9228drk4.js";import{Bs as ZG}from"./chunk-19m7hed6.js";function HG(X,Z={}){let{src:G,alt:J,width:q,height:$,sizes:K="100vw",loading:Q="lazy",priority:Y=!1,quality:M=x,placeholder:N="none",formats:j=w,widths:C=L,decoding:B="async",fetchpriority:V,objectFit:O,objectPosition:W}=X,H=X.class,z=X.style,{processedImage:R,variants:_,optimize:E=!0,isDev:S=!1}=Z;if(_&&_.length>0)return OG(X,_,R);if(S||!E)return MG(X);return VG(X)}function OG(X,Z,G){let{src:J,alt:q,width:$,height:K,sizes:Q="100vw",loading:Y="lazy",priority:M=!1,decoding:N="async",fetchpriority:j,objectFit:C,objectPosition:B,placeholder:V="none"}=X,O=X.class,W=X.style,H=n(Z),z=l(Z),R=typeof Q==="object"?f(Q):Q,_=G?G.aspectRatio:$&&K?Number($)/Number(K):void 0,E=[];if(_)E.push(`aspect-ratio: ${_}`);if(C)E.push(`object-fit: ${C}`);if(B)E.push(`object-position: ${B}`);if(W)E.push(W);let S=E.length>0?` style="${E.join("; ")}"`:"",b=O?` class="${O}"`:"",u=M?"":` loading="${Y}"`,d=` decoding="${N}"`,h=j?` fetchpriority="${j}"`:M?' fetchpriority="high"':"",r=["avif","webp","jpeg","png"],s=[];for(let U of r){let D=H.get(U);if(D&&D.length>0){let m=I(D),QG=P(U);s.push(` <source type="${QG}" srcset="${m}" sizes="${R}" />`)}}let e="",t="",g;if(V!=="none"&&G?.placeholder){let U=`img-${Math.random().toString(36).slice(2,8)}`;if(e=`<div class="stx-image-wrapper" id="${U}">`,t="</div>",V==="blur")g=`
3
3
  #${U} {
4
4
  position: relative;
5
5
  background-image: url('${G.placeholder}');
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{$k as c,Zk as a,_k as b,al as d,bl as e,cl as f,dl as g,el as h,fl as i}from"./chunk-phj11c6x.js";import"./chunk-r84h7wxw.js";import"./chunk-v2vv4etv.js";import"./chunk-092sm06a.js";import"./chunk-19m7hed6.js";import"./chunk-nhn7qftp.js";import"./chunk-mv2v3g62.js";import"./chunk-b220zqbz.js";import"./chunk-2qkasmq1.js";import"./chunk-1px4xey5.js";import"./chunk-a8fx6wcb.js";import"./chunk-x41v697c.js";import"./chunk-ax56kn66.js";import"./chunk-z2gmz9ew.js";import"./chunk-k26kt6fp.js";import"./chunk-qs0fp63n.js";export{a as shouldLogBundlerDiagnostics,e as setBundlerFallbackMode,f as resolveBundlerFallback,b as recordBundleFailure,h as queueClientBundleBuild,g as hasUserImports,c as getBundleFailures,d as clearBundleFailures,i as bundleClientScript};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{dj as a,ej as b,fj as c,gj as d,hj as e,ij as f,jj as g,kj as h,lj as i,mj as j,nj as k,oj as l,pj as m,qj as n}from"./chunk-fee1k8c5.js";import"./chunk-spnkgsft.js";import"./chunk-4awxsp8f.js";import"./chunk-hk8j3eps.js";import"./chunk-mxva4zmq.js";import"./chunk-1kg9sz9a.js";import"./chunk-nnd1hqht.js";import"./chunk-msxcd1kp.js";import"./chunk-xgtcq9bj.js";import"./chunk-2fspj91j.js";import"./chunk-evv58hf5.js";import"./chunk-5a1b5kjt.js";import"./chunk-r2kag877.js";import"./chunk-8p8qa1s9.js";import"./chunk-j4ze77e0.js";export{i as streamingSuspenseDirective,m as streamToResponse,g as streamTemplateSimple,a as streamTemplate,d as renderStreamingPage,k as registerStreamingDirectives,e as processStreamDirectives,l as processSectionDirectives,j as islandDirective,n as generateHydrationRuntime,f as extractStreamBoundaries,h as createStreamRenderer,b as buildSuspenseResolveScript,c as SUSPENSE_RESOLVER_RUNTIME};
2
+ import{dj as a,ej as b,fj as c,gj as d,hj as e,ij as f,jj as g,kj as h,lj as i,mj as j,nj as k,oj as l,pj as m,qj as n}from"./chunk-etx5vb1n.js";import"./chunk-v2vv4etv.js";import"./chunk-092sm06a.js";import"./chunk-19m7hed6.js";import"./chunk-nhn7qftp.js";import"./chunk-mv2v3g62.js";import"./chunk-b220zqbz.js";import"./chunk-2qkasmq1.js";import"./chunk-1px4xey5.js";import"./chunk-a8fx6wcb.js";import"./chunk-x41v697c.js";import"./chunk-ax56kn66.js";import"./chunk-z2gmz9ew.js";import"./chunk-k26kt6fp.js";import"./chunk-qs0fp63n.js";export{i as streamingSuspenseDirective,m as streamToResponse,g as streamTemplateSimple,a as streamTemplate,d as renderStreamingPage,k as registerStreamingDirectives,e as processStreamDirectives,l as processSectionDirectives,j as islandDirective,n as generateHydrationRuntime,f as extractStreamBoundaries,h as createStreamRenderer,b as buildSuspenseResolveScript,c as SUSPENSE_RESOLVER_RUNTIME};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{lm as a,mm as b,nm as c,om as d,pm as e,qm as f,rm as g,sm as h,tm as i,um as j,vm as k,wm as l,xm as m,ym as n,zm as o}from"./chunk-v2vv4etv.js";import"./chunk-092sm06a.js";import"./chunk-19m7hed6.js";import"./chunk-nhn7qftp.js";import"./chunk-mv2v3g62.js";import"./chunk-b220zqbz.js";import"./chunk-2qkasmq1.js";import"./chunk-1px4xey5.js";import"./chunk-a8fx6wcb.js";import"./chunk-x41v697c.js";import"./chunk-ax56kn66.js";import"./chunk-z2gmz9ew.js";import"./chunk-k26kt6fp.js";import"./chunk-qs0fp63n.js";export{h as usesSignalsInScript,o as unescapeHtml,c as registerFilters,b as registerFilter,l as processExpressions,k as interpolateScriptsInTemplate,i as interpolateScriptExpressions,j as interpolateScriptAttributes,d as getAllFilters,n as evaluateExpression,g as escapeHtmlValue,f as escapeHtml,a as defaultFilters,e as clearCustomFilters,m as applyFilters};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{Nj as a,Oj as b,Pj as c,Qj as d,Rj as e,Sj as f,Tj as g,Uj as h,Vj as i,Wj as j,Xj as k}from"./chunk-m0xp6xjr.js";import"./chunk-v2vv4etv.js";import"./chunk-092sm06a.js";import"./chunk-19m7hed6.js";import"./chunk-nhn7qftp.js";import"./chunk-mv2v3g62.js";import"./chunk-b220zqbz.js";import"./chunk-2qkasmq1.js";import"./chunk-1px4xey5.js";import"./chunk-a8fx6wcb.js";import"./chunk-x41v697c.js";import"./chunk-ax56kn66.js";import"./chunk-z2gmz9ew.js";import"./chunk-k26kt6fp.js";import"./chunk-qs0fp63n.js";export{a as templateCache,b as readFileCached,d as invalidateFileCacheByDir,c as invalidateFileCache,k as hashFilePath,f as getCachedSignalsRuntime,g as getCachedRouterScript,h as clearDevCaches,i as checkCache,j as cacheTemplate,e as __setSignalsGeneratorsForTest};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{kt as a,lt as b,mt as c,nt as d,ot as e,pt as f,qt as g,rt as h,st as i,tt as j,ut as k,vt as l,wt as m,xt as n,yt as o,zt as p}from"./chunk-2fspj91j.js";import"./chunk-j4ze77e0.js";export{i as useTitle,f as useSeoMeta,i as usePageTitle,d as useHead,g as seoMetaToHeadConfig,c as resetHead,k as renderHtmlAttrs,j as renderHead,l as renderBodyAttrs,o as processTitleDirective,p as processMetaDirective,n as processHeadDirective,e as mergeHeadConfigs,b as getPageMeta,a as getHead,h as definePageMeta,m as applyHead};
2
+ import{At as p,lt as a,mt as b,nt as c,ot as d,pt as e,qt as f,rt as g,st as h,tt as i,ut as j,vt as k,wt as l,xt as m,yt as n,zt as o}from"./chunk-a8fx6wcb.js";import"./chunk-qs0fp63n.js";export{i as useTitle,f as useSeoMeta,i as usePageTitle,d as useHead,g as seoMetaToHeadConfig,c as resetHead,k as renderHtmlAttrs,j as renderHead,l as renderBodyAttrs,o as processTitleDirective,p as processMetaDirective,n as processHeadDirective,e as mergeHeadConfigs,b as getPageMeta,a as getHead,h as definePageMeta,m as applyHead};