@stacksjs/stx 0.2.681 → 0.2.683
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.
- package/dist/{chunk-19kc8xnw.js → chunk-0h22d9cb.js} +1 -1
- package/dist/{chunk-6xtzsw17.js → chunk-0t65m9nw.js} +1 -1
- package/dist/{chunk-9fnt6q57.js → chunk-1dbw2j4q.js} +1 -1
- package/dist/{chunk-rxmmrafq.js → chunk-246k73ga.js} +1 -1
- package/dist/chunk-29c177cz.js +2 -0
- package/dist/{chunk-haqbkrdk.js → chunk-2rvprm39.js} +1 -1
- package/dist/{chunk-j3qcxtvc.js → chunk-3353tc28.js} +4 -4
- package/dist/{chunk-g2h12kza.js → chunk-3vgfwsft.js} +2 -2
- package/dist/{chunk-hy4j4r8a.js → chunk-3waphqhe.js} +1 -1
- package/dist/{chunk-0kk86z2m.js → chunk-551vqymy.js} +1 -1
- package/dist/{chunk-pfvjqvzd.js → chunk-56w1njc8.js} +6 -6
- package/dist/{chunk-2efy5ftv.js → chunk-5wpny9k3.js} +5 -5
- package/dist/chunk-6rrr362d.js +2 -0
- package/dist/{chunk-d2z2kvyj.js → chunk-70fdw728.js} +1 -1
- package/dist/{chunk-7afqwh0m.js → chunk-7fgsqs43.js} +2 -2
- package/dist/{chunk-8fetb3cr.js → chunk-840aejkc.js} +27 -27
- package/dist/chunk-8s10jjf1.js +2 -0
- package/dist/chunk-979g7g0r.js +2 -0
- package/dist/{chunk-9nzx4fv4.js → chunk-aenajaxk.js} +1 -1
- package/dist/{chunk-zcht5y0v.js → chunk-bsvwzma0.js} +1 -1
- package/dist/chunk-c3dqsjv0.js +2 -0
- package/dist/{chunk-0w1132a5.js → chunk-cd6s5k6e.js} +1 -1
- package/dist/{chunk-gvpwc9hr.js → chunk-cfbev664.js} +1 -1
- package/dist/{chunk-3cr308sm.js → chunk-d2nkm1jt.js} +1 -1
- package/dist/{chunk-5s9pjs20.js → chunk-d4f6dkrt.js} +1 -1
- package/dist/{chunk-avthzrdg.js → chunk-drd4t5v4.js} +2 -2
- package/dist/chunk-e1fgpb46.js +2 -0
- package/dist/{chunk-6aahems6.js → chunk-ff3d0eh9.js} +1 -1
- package/dist/{chunk-ar4yk1rk.js → chunk-g93jkztp.js} +1 -1
- package/dist/{chunk-5cvdc2a0.js → chunk-gny4j06b.js} +1 -1
- package/dist/{chunk-0c6ag7mk.js → chunk-gtktv6nn.js} +2 -2
- package/dist/chunk-hfk17t81.js +2 -0
- package/dist/{chunk-y5ase5av.js → chunk-j87n6mh0.js} +2 -2
- package/dist/chunk-jf717wps.js +2 -0
- package/dist/{chunk-gfa0dxjd.js → chunk-jg4932ma.js} +1 -1
- package/dist/{chunk-esz22r0a.js → chunk-js8ytnrn.js} +1 -1
- package/dist/{chunk-144wmtba.js → chunk-kbagpk8a.js} +1 -1
- package/dist/{chunk-a358zpqd.js → chunk-kbt9r41q.js} +1 -1
- package/dist/{chunk-wqn17d09.js → chunk-kq8t4xn9.js} +2 -2
- package/dist/chunk-mjqf15e7.js +2 -0
- package/dist/chunk-p1a6y65v.js +2 -0
- package/dist/{chunk-5yc7btc2.js → chunk-p21prjzh.js} +1 -1
- package/dist/{chunk-aezxgrd2.js → chunk-pqg3ghvh.js} +1 -1
- package/dist/{chunk-5ha6gkfr.js → chunk-px9p7q26.js} +4 -4
- package/dist/{chunk-3h7k7cnr.js → chunk-q7z1ybcn.js} +1 -1
- package/dist/{chunk-a2fa9aj4.js → chunk-qjccq0yd.js} +7 -7
- package/dist/{chunk-x65g450d.js → chunk-qpvasda5.js} +1 -1
- package/dist/{chunk-4nst5nj4.js → chunk-qq40hxg9.js} +60 -60
- package/dist/chunk-sk2ae1qj.js +2 -0
- package/dist/chunk-smdxvjhn.js +25 -0
- package/dist/{chunk-793qv470.js → chunk-sme7phry.js} +3 -3
- package/dist/{chunk-1x0jwz8m.js → chunk-t0644y3k.js} +2 -2
- package/dist/{chunk-ms9v5tc9.js → chunk-t257ye4c.js} +1 -1
- package/dist/chunk-thkw9ez9.js +54 -0
- package/dist/{chunk-km92eh3c.js → chunk-tkypg1xx.js} +1 -1
- package/dist/{chunk-q7v05zcy.js → chunk-w1wzydvp.js} +1 -1
- package/dist/chunk-wbn3x66p.js +2 -0
- package/dist/{chunk-a6h6ansh.js → chunk-xv8yy1cz.js} +5 -5
- package/dist/{chunk-yzf8g9h1.js → chunk-yfr4tsn1.js} +2 -2
- package/dist/chunk-yq9dtdkn.js +2 -0
- package/dist/{chunk-r8xzqz8z.js → chunk-yrq24gyy.js} +3 -3
- package/dist/chunk-yxy3brpr.js +2 -0
- package/dist/chunk-z9xhpkn6.js +2 -0
- package/dist/{chunk-ekztn3f5.js → chunk-zj5x4yk2.js} +2 -2
- package/dist/{chunk-ab5fc7cj.js → chunk-zx468wjw.js} +1 -1
- package/dist/cli.js +8 -8
- package/dist/craft-entry.js +1 -1
- package/dist/craft.js +1 -1
- package/dist/pwa.js +1 -1
- package/dist/ssg.js +2 -2
- package/dist/utils.js +13 -1
- package/package.json +5 -5
- package/dist/chunk-1h995e54.js +0 -2
- package/dist/chunk-4vxe0605.js +0 -54
- package/dist/chunk-540jj8a7.js +0 -2
- package/dist/chunk-5b1q41vy.js +0 -2
- package/dist/chunk-877tm3sp.js +0 -2
- package/dist/chunk-8q3j4jxr.js +0 -2
- package/dist/chunk-9cmmdbzc.js +0 -25
- package/dist/chunk-d3qxmety.js +0 -2
- package/dist/chunk-ehe5f2yn.js +0 -2
- package/dist/chunk-gjaqez01.js +0 -2
- package/dist/chunk-gr1331xc.js +0 -2
- package/dist/chunk-hsgbsj0g.js +0 -2
- package/dist/chunk-j7rzh56k.js +0 -2
- package/dist/chunk-me4f7ekt.js +0 -2
- package/dist/chunk-mndxjbmy.js +0 -2
- package/dist/chunk-ythdsen4.js +0 -2
- package/dist/chunk-zc6bkctv.js +0 -2
package/dist/chunk-4vxe0605.js
DELETED
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{l,p,E,u,U}from"./chunk-w28wc7mv.js";import{L,is,B,Pe,ue,ur,Me,Le,n,m,we,k}from"./chunk-4nst5nj4.js";import{st}from"./chunk-0c6ag7mk.js";import{T}from"./chunk-6beg47t4.js";import{re}from"./chunk-2a1eeywj.js";import{G,Ke}from"./chunk-jkywbfb0.js";import{C,wn}from"./chunk-2ajbhefk.js";import A from"path";import{existsSync as St}from"fs";function at(a,t){let c=0;for(let i=t;i<a.length;i++){let b=a[i];if(b==="("||b==="["||b==="{")c++;else if(b===")"||b==="]"||b==="}")c--;else if(b===","&&c===0)return i}return-1}function yt(a,t,c){let i=a,b=new RegExp(`${t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}\\s*\\(`,"g"),s=b.exec(i);while(s){let f=s.index,e=f+s[0].length-1,D=1,Z=e+1;while(Z<i.length&&D>0){if(i[Z]==="(")D++;else if(i[Z]===")")D--;Z++}if(D!==0)break;let it=i.substring(e+1,Z-1),j=`${c}(${it})`;i=i.substring(0,f)+j+i.substring(Z),b.lastIndex=f+j.length,s=b.exec(i)}return i}function $t(a){return/\b(state|derived|effect)\s*(?:<[^<>()]*>)?\s*\(/.test(a)}function mt(a){let t=a,c=[],i=new Set,b=0,s=0,f=t.length,e=(j)=>{s++;while(s<f){if(t[s]==="\\"){s+=2;continue}if(t[s]===j){s++;return}s++}},D=()=>{s++;while(s<f){if(t[s]==="\\"){s+=2;continue}if(t[s]==="`"){s++;return}if(t[s]==="$"&&t[s+1]==="{"){s+=2;let j=1;while(s<f&&j>0)if(t[s]==="{")j++,s++;else if(t[s]==="}")j--,s++;else if(t[s]==="'"||t[s]==='"')e(t[s]);else if(t[s]==="`")D();else s++;continue}s++}},Z=()=>{if(t[s]==="/"&&t[s+1]==="/"){while(s<f&&t[s]!==`
|
|
3
|
-
`)s++;return!0}if(t[s]==="/"&&t[s+1]==="*"){s+=2;while(s<f-1&&!(t[s]==="*"&&t[s+1]==="/"))s++;return s+=2,!0}return!1},it=()=>{if(b!==0)return;let j=t.slice(s).match(/^(const|let|var)\s+([a-zA-Z_$][a-zA-Z0-9_$]*)\s*=/);if(j){let H=j[2];if(!i.has(H))c.push(H),i.add(H);return}let et=t.slice(s).match(/^function\s+([a-zA-Z_$][a-zA-Z0-9_$]*)\s*\(/);if(et){let H=et[1];if(!i.has(H))c.push(H),i.add(H);return}let Y=t.slice(s).match(/^async\s+function\s+([a-zA-Z_$][a-zA-Z0-9_$]*)\s*\(/);if(Y){let H=Y[1];if(!i.has(H))c.push(H),i.add(H)}};while(s<f){if(Z())continue;if(t[s]==="'"||t[s]==='"'){e(t[s]);continue}if(t[s]==="`"){D();continue}if(t[s]==="{"){b++,s++;continue}if(t[s]==="}"){b--,s++;continue}if(b===0&&/[a-z]/i.test(t[s])&&(s===0||/\s|[;{}()]/.test(t[s-1])))it();s++}return c.join(", ")}function Et(a,t=""){let c=mt(a).split(",").map((i)=>i.trim()).filter(Boolean);return`
|
|
4
|
-
(function() {
|
|
5
|
-
${st("var",c)}
|
|
6
|
-
var __destroyHooks = [];
|
|
7
|
-
var __origOnDestroy = onDestroy;
|
|
8
|
-
onDestroy = function(fn) { __origOnDestroy(fn); __destroyHooks.push(fn); };
|
|
9
|
-
|
|
10
|
-
${a}
|
|
11
|
-
${t}})();
|
|
12
|
-
`}function vt(a,t){let i=mt(a).split(",").map((f)=>f.trim()).filter(Boolean),b=new Set(L(a,!0).split(",").map((f)=>f.trim())),s=i.map((f)=>b.has(f)?` try { ${f}; Object.defineProperty(__scopeRegistration, ${JSON.stringify(f)}, ${is(f)}); } catch (e) { /* not actually top-level */ }`:` try { __scopeRegistration[${JSON.stringify(f)}] = ${f}; } catch (e) { /* not actually top-level */ }`).join(`
|
|
13
|
-
`);return`
|
|
14
|
-
// Register scope variables for STX runtime
|
|
15
|
-
if (!window.stx._scopes) window.stx._scopes = {};
|
|
16
|
-
var __scopeRegistration = window.stx._scopes['${t}'] || { __destroyCallbacks: __destroyHooks };
|
|
17
|
-
${s}
|
|
18
|
-
// #1767: when the bundler renamed a component const that collided with an
|
|
19
|
-
// inlined import (foo -> foo2), rebind the ORIGINAL template name to the
|
|
20
|
-
// renamed declaration so it resolves to the component's value, not the
|
|
21
|
-
// shadowing import. __stxScopeRenames is emitted by bundleClientScript.
|
|
22
|
-
try { if (typeof __stxScopeRenames !== 'undefined' && __stxScopeRenames) { for (var __stxRK in __stxScopeRenames) __scopeRegistration[__stxRK] = __stxScopeRenames[__stxRK]; } } catch (e) { /* no renames */ }
|
|
23
|
-
if (typeof __stxLiveBindings !== 'undefined') Object.defineProperties(__scopeRegistration, Object.getOwnPropertyDescriptors(__stxLiveBindings));
|
|
24
|
-
window.stx._scopes['${t}'] = __scopeRegistration;
|
|
25
|
-
`}function Rt(a,t){return a.replace(/<script data-stx-scoped data-stx-run="always" data-stx-owner="([^"]*)"/g,(c,i)=>i===t?c:'<script data-stx-scoped data-stx-run="always"')}function gt(a,t){let c=vt(a,t);return kt(Et(a,c),t)}function kt(a,t){let c=`
|
|
26
|
-
(function() {
|
|
27
|
-
var __stxScopeEl = (typeof document !== 'undefined') ? document.querySelector('[data-stx-scope="${t}"]') : null;
|
|
28
|
-
var __stxPrevEl = (typeof window !== 'undefined') ? window.__STX_CURRENT_ELEMENT__ : undefined;
|
|
29
|
-
if (__stxScopeEl && typeof window !== 'undefined') window.__STX_CURRENT_ELEMENT__ = __stxScopeEl;
|
|
30
|
-
if (__stxScopeEl && typeof window !== 'undefined' && window.stx) {
|
|
31
|
-
if (!window.stx._scopes) window.stx._scopes = {};
|
|
32
|
-
window.stx._scopes['${t}'] = {};
|
|
33
|
-
}
|
|
34
|
-
var __stxEndEffects = (typeof window !== 'undefined' && window.stx && window.stx._beginEffects) ? window.stx._beginEffects() : null;
|
|
35
|
-
try {`,i=`
|
|
36
|
-
} finally {
|
|
37
|
-
// The body's effects end where its onDestroy callbacks run: with the scope
|
|
38
|
-
// when the partial has a root, with the page when it has none.
|
|
39
|
-
if (__stxEndEffects) {
|
|
40
|
-
var __stxDisposeEffects = __stxEndEffects();
|
|
41
|
-
var __stxRegistered = __stxScopeEl && window.stx._scopes && window.stx._scopes['${t}'];
|
|
42
|
-
if (__stxRegistered) __stxRegistered.__disposeEffects = __stxDisposeEffects;
|
|
43
|
-
else if (window.stx._destroyCallbacks) window.stx._destroyCallbacks.push(__stxDisposeEffects);
|
|
44
|
-
}
|
|
45
|
-
if (typeof window !== 'undefined') window.__STX_CURRENT_ELEMENT__ = __stxPrevEl;
|
|
46
|
-
}
|
|
47
|
-
})();`;return c+a+i}function It(a,t){if(G(a)){let b=G(a).tag.match(/data-stx-scope="([^"]*)"/);if(b)return{html:a,mergedIntoExisting:b[1],stamped:!0,root:"body"};return{html:Ke(a,(s,f)=>`<body${f} data-stx-scope="${t}">`),mergedIntoExisting:null,stamped:!0,root:"body"}}let c=a.match(/^(\s*(?:(?:<!--[\s\S]*?-->|\x00STX_HTML_COMMENT_\d+\x00)\s*)*)(<[a-zA-Z][a-zA-Z0-9-]*)(\s[^>]*>|>)/s);if(c){let i=c[2]+c[3],b=c[2].slice(1),s=i.match(/data-stx-scope="([^"]*)"/);if(s)return{html:a,mergedIntoExisting:s[1],stamped:!0,root:b};let f=c[1],e=c[2],D=c[3];return{html:`${f}${e} data-stx-scope="${t}"${D}${a.slice(c[0].length)}`,mergedIntoExisting:null,stamped:!0,root:b}}return{html:a,mergedIntoExisting:null,stamped:!1,root:null}}var Mt=0;function ut(a,t){let c=A.basename(a,".stx").replace(/[^a-zA-Z0-9]/g,"_"),i=t.__stx_scope_seq;return i?`stx_scope_${c}_${++i.n}_${i.key}`:`stx_scope_${c}_${++Mt}`}var lt=new Set,pt=new Set;function gp(){lt.clear(),pt.clear()}var Tt=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]);function Tl(a){let t=(e)=>e.replace(/[^\n]/g," "),c=a.replace(/<script\b[^>]*>[\s\S]*?<\/script>/gi,t).replace(/<style\b[^>]*>[\s\S]*?<\/style>/gi,t).replace(/<!--[\s\S]*?-->/g,t).replace(/\x00STX_HTML_COMMENT_\d+\x00/g,t).replace(/\{\{[\s\S]*?\}\}/g,t).replace(/\{!![\s\S]*?!!\}/g,t),i=[],b=0,s=/<(\/?)([A-Za-z][\w-]*)\b(?:[^<>"']|"[^"]*"|'[^']*')*?(\/?)>/g,f;while((f=s.exec(c))!==null){let e=f[1]==="/",D=f[2],Z=f[3]==="/"||Tt.has(D.toLowerCase());if(e){b=Math.max(0,b-1);continue}if(b===0)i.push(D);if(!Z)b++}return i}function ft(a){return/\btype\s*=\s*["'](?!(?:text\/javascript|application\/javascript|module)["'])[^"']*["']/i.test(a)}var Ge=new B(500),ca=new Set;function mp(){ca.clear()}function Ct(a){if(a.__onceStore instanceof Set)return a.__onceStore;return ca}async function Br(a,t,c,i,b,s=new Set){let f=i.partialsDir||A.join(A.dirname(c),"partials");if(f&&!A.isAbsolute(f))f=A.resolve(process.cwd(),f);let e=yt(a,"@partial","@include"),D=Ct(t);e=e.replace(/@once([\s\S]*?)@endonce/g,(h,R,x)=>{let g=R.trim(),r=`${c}:${g}`;if(D.has(r))return"";return D.add(r),R});{let h=/@includeIf\s*\(/g,R;while((R=h.exec(e))!==null){let x=R.index,g=x+R[0].length-1,r=1,_=g+1;while(_<e.length&&r>0){if(e[_]==="(")r++;else if(e[_]===")")r--;_++}if(r!==0)break;let d=e.substring(g+1,_-1),o=d.match(/^\s*['"]([^'"]+)['"]/);if(!o){h.lastIndex=_;continue}let O=o[1],W=Z(O,f,c),v="";if(W&&await Bun.file(W).exists())b.add(W),v=`@include(${d})`;e=e.substring(0,x)+v+e.substring(_),h.lastIndex=0}}for(let[h,R]of[["@includeWhen",!1],["@includeUnless",!0]]){let x=new RegExp(`${h.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}\\s*\\(`,"g"),g;while((g=x.exec(e))!==null){let r=g.index,_=r+g[0].length-1,d=1,o=_+1;while(o<e.length&&d>0){if(e[o]==="(")d++;else if(e[o]===")")d--;o++}if(d!==0)break;let O=e.substring(_+1,o-1),W=at(O,0);if(W===-1){x.lastIndex=o;continue}let v=O.substring(0,W).trim(),V=O.substring(W+1).trim(),z=V.match(/^\s*['"]([^'"]+)['"]/);if(!z){x.lastIndex=o;continue}let w=z[1],q=V.substring(z[0].length),N,I=at(q,0);if(I!==-1)N=q.substring(I+1).trim();try{let M=`Boolean(${v})`,P;if(p(M)){let ot=u(M,Object.keys(t));P=Boolean(ot(...Object.values(t)))}else P=Boolean(l(M,t));let tt=R?!P:P,rt="";if(tt){let ot=Z(w,f,c);if(ot&&await Bun.file(ot).exists())b.add(ot);rt=`@include('${w}'${N?`, ${N}`:""})`}e=e.substring(0,r)+rt+e.substring(o),x.lastIndex=0}catch(M){let P=M instanceof Error?M.message:String(M),tt=m("Include",`Error evaluating ${h} condition: ${P}`,c,a,r);e=e.substring(0,r)+tt+e.substring(o),x.lastIndex=0}}}{let h=/@each\s*\(/g,R;while((R=h.exec(e))!==null){let x=R.index,g=x+R[0].length-1,r=1,_=g+1;while(_<e.length&&r>0){if(e[_]==="(")r++;else if(e[_]===")"){if(r--,r===0)break}_++}if(r!==0)break;let d=e.substring(g+1,_),o=e.substring(x,_+1),O=d.match(/^\s*['"]([^'"]+)['"]\s*,\s*([^,]+)\s*,\s*['"]([^'"]+)['"](?:\s*,\s*['"]([^'"]+)['"])?\s*$/);if(!O){h.lastIndex=0,e=e.replace(o,"");continue}let[,W,v,V,z]=O;try{let w,q=v.trim();if(p(q))w=u(q,Object.keys(t))(...Object.values(t));else w=l(q,t);let N="";if(Array.isArray(w)&&w.length>0)for(let I of w){let M={...t,[V]:I},P=await et(W,M,a,x);N+=P}else if(z)N=await et(z,{},a,x);e=e.substring(0,x)+N+e.substring(_+1),h.lastIndex=0}catch(w){let q=w instanceof Error?w.message:String(w);e=e.substring(0,x)+m("Each",`Error in @each: ${q}`,c,a,x)+e.substring(_+1),h.lastIndex=0}}}{let h=/@includeFirst\s*\(/g,R;while((R=h.exec(e))!==null){let x=R.index,g=x+R[0].length-1,r=1,_=g+1;while(_<e.length&&r>0){if(e[_]==="(")r++;else if(e[_]===")"){if(r--,r===0)break}_++}if(r!==0)break;let d=e.substring(g+1,_),o=e.substring(x,_+1),O=d.match(/^\s*(\[[^\]]+\])/);if(!O){h.lastIndex=0,e=e.replace(o,"");continue}let W=O[1],v=d.slice(O[0].length),V,z=v.match(/^\s*,\s*\{/);if(z){v=v.slice(z[0].length-1);let N=1,I=1;while(I<v.length&&N>0){if(v[I]==="{")N++;else if(v[I]==="}"){if(N--,N===0)break}I++}V=v.substring(0,I+1),v=v.slice(I+1)}let w,q=v.match(/^\s*,\s*['"]([^'"]*)['"]\s*$/);if(q)w=q[1];try{let N=JSON.parse(W.replace(/'/g,'"')),I={};if(V)try{I=E(V,t)}catch(P){let tt=P instanceof Error?P.message:String(P);if(i.debug){let rt=m("Include",`Error parsing includeFirst variables: ${tt}`,c,a,x,o);e=e.replace(o,()=>rt)}else e=e.replace(o,()=>w||"");continue}let M=!1;for(let P of N){let tt=Z(P,f,c);if(!tt)continue;if(await n(tt)){let rt=await et(P,I,a,x);e=e.replace(o,()=>rt),M=!0;break}}if(!M)if(w!==void 0)e=e.replace(o,()=>w);else if(i.debug){let P=m("Include",`None of the includeFirst paths exist: ${W}`,c,a,x,o);e=e.replace(o,()=>P)}else e=e.replace(o,"")}catch(N){let I=N instanceof Error?N.message:String(N),M=m("Include",`Error processing @includeFirst: ${I}`,c,a,x,o);e=e.replace(o,()=>M)}h.lastIndex=0}}function Z(h,R,x){try{let g=h;if(!h.endsWith(".stx"))g=`${h}.stx`;let r=A.resolve(R),_=A.resolve(A.dirname(x)),d;if(!g.startsWith("./")&&!g.startsWith("../")){for(let z of i._layerPartialDirs??[]){let w=A.resolve(z,g);if(w.startsWith(`${A.resolve(z)}${A.sep}`)&&St(w))return w}d=A.resolve(R,g)}else d=A.resolve(_,g);let o=A.normalize(d),O=o.startsWith(r+A.sep)||o===r,W=o.startsWith(_+A.sep)||o===_,v=!1,V=A.dirname(_);if(o.startsWith(V+A.sep)){if(!A.relative(V,o).split(A.sep).some((N)=>N.startsWith(".")&&N!=="."&&N!==".."))v=!0}if(!O&&!W&&!v)return console.error(`Security: Path traversal attempt blocked for include path: ${h}`),console.error(` Resolved to: ${o}`),console.error(` Allowed dirs: ${r}, ${_}`),null;return o}catch(g){return console.error(`Error resolving path ${h}: ${g}`),null}}let it=A.resolve(c);s.add(it);function j(h,R,x,g){return i.onIncludeError?.({includePath:h,templatePath:c,message:R,partialsDir:f}),m("Include",R,c,x,g)}async function et(h,R={},x,g){let r=Z(h,f,c);if(!r)return j(h,`Could not resolve path for include: ${h}`,x,g);let _=A.resolve(r);if(s.has(_)){let d=[...s,_].map((o)=>A.basename(o)).join(" -> ");return j(h,`Circular include detected: ${d}`,x,g)}try{b.add(r);let d;if(!d)try{d=await Bun.file(r).text()}catch(y){let K=y instanceof Error?y.message:String(y);return j(h,`Error loading include file ${h}: ${K}`,x,g)}if(d)d=d.replace(/\{\{--[\s\S]*?--\}\}/g,"");if(d&&d.includes("@stream")){let{processStreamDirectives:y}=await import("./chunk-540jj8a7.js");d=y(d,t)}if(d&&(i.debug||!C()&&!wn()))try{let{warnUnbalancedTags:y}=await import("./chunk-23efje42.js");y(d,r)}catch{}try{let{processESImports:y}=await import("./chunk-ehe5f2yn.js");d=await y(d,t,r,i,b)}catch(y){if(i.debug)console.warn(`[stx] partial ES import extraction skipped for ${r}:`,y instanceof Error?y.message:y)}let o=d,O=ue(o);if(O)o=O.content.trim();let v=d.replace(/<script\b[^>]*>[\s\S]*?<\/script>/gi,"").match(/<style\b([^>]*)>([\s\S]*?)<\/style>/i),V="";if(v)V=`<style${v[1]}>${v[2]}</style>`;let z=[];o=o.replace(/<script\b([^>]*)>([\s\S]*?)<\/script>/gi,(y,K,S)=>{if(!ft(K))return"";return z.push({attrs:K,body:S}),`__STX_DATA_BLOCK_${z.length-1}__`}),o=o.replace(/<style\b[^>]*>[\s\S]*?<\/style>/gi,"");let w={...t};w.__stx_signals_gate=we(d,r);for(let[y,K]of Object.entries(R))w[y]=K;let q=/<script\b([^>]*)>([\s\S]*?)<\/script>/gi,N=[...d.matchAll(q)].sort((y,K)=>{let S=(y[1]||"").includes("server"),X=(K[1]||"").includes("server");return Number(X)-Number(S)}),I="",M=null,P=!1,tt=!1;for(let y of N){let K=y[1]||"",S=y[2]||"";if(ft(K))continue;let X=K.includes("server"),wt=Me(K);if(!X&&!/\bsrc\s*=/i.test(K))Pe(S,r,i.strict);if(!X&&S.trim()){let{interpolateScriptExpressions:F}=await import("./chunk-0kk86z2m.js");S=F(S,w,h)}let ct="";try{let{extractAndStripCssImports:F,renderVendorStyleTags:Q}=await import("./chunk-6xtzsw17.js"),nt=F(S,{filePath:r,projectRoot:process.cwd()});S=nt.code,ct=Q(nt.styles)}catch(F){if(i.debug)console.warn(`[stx] vendor-css extractor skipped for ${r}:`,F instanceof Error?F.message:F)}if(wt&&S.trim())S=Le(S);if(!X){try{let{injectBrowserCoreAutoImports:Q}=await import("./chunk-6xtzsw17.js");S=Q(S).code;let{hasUserImports:nt,bundleClientScript:bt}=await import("./chunk-3cr308sm.js");if(nt(S))S=await bt(S,r,{projectRoot:process.cwd()})}catch(Q){if(i.debug)console.warn(`[stx] bundler skipped for ${r}:`,Q instanceof Error?Q.message:Q)}let{stripStxRuntimeImports:F}=await import("./chunk-9fnt6q57.js");S=F(S)}let dt=$t(S);if(!X){let{extractBridgeData:F,generateServerDataBridge:Q}=await import("./chunk-6xtzsw17.js"),nt=Q(S,F(w));if(nt)S=`${nt}
|
|
48
|
-
${S}`}if(dt&&!X){P=!0,M=ut(r,t);let F=T(S),Q=gt(F,M);I+=`${ct}<script data-stx-scoped data-stx-run="always" data-stx-owner="${M}">${Q}</script>
|
|
49
|
-
`;continue}if(X)try{let{extractVariables:F}=await import("./chunk-ar4yk1rk.js");await F(S,w,r)}catch(F){if(i.debug)console.warn(`Warning: Could not extract variables from server script in ${r}:`,F)}if(!X&&!dt){let F=K.replace(/\bclient\b/i,"").trim();M=ut(r,t);let Q=T(S),nt=gt(Q,M);if(/__scopeRegistration\["(?!__stx)[^"]+"\]\s*=|Object\.defineProperty\(__scopeRegistration, "(?!__stx)/.test(nt))tt=!0;I+=`${ct}<script data-stx-scoped data-stx-run="always" data-stx-owner="${M}"${F?` ${F}`:""}>${nt}</script>
|
|
50
|
-
`}}if(z.length>0){let{interpolateScriptExpressions:y}=await import("./chunk-0kk86z2m.js");o=o.replace(/__STX_DATA_BLOCK_(\d+)__/g,(K,S)=>{let X=z[Number(S)];return`<script${X.attrs}>${y(X.body,w,h)}</script>`})}if(M){let y=It(o,M);if(o=y.html,y.mergedIntoExisting){let S=M,X=y.mergedIntoExisting;I=I.split(`'${S}'`).join(`'${X}'`).split(`"${S}"`).join(`"${X}"`),M=X}else if(!y.stamped&&P&&!lt.has(r))lt.add(r),console.warn(`[stx] ${A.relative(process.cwd(),r)} declares signals but has no element to scope them to, so nothing in it will hydrate. Wrap the partial's markup in a single root element.`);if(y.stamped&&y.root!=="body"&&(P||tt)&&!pt.has(r)){let S=Tl(o);if(S.length>1)pt.add(r),console.warn(`[stx] ${A.relative(process.cwd(),r)} declares ${P?"signals":"bindings"} and has ${S.length} top-level elements (${S.map((X)=>`<${X}>`).join(", ")}). Only the first is scoped, so bindings in the others cannot see what this partial's script declares. Wrap the partial's markup in a single root element.`)}let K=y.stamped&&y.root!==null&&ur(y.root);I=Rt(I,K?M:null)}if(o.includes("@include")||o.includes("@partial"))o=await Br(o,w,r,i,b,s);let{processLoops:rt,reportDeferredLoopWarnings:ot}=await import("./chunk-zc6bkctv.js"),J=rt(o,w,r,void 0,!0);J=re(J,w,r),J=ot(J);let{processMetaDirectives:ht,processSeoDirective:xt,processStructuredData:_t}=await import("./chunk-8jxqg7kb.js");if(J=ht(J,w,r,i),J=_t(J,w,r),J=xt(J,w,r,i),J=k(J,w,r),V)J+=`
|
|
51
|
-
`+V;if(I)J+=`
|
|
52
|
-
`+I;return J}catch(d){if(d instanceof U)throw d;let o=d instanceof Error?d.message:String(d);return j(h,`Error processing include ${h}: ${o}`,x,g)}}let Y=/@include\s*\(/g,H;while((H=Y.exec(e))!==null){let h=H.index,R=h+H[0].length-1,x=1,g=R+1;while(g<e.length&&x>0){if(e[g]==="(")x++;else if(e[g]===")")x--;g++}if(x!==0)break;let r=e.substring(h,g),_=e.substring(R+1,g-1),d=_.match(/^\s*['"]([^'"]+)['"]/);if(!d){Y.lastIndex=g;continue}let o=d[1],O,W=_.substring(d[0].length),v=at(W,0);if(v!==-1)O=W.substring(v+1).trim();let V={};if(O)try{V=E(O,t)}catch(w){let q=w instanceof Error?w.message:String(w);e=e.replace(r,m("Include",`Error parsing include variables for ${o}: ${q}`,c,a,h)),Y.lastIndex=0;continue}let z=await et(o,V,a,h);e=e.substring(0,h)+z+e.substring(g),Y.lastIndex=0}return e}function Fr(a,t){let c=a;function i(b,s,f,e){let D=b,Z=!0;while(Z){Z=!1;let it=new RegExp(`@${s}\\(['"]([^'"]+)['"]\\)`),j=D.match(it);if(!j||j.index===void 0)break;let et=j.index,Y=j[1],H=et+j[0].length,h=new RegExp(`@${s}\\(`),R=new RegExp(`@${f}(?![a-z])`),x=1,g=H,r=-1;while(x>0&&g<D.length){let d=D.slice(g),o=d.match(h),O=d.match(R),W=o?g+o.index:1/0,v=O?g+O.index:1/0;if(W<v)x++,g=W+(o[0].length||1);else if(v<1/0){if(x--,x===0){r=v;break}g=v+f.length+1}else break}if(r===-1)break;let _=D.slice(H,r);if(!t[Y])t[Y]=[];if(e)t[Y].unshift(_);else t[Y].push(_);D=D.substring(0,et)+D.substring(r+`@${f}`.length),Z=!0}return D}return c=i(c,"push","endpush",!1),c=i(c,"prepend","endprepend",!0),c}function zr(a,t){return a.replace(/@stack\(['"]([^'"]+)['"]\)/g,(c,i)=>{if(!t[i]||t[i].length===0)return"";return t[i].join(`
|
|
53
|
-
`)})}
|
|
54
|
-
export{gp,Tl,Ge,ca,mp,Br,Fr,zr};
|
package/dist/chunk-540jj8a7.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{cd,zi,dl,ld,ud,dd,pd,fd,pl,fl,gd,md,hd,yd}from"./chunk-19kc8xnw.js";import"./chunk-8fetb3cr.js";import"./chunk-1x0jwz8m.js";import"./chunk-9bgb9n12.js";import"./chunk-9cmmdbzc.js";import"./chunk-4vxe0605.js";import"./chunk-a358zpqd.js";import"./chunk-2a1eeywj.js";import"./chunk-avthzrdg.js";import"./chunk-5ha6gkfr.js";import"./chunk-zt5hp5w5.js";import"./chunk-rxmmrafq.js";import"./chunk-ekztn3f5.js";import"./chunk-gvpwc9hr.js";import"./chunk-tenbwcts.js";import"./chunk-912r15hr.js";import"./chunk-nbjyed3q.js";import"./chunk-gymmbbzc.js";import"./chunk-4nst5nj4.js";import"./chunk-5cvdc2a0.js";import"./chunk-t6m5d64b.js";import"./chunk-w28wc7mv.js";import"./chunk-6beg47t4.js";import"./chunk-0c6ag7mk.js";export{dl as SUSPENSE_RESOLVER_RUNTIME,zi as buildSuspenseResolveScript,fd as createStreamRenderer,dd as extractStreamBoundaries,yd as generateHydrationRuntime,fl as islandDirective,md as processSectionDirectives,ud as processStreamDirectives,gd as registerStreamingDirectives,ld as renderStreamingPage,cd as streamTemplate,pd as streamTemplateSimple,hd as streamToResponse,pl as streamingSuspenseDirective};
|
package/dist/chunk-5b1q41vy.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Ud,Wd}from"./chunk-g2h12kza.js";import"./chunk-2efy5ftv.js";import"./chunk-5s9pjs20.js";import"./chunk-374nhgyf.js";import"./chunk-avthzrdg.js";import"./chunk-5ha6gkfr.js";import"./chunk-zt5hp5w5.js";import"./chunk-ekztn3f5.js";import"./chunk-gvpwc9hr.js";import"./chunk-tenbwcts.js";import"./chunk-912r15hr.js";import"./chunk-nbjyed3q.js";import"./chunk-gymmbbzc.js";import"./chunk-4nst5nj4.js";import"./chunk-5cvdc2a0.js";import"./chunk-t6m5d64b.js";import"./chunk-w28wc7mv.js";import"./chunk-6beg47t4.js";import"./chunk-0c6ag7mk.js";export{Wd as clearStoreCache,Ud as getStoreScript};
|
package/dist/chunk-877tm3sp.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Qu}from"./chunk-144wmtba.js";import"./chunk-ekztn3f5.js";import"./chunk-gvpwc9hr.js";import"./chunk-tenbwcts.js";import"./chunk-912r15hr.js";import"./chunk-nbjyed3q.js";import"./chunk-gymmbbzc.js";import"./chunk-4nst5nj4.js";import"./chunk-5cvdc2a0.js";import"./chunk-t6m5d64b.js";import"./chunk-w28wc7mv.js";import"./chunk-6beg47t4.js";import"./chunk-0c6ag7mk.js";export{Qu as buildApp};
|
package/dist/chunk-8q3j4jxr.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Iu}from"./chunk-793qv470.js";import"./chunk-8fetb3cr.js";import"./chunk-1x0jwz8m.js";import"./chunk-9bgb9n12.js";import"./chunk-9cmmdbzc.js";import"./chunk-4vxe0605.js";import"./chunk-a358zpqd.js";import"./chunk-2a1eeywj.js";import"./chunk-avthzrdg.js";import"./chunk-5ha6gkfr.js";import"./chunk-zt5hp5w5.js";import"./chunk-rxmmrafq.js";import"./chunk-ekztn3f5.js";import"./chunk-gvpwc9hr.js";import"./chunk-tenbwcts.js";import"./chunk-912r15hr.js";import"./chunk-nbjyed3q.js";import"./chunk-gymmbbzc.js";import"./chunk-4nst5nj4.js";import"./chunk-5cvdc2a0.js";import"./chunk-t6m5d64b.js";import"./chunk-w28wc7mv.js";import"./chunk-6beg47t4.js";import"./chunk-0c6ag7mk.js";export{Iu as startInteractive};
|
package/dist/chunk-9cmmdbzc.js
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Wo,ks,l,p,E,tt,u,_s,t,a,y}from"./chunk-w28wc7mv.js";import{be,$t,X,H,Ot,Y,k}from"./chunk-4nst5nj4.js";import{Xn}from"./chunk-avthzrdg.js";import{re}from"./chunk-2a1eeywj.js";import{Kr}from"./chunk-zt5hp5w5.js";var de=1000,pe=!1;function he(n,r){let c=/@(include|partial)\s*\(\s*(['"])([^'"]+)\2\s*,\s*/g,e="",o=0,i;while((i=c.exec(n))!==null){let g=i.index+i[0].length,x=i.index+i[0].indexOf("("),b=y(n,"(",")",x);if(b===-1)continue;let d=n.slice(g,b).trim();if(!d)continue;if(!Object.keys(r).some((f)=>new RegExp(`(?:^|[^\\w$.])${f.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}(?![\\w$])`).test(d)))continue;let m;try{let f=E(d,r);if(!f||typeof f!=="object")continue;m=JSON.stringify(f)}catch{continue}e+=n.slice(o,g)+m,o=b,c.lastIndex=b}return o===0?n:e+n.slice(o)}function me(n,r){let c=/@component\s*\(/g,e=n,o,i=[];while((o=c.exec(e))!==null){let g=o.index,x=g+o[0].length-1,b=1,d=x+1;while(d<e.length&&b>0){if(e[d]==="(")b++;else if(e[d]===")"){if(b--,b===0)break}d++}if(b!==0)continue;let s=e.substring(x+1,d),m=d+1,f=s.match(/^\s*['"]([^'"]+)['"]/);if(!f)continue;let _=f[1],h=s.slice(f[0].length),w=h.match(/^\s*,\s*/);if(!w)continue;let I=h.slice(w[0].length).trim();if(!I)continue;try{let F=E(I,r),j=JSON.stringify(F),S=`@component('${_}', ${j})`;i.push({start:g,end:m,replacement:S})}catch{continue}}for(let g=i.length-1;g>=0;g--){let{start:x,end:b,replacement:d}=i[g];e=e.substring(0,x)+d+e.substring(b)}return e}function oe(n,r,c){let e=n,o=new RegExp(`${r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}\\(`),i;while((i=o.exec(e))!==null){let g=i.index,x=g+i[0].length-1,b=1,d=x+1,s=null,m=!1;while(d<e.length&&b>0){let h=e[d];if(m){m=!1,d++;continue}if(h==="\\"&&s){m=!0,d++;continue}if(s){if(h===s)s=null;d++;continue}if(h==='"'||h==="'"||h==="`"){s=h,d++;continue}if(h==="(")b++;else if(h===")"){if(b--,b===0)break}d++}if(b!==0)break;let f=e.substring(x+1,d),_=c(f);e=e.substring(0,g)+_+e.substring(d+1)}return e}function xe(n,r){let c=n;return c=c.replace(/:([a-zA-Z_][a-zA-Z0-9_-]*)(?=\s+[^=]|\s*\/?>|\s*$)/g,(e,o)=>{if(o in r)return`:${o}="${o}"`;return e}),c=c.replace(/:([a-zA-Z_][a-zA-Z0-9_-]*)\s*=\s*"([^"]*)"/g,(e,o,i)=>{try{if(H(i,r.__stx_client_signal_names||[]))return e;let g=Object.keys(r),x=Object.values(r);Wo(i);let b=!1,s=u(i,g,()=>{b=!0})(...x);if(b)return e;let m=JSON.stringify(s);if(m===void 0){if(!tt(i).some((h)=>!(h in r)))return"";return e}let f=Buffer.from(m,"utf8").toString("base64");return`__stx_${o}="${f}"`}catch(g){return e}}),c}var ee="<!--__STX_BREAK__-->",ne="<!--__STX_CONTINUE__-->";function le(n,r){let c=/\{\{\{?|\{!!|@(break|continue)(?![\w$])/g,e="",o=0;for(let i=c.exec(n);i;i=c.exec(n)){if(!i[1]){let d=i[0].length===3&&i[0]==="{{{"?3:2,s=i[0]==="{!!"?n.indexOf("!!}",c.lastIndex):be(n,i.index,d);if(s<0)break;c.lastIndex=s+(i[0]==="{!!"?3:d);continue}let g=c.lastIndex,x=!0,b=/^\s*\(/.exec(n.slice(g));if(b){let d=g+b[0].length-1,s=y(n,"(",")",d);if(s<0)break;g=s+1;try{let m=`!!(${n.slice(d+1,s).trim()})`;x=p(m)?Boolean(u(m,Object.keys(r))(...Object.values(r))):Boolean(l(m,r))}catch{x=!1}}if(e+=n.slice(o,i.index),x)return e+(i[1]==="break"?ee:ne);o=g,c.lastIndex=g}return e+n.slice(o)}function ae(n){let r=(o)=>o.replace(/\\/g,"\\\\").replace(/`/g,"\\`").replace(/\$\{/g,"\\${"),c="",e=0;return Ot(n,(o,i,g)=>(c+=ie(r(n.slice(e,g))),c+=`\${__stxRenderLoopValue(${g}, (${i}), ${o.length})}`,e=g+o.length,o)),c+ie(r(n.slice(e)))}function ue(n,r,c,e){return Y(n,r,c==null?"":String(c),!1,e)}function ie(n){let r=n;return r=oe(r,"@break",(c)=>{let e=c.trim();if(!_s(e))return"";return`\`; if (${e}) { break; } result += \``}),r=oe(r,"@continue",(c)=>{let e=c.trim();if(!_s(e))return"";return`\`; if (${e}) { continue; } result += \``}),r=r.replace(/@break(?!\()/g,"`; break; result += `"),r=r.replace(/@continue(?!\()/g,"`; continue; result += `"),r}function ye(n){let r=/@forelse\s*\(/g,c,e=[],o=/@foreach\s*\(/g,i=/@endforeach/g,g;while((g=o.exec(n))!==null)e.push({pos:g.index,delta:1});while((g=i.exec(n))!==null)e.push({pos:g.index,delta:-1});e.sort((s,m)=>s.pos-m.pos);let x=[],b=0;for(let s of e)b+=s.delta,x.push({pos:s.pos,depth:b});function d(s){let m=0,f=x.length-1,_=0;while(m<=f){let h=m+f>>1;if(x[h].pos<=s)_=x[h].depth,m=h+1;else f=h-1}return _}while((c=r.exec(n))!==null){if(d(c.index)>0)continue;let s=c.index,m=c.index+c[0].length-1,f=1,_=m+1,h=-1;while(_<n.length&&f>0){if(n[_]==="(")f++;else if(n[_]===")"){if(f--,f===0){h=_;break}}_++}if(h===-1)continue;let w=n.substring(m+1,h),I=$t(w);if(!I)continue;let{arrayExpr:F,itemVar:j}=I,S=h+1,R=1,W=S,z=/@forelse\s*\(/g,P=/@endforelse/g,L=-1;while(R>0&&W<n.length){z.lastIndex=W,P.lastIndex=W;let C=z.exec(n),A=P.exec(n);if(!A)break;if(C&&C.index<A.index)R++,W=C.index+C[0].length;else{if(R--,R===0){L=A.index;break}W=A.index+11}}if(L===-1)continue;let O=n.substring(S,L),D=L+11,T=-1,U=0,V=0;while(V<O.length){let C=O.indexOf("@",V);if(C===-1)break;let A=O.substring(C);if(/^@forelse\s*\(/.test(A))U++,V=C+1;else if(A.startsWith("@endforelse"))U--,V=C+11;else if(U===0&&A.startsWith("@empty")){if(O.length<=C+6||!/[a-z]/i.test(O[C+6])){T=C;break}V=C+1}else V=C+1}if(T===-1)continue;return{start:s,end:D,arrayExpr:F,itemVar:j,foreachContent:O.substring(0,T),emptyContent:O.substring(T+6)}}return null}function ce(n,r){let c=n;while(!0){let e=ye(c);if(!e)break;let{start:o,end:i,arrayExpr:g,itemVar:x,foreachContent:b,emptyContent:d}=e;try{let s;if(p(g))s=u(g,Object.keys(r))(...Object.values(r));else s=l(g,r);let m;if(!Array.isArray(s)||s.length===0)m=d;else m=`@foreach (${g} as ${x})${b}@endforeach`;c=c.substring(0,o)+m+c.substring(i)}catch(s){let m=s instanceof Error?s.message:String(s),f=a("Forelse",`Error in @forelse(${g} as ${x}): ${m}`,t.EVALUATION_ERROR);c=c.substring(0,o)+f+c.substring(i)}}return c}var fe="<!--stx:foreach-not-iterable:",Ee=/<!--stx:foreach-not-iterable:([^|>]*)\|([^>]*?)-->/g;function _e(n,r){return`${fe}${encodeURIComponent(n)}|${encodeURIComponent(r)}-->`}function $e(n,r){console.warn(`[stx] @foreach(${n}) in ${r}: ${n} is not iterable server-side, so the loop rendered nothing. `+"Values a server loop reads must come from <script server> or the page context \u2014 "+"a plain <script> runs in the browser.")}function jr(n){if(!n.includes(fe))return n;return n.replace(Ee,(r,c,e)=>($e(decodeURIComponent(c),decodeURIComponent(e)),""))}function Kn(n,r,c,e,o=!1){let i=n,g=new Set(r.__stx_client_signal_names||[]);for(let s of Xn(n))g.add(s);if(g.size)r={...r,__stx_client_signal_names:[...g]};i=ce(i,r);function x(s){let m=/@foreach\s*\(/g,f;while((f=m.exec(s))!==null){let _=f.index,h=f.index+f[0].length-1,w=1,I=h+1,F=-1;while(I<s.length&&w>0){if(s[I]==="(")w++;else if(s[I]===")"){if(w--,w===0){F=I;break}}I++}if(F===-1)continue;let j=s.substring(h+1,F),S=$t(j);if(!S)continue;let R=_,{arrayExpr:W,itemVar:z}=S,P=F+1,L=1,O=P,D=/@foreach\s*\(/g,T=/@endforeach/g;while(L>0&&O<s.length){D.lastIndex=O,T.lastIndex=O;let U=D.exec(s),V=T.exec(s);if(!V)break;if(U&&U.index<V.index)L++,O=U.index+U[0].length;else{if(L--,L===0){let C=s.substring(P,V.index),A=V.index+11;return{start:R,end:A,arrayExpr:W,itemVar:z,content:C}}O=V.index+11}}}return null}function b(s,m){let f=s;while(!0){let _=x(f);if(!_)break;let{start:h,end:w,arrayExpr:I,itemVar:F,content:j}=_;try{let S=I.trim(),R;if(p(S))R=u(S,Object.keys(m))(...Object.values(m));else R=l(S,m);let W=!1;if(!Array.isArray(R))if(R instanceof Map)R=Array.from(R),W=!0;else if(R instanceof Set)R=Array.from(R);else if(typeof R==="string")R=Array.from(R);else if(R&&typeof R==="object"&&!(R instanceof Date)&&!(R instanceof RegExp))R=Object.entries(R),W=!0;else{let A=_e(S,c)+a("Foreach",`Error in @foreach: ${S} is not iterable`,t.TYPE_ERROR);f=f.substring(0,h)+A+f.substring(w);continue}let z=e?.loops?.useAltLoopVariable??pe,P=F.trim(),L=null,O,D=!1;if(P.includes("=>")){let A=P.split("=>").map((M)=>M.trim());if(A.length===2&&A[0]&&A[1])L=A[0],O=A[1];else O=P}else if(!P.startsWith("[")&&!P.startsWith("{")&&P.includes(",")){let A=P.split(",").map((M)=>M.trim());if(A.length===2&&A[0]&&A[1])O=A[0],L=A[1],D=!0;else O=P}else O=P;let T="",U=new Set(X(`${I} as ${F}`)),V=R,C=m[ks]??new WeakMap;for(let A=0;A<V.length;A++){let M=V[A],te={index:A,iteration:A+1,first:A===0,last:A===V.length-1,count:V.length},N={...m,loop:te,$loop:te,[ks]:C};if(Array.isArray(m.__stx_client_signal_names))N.__stx_client_signal_names=m.__stx_client_signal_names.filter((Z)=>!U.has(Z));if(O.startsWith("[")&&O.endsWith("]")){let Z=O.slice(1,-1).split(",").map((B)=>B.trim());if(Array.isArray(M))Z.forEach((B,K)=>{if(B)N[B]=M[K]});else N[O]=M}else if(O.startsWith("{")&&O.endsWith("}")){let Z=O.slice(1,-1).split(",").map((B)=>B.trim()).filter(Boolean);if(M!==null&&typeof M==="object")Z.forEach((B)=>{let K=B.indexOf(":"),Q=(K===-1?B:B.slice(0,K)).trim(),se=K===-1?Q:B.slice(K+1).trim();if(Q&&se)N[se]=M[Q]});else N[O]=M}else N[O]=M;if(L)if(!D&&W&&Array.isArray(M)&&M.length===2)N[L]=M[0],N[O]=M[1];else N[L]=A;let v=ce(j,N);v=Kn(v,N,c,e,!0),v=re(v,N,c),v=le(v,N);let J=v.indexOf(ee),G=v.indexOf(ne),q=J<0?G:G<0?J:Math.min(J,G);if(q>=0)v=v.slice(0,q);if(v=k(v,N,c),v=xe(v,N),v=me(v,N),v=he(v,N),T+=v,q>=0&&q===J)break}f=f.substring(0,h)+T+f.substring(w)}catch(S){let R=a("Foreach",`Error in @foreach(${I.trim()} as ${F.trim()}): ${S instanceof Error?S.message:String(S)}`,t.EVALUATION_ERROR);f=f.substring(0,h)+R+f.substring(w)}}return f}i=b(i,r),i=Ae(i,r,c,e);let d=e?.loops?.maxWhileIterations??de;return i=Oe(i,r,d),o?i:jr(i)}function El(n){let r=/^(\s*)([A-Za-z_$][\w$]*|\[[^\]]*\]|\{[^}]*\})(\s+(?:of|in)\s)/.exec(n);if(!r||/^(?:const|let|var)$/.test(r[2]))return n;return`${r[1]}let ${n.slice(r[1].length)}`}function ge(n){return _s(n)}function Ae(n,r,c,e){let o=n,i=!0;while(i){i=!1;let g=o.match(/@for\s*\(/);if(!g||g.index===void 0)break;let x=g.index,b=x+g[0].length-1,d=y(o,"(",")",b);if(d===-1)break;let s=El(o.slice(b+1,d)),m=d+1,f=Kr(o.slice(x),"for","endfor");if(f.length===0)break;let _=f[0].content,h=x+f[0].end;if(!ge(s)){let w=a("For",`Unsafe expression in @for: ${s}`,t.UNSAFE_EXPRESSION);o=o.substring(0,x)+w+o.substring(h),i=!0;continue}try{let w=Re(s),I=/@(?:for|foreach|if|unless)\s*\(/.test(_);if(w.length>0&&I){let z=we({forExpr:s,content:_,iterVarNames:w,context:r,filePath:c,options:e});o=o.substring(0,x)+z+o.substring(h),i=!0;continue}let F=Object.keys(r),j=Object.values(r),S=ae(_),W=Function(...F,"__stxRenderLoopValue",`
|
|
3
|
-
let result = '';
|
|
4
|
-
for (${s}) {
|
|
5
|
-
result += \`${S}\`;
|
|
6
|
-
}
|
|
7
|
-
return result;
|
|
8
|
-
`)(...j,(z,P,L)=>ue(_,z,P,L));o=o.substring(0,x)+W+o.substring(h),i=!0}catch(w){let I=a("For",`Error in @for(${s}): ${w instanceof Error?w.message:String(w)}`,t.EVALUATION_ERROR);o=o.substring(0,x)+I+o.substring(h),i=!0}}return o}function Re(n){let r=n.trim(),c=r.match(/^(?:const|let|var)\s+(\[[^\]]+\]|\{[^}]+\})\s+(?:of|in)\s+/);if(c){let i=c[1];return i.slice(1,-1).split(",").map((x)=>{let b=x.trim();if(!b)return"";let d=b.indexOf(":");if(d>=0&&i.startsWith("{")){let f=b.slice(d+1).trim(),_=f.indexOf("=");return(_>=0?f.slice(0,_):f).trim()}let s=b.indexOf("="),m=(s>=0?b.slice(0,s):b).trim();return/^[A-Za-z_$][\w$]*$/.test(m)?m:""}).filter(Boolean)}let e=r.match(/^(?:const|let|var)\s+([A-Za-z_$][\w$]*)\s+(?:of|in)\s+/);if(e)return[e[1]];let o=r.match(/^(?:const|let|var)\s+([A-Za-z_$][\w$]*)\s*=[^;]*;/);if(o)return[o[1]];return[]}function we(n){let{forExpr:r,content:c,iterVarNames:e,context:o,filePath:i,options:g}=n,x=Object.keys(o),b=Object.values(o),d=i??"inline.stx",s="";return Function(...x,"__renderIteration",`
|
|
9
|
-
for (${r}) {
|
|
10
|
-
if (!__renderIteration([${e.join(", ")}])) break;
|
|
11
|
-
}
|
|
12
|
-
`)(...b,(f)=>{let _={...o};e.forEach((j,S)=>{_[j]=f[S]});let h=Kn(c,_,d,g,!0);h=re(h,_,d),h=le(h,_);let w=h.indexOf(ee),I=h.indexOf(ne),F=w<0?I:I<0?w:Math.min(w,I);if(F>=0)h=h.slice(0,F);return s+=k(h,_,d),F<0||F!==w}),s}function Oe(n,r,c){let e=n,o=!0;while(o){o=!1;let i=e.match(/@while\s*\(/);if(!i||i.index===void 0)break;let g=i.index,x=g+i[0].length-1,b=y(e,"(",")",x);if(b===-1)break;let d=e.slice(x+1,b),s=Kr(e.slice(g),"while","endwhile");if(s.length===0)break;let m=s[0].content,f=g+s[0].end;if(!ge(d)){let _=a("While",`Unsafe expression in @while: ${d}`,t.UNSAFE_EXPRESSION);e=e.substring(0,g)+_+e.substring(f),o=!0;continue}try{let _=Object.keys(r),h=Object.values(r),w=ae(m),F=Function(..._,"__stxRenderLoopValue",`
|
|
13
|
-
let result = '';
|
|
14
|
-
let maxIterations = ${c}; // Configurable safety limit
|
|
15
|
-
let counter = 0;
|
|
16
|
-
while (${d} && counter < maxIterations) {
|
|
17
|
-
counter++;
|
|
18
|
-
result += \`${w}\`;
|
|
19
|
-
}
|
|
20
|
-
if (counter > maxIterations) {
|
|
21
|
-
result += '<!-- [While Error [1104]]: Maximum iterations (${c}) exceeded in while loop. Configure via options.loops.maxWhileIterations -->';
|
|
22
|
-
}
|
|
23
|
-
return result;
|
|
24
|
-
`)(...h,(j,S,R)=>ue(m,j,S,R));e=e.substring(0,g)+F+e.substring(f),o=!0}catch(_){let h=a("While",`Error in @while(${d}): ${_ instanceof Error?_.message:String(_)}`,t.EVALUATION_ERROR);e=e.substring(0,g)+h+e.substring(f),o=!0}}return e}
|
|
25
|
-
export{jr,Kn,El};
|
package/dist/chunk-d3qxmety.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{qi,Gi,Ki,Xi,ip}from"./chunk-3h7k7cnr.js";import"./chunk-7afqwh0m.js";import"./chunk-03xn8244.js";import"./chunk-8fetb3cr.js";import"./chunk-1x0jwz8m.js";import"./chunk-9bgb9n12.js";import"./chunk-9cmmdbzc.js";import"./chunk-4vxe0605.js";import"./chunk-a358zpqd.js";import"./chunk-2a1eeywj.js";import"./chunk-avthzrdg.js";import"./chunk-5ha6gkfr.js";import"./chunk-zt5hp5w5.js";import"./chunk-rxmmrafq.js";import"./chunk-ekztn3f5.js";import"./chunk-gvpwc9hr.js";import"./chunk-tenbwcts.js";import"./chunk-912r15hr.js";import"./chunk-nbjyed3q.js";import"./chunk-gymmbbzc.js";import"./chunk-4nst5nj4.js";import"./chunk-5cvdc2a0.js";import"./chunk-t6m5d64b.js";import"./chunk-w28wc7mv.js";import"./chunk-6beg47t4.js";import"./chunk-0c6ag7mk.js";export{qi as buildNative,ip as default,Gi as findCraftBinary,Xi as getAvailableFormats,Ki as getAvailableTargets};
|
package/dist/chunk-ehe5f2yn.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{$l,Vr}from"./chunk-a358zpqd.js";import"./chunk-2a1eeywj.js";import"./chunk-zt5hp5w5.js";import{ur}from"./chunk-4nst5nj4.js";import"./chunk-5cvdc2a0.js";import"./chunk-t6m5d64b.js";import{tt}from"./chunk-w28wc7mv.js";import"./chunk-6beg47t4.js";import"./chunk-0c6ag7mk.js";export{tt as freeIdentifiers,Vr as processComponents,$l as processESImports,ur as rendersAsElement};
|
package/dist/chunk-gjaqez01.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Ec,Tc}from"./chunk-a6h6ansh.js";import"./chunk-793qv470.js";import"./chunk-km92eh3c.js";import"./chunk-xr9a0hcr.js";import"./chunk-km37yrk4.js";import"./chunk-pfvjqvzd.js";import"./chunk-58dv14c3.js";import"./chunk-zcht5y0v.js";import"./chunk-wqn17d09.js";import"./chunk-1y50gat7.js";import"./chunk-xvnrm5c3.js";import"./chunk-144wmtba.js";import"./chunk-f4z9w4kc.js";import"./chunk-6aahems6.js";import"./chunk-brftzqzj.js";import"./chunk-hm69jxmh.js";import"./chunk-3zbege39.js";import"./chunk-yzf8g9h1.js";import"./chunk-pzxy40a2.js";import"./chunk-19kc8xnw.js";import"./chunk-qh7fvr2z.js";import"./chunk-ae12wgc5.js";import"./chunk-d7js6v1m.js";import"./chunk-ry501z40.js";import"./chunk-974prn41.js";import"./chunk-d1ssvg9k.js";import"./chunk-g2h12kza.js";import"./chunk-a2fa9aj4.js";import"./chunk-q7v05zcy.js";import"./chunk-7afqwh0m.js";import"./chunk-03xn8244.js";import"./chunk-rspe6qa5.js";import{Kt}from"./chunk-ms9v5tc9.js";import"./chunk-2efy5ftv.js";import"./chunk-5s9pjs20.js";import"./chunk-374nhgyf.js";import{$e,o}from"./chunk-8fetb3cr.js";import"./chunk-1x0jwz8m.js";import"./chunk-9bgb9n12.js";import"./chunk-9cmmdbzc.js";import"./chunk-4vxe0605.js";import"./chunk-a358zpqd.js";import"./chunk-2a1eeywj.js";import"./chunk-avthzrdg.js";import{ye}from"./chunk-5ha6gkfr.js";import"./chunk-zt5hp5w5.js";import{Zn,Qn}from"./chunk-rxmmrafq.js";import{Jr,N,i}from"./chunk-ekztn3f5.js";import"./chunk-gvpwc9hr.js";import"./chunk-tenbwcts.js";import"./chunk-912r15hr.js";import"./chunk-nbjyed3q.js";import"./chunk-gymmbbzc.js";import{g,De}from"./chunk-4nst5nj4.js";import"./chunk-5cvdc2a0.js";import"./chunk-t6m5d64b.js";import"./chunk-w28wc7mv.js";import"./chunk-6beg47t4.js";import"./chunk-0c6ag7mk.js";import"./chunk-b7z6rqfg.js";import"./chunk-drabexxq.js";export{Jr as buildWebComponents,Qn as cacheTemplate,Zn as checkCache,Kt as classifyAllScripts,Ec as createMiddleware,Tc as createRoute,N as defaultConfig,g as extractVariables,ye as injectRouterScript,i as loadStxConfig,De as processClientScript,o as processDirectives,$e as readMarkdownFile};
|
package/dist/chunk-gr1331xc.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Ou}from"./chunk-km92eh3c.js";import"./chunk-wqn17d09.js";import"./chunk-ms9v5tc9.js";import"./chunk-5s9pjs20.js";import"./chunk-5ha6gkfr.js";import"./chunk-ekztn3f5.js";import"./chunk-gvpwc9hr.js";import"./chunk-tenbwcts.js";import"./chunk-912r15hr.js";import"./chunk-nbjyed3q.js";import"./chunk-gymmbbzc.js";import"./chunk-4nst5nj4.js";import"./chunk-5cvdc2a0.js";import"./chunk-t6m5d64b.js";import"./chunk-w28wc7mv.js";import"./chunk-6beg47t4.js";import"./chunk-0c6ag7mk.js";export{Ou as startProductionServer};
|
package/dist/chunk-hsgbsj0g.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{up,ia,dp,aa,Sl,kl,nn,Gn,pp,_l,Cl,fp,h}from"./chunk-1x0jwz8m.js";import"./chunk-rxmmrafq.js";import"./chunk-4nst5nj4.js";import"./chunk-5cvdc2a0.js";import"./chunk-t6m5d64b.js";import"./chunk-w28wc7mv.js";import"./chunk-6beg47t4.js";import"./chunk-0c6ag7mk.js";export{nn as buildCss,_l as extractClassNames,kl as fingerprintConfig,Cl as generateCss,pp as getCachedCSS,up as getCssServeAsset,h as injectCss,ia as loadCssEngine,aa as loadCssEngineConfig,Gn as rebuildCss,dp as resetCssCache,Sl as resolveUserCssConfig,fp as withLinkedModuleBundles};
|
package/dist/chunk-j7rzh56k.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Un,o}from"./chunk-8fetb3cr.js";import"./chunk-1x0jwz8m.js";import"./chunk-9bgb9n12.js";import"./chunk-9cmmdbzc.js";import"./chunk-4vxe0605.js";import"./chunk-a358zpqd.js";import"./chunk-2a1eeywj.js";import"./chunk-avthzrdg.js";import{ye}from"./chunk-5ha6gkfr.js";import"./chunk-zt5hp5w5.js";import"./chunk-rxmmrafq.js";import"./chunk-ekztn3f5.js";import"./chunk-gvpwc9hr.js";import"./chunk-tenbwcts.js";import"./chunk-912r15hr.js";import"./chunk-nbjyed3q.js";import"./chunk-gymmbbzc.js";import{Pe,ys,bs}from"./chunk-4nst5nj4.js";import"./chunk-5cvdc2a0.js";import"./chunk-t6m5d64b.js";import"./chunk-w28wc7mv.js";import"./chunk-6beg47t4.js";import"./chunk-0c6ag7mk.js";export{Un as buildModulesTag,ye as injectRouterScript,o as processDirectives,ys as processJsonDirective,bs as processOnceDirective,Pe as validateClientScript};
|
package/dist/chunk-me4f7ekt.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Ws,qd,Gd}from"./chunk-a2fa9aj4.js";import"./chunk-2efy5ftv.js";import"./chunk-5s9pjs20.js";import"./chunk-374nhgyf.js";import"./chunk-avthzrdg.js";import"./chunk-5ha6gkfr.js";import"./chunk-zt5hp5w5.js";import"./chunk-ekztn3f5.js";import"./chunk-gvpwc9hr.js";import"./chunk-tenbwcts.js";import"./chunk-912r15hr.js";import"./chunk-nbjyed3q.js";import"./chunk-gymmbbzc.js";import"./chunk-4nst5nj4.js";import"./chunk-5cvdc2a0.js";import"./chunk-t6m5d64b.js";import"./chunk-w28wc7mv.js";import"./chunk-6beg47t4.js";import"./chunk-0c6ag7mk.js";export{Gd as clearComposableCache,qd as getComposableScript,Ws as listComposableModules};
|
package/dist/chunk-mndxjbmy.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Hc,td,Vc,Uc,nd,rd}from"./chunk-6aahems6.js";import"./chunk-4nst5nj4.js";import"./chunk-5cvdc2a0.js";import"./chunk-t6m5d64b.js";import"./chunk-w28wc7mv.js";import"./chunk-6beg47t4.js";import"./chunk-0c6ag7mk.js";export{rd as applySlots,nd as extractSlotContent,td as parseSlotElement,Hc as parseSlots,Uc as processSlots,Vc as renderSlot};
|
package/dist/chunk-ythdsen4.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{zu}from"./chunk-zcht5y0v.js";import"./chunk-wqn17d09.js";import"./chunk-q7v05zcy.js";import"./chunk-ms9v5tc9.js";import"./chunk-5s9pjs20.js";import"./chunk-8fetb3cr.js";import"./chunk-1x0jwz8m.js";import"./chunk-9bgb9n12.js";import"./chunk-9cmmdbzc.js";import"./chunk-4vxe0605.js";import"./chunk-a358zpqd.js";import"./chunk-2a1eeywj.js";import"./chunk-avthzrdg.js";import"./chunk-5ha6gkfr.js";import"./chunk-zt5hp5w5.js";import"./chunk-rxmmrafq.js";import"./chunk-ekztn3f5.js";import"./chunk-gvpwc9hr.js";import"./chunk-tenbwcts.js";import"./chunk-912r15hr.js";import"./chunk-nbjyed3q.js";import"./chunk-gymmbbzc.js";import"./chunk-4nst5nj4.js";import"./chunk-5cvdc2a0.js";import"./chunk-t6m5d64b.js";import"./chunk-w28wc7mv.js";import"./chunk-6beg47t4.js";import"./chunk-0c6ag7mk.js";export{zu as buildForProduction};
|
package/dist/chunk-zc6bkctv.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{jr,Kn,El}from"./chunk-9cmmdbzc.js";import"./chunk-2a1eeywj.js";import"./chunk-avthzrdg.js";import"./chunk-5ha6gkfr.js";import"./chunk-zt5hp5w5.js";import"./chunk-ekztn3f5.js";import"./chunk-gvpwc9hr.js";import"./chunk-tenbwcts.js";import"./chunk-912r15hr.js";import"./chunk-nbjyed3q.js";import"./chunk-gymmbbzc.js";import{$t}from"./chunk-4nst5nj4.js";import"./chunk-5cvdc2a0.js";import"./chunk-t6m5d64b.js";import"./chunk-w28wc7mv.js";import"./chunk-6beg47t4.js";import"./chunk-0c6ag7mk.js";export{El as declareBareLoopHead,$t as parseLoopBinding,Kn as processLoops,jr as reportDeferredLoopWarnings};
|