@stacksjs/stx 0.2.648 → 0.2.654

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 (169) hide show
  1. package/dist/chunk-17srvghf.js +2 -0
  2. package/dist/{chunk-nt0n0vjm.js → chunk-1zb7ar32.js} +2 -2
  3. package/dist/{chunk-e87xa4r3.js → chunk-26whq1rg.js} +2 -2
  4. package/dist/{chunk-k79x96ra.js → chunk-28jtt8hn.js} +42 -42
  5. package/dist/{chunk-zsgcsqat.js → chunk-2yg9y1na.js} +99 -99
  6. package/dist/{chunk-481d4kr9.js → chunk-2zqg980j.js} +1 -1
  7. package/dist/{chunk-x5tjb4y4.js → chunk-35zjpdcb.js} +1 -1
  8. package/dist/chunk-3634ds4n.js +2 -0
  9. package/dist/{chunk-nj1t4g3a.js → chunk-36649w15.js} +6 -6
  10. package/dist/chunk-3msbc4zj.js +2 -0
  11. package/dist/chunk-3q3gsr7m.js +2 -0
  12. package/dist/{chunk-3q163st5.js → chunk-3v8yejzc.js} +3 -3
  13. package/dist/chunk-42v0vegr.js +2 -0
  14. package/dist/{chunk-2jh21f1n.js → chunk-46w53nj5.js} +1 -1
  15. package/dist/{chunk-0jhdrgpr.js → chunk-48acjmeg.js} +2 -2
  16. package/dist/{chunk-55zaxb4s.js → chunk-4e0z858k.js} +10 -10
  17. package/dist/{chunk-yq021b3r.js → chunk-4nbq7mnp.js} +4 -4
  18. package/dist/{chunk-7rta163c.js → chunk-4qwvqbzf.js} +2 -2
  19. package/dist/{chunk-hjm69qnj.js → chunk-50pkybyn.js} +1 -1
  20. package/dist/{chunk-88z4wkrj.js → chunk-5yxd4ryz.js} +2 -2
  21. package/dist/{chunk-vqc4h16r.js → chunk-6598d3m6.js} +2 -2
  22. package/dist/{chunk-ab7zqtax.js → chunk-6raq8r7w.js} +1 -1
  23. package/dist/{chunk-zmh9p9aa.js → chunk-6rparhvs.js} +1 -1
  24. package/dist/{chunk-t1k9160w.js → chunk-71mthavp.js} +32 -32
  25. package/dist/chunk-73swyb5p.js +2 -0
  26. package/dist/{chunk-b0hpshvk.js → chunk-7wnd2psp.js} +1 -1
  27. package/dist/{chunk-ymymwzt5.js → chunk-8gewq710.js} +1 -1
  28. package/dist/{chunk-3zyjqvsq.js → chunk-929zbzh7.js} +9 -9
  29. package/dist/{chunk-v2x9vzgw.js → chunk-9y2ncrnq.js} +2 -2
  30. package/dist/{chunk-c9k40352.js → chunk-a2a74f6c.js} +1 -1
  31. package/dist/{chunk-67xhsacd.js → chunk-bgt1dx8c.js} +1 -1
  32. package/dist/chunk-c9b0cme2.js +2 -0
  33. package/dist/{chunk-89yj6tcd.js → chunk-cq40n7ak.js} +1 -1
  34. package/dist/{chunk-f46ht5kq.js → chunk-cvw7gknw.js} +3 -3
  35. package/dist/chunk-d0xcykw6.js +2 -0
  36. package/dist/{chunk-vdxjy7j2.js → chunk-d3bsfd10.js} +2 -2
  37. package/dist/{chunk-rjh2jwxx.js → chunk-d4tf0tfn.js} +4 -4
  38. package/dist/chunk-dxjc11hx.js +2 -0
  39. package/dist/{chunk-zhf01af3.js → chunk-dxk5sqtv.js} +2 -2
  40. package/dist/chunk-edz1h5f9.js +2 -0
  41. package/dist/{chunk-fg3jw17w.js → chunk-en8jgavy.js} +6 -5
  42. package/dist/chunk-etw04j02.js +2 -0
  43. package/dist/chunk-ewng6v6g.js +49 -0
  44. package/dist/{chunk-9121nkpj.js → chunk-ex1kd5gs.js} +3 -3
  45. package/dist/chunk-fbd9w4ys.js +2 -0
  46. package/dist/{chunk-qfe7ps3v.js → chunk-ff1cb7k4.js} +2 -2
  47. package/dist/chunk-fnj3gja0.js +2 -0
  48. package/dist/chunk-fsnby15p.js +2 -0
  49. package/dist/{chunk-pbtkbe48.js → chunk-g7j3mwzd.js} +18 -18
  50. package/dist/{chunk-3p7mk3mw.js → chunk-gmrc24cb.js} +1 -1
  51. package/dist/{chunk-p44kmbdg.js → chunk-h09a03ay.js} +4 -4
  52. package/dist/chunk-h0bg2h0j.js +2 -0
  53. package/dist/{chunk-wjt0kej9.js → chunk-h4vg78mw.js} +1 -1
  54. package/dist/{chunk-4q2dtxdk.js → chunk-hjmnsa6a.js} +1 -1
  55. package/dist/{chunk-er60h3j3.js → chunk-ht3dxx5m.js} +1 -1
  56. package/dist/{chunk-h5nmf98w.js → chunk-hw7sv4ac.js} +1 -1
  57. package/dist/{chunk-pg0xzsss.js → chunk-j2bkjtp3.js} +4 -4
  58. package/dist/chunk-j3472s37.js +3 -0
  59. package/dist/chunk-jmx4q1yr.js +2 -0
  60. package/dist/{chunk-j393gsfd.js → chunk-k49fg322.js} +2 -2
  61. package/dist/{chunk-0vkawews.js → chunk-k7nan28e.js} +5 -5
  62. package/dist/{chunk-06w0z1cm.js → chunk-kcrtqyek.js} +4 -4
  63. package/dist/{chunk-t2pzy3x1.js → chunk-khvc43pq.js} +2 -2
  64. package/dist/{chunk-qm4672dj.js → chunk-ktvr9ta8.js} +2 -2
  65. package/dist/{chunk-wq6j2h32.js → chunk-m47spkxr.js} +7 -7
  66. package/dist/chunk-m947aq9a.js +2 -0
  67. package/dist/{chunk-jkaszw24.js → chunk-mgj34bbg.js} +1 -1
  68. package/dist/{chunk-r1r6311d.js → chunk-n7xbhzzt.js} +4 -4
  69. package/dist/chunk-ndtxkps4.js +2 -0
  70. package/dist/{chunk-np4zm2ph.js → chunk-nttspz8c.js} +4 -4
  71. package/dist/chunk-pge3bzqx.js +2 -0
  72. package/dist/{chunk-9txn4rvb.js → chunk-phws2c9s.js} +1 -1
  73. package/dist/{chunk-j5gd0e53.js → chunk-q1x7ckfw.js} +1 -1
  74. package/dist/chunk-q79ksfcd.js +2 -0
  75. package/dist/chunk-qjf1c8fa.js +2 -0
  76. package/dist/{chunk-gv793yqq.js → chunk-qrt8b179.js} +2 -2
  77. package/dist/{chunk-w2zceynt.js → chunk-qygynhzc.js} +1 -1
  78. package/dist/{chunk-6ea6az61.js → chunk-ra56jh7e.js} +1 -1
  79. package/dist/chunk-rmdw6s65.js +2 -0
  80. package/dist/chunk-s0crnpyx.js +2 -0
  81. package/dist/{chunk-8p9kpfk8.js → chunk-s4cs2n2c.js} +1 -1
  82. package/dist/{chunk-t82be9yf.js → chunk-sd4jwn3y.js} +1 -1
  83. package/dist/chunk-t7j4h3nf.js +128 -0
  84. package/dist/{chunk-sgptbhrc.js → chunk-v9bmw06j.js} +1 -1
  85. package/dist/{chunk-gz90fqn8.js → chunk-vmn2b6p6.js} +1 -1
  86. package/dist/{chunk-aprhqxky.js → chunk-vngnface.js} +3 -3
  87. package/dist/{chunk-0h8tg21j.js → chunk-vs8kg85h.js} +1 -1
  88. package/dist/{chunk-84djpte6.js → chunk-wbzmr6a4.js} +2 -2
  89. package/dist/{chunk-ye8tgmd3.js → chunk-wh838rdh.js} +1 -1
  90. package/dist/{chunk-xm2mee4a.js → chunk-x9d4bpmh.js} +21 -21
  91. package/dist/{chunk-mnp8ecj9.js → chunk-xdgvb5a5.js} +1 -1
  92. package/dist/{chunk-pxs7sgnp.js → chunk-xhmpfq9d.js} +1 -1
  93. package/dist/{chunk-hfpv56cp.js → chunk-xq410rsc.js} +1 -1
  94. package/dist/{chunk-xvs04cnp.js → chunk-y8881za3.js} +1 -1
  95. package/dist/chunk-z75bp57x.js +2 -0
  96. package/dist/{chunk-8d2f2e42.js → chunk-znnfjxph.js} +1 -1
  97. package/dist/chunk-zrqremja.js +2 -0
  98. package/dist/cli.js +11 -11
  99. package/dist/client/signals-head-runtime.js +2 -1
  100. package/dist/craft-entry.js +1 -1
  101. package/dist/craft.js +1 -1
  102. package/dist/expressions.js +9 -0
  103. package/dist/interpolation-context.d.ts +2 -0
  104. package/dist/interpolation-context.js +8 -0
  105. package/dist/native/bridge/protocol.d.ts +2 -0
  106. package/dist/native/compiler/bundle.d.ts +6 -0
  107. package/dist/native/compiler/bundle.js +16 -9
  108. package/dist/native/compiler/headwind-to-style.d.ts +5 -1
  109. package/dist/native/compiler/headwind-to-style.js +188 -3
  110. package/dist/native/compiler/html-to-ir.d.ts +2 -1
  111. package/dist/native/compiler/html-to-ir.js +9 -4
  112. package/dist/native/compiler/ir.d.ts +15 -0
  113. package/dist/native/compiler/layout-chrome.d.ts +6 -0
  114. package/dist/native/compiler/layout-chrome.js +72 -0
  115. package/dist/native/compiler/render-screen.js +19 -3
  116. package/dist/native/compiler/style-config.d.ts +32 -0
  117. package/dist/native/compiler/style-config.js +71 -0
  118. package/dist/native/compiler/stylesheet-rules.d.ts +17 -0
  119. package/dist/native/compiler/stylesheet-rules.js +107 -0
  120. package/dist/native/runtime/browser-screen.js +11 -0
  121. package/dist/native/runtime/craft-bridge.d.ts +3 -0
  122. package/dist/native/runtime/craft-bridge.js +41 -4
  123. package/dist/native/runtime/jsc-globals.d.ts +2 -0
  124. package/dist/native/runtime/jsc-globals.js +8 -1
  125. package/dist/native/runtime/native-host.d.ts +5 -0
  126. package/dist/native/runtime/native-host.js +48 -5
  127. package/dist/native/runtime/shared-screen.js +18 -2
  128. package/dist/native/runtime/web-navigation.d.ts +33 -0
  129. package/dist/native/runtime/web-navigation.js +107 -0
  130. package/dist/native/runtime/web-storage.d.ts +56 -0
  131. package/dist/native/runtime/web-storage.js +89 -0
  132. package/dist/native/testing.d.ts +3 -0
  133. package/dist/native/testing.js +3 -0
  134. package/dist/native-signing.d.ts +2 -0
  135. package/dist/native-signing.js +13 -4
  136. package/dist/process.js +2 -0
  137. package/dist/pwa.js +3 -3
  138. package/dist/reactive-bindings.js +3 -1
  139. package/dist/ssg.js +12 -12
  140. package/dist/utils.js +1 -1
  141. package/package.json +5 -5
  142. package/dist/chunk-0en5jwjy.js +0 -2
  143. package/dist/chunk-2n3pa5gm.js +0 -2
  144. package/dist/chunk-354jmw2k.js +0 -3
  145. package/dist/chunk-3b5bphcn.js +0 -2
  146. package/dist/chunk-57md41g9.js +0 -2
  147. package/dist/chunk-6vh8s0pg.js +0 -2
  148. package/dist/chunk-8fsq2ynj.js +0 -2
  149. package/dist/chunk-8tpmz4as.js +0 -2
  150. package/dist/chunk-9x0zt65f.js +0 -2
  151. package/dist/chunk-a2bw46t9.js +0 -2
  152. package/dist/chunk-a4sggwcz.js +0 -2
  153. package/dist/chunk-b4fd2dtk.js +0 -2
  154. package/dist/chunk-c1479y92.js +0 -2
  155. package/dist/chunk-embejqx4.js +0 -2
  156. package/dist/chunk-eyfxw7ds.js +0 -2
  157. package/dist/chunk-f3y4fnaa.js +0 -2
  158. package/dist/chunk-f7930sce.js +0 -2
  159. package/dist/chunk-fsbjat59.js +0 -2
  160. package/dist/chunk-h15xb2vd.js +0 -2
  161. package/dist/chunk-m6qfqkbh.js +0 -2
  162. package/dist/chunk-ncqh5qe5.js +0 -2
  163. package/dist/chunk-radggg3p.js +0 -49
  164. package/dist/chunk-sszhz1zh.js +0 -2
  165. package/dist/chunk-weqc0ssb.js +0 -2
  166. package/dist/chunk-xfzcv0jc.js +0 -2
  167. package/dist/chunk-y9x4pyp2.js +0 -2
  168. package/dist/chunk-zdnc7a4t.js +0 -127
  169. package/dist/chunk-zyqs6a3p.js +0 -2
@@ -1,49 +0,0 @@
1
- // @bun
2
- import{l,d,C,u,z}from"./chunk-55zaxb4s.js";import{L,ns,B,Re,ie,ar,Ne,De,n,g,be,k}from"./chunk-zsgcsqat.js";import{rt}from"./chunk-7rta163c.js";import{T}from"./chunk-ce6zddpf.js";import{ee}from"./chunk-ymymwzt5.js";import{U,qe}from"./chunk-szyqxcfj.js";import{E,bn}from"./chunk-354jmw2k.js";import A from"path";import{existsSync as St}from"fs";function at(a,t){let c=0;for(let o=t;o<a.length;o++){let b=a[o];if(b==="("||b==="["||b==="{")c++;else if(b===")"||b==="]"||b==="}")c--;else if(b===","&&c===0)return o}return-1}function yt(a,t,c){let o=a,b=new RegExp(`${t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}\\s*\\(`,"g"),s=b.exec(o);while(s){let m=s.index,e=m+s[0].length-1,O=1,H=e+1;while(H<o.length&&O>0){if(o[H]==="(")O++;else if(o[H]===")")O--;H++}if(O!==0)break;let it=o.substring(e+1,H-1),j=`${c}(${it})`;o=o.substring(0,m)+j+o.substring(H),b.lastIndex=m+j.length,s=b.exec(o)}return o}function $t(a){return/\b(state|derived|effect)\s*(?:<[^<>()]*>)?\s*\(/.test(a)}function mt(a){let t=a,c=[],o=new Set,b=0,s=0,m=t.length,e=(j)=>{s++;while(s<m){if(t[s]==="\\"){s+=2;continue}if(t[s]===j){s++;return}s++}},O=()=>{s++;while(s<m){if(t[s]==="\\"){s+=2;continue}if(t[s]==="`"){s++;return}if(t[s]==="$"&&t[s+1]==="{"){s+=2;let j=1;while(s<m&&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]==="`")O();else s++;continue}s++}},H=()=>{if(t[s]==="/"&&t[s+1]==="/"){while(s<m&&t[s]!==`
3
- `)s++;return!0}if(t[s]==="/"&&t[s+1]==="*"){s+=2;while(s<m-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 V=j[2];if(!o.has(V))c.push(V),o.add(V);return}let et=t.slice(s).match(/^function\s+([a-zA-Z_$][a-zA-Z0-9_$]*)\s*\(/);if(et){let V=et[1];if(!o.has(V))c.push(V),o.add(V);return}let Y=t.slice(s).match(/^async\s+function\s+([a-zA-Z_$][a-zA-Z0-9_$]*)\s*\(/);if(Y){let V=Y[1];if(!o.has(V))c.push(V),o.add(V)}};while(s<m){if(H())continue;if(t[s]==="'"||t[s]==='"'){e(t[s]);continue}if(t[s]==="`"){O();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((o)=>o.trim()).filter(Boolean);return`
4
- (function() {
5
- ${rt("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 o=mt(a).split(",").map((m)=>m.trim()).filter(Boolean),b=new Set(L(a,!0).split(",").map((m)=>m.trim())),s=o.map((m)=>b.has(m)?` try { ${m}; Object.defineProperty(__scopeRegistration, ${JSON.stringify(m)}, ${ns(m)}); } catch (e) { /* not actually top-level */ }`:` try { __scopeRegistration[${JSON.stringify(m)}] = ${m}; } 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,o)=>o===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
- try {`,o=`
35
- } finally {
36
- if (typeof window !== 'undefined') window.__STX_CURRENT_ELEMENT__ = __stxPrevEl;
37
- }
38
- })();`;return c+a+`
39
- } finally {
40
- if (typeof window !== 'undefined') window.__STX_CURRENT_ELEMENT__ = __stxPrevEl;
41
- }
42
- })();`}function It(a,t){if(U(a)){let b=U(a).tag.match(/data-stx-scope="([^"]*)"/);if(b)return{html:a,mergedIntoExisting:b[1],stamped:!0,root:"body"};return{html:qe(a,(s,m)=>`<body${m} 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 o=c[2]+c[3],b=c[2].slice(1),s=o.match(/data-stx-scope="([^"]*)"/);if(s)return{html:a,mergedIntoExisting:s[1],stamped:!0,root:b};let m=c[1],e=c[2],O=c[3];return{html:`${m}${e} data-stx-scope="${t}"${O}${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,"_"),o=t.__stx_scope_seq;return o?`stx_scope_${c}_${++o.n}_${o.key}`:`stx_scope_${c}_${++Mt}`}var lt=new Set,pt=new Set;function lp(){lt.clear(),pt.clear()}var Tt=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]);function Sl(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),o=[],b=0,s=/<(\/?)([A-Za-z][\w-]*)\b(?:[^<>"']|"[^"]*"|'[^']*')*?(\/?)>/g,m;while((m=s.exec(c))!==null){let e=m[1]==="/",O=m[2],H=m[3]==="/"||Tt.has(O.toLowerCase());if(e){b=Math.max(0,b-1);continue}if(b===0)o.push(O);if(!H)b++}return o}function ft(a){return/\btype\s*=\s*["'](?!(?:text\/javascript|application\/javascript|module)["'])[^"']*["']/i.test(a)}var We=new B(500),sa=new Set;function up(){sa.clear()}function At(a){if(a.__onceStore instanceof Set)return a.__onceStore;return sa}async function Dr(a,t,c,o,b,s=new Set){let m=o.partialsDir||A.join(A.dirname(c),"partials");if(m&&!A.isAbsolute(m))m=A.resolve(process.cwd(),m);let e=yt(a,"@partial","@include"),O=At(t);e=e.replace(/@once([\s\S]*?)@endonce/g,(h,R,x)=>{let f=R.trim(),r=`${c}:${f}`;if(O.has(r))return"";return O.add(r),R});{let h=/@includeIf\s*\(/g,R;while((R=h.exec(e))!==null){let x=R.index,f=x+R[0].length-1,r=1,_=f+1;while(_<e.length&&r>0){if(e[_]==="(")r++;else if(e[_]===")")r--;_++}if(r!==0)break;let p=e.substring(f+1,_-1),i=p.match(/^\s*['"]([^'"]+)['"]/);if(!i){h.lastIndex=_;continue}let D=i[1],W=H(D,m,c),v="";if(W&&await Bun.file(W).exists())b.add(W),v=`@include(${p})`;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"),f;while((f=x.exec(e))!==null){let r=f.index,_=r+f[0].length-1,p=1,i=_+1;while(i<e.length&&p>0){if(e[i]==="(")p++;else if(e[i]===")")p--;i++}if(p!==0)break;let D=e.substring(_+1,i-1),W=at(D,0);if(W===-1){x.lastIndex=i;continue}let v=D.substring(0,W).trim(),X=D.substring(W+1).trim(),F=X.match(/^\s*['"]([^'"]+)['"]/);if(!F){x.lastIndex=i;continue}let w=F[1],J=X.substring(F[0].length),N,I=at(J,0);if(I!==-1)N=J.substring(I+1).trim();try{let M=`Boolean(${v})`,P;if(d(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,st="";if(tt){let ot=H(w,m,c);if(ot&&await Bun.file(ot).exists())b.add(ot);st=`@include('${w}'${N?`, ${N}`:""})`}e=e.substring(0,r)+st+e.substring(i),x.lastIndex=0}catch(M){let P=M instanceof Error?M.message:String(M),tt=g("Include",`Error evaluating ${h} condition: ${P}`,c,a,r);e=e.substring(0,r)+tt+e.substring(i),x.lastIndex=0}}}{let h=/@each\s*\(/g,R;while((R=h.exec(e))!==null){let x=R.index,f=x+R[0].length-1,r=1,_=f+1;while(_<e.length&&r>0){if(e[_]==="(")r++;else if(e[_]===")"){if(r--,r===0)break}_++}if(r!==0)break;let p=e.substring(f+1,_),i=e.substring(x,_+1),D=p.match(/^\s*['"]([^'"]+)['"]\s*,\s*([^,]+)\s*,\s*['"]([^'"]+)['"](?:\s*,\s*['"]([^'"]+)['"])?\s*$/);if(!D){h.lastIndex=0,e=e.replace(i,"");continue}let[,W,v,X,F]=D;try{let w,J=v.trim();if(d(J))w=u(J,Object.keys(t))(...Object.values(t));else w=l(J,t);let N="";if(Array.isArray(w)&&w.length>0)for(let I of w){let M={...t,[X]:I},P=await et(W,M,a,x);N+=P}else if(F)N=await et(F,{},a,x);e=e.substring(0,x)+N+e.substring(_+1),h.lastIndex=0}catch(w){let J=w instanceof Error?w.message:String(w);e=e.substring(0,x)+g("Each",`Error in @each: ${J}`,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,f=x+R[0].length-1,r=1,_=f+1;while(_<e.length&&r>0){if(e[_]==="(")r++;else if(e[_]===")"){if(r--,r===0)break}_++}if(r!==0)break;let p=e.substring(f+1,_),i=e.substring(x,_+1),D=p.match(/^\s*(\[[^\]]+\])/);if(!D){h.lastIndex=0,e=e.replace(i,"");continue}let W=D[1],v=p.slice(D[0].length),X,F=v.match(/^\s*,\s*\{/);if(F){v=v.slice(F[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++}X=v.substring(0,I+1),v=v.slice(I+1)}let w,J=v.match(/^\s*,\s*['"]([^'"]*)['"]\s*$/);if(J)w=J[1];try{let N=JSON.parse(W.replace(/'/g,'"')),I={};if(X)try{I=C(X,t)}catch(P){let tt=P instanceof Error?P.message:String(P);if(o.debug){let st=g("Include",`Error parsing includeFirst variables: ${tt}`,c,a,x,i);e=e.replace(i,()=>st)}else e=e.replace(i,()=>w||"");continue}let M=!1;for(let P of N){let tt=H(P,m,c);if(!tt)continue;if(await n(tt)){let st=await et(P,I,a,x);e=e.replace(i,()=>st),M=!0;break}}if(!M)if(w!==void 0)e=e.replace(i,()=>w);else if(o.debug){let P=g("Include",`None of the includeFirst paths exist: ${W}`,c,a,x,i);e=e.replace(i,()=>P)}else e=e.replace(i,"")}catch(N){let I=N instanceof Error?N.message:String(N),M=g("Include",`Error processing @includeFirst: ${I}`,c,a,x,i);e=e.replace(i,()=>M)}h.lastIndex=0}}function H(h,R,x){try{let f=h;if(!h.endsWith(".stx"))f=`${h}.stx`;let r=A.resolve(R),_=A.resolve(A.dirname(x)),p;if(!f.startsWith("./")&&!f.startsWith("../")){for(let F of o._layerPartialDirs??[]){let w=A.resolve(F,f);if(w.startsWith(`${A.resolve(F)}${A.sep}`)&&St(w))return w}p=A.resolve(R,f)}else p=A.resolve(_,f);let i=A.normalize(p),D=i.startsWith(r+A.sep)||i===r,W=i.startsWith(_+A.sep)||i===_,v=!1,X=A.dirname(_);if(i.startsWith(X+A.sep)){if(!A.relative(X,i).split(A.sep).some((N)=>N.startsWith(".")&&N!=="."&&N!==".."))v=!0}if(!D&&!W&&!v)return console.error(`Security: Path traversal attempt blocked for include path: ${h}`),console.error(` Resolved to: ${i}`),console.error(` Allowed dirs: ${r}, ${_}`),null;return i}catch(f){return console.error(`Error resolving path ${h}: ${f}`),null}}let it=A.resolve(c);s.add(it);function j(h,R,x,f){return o.onIncludeError?.({includePath:h,templatePath:c,message:R,partialsDir:m}),g("Include",R,c,x,f)}async function et(h,R={},x,f){let r=H(h,m,c);if(!r)return j(h,`Could not resolve path for include: ${h}`,x,f);let _=A.resolve(r);if(s.has(_)){let p=[...s,_].map((i)=>A.basename(i)).join(" -> ");return j(h,`Circular include detected: ${p}`,x,f)}try{b.add(r);let p;if(!p)try{p=await Bun.file(r).text()}catch(y){let q=y instanceof Error?y.message:String(y);return j(h,`Error loading include file ${h}: ${q}`,x,f)}if(p)p=p.replace(/\{\{--[\s\S]*?--\}\}/g,"");if(p&&p.includes("@stream")){let{processStreamDirectives:y}=await import("./chunk-8fsq2ynj.js");p=y(p,t)}if(p&&(o.debug||!E()&&!bn()))try{let{warnUnbalancedTags:y}=await import("./chunk-z8p6tk5z.js");y(p,r)}catch{}try{let{processESImports:y}=await import("./chunk-8tpmz4as.js");p=await y(p,t,r,o,b)}catch(y){if(o.debug)console.warn(`[stx] partial ES import extraction skipped for ${r}:`,y instanceof Error?y.message:y)}let i=p,D=ie(i);if(D)i=D.content.trim();let v=p.replace(/<script\b[^>]*>[\s\S]*?<\/script>/gi,"").match(/<style\b([^>]*)>([\s\S]*?)<\/style>/i),X="";if(v)X=`<style${v[1]}>${v[2]}</style>`;let F=[];i=i.replace(/<script\b([^>]*)>([\s\S]*?)<\/script>/gi,(y,q,S)=>{if(!ft(q))return"";return F.push({attrs:q,body:S}),`__STX_DATA_BLOCK_${F.length-1}__`}),i=i.replace(/<style\b[^>]*>[\s\S]*?<\/style>/gi,"");let w={...t};w.__stx_signals_gate=be(p,r);for(let[y,q]of Object.entries(R))w[y]=q;let J=/<script\b([^>]*)>([\s\S]*?)<\/script>/gi,N=[...p.matchAll(J)].sort((y,q)=>{let S=(y[1]||"").includes("server"),K=(q[1]||"").includes("server");return Number(K)-Number(S)}),I="",M=null,P=!1,tt=!1;for(let y of N){let q=y[1]||"",S=y[2]||"";if(ft(q))continue;let K=q.includes("server"),wt=Ne(q);if(!K&&!/\bsrc\s*=/i.test(q))Re(S,r,o.strict);if(!K&&S.trim()){let{interpolateScriptExpressions:Z}=await import("./chunk-j5gd0e53.js");S=Z(S,w,h)}let ct="";try{let{extractAndStripCssImports:Z,renderVendorStyleTags:Q}=await import("./chunk-er60h3j3.js"),nt=Z(S,{filePath:r,projectRoot:process.cwd()});S=nt.code,ct=Q(nt.styles)}catch(Z){if(o.debug)console.warn(`[stx] vendor-css extractor skipped for ${r}:`,Z instanceof Error?Z.message:Z)}if(wt&&S.trim())S=De(S);if(!K){try{let{injectBrowserCoreAutoImports:Q}=await import("./chunk-er60h3j3.js");S=Q(S).code;let{hasUserImports:nt,bundleClientScript:bt}=await import("./chunk-h15xb2vd.js");if(nt(S))S=await bt(S,r,{projectRoot:process.cwd()})}catch(Q){if(o.debug)console.warn(`[stx] bundler skipped for ${r}:`,Q instanceof Error?Q.message:Q)}let{stripStxRuntimeImports:Z}=await import("./chunk-sszhz1zh.js");S=Z(S)}let dt=$t(S);if(!K){let{extractBridgeData:Z,generateServerDataBridge:Q}=await import("./chunk-er60h3j3.js"),nt=Q(S,Z(w));if(nt)S=`${nt}
43
- ${S}`}if(dt&&!K){P=!0,M=ut(r,t);let Z=T(S),Q=gt(Z,M);I+=`${ct}<script data-stx-scoped data-stx-run="always" data-stx-owner="${M}">${Q}</script>
44
- `;continue}if(K)try{let{extractVariables:Z}=await import("./chunk-t82be9yf.js");await Z(S,w,r)}catch(Z){if(o.debug)console.warn(`Warning: Could not extract variables from server script in ${r}:`,Z)}if(!K&&!dt){let Z=q.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}"${Z?` ${Z}`:""}>${nt}</script>
45
- `}}if(F.length>0){let{interpolateScriptExpressions:y}=await import("./chunk-j5gd0e53.js");i=i.replace(/__STX_DATA_BLOCK_(\d+)__/g,(q,S)=>{let K=F[Number(S)];return`<script${K.attrs}>${y(K.body,w,h)}</script>`})}if(M){let y=It(i,M);if(i=y.html,y.mergedIntoExisting){let S=M,K=y.mergedIntoExisting;I=I.split(`'${S}'`).join(`'${K}'`).split(`"${S}"`).join(`"${K}"`),M=K}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=Sl(i);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((K)=>`<${K}>`).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 q=y.stamped&&y.root!==null&&ar(y.root);I=Rt(I,q?M:null)}if(i.includes("@include")||i.includes("@partial"))i=await Dr(i,w,r,o,b,s);let{processLoops:st,reportDeferredLoopWarnings:ot}=await import("./chunk-3b5bphcn.js"),G=st(i,w,r,void 0,!0);G=ee(G,w,r),G=ot(G);let{processMetaDirectives:ht,processSeoDirective:xt,processStructuredData:_t}=await import("./chunk-4q2dtxdk.js");if(G=ht(G,w,r,o),G=_t(G,w,r),G=xt(G,w,r,o),G=k(G,w,r),X)G+=`
46
- `+X;if(I)G+=`
47
- `+I;return G}catch(p){if(p instanceof z)throw p;let i=p instanceof Error?p.message:String(p);return j(h,`Error processing include ${h}: ${i}`,x,f)}}let Y=/@include\s*\(/g,V;while((V=Y.exec(e))!==null){let h=V.index,R=h+V[0].length-1,x=1,f=R+1;while(f<e.length&&x>0){if(e[f]==="(")x++;else if(e[f]===")")x--;f++}if(x!==0)break;let r=e.substring(h,f),_=e.substring(R+1,f-1),p=_.match(/^\s*['"]([^'"]+)['"]/);if(!p){Y.lastIndex=f;continue}let i=p[1],D,W=_.substring(p[0].length),v=at(W,0);if(v!==-1)D=W.substring(v+1).trim();let X={};if(D)try{X=C(D,t)}catch(w){let J=w instanceof Error?w.message:String(w);e=e.replace(r,g("Include",`Error parsing include variables for ${i}: ${J}`,c,a,h)),Y.lastIndex=0;continue}let F=await et(i,X,a,h);e=e.substring(0,h)+F+e.substring(f),Y.lastIndex=0}return e}function Mr(a,t){let c=a;function o(b,s,m,e){let O=b,H=!0;while(H){H=!1;let it=new RegExp(`@${s}\\(['"]([^'"]+)['"]\\)`),j=O.match(it);if(!j||j.index===void 0)break;let et=j.index,Y=j[1],V=et+j[0].length,h=new RegExp(`@${s}\\(`),R=new RegExp(`@${m}(?![a-z])`),x=1,f=V,r=-1;while(x>0&&f<O.length){let p=O.slice(f),i=p.match(h),D=p.match(R),W=i?f+i.index:1/0,v=D?f+D.index:1/0;if(W<v)x++,f=W+(i[0].length||1);else if(v<1/0){if(x--,x===0){r=v;break}f=v+m.length+1}else break}if(r===-1)break;let _=O.slice(V,r);if(!t[Y])t[Y]=[];if(e)t[Y].unshift(_);else t[Y].push(_);O=O.substring(0,et)+O.substring(r+`@${m}`.length),H=!0}return O}return c=o(c,"push","endpush",!1),c=o(c,"prepend","endprepend",!0),c}function Lr(a,t){return a.replace(/@stack\(['"]([^'"]+)['"]\)/g,(c,o)=>{if(!t[o]||t[o].length===0)return"";return t[o].join(`
48
- `)})}
49
- export{lp,Sl,We,sa,up,Dr,Mr,Lr};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{fp,_l,oo,Fr,io,ao,zr,Hr,Vr,co,ia,Cl,mt}from"./chunk-0vkawews.js";import"./chunk-r1r6311d.js";import"./chunk-ye8tgmd3.js";import"./chunk-3q163st5.js";import"./chunk-e87xa4r3.js";import"./chunk-a3d0g4mr.js";import"./chunk-04kg16qs.js";import"./chunk-p44kmbdg.js";import"./chunk-gv793yqq.js";import{L}from"./chunk-zsgcsqat.js";import"./chunk-x5tjb4y4.js";import"./chunk-2h8ea0we.js";import"./chunk-55zaxb4s.js";import"./chunk-ce6zddpf.js";import"./chunk-7rta163c.js";export{fp as clearScriptScanCache,zr as convertServerLoopAttributesToDirectives,io as convertSignalDirectivesToAttributes,Hr as convertSignalLoopsToAttributes,L as extractExports,ia as findMarkupIndexOutsideScripts,Fr as hasSignalsSyntax,oo as parseLoopExpression,ao as preEvalLiteralReactiveIfs,Vr as processScriptSetup,co as processSignals,Cl as rewriteStxImportSpecifiers,_l as scanScriptTags,mt as stripStxRuntimeImports};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Sd,kd,_d,Cd,Ed}from"./chunk-aprhqxky.js";export{kd as createSSRSuspense,Cd as generateSuspenseCSS,Ed as generateSuspenseRuntime,Sd as processSuspenseDirectives,_d as renderSSRSuspense};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Pc,ki,Iu,Ic,Oc,Ou,Nu}from"./chunk-j393gsfd.js";import"./chunk-wq6j2h32.js";import"./chunk-f46ht5kq.js";import"./chunk-88z4wkrj.js";import"./chunk-v2x9vzgw.js";import"./chunk-0vkawews.js";import"./chunk-r1r6311d.js";import"./chunk-ye8tgmd3.js";import"./chunk-3q163st5.js";import"./chunk-e87xa4r3.js";import"./chunk-a3d0g4mr.js";import"./chunk-04kg16qs.js";import"./chunk-p44kmbdg.js";import"./chunk-gv793yqq.js";import{$t,Fl}from"./chunk-zsgcsqat.js";import"./chunk-x5tjb4y4.js";import"./chunk-2h8ea0we.js";import"./chunk-55zaxb4s.js";import"./chunk-ce6zddpf.js";import"./chunk-7rta163c.js";export{Pc as buildVirtualSource,$t as extractScriptBlocks,Fl as extractTemplateExpressions,Ic as findRuntimeTypeDeclarations,Oc as findStxModuleDeclarations,Nu as formatTypecheckDiagnostics,Iu as sourcePathFor,Ou as typecheckStxFiles,ki as virtualPathFor};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{pt,On,Vd}from"./chunk-fg3jw17w.js";import{se,Nn,Ud,Dn,Hs,Pr,Ir,Wd,qd,Gd,Mn,Ln,Vs,Or,Kd}from"./chunk-84djpte6.js";import"./chunk-7rta163c.js";export{Hs as batch,Vd as default,Nn as derived,Dn as effect,pt as generateSignalsRuntime,On as generateSignalsRuntimeDev,Ln as isDerived,Mn as isSignal,Ud as memo,Ir as onDestroy,Pr as onMount,Or as peek,Gd as pendingLifecycleCounts,qd as runDestroyCallbacks,Wd as runMountCallbacks,se as state,Vs as untrack,Kd as useOptimistic};
@@ -1,127 +0,0 @@
1
- // @bun
2
- import"./chunk-55zaxb4s.js";import{_s,Ko,gc}from"./chunk-7rta163c.js";import"./chunk-ce6zddpf.js";import"./chunk-zsgcsqat.js";import"./chunk-2h8ea0we.js";import"./chunk-x5tjb4y4.js";import"./chunk-a3d0g4mr.js";import"./chunk-gv793yqq.js";import{i}from"./chunk-3q163st5.js";import"./chunk-p44kmbdg.js";import"./chunk-04kg16qs.js";import"./chunk-pxs7sgnp.js";import{gt,Ve,fe,Qt,Te,Vn,Un,Ue}from"./chunk-qfe7ps3v.js";import{s}from"./chunk-pbtkbe48.js";import"./chunk-3zyjqvsq.js";import"./chunk-radggg3p.js";import"./chunk-nj1t4g3a.js";import{Vr}from"./chunk-0vkawews.js";import"./chunk-prf164ct.js";import{pt}from"./chunk-fg3jw17w.js";import"./chunk-v2x9vzgw.js";import"./chunk-88z4wkrj.js";import{qs}from"./chunk-f46ht5kq.js";import"./chunk-ymymwzt5.js";import"./chunk-r1r6311d.js";import"./chunk-ye8tgmd3.js";import"./chunk-e87xa4r3.js";import{existsSync as le,mkdirSync as fr,readFileSync as pr}from"fs";import X from"path";import{existsSync as $e,mkdirSync as Et,realpathSync as nr,rmSync as It}from"fs";import C from"path";import{existsSync as Yn}from"fs";import te from"path";var Mt="data-stx-b",Xe=new Set(Ko),Dt=new Set(_s);function Lt(n){if(n==="ref"||n==="data-stx-ref")return"ref";if(n.startsWith("::"))return null;if(n.startsWith("@bind:")||n.startsWith("x-bind:"))return"attr";if(n.startsWith("@")||n.startsWith(":")){let e=n.slice(1).split(".")[0];if(Xe.has(e))return e==="if"?"if":e;if(e==="for"||e==="else"||e==="else-if"||e==="elseif")return"for";if(gc(e))return"event";if(n.startsWith("@"))return"event";return"attr"}if(n.startsWith("x-")){let e=n.split(".")[0];if(!Dt.has(e))return"attr";let t=e.slice(2);if(t==="cloak"||t==="data"||t==="bind")return null;if(t==="tooltip"||t==="tooltip-position")return null;return Xe.has(t)?t==="if"?"if":t:"attr"}return null}function Vt(n){let e=[];for(let[t,r]of n){let o=Lt(t);if(o)e.push({name:t,value:r,kind:o})}return e}var $t=/<([a-z][\w-]*)((?:\s+[^\s"'=<>/]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s"'=<>`]+))?)*)\s*\/?>/gi,pe=/([^\s"'=<>/]+)(?:\s*=\s*(?:"([^"]*)"|'([^']*)'|([^\s"'=<>`]+)))?/g;function ze(n){let e=[],t=0;return{html:n.replace($t,(o,a,c)=>{if(!c||!/[:@]|x-/.test(c))return o;let u=[];pe.lastIndex=0;for(let b=pe.exec(c);b;b=pe.exec(c))u.push([b[1],b[2]??b[3]??b[4]??""]);let f=Vt(u);if(!f.length)return o;let h={id:t++,bindings:f};if(f.some((b)=>b.kind==="for"))h.template=!0;e.push(h);let S=o.endsWith("/>");return`${o.slice(0,S?-2:-1).trimEnd()} ${Mt}="${h.id}"${S?"/>":">"}`}),manifest:{entries:e}}}import pn from"path";function re(n){let e=n&&/^(\d+(?:\.\d+)?|\.\d+)(px|rem)?$/.exec(n.trim());if(!e)return;let t=Number(e[1])*(e[2]==="rem"?16:1);return Number.isFinite(t)?t:void 0}function ge(n,e){if(!fe[n])return;return re(e?.get(Qt(n))??fe[n].value)}function he(n,e){let t=Vn[n];if(!t)return;return re(e?.get(Ue(t))??Te[t]?.value)}function me(n,e){let t=Un[n];if(!t)return;let r=re(e?.get(Ue(t.size))??Te[t.size]?.value),o=re(e?.get(Ue(t.leading))??Te[t.leading]?.value);if(r===void 0||o===void 0)return;return{fontSize:r,lineHeight:o}}var jt={transparent:"transparent",current:"currentColor",black:"#000000",white:"#ffffff",slate:{50:"#f8fafc",100:"#f1f5f9",200:"#e2e8f0",300:"#cbd5e1",400:"#94a3b8",500:"#64748b",600:"#475569",700:"#334155",800:"#1e293b",900:"#0f172a",950:"#020617"},gray:{50:"#f9fafb",100:"#f3f4f6",200:"#e5e7eb",300:"#d1d5db",400:"#9ca3af",500:"#6b7280",600:"#4b5563",700:"#374151",800:"#1f2937",900:"#111827",950:"#030712"},zinc:{50:"#fafafa",100:"#f4f4f5",200:"#e4e4e7",300:"#d4d4d8",400:"#a1a1aa",500:"#71717a",600:"#52525b",700:"#3f3f46",800:"#27272a",900:"#18181b",950:"#09090b"},red:{50:"#fef2f2",100:"#fee2e2",200:"#fecaca",300:"#fca5a5",400:"#f87171",500:"#ef4444",600:"#dc2626",700:"#b91c1c",800:"#991b1b",900:"#7f1d1d",950:"#450a0a"},orange:{50:"#fff7ed",100:"#ffedd5",200:"#fed7aa",300:"#fdba74",400:"#fb923c",500:"#f97316",600:"#ea580c",700:"#c2410c",800:"#9a3412",900:"#7c2d12",950:"#431407"},amber:{50:"#fffbeb",100:"#fef3c7",200:"#fde68a",300:"#fcd34d",400:"#fbbf24",500:"#f59e0b",600:"#d97706",700:"#b45309",800:"#92400e",900:"#78350f",950:"#451a03"},yellow:{50:"#fefce8",100:"#fef9c3",200:"#fef08a",300:"#fde047",400:"#facc15",500:"#eab308",600:"#ca8a04",700:"#a16207",800:"#854d0e",900:"#713f12",950:"#422006"},green:{50:"#f0fdf4",100:"#dcfce7",200:"#bbf7d0",300:"#86efac",400:"#4ade80",500:"#22c55e",600:"#16a34a",700:"#15803d",800:"#166534",900:"#14532d",950:"#052e16"},emerald:{50:"#ecfdf5",100:"#d1fae5",200:"#a7f3d0",300:"#6ee7b7",400:"#34d399",500:"#10b981",600:"#059669",700:"#047857",800:"#065f46",900:"#064e3b",950:"#022c22"},teal:{50:"#f0fdfa",100:"#ccfbf1",200:"#99f6e4",300:"#5eead4",400:"#2dd4bf",500:"#14b8a6",600:"#0d9488",700:"#0f766e",800:"#115e59",900:"#134e4a",950:"#042f2e"},cyan:{50:"#ecfeff",100:"#cffafe",200:"#a5f3fc",300:"#67e8f9",400:"#22d3ee",500:"#06b6d4",600:"#0891b2",700:"#0e7490",800:"#155e75",900:"#164e63",950:"#083344"},sky:{50:"#f0f9ff",100:"#e0f2fe",200:"#bae6fd",300:"#7dd3fc",400:"#38bdf8",500:"#0ea5e9",600:"#0284c7",700:"#0369a1",800:"#075985",900:"#0c4a6e",950:"#082f49"},lime:{50:"#f7fee7",100:"#ecfccb",200:"#d9f99d",300:"#bef264",400:"#a3e635",500:"#84cc16",600:"#65a30d",700:"#4d7c0f",800:"#3f6212",900:"#365314",950:"#1a2e05"},fuchsia:{50:"#fdf4ff",100:"#fae8ff",200:"#f5d0fe",300:"#f0abfc",400:"#e879f9",500:"#d946ef",600:"#c026d3",700:"#a21caf",800:"#86198f",900:"#701a75",950:"#4a044e"},neutral:{50:"#fafafa",100:"#f5f5f5",200:"#e5e5e5",300:"#d4d4d4",400:"#a3a3a3",500:"#737373",600:"#525252",700:"#404040",800:"#262626",900:"#171717",950:"#0a0a0a"},stone:{50:"#fafaf9",100:"#f5f5f4",200:"#e7e5e4",300:"#d6d3d1",400:"#a8a29e",500:"#78716c",600:"#57534e",700:"#44403c",800:"#292524",900:"#1c1917",950:"#0c0a09"},blue:{50:"#eff6ff",100:"#dbeafe",200:"#bfdbfe",300:"#93c5fd",400:"#60a5fa",500:"#3b82f6",600:"#2563eb",700:"#1d4ed8",800:"#1e40af",900:"#1e3a8a",950:"#172554"},indigo:{50:"#eef2ff",100:"#e0e7ff",200:"#c7d2fe",300:"#a5b4fc",400:"#818cf8",500:"#6366f1",600:"#4f46e5",700:"#4338ca",800:"#3730a3",900:"#312e81",950:"#1e1b4b"},violet:{50:"#f5f3ff",100:"#ede9fe",200:"#ddd6fe",300:"#c4b5fd",400:"#a78bfa",500:"#8b5cf6",600:"#7c3aed",700:"#6d28d9",800:"#5b21b6",900:"#4c1d95",950:"#2e1065"},purple:{50:"#faf5ff",100:"#f3e8ff",200:"#e9d5ff",300:"#d8b4fe",400:"#c084fc",500:"#a855f7",600:"#9333ea",700:"#7e22ce",800:"#6b21a8",900:"#581c87",950:"#3b0764"},pink:{50:"#fdf2f8",100:"#fce7f3",200:"#fbcfe8",300:"#f9a8d4",400:"#f472b6",500:"#ec4899",600:"#db2777",700:"#be185d",800:"#9d174d",900:"#831843",950:"#500724"},rose:{50:"#fff1f2",100:"#ffe4e6",200:"#fecdd3",300:"#fda4af",400:"#fb7185",500:"#f43f5e",600:"#e11d48",700:"#be123c",800:"#9f1239",900:"#881337",950:"#4c0519"}},Je={px:1,0:0,0.5:2,1:4,1.5:6,2:8,2.5:10,3:12,3.5:14,4:16,5:20,6:24,7:28,8:32,9:36,10:40,11:44,12:48,14:56,16:64,20:80,24:96,28:112,32:128,36:144,40:160,44:176,48:192,52:208,56:224,60:240,64:256,72:288,80:320,96:384},He={xs:12,sm:14,base:16,lg:18,xl:20,"2xl":24,"3xl":30,"4xl":36,"5xl":48,"6xl":60,"7xl":72,"8xl":96,"9xl":128},qe={none:0,sm:2,DEFAULT:4,md:6,lg:8,xl:12,"2xl":16,"3xl":24,full:9999};function G(n){let e=n.lastIndexOf("/");if(e>0&&!n.endsWith("]")){let r=G(n.slice(0,e)),o=n.slice(e+1),a=/^\[(.+)\]$/.test(o)?Number.parseFloat(o.slice(1,-1))*(o.includes("%")?1:100):Number.parseFloat(o);if(!r||!Number.isFinite(a))return;return Wt(r,a/100)}if(n==="transparent")return"transparent";if(n==="current")return"currentColor";if(n==="black")return"#000000";if(n==="white")return"#ffffff";let t=n.split("-");if(t.length===2){let[r,o]=t,a=jt[r];if(a&&typeof a==="object")return a[o]}if(n.startsWith("[")&&n.endsWith("]")){let r=n.slice(1,-1);return/^(#|rgba?\(|hsla?\(|[a-z]+$)/i.test(r)?r:void 0}return}function be(n){return G(n.trim())}function Wt(n,e){if(n==="transparent")return n;let t=n.startsWith("#")?n.slice(1):"";if(t.length===3)t=t.split("").map((o)=>o+o).join("");if(t.length===8)t=t.slice(0,6);if(t.length!==6)return;let r=Math.round(Math.min(1,Math.max(0,e))*255);return`#${t}${r.toString(16).padStart(2,"0")}`}function ye(n,e=16){if(!n.startsWith("[")||!n.endsWith("]"))return;let t=n.slice(1,-1),r=Number.parseFloat(t);if(!Number.isFinite(r))return;if(t.endsWith("rem"))return r*16;if(t.endsWith("em"))return r*e;return r}function O(n){if(n.startsWith("[")&&n.endsWith("]")){let e=n.slice(1,-1);if(e.endsWith("%"))return;let t=e.endsWith("rem")?Number.parseFloat(e)*16:Number.parseFloat(e);return Number.isFinite(t)?t:void 0}return Je[n]??he(n)}function ie(n){let e=/^\[(-?\d*\.?\d+)%\]$/.exec(n);if(e)return`${Number.parseFloat(e[1])}%`;return O(n)}var Ft={flex:(n,e)=>(e.display="flex",!0),hidden:(n,e)=>(e.display="none",!0),grid:(n,e)=>(e.display="grid",!0),"flex-row":(n,e)=>(e.flexDirection="row",!0),"flex-col":(n,e)=>(e.flexDirection="column",!0),"flex-row-reverse":(n,e)=>(e.flexDirection="row-reverse",!0),"flex-col-reverse":(n,e)=>(e.flexDirection="column-reverse",!0),"flex-wrap":(n,e)=>(e.flexWrap="wrap",!0),"flex-nowrap":(n,e)=>(e.flexWrap="nowrap",!0),"flex-wrap-reverse":(n,e)=>(e.flexWrap="wrap-reverse",!0),"flex-1":(n,e)=>(e.flex=1,e.flexGrow=1,e.flexShrink=1,e.flexBasis=0,!0),"flex-auto":(n,e)=>(e.flexGrow=1,e.flexShrink=1,!0),"flex-initial":(n,e)=>(e.flexGrow=0,e.flexShrink=1,!0),"flex-none":(n,e)=>(e.flexGrow=0,e.flexShrink=0,!0),grow:(n,e)=>(e.flexGrow=1,!0),"grow-0":(n,e)=>(e.flexGrow=0,!0),shrink:(n,e)=>(e.flexShrink=1,!0),"shrink-0":(n,e)=>(e.flexShrink=0,!0),"order-first":(n,e)=>(e.order=-9999,!0),"order-last":(n,e)=>(e.order=9999,!0),"order-none":(n,e)=>(e.order=0,!0),"justify-start":(n,e)=>(e.justifyContent="flex-start",!0),"justify-center":(n,e)=>(e.justifyContent="center",!0),"justify-end":(n,e)=>(e.justifyContent="flex-end",!0),"justify-between":(n,e)=>(e.justifyContent="space-between",!0),"justify-around":(n,e)=>(e.justifyContent="space-around",!0),"justify-evenly":(n,e)=>(e.justifyContent="space-evenly",!0),"items-start":(n,e)=>(e.alignItems="flex-start",!0),"items-center":(n,e)=>(e.alignItems="center",!0),"items-end":(n,e)=>(e.alignItems="flex-end",!0),"items-stretch":(n,e)=>(e.alignItems="stretch",!0),"items-baseline":(n,e)=>(e.alignItems="baseline",!0),"self-auto":(n,e)=>(e.alignSelf="auto",!0),"self-start":(n,e)=>(e.alignSelf="flex-start",!0),"self-center":(n,e)=>(e.alignSelf="center",!0),"self-end":(n,e)=>(e.alignSelf="flex-end",!0),"self-stretch":(n,e)=>(e.alignSelf="stretch",!0),"self-baseline":(n,e)=>(e.alignSelf="baseline",!0),"min-w-0":(n,e)=>(e.minWidth=0,!0),"aspect-square":(n,e)=>(e.aspectRatio=1,!0),"inset-0":(n,e)=>(e.top=0,e.right=0,e.bottom=0,e.left=0,!0),"tracking-tighter":(n,e)=>(e.letterSpacing=-0.8,!0),"tracking-tight":(n,e)=>(e.letterSpacing=-0.4,!0),"tracking-normal":(n,e)=>(e.letterSpacing=0,!0),"tracking-wide":(n,e)=>(e.letterSpacing=0.4,!0),"tracking-wider":(n,e)=>(e.letterSpacing=0.8,!0),"tracking-widest":(n,e)=>(e.letterSpacing=1.6,!0),"tabular-nums":()=>!0,block:()=>!0,"inline-flex":(n,e)=>(e.display="flex",!0),truncate:()=>!0,relative:(n,e)=>(e.position="relative",!0),absolute:(n,e)=>(e.position="absolute",!0),"overflow-visible":(n,e)=>(e.overflow="visible",!0),"overflow-hidden":(n,e)=>(e.overflow="hidden",!0),"overflow-scroll":(n,e)=>(e.overflow="scroll",!0),"overflow-x-auto":()=>!0,"overflow-x-scroll":()=>!0,"overflow-y-auto":()=>!0,"overflow-y-scroll":()=>!0,"font-thin":(n,e)=>(e.fontWeight="100",!0),"font-extralight":(n,e)=>(e.fontWeight="200",!0),"font-light":(n,e)=>(e.fontWeight="300",!0),"font-normal":(n,e)=>(e.fontWeight="400",!0),"font-medium":(n,e)=>(e.fontWeight="500",!0),"font-semibold":(n,e)=>(e.fontWeight="600",!0),"font-bold":(n,e)=>(e.fontWeight="bold",!0),"font-extrabold":(n,e)=>(e.fontWeight="800",!0),"font-black":(n,e)=>(e.fontWeight="900",!0),italic:(n,e)=>(e.fontStyle="italic",!0),"not-italic":(n,e)=>(e.fontStyle="normal",!0),"text-left":(n,e)=>(e.textAlign="left",!0),"text-center":(n,e)=>(e.textAlign="center",!0),"text-right":(n,e)=>(e.textAlign="right",!0),"text-justify":(n,e)=>(e.textAlign="justify",!0),uppercase:(n,e)=>(e.textTransform="uppercase",!0),lowercase:(n,e)=>(e.textTransform="lowercase",!0),capitalize:(n,e)=>(e.textTransform="capitalize",!0),"normal-case":(n,e)=>(e.textTransform="none",!0),underline:(n,e)=>(e.textDecorationLine="underline",!0),"line-through":(n,e)=>(e.textDecorationLine="line-through",!0),"no-underline":(n,e)=>(e.textDecorationLine="none",!0)};function Xt(n,e){if(!n.startsWith("bg-"))return!1;let t=n.slice(3),r=G(t);if(r)return e.backgroundColor=r,!0;return!1}function zt(n,e){if(!n.startsWith("text-"))return!1;let t=n.slice(5),r=me(t);if(r)return Object.assign(e,r),!0;if(He[t])return e.fontSize=He[t],!0;if(t.startsWith("[")&&t.endsWith("]")){let a=t.slice(1,-1);if(/^-?[\d.]+(?:px|r?em)?$/.test(a)){let c=a.endsWith("rem")||a.endsWith("em")?Number.parseFloat(a)*16:Number.parseFloat(a);if(Number.isFinite(c))return e.fontSize=c,!0}}let o=G(t);if(o)return e.color=o,!0;return!1}var Ht=new Set(["t","tr","r","br","b","bl","l","tl"]);function Ut(n,e){let t=/^bg-(?:gradient|linear)-to-([a-z]+)$/.exec(n);if(t&&Ht.has(t[1]))return e.gradientDirection=`to-${t[1]}`,!0;let r=/^(from|via|to)-(.+)$/.exec(n);if(!r)return!1;let o=G(r[2]);if(!o)return!1;if(r[1]==="from")e.gradientFrom=o;else if(r[1]==="via")e.gradientVia=o;else e.gradientTo=o;return!0}function qt(n,e){for(let t of["fill","stroke"]){let r=`${t}-`;if(!n.startsWith(r))continue;let o=n.slice(r.length);if(o==="none")return e[t]="none",!0;if(t==="stroke"&&/^\d+(?:\.\d+)?$/.test(o))return e.strokeWidth=Number.parseFloat(o),!0;if(t==="stroke"&&/^\[\d+(?:\.\d+)?(?:px)?\]$/.test(o))return e.strokeWidth=Number.parseFloat(o.slice(1)),!0;let a=G(o);if(a)return e[t]=a,!0}return!1}function Gt(n,e){if(n.startsWith("p-")){let t=O(n.slice(2));if(t!==void 0)return e.padding=t,!0}if(n.startsWith("px-")){let t=O(n.slice(3));if(t!==void 0)return e.paddingHorizontal=t,!0}if(n.startsWith("py-")){let t=O(n.slice(3));if(t!==void 0)return e.paddingVertical=t,!0}if(n.startsWith("pt-")){let t=O(n.slice(3));if(t!==void 0)return e.paddingTop=t,!0}if(n.startsWith("pr-")){let t=O(n.slice(3));if(t!==void 0)return e.paddingRight=t,!0}if(n.startsWith("pb-")){let t=O(n.slice(3));if(t!==void 0)return e.paddingBottom=t,!0}if(n.startsWith("pl-")){let t=O(n.slice(3));if(t!==void 0)return e.paddingLeft=t,!0}return!1}function Ke(n,e){if(/^-(?:m|mx|my|mt|mr|mb|ml)-/.test(n)){let t={};if(!Ke(n.slice(1),t))return!1;let r=Object.entries(t);if(r.some(([,o])=>typeof o!=="number"))return!1;for(let[o,a]of r)e[o]=-a;return!0}if(n.startsWith("m-")){let t=O(n.slice(2));if(t!==void 0)return e.margin=t,!0}if(n.startsWith("mx-")){let t=O(n.slice(3));if(t!==void 0)return e.marginHorizontal=t,!0}if(n.startsWith("my-")){let t=O(n.slice(3));if(t!==void 0)return e.marginVertical=t,!0}if(n.startsWith("mt-")){let t=O(n.slice(3));if(t!==void 0)return e.marginTop=t,!0}if(n.startsWith("mr-")){let t=O(n.slice(3));if(t!==void 0)return e.marginRight=t,!0}if(n.startsWith("mb-")){let t=O(n.slice(3));if(t!==void 0)return e.marginBottom=t,!0}if(n.startsWith("ml-")){let t=O(n.slice(3));if(t!==void 0)return e.marginLeft=t,!0}return!1}function Jt(n,e){if(!n.startsWith("w-"))return!1;let t=n.slice(2);if(t==="full")return e.width="100%",!0;if(t==="screen")return e.width="100%",!0;if(t==="auto")return e.width="auto",!0;if(t.includes("/")){let[o,a]=t.split("/"),c=Number.parseInt(o)/Number.parseInt(a)*100;return e.width=`${c}%`,!0}let r=ie(t);if(r!==void 0)return e.width=r,!0;return!1}function Kt(n,e){if(!n.startsWith("h-"))return!1;let t=n.slice(2);if(t==="full")return e.height="100%",!0;if(t==="screen")return e.height="100%",!0;if(t==="auto")return e.height="auto",!0;let r=ie(t);if(r!==void 0)return e.height=r,!0;return!1}function Yt(n,e){if(n==="rounded")return e.borderRadius=qe.DEFAULT,!0;if(!n.startsWith("rounded-"))return!1;let t=n.slice(8);if(t==="")return!1;let r=/^(?:(tl|tr|bl|br|t|b|l|r)-)?(.+)$/.exec(t),o=qe[r[2]]??ge(r[2])??ye(r[2]);if(o===void 0)return!1;let a={t:["borderTopLeftRadius","borderTopRightRadius"],b:["borderBottomLeftRadius","borderBottomRightRadius"],l:["borderTopLeftRadius","borderBottomLeftRadius"],r:["borderTopRightRadius","borderBottomRightRadius"],tl:["borderTopLeftRadius"],tr:["borderTopRightRadius"],bl:["borderBottomLeftRadius"],br:["borderBottomRightRadius"]};for(let c of r[1]?a[r[1]]:["borderRadius"])e[c]=o;return!0}function Zt(n,e){let t=/^border(?:-([trblxy]))?(?:-(\d+|\[[^\]]+\]))?$/.exec(n);if(!t)return!1;let[,r="",o]=t,a=o===void 0?1:Number(o);if(o?.startsWith("[")){let u=/^\[(\d+(?:\.\d+)?|\.\d+)(px|rem)?\]$/.exec(o);if(!u)return!1;a=Number(u[1])*(u[2]==="rem"?16:1)}if(!Number.isFinite(a)||a<0)return!1;let c={"":["borderWidth"],t:["borderTopWidth"],r:["borderRightWidth"],b:["borderBottomWidth"],l:["borderLeftWidth"],x:["borderLeftWidth","borderRightWidth"],y:["borderTopWidth","borderBottomWidth"]};for(let u of c[r])e[u]=a;return!0}function en(n,e){if(!n.startsWith("border-"))return!1;let t=n.slice(7),r=G(t);if(r)return e.borderColor=r,!0;return!1}function tn(n,e){if(!n.startsWith("opacity-"))return!1;let t=Number.parseInt(n.slice(8));if(!Number.isNaN(t))return e.opacity=t/100,!0;return!1}function nn(n,e){if(n.startsWith("tracking-[")){let t=ye(n.slice(9),typeof e.fontSize==="number"?e.fontSize:16);if(t===void 0)return!1;return e.letterSpacing=t,!0}if(n.startsWith("leading-")){let t=n.slice(8),r=typeof e.fontSize==="number"?e.fontSize:16,o={none:1,tight:1.25,snug:1.375,normal:1.5,relaxed:1.625,loose:2},a=t.startsWith("[")?/^\[[\d.]+\]$/.test(t)?Number.parseFloat(t.slice(1,-1))*r:ye(t,r):o[t]!==void 0?o[t]*r:Je[t];if(a===void 0||!Number.isFinite(a))return!1;return e.lineHeight=a,!0}return!1}function rn(n,e){let t=/^grid-cols-(\d+)$/.exec(n);if(!t)return!1;return e.gridColumns=Number(t[1]),!0}function sn(n,e){if(!n.startsWith("size-"))return!1;let t=n.slice(5),r=t==="full"?"100%":ie(t);if(r===void 0)return!1;return e.width=r,e.height=r,!0}var on={xs:320,sm:384,md:448,lg:512,xl:576,"2xl":672,"3xl":768,"4xl":896,"5xl":1024,"6xl":1152,"7xl":1280};function an(n,e){let t=/^(min|max)-(w|h)-(.+)$/.exec(n);if(!t)return!1;let[,r,o,a]=t,c=a==="full"||a==="screen"?"100%":a==="none"?void 0:o==="w"&&r==="max"&&on[a]||ie(a);if(c===void 0&&a!=="none")return!1;let u=`${r}${o==="w"?"Width":"Height"}`;if(c===void 0)delete e[u];else e[u]=c;return!0}function cn(n,e){let t=/^(-?)(top|right|bottom|left)-(.+)$/.exec(n);if(!t)return!1;let r=t[3]==="full"?"100%":O(t[3]);if(r===void 0)return!1;return e[t[2]]=typeof r==="number"&&t[1]?-r:r,!0}function ln(n,e){let t=/^(-?)translate-(x|y)-(.+)$/.exec(n);if(!t)return!1;let r=t[3],o;if(r.startsWith("[")){let u=/^\[([+-]?(?:\d+\.?\d*|\.\d+))(px|rem|em)?\]$/.exec(r);if(!u)return!1;o=Number(u[1])*(u[2]?.endsWith("em")?16:1)}else o=O(r);if(o===void 0||!Number.isFinite(o))return!1;if(t[1])o=-o;let a=t[2]==="x"?"translateX":"translateY",c=a==="translateX"?{translateX:o}:{translateY:o};return e.transform=[...(e.transform??[]).filter((u)=>!(a in u)),c],!0}function un(n,e){let t=/^space-(x|y)-(.+)$/.exec(n);if(!t)return!1;let r=O(t[2]);if(r===void 0)return!1;return e.gap=r,!0}function dn(n,e){if(n.startsWith("gap-")){let t=O(n.slice(4));if(t!==void 0)return e.gap=t,!0}if(n.startsWith("gap-x-")){let t=O(n.slice(6));if(t!==void 0)return e.columnGap=t,!0}if(n.startsWith("gap-y-")){let t=O(n.slice(6));if(t!==void 0)return e.rowGap=t,!0}return!1}function fn(n,e){let r={"shadow-none":[0,0,0,0],"shadow-xs":[1,1,0.05,1],"shadow-sm":[2,1,0.1,2],shadow:[3,2,0.12,3],"shadow-md":[6,4,0.15,4],"shadow-lg":[10,6,0.18,8],"shadow-xl":[16,10,0.2,12],"shadow-2xl":[24,16,0.25,18]}[n];if(!r)return!1;let[o,a,c,u]=r;return Object.assign(e,{shadowColor:"#000000",shadowOpacity:c,shadowRadius:o,shadowOffset:{width:0,height:a},elevation:u}),!0}function Q(n,e,t={}){let r=[],o=[],a=[],c=[],u={focus:{classes:[],originals:new Map},focusWithin:{classes:[],originals:new Map}},f=new Map;function h(l,p){let y=/^(text|bg|border|ring)-([a-z-]+)(\/[^\s]+)?$/.exec(l),w=y&&gt[y[2]];if(w){let x=e?.get(Ve(y[2]));return[`${y[1]}-${x===void 0?w[p]:`[${x}]`}${y[3]||""}`]}let N=/^rounded-(?:(tl|tr|bl|br|t|b|l|r)-)?(.+)$/.exec(l);if(N&&fe[N[2]]){let x=ge(N[2],e);return x===void 0?void 0:[`rounded-${N[1]?`${N[1]}-`:""}[${x}px]`]}let d=l.startsWith("text-")?l.slice(5):"";if(Un[d]){let x=me(d,e);return x&&[`text-[${x.fontSize}px]`,`leading-[${x.lineHeight}px]`]}for(let x of Object.keys(Vn)){if(!l.endsWith(`-${x}`))continue;let R=he(x,e);return R===void 0?void 0:[`${l.slice(0,-x.length)}[${R}px]`]}return[l]}function S(l,p){if(!f.has(l))f.set(l,new Set);return f.get(l).add(p),l}for(let l of n.split(/\s+/).filter(Boolean)){let p=/^(dark:)?(focus|focus-within):(dark:)?(.+)$/.exec(l),y=p?.[2]==="focus"?"focus":"focusWithin";if(p&&t[y]&&!(p[1]&&p[3])){let w=`${p[1]||p[3]?"dark:":""}${p[4]}`,N=u[y];N.classes.push(w),N.originals.set(w,[...N.originals.get(w)??[],l]);continue}if(l.startsWith("dark:")){let w=h(l.slice(5),"dark");if(!w)c.push(l);else o.push(...w.map((N)=>S(N,l)))}else if(!l.includes(":")||l.startsWith("[")){let w=h(l,"light"),N=h(l,"dark");if(!w||!N){c.push(l);continue}if(r.push(...w.map((d)=>S(d,l))),N.join(" ")!==w.join(" "))a.push(...N.map((d)=>S(d,l)))}else c.push(l)}let v=[],b=Ge(r,v),m={style:b,unknown:v};if(o.length||a.length)m.dark=Ge([...a,...o],v);if(b.transform&&m.dark?.transform){let l=new Set(m.dark.transform.flatMap((p)=>Object.keys(p)));m.dark.transform=[...b.transform.filter((p)=>!Object.keys(p).some((y)=>l.has(y))),...m.dark.transform]}for(let l of r){if(l==="truncate")m.numberOfLines=1;let p=/^line-clamp-(\d+)$/.exec(l);if(p)m.numberOfLines=Number(p[1]);if(!m.icon&&/^i-[a-z0-9]+-[a-z0-9-]+$/.test(l))m.icon=l}let g=v.flatMap((l)=>[...f.get(l)??[l]]);m.unknown=[...new Set([...g.filter((l)=>!/^line-clamp-\d+$/.test(l)),...c])];for(let l of["focus","focusWithin"]){let p=u[l];if(!p.classes.length)continue;let y=Q(p.classes.join(" "),e);m[l]={style:y.style,dark:y.dark},m.unknown=[...new Set([...m.unknown,...y.unknown.flatMap((w)=>p.originals.get(w)??[w])])];for(let w of p.classes)if(/^(?:dark:)?(?:truncate|line-clamp-\d+|i-[a-z0-9]+-.+)$/.test(w))m.unknown.push(...p.originals.get(w))}return m}function Ge(n,e){let t={},r=Array.isArray(n)?n:n.split(/\s+/).filter(Boolean);for(let o of r){if(/^i-[a-z0-9]+-/.test(o))continue;let a=Ft[o];if(a){a("",t);continue}if(fn(o,t))continue;if(Ut(o,t))continue;if(Xt(o,t))continue;if(qt(o,t))continue;if(zt(o,t))continue;if(Gt(o,t))continue;if(Ke(o,t))continue;if(Jt(o,t))continue;if(Kt(o,t))continue;if(Yt(o,t))continue;if(Zt(o,t))continue;if(en(o,t))continue;if(tn(o,t))continue;if(dn(o,t))continue;if(nn(o,t))continue;if(sn(o,t))continue;if(an(o,t))continue;if(rn(o,t))continue;let c=/^order-\[(-?\d+)\]$/.exec(o)??/^order-(-?\d+)$/.exec(o);if(c){t.order=Number(c[1]);continue}if(cn(o,t))continue;if(ln(o,t))continue;if(un(o,t))continue;if(e?.push(o),typeof process<"u"&&process.env?.NODE_ENV==="development")console.warn(`[STX Native] Unknown Headwind class: ${o}`)}return t}var Ye=new Map;function Qe(n,e){if(!n)return;let t=n.trim(),r=t.lastIndexOf("-"),o=r===-1?e[t]:e[t.slice(0,r)],a=r===-1?o:o?.[t.slice(r+1)];if(typeof a==="string"&&/^#[\da-f]{3,8}$/i.test(a))return a;return be(t)??be(`[${t}]`)}function gn(n){let e=n.roles??{},t=n.shapes??{},r=n.density??{},o={...n.theme?.colors,...n.theme?.extend?.colors},a=[],c=[];for(let[u,f]of Object.entries(e)){if(!gt[u])continue;let h=Qe(typeof f==="string"?f:f?.light,o),S=Qe(typeof f==="string"?f:f?.dark,o);if(h)a.push(`${Ve(u)}: ${h};`);if(S)c.push(`${Ve(u)}: ${S};`)}for(let[u,f]of Object.entries(t))if(fe[u])a.push(`${Qt(u)}: ${f};`);for(let[u,f]of Object.entries(r))if(Te[u])a.push(`${Ue(u)}: ${f};`);return[a.length?`:root { ${a.join(" ")} }`:"",c.length?`.dark { ${c.join(" ")} }`:""].filter(Boolean).join(`
3
- `)}async function hn(n){let{resolveUserCssConfig:e}=await import("./chunk-fsbjat59.js"),t=await e(n);return t?gn(t):""}function Ze(n){let e=pn.resolve(n),t=Ye.get(e);if(!t)t=hn(e).catch(()=>""),Ye.set(e,t);return t}var tt={"aria-pressed":"selected","aria-selected":"selected","aria-checked":"checked","aria-disabled":"disabled","aria-expanded":"expanded","aria-busy":"busy"},et={alert:"alert",button:"button",checkbox:"checkbox",combobox:"combobox",header:"header",heading:"header",image:"image",img:"image",link:"link",menu:"menu",menubar:"menubar",menuitem:"menuitem",none:"none",presentation:"none",progressbar:"progressbar",radio:"radio",scrollbar:"scrollbar",search:"search",searchbox:"search",slider:"adjustable",spinbutton:"spinbutton",switch:"switch",tab:"tab",tablist:"tablist",timer:"timer",toolbar:"toolbar"};function mn(n){return n==="role"||n==="aria-label"||n==="aria-valuetext"||n in tt}function yn(n,e){if(e===void 0||e===null)return;let t=String(e).trim().toLowerCase();if(t==="mixed")return n==="aria-checked"?"mixed":!0;if(t==="undefined")return;return t===""||t==="true"}function bn(n){if(n===void 0||n===null)return null;for(let e of String(n).trim().toLowerCase().split(/\s+/))if(et[e])return et[e];return null}function vn(n,e,t){if(n==="aria-label")return{accessibilityLabel:e===void 0||e===null||e===""?null:String(e)};if(n==="aria-valuetext")return{accessibilityValue:e===void 0||e===null||e===""?null:String(e)};if(n==="role")return{accessibilityRole:bn(e)};let r=tt[n];if(!r)return;let o=t.accessibilityState,a=o&&typeof o==="object"?{...o}:{},c=yn(n,e);if(c===void 0)delete a[r];else a[r]=c;return{accessibilityState:Object.keys(a).length?a:null}}function wn(n){let e=n.accessibilityState&&typeof n.accessibilityState==="object"?n.accessibilityState:void 0,t={};for(let[o,a]of Object.entries(n)){if(!mn(o))continue;let c=vn(o,a,t);if(c)Object.assign(t,c)}for(let o of["accessibilityLabel","accessibilityRole","accessibilityValue"])if(n[o]===void 0&&t[o]!==void 0&&t[o]!==null)n[o]=t[o];let r=t.accessibilityState;if(r)n.accessibilityState={...r,...e}}var ve=["accessibilityLabel","accessibilityRole","accessibilityState","accessibilityValue"];function we(n){let e={...n};return wn(e),Object.fromEntries(ve.filter((t)=>(t in e)).map((t)=>[t,e[t]]))}var Se={"region-change-complete":"onRegionChangeComplete",regionchangecomplete:"onRegionChangeComplete",click:"onPress",press:"onPress","press-in":"onPressIn",pressin:"onPressIn","press-out":"onPressOut",pressout:"onPressOut",longpress:"onLongPress",contextmenu:"onLongPress",input:"onChangeText",onchange:"onChange",change:"onValueChange","value-change":"onValueChange",valuechange:"onValueChange",focus:"onFocus",focusin:"onFocus",blur:"onBlur",focusout:"onBlur",submit:"onSubmitEditing","submit-editing":"onSubmitEditing",submitediting:"onSubmitEditing","end-editing":"onEndEditing",endediting:"onEndEditing",scroll:"onScroll","scroll-begin-drag":"onScrollBeginDrag",scrollbegindrag:"onScrollBeginDrag","scroll-end-drag":"onScrollEndDrag",scrollenddrag:"onScrollEndDrag","momentum-scroll-begin":"onMomentumScrollBegin",momentumscrollbegin:"onMomentumScrollBegin","momentum-scroll-end":"onMomentumScrollEnd",momentumscrollend:"onMomentumScrollEnd",refresh:"onRefresh",layout:"onLayout","end-reached":"onEndReached",endreached:"onEndReached",close:"onRequestClose","request-close":"onRequestClose",requestclose:"onRequestClose",show:"onShow",dismiss:"onDismiss","sliding-complete":"onSlidingComplete",slidingcomplete:"onSlidingComplete","load-start":"onLoadStart",loadstart:"onLoadStart",load:"onLoad","load-end":"onLoadEnd",loadend:"onLoadEnd",error:"onError",play:"onPlay",playing:"onPlay",pause:"onPause",ended:"onEnd",end:"onEnd",timeupdate:"onProgress",progress:"onProgress",loadedmetadata:"onLoad",enterpictureinpicture:"onPictureInPictureStart",leavepictureinpicture:"onPictureInPictureStop"};var xe={svg:"Svg",g:"G",path:"Path",line:"Line",rect:"Rect",circle:"Circle",ellipse:"Ellipse",polyline:"Polyline",polygon:"Polygon",text:"SvgText",tspan:"SvgText",animate:"Animate"},ke=new Set(Object.values(xe));var it=new Set(["defs","title","desc","metadata","style","symbol","use","clippath","mask","lineargradient","radialgradient","stop","pattern","marker","filter","foreignobject"]),st=["viewBox","preserveAspectRatio","strokeWidth","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin","strokeMiterlimit","strokeOpacity","fillOpacity","fillRule","vectorEffect","textAnchor","dominantBaseline","fontSize","fontWeight","attributeName","keyTimes","repeatCount"];function D(n){let e=typeof n==="number"?n:Number.parseFloat(String(n??""));return Number.isFinite(e)?e:0}function q(n){return Math.round(n*1000)/1000}function Re(n){if(Array.isArray(n)&&n.length===4&&n.every((t)=>Number.isFinite(Number(t))))return n.map(Number);let e=String(n??"").trim().split(/[\s,]+/).map(Number);if(e.length!==4||e.some((t)=>!Number.isFinite(t))||e[2]<=0||e[3]<=0)return null;return e}function Sn(n){let e=String(n??"").trim().split(/[\s,]+/).filter(Boolean).map(Number).filter(Number.isFinite);return e.length%2?e.slice(0,-1):e}var nt=/[MLHVCSQTAZ]/i,Ne=/[+-]?(?:\d+\.?\d*|\.\d+)(?:e[+-]?\d+)?/gi;function Nn(n){let e=[],t=n,r=nt.exec(t);while(r){let o=r.index;t=t.slice(o);let a=t[0];t=t.slice(1);let c=nt.exec(t),u=c?t.slice(0,c.index):t,f;if(a==="A"||a==="a"){f=[];let h=0,S=u.trim(),v=0;while(v<S.length){let b=h%7,m=S.slice(v).replace(/^[\s,]+/,"");if(v=S.length-m.length,!m)break;if(b===3||b===4)f.push(m[0]==="1"?1:0),v+=1;else{Ne.lastIndex=0;let g=Ne.exec(m);if(!g||g.index!==0)break;f.push(Number.parseFloat(g[0])),v+=g[0].length}h++}}else f=(u.match(Ne)||[]).map(Number.parseFloat);e.push({command:a,args:f}),r=c}return e}function xn(n,e,t,r,o,a,c,u,f){if(n===u&&e===f)return[];let h=Math.abs(t),S=Math.abs(r);if(!h||!S)return[1,u,f];let v=o*Math.PI/180,b=Math.cos(v),m=Math.sin(v),g=(n-u)/2,l=(e-f)/2,p=b*g+m*l,y=-m*g+b*l,w=p*p/(h*h)+y*y/(S*S);if(w>1)h*=Math.sqrt(w),S*=Math.sqrt(w);let N=h*h*S*S-h*h*y*y-S*S*p*p,d=h*h*y*y+S*S*p*p,x=Math.sqrt(Math.max(0,N/d));if(a===c)x=-x;let R=x*(h*y)/S,W=x*-(S*p)/h,T=b*R-m*W+(n+u)/2,L=m*R+b*W+(e+f)/2,P=(M,j,V,Y)=>{let ue=M*Y-j*V<0?-1:1,de=(M*V+j*Y)/(Math.hypot(M,j)*Math.hypot(V,Y));return ue*Math.acos(Math.min(1,Math.max(-1,de)))},k=P(1,0,(p-R)/h,(y-W)/S),_=P((p-R)/h,(y-W)/S,(-p-R)/h,(-y-W)/S);if(!c&&_>0)_-=2*Math.PI;if(c&&_<0)_+=2*Math.PI;let I=Math.max(1,Math.ceil(Math.abs(_)/(Math.PI/2))),E=_/I,A=1.3333333333333333*Math.tan(E/4),B=[],H=(M)=>{let j=h*Math.cos(M),V=S*Math.sin(M);return[b*j-m*V+T,m*j+b*V+L]},U=(M)=>{let j=-h*Math.sin(M),V=S*Math.cos(M);return[b*j-m*V,m*j+b*V]},F=k;for(let M=0;M<I;M++){let j=F+E,[V,Y]=H(F),[ue,de]=U(F),[We,Fe]=H(j),[Pt,Bt]=U(j);B.push(2,V+A*ue,Y+A*de,We-A*Pt,Fe-A*Bt,M===I-1?u:We,M===I-1?f:Fe),F=j}return B}function ot(n){let e=[],t=0,r=0,o=0,a=0,c=0,u=0,f=0,h=0,S="";for(let{command:v,args:b}of Nn(String(n??""))){let m=v===v.toLowerCase(),g=v.toUpperCase(),l=()=>m?t:0,p=()=>m?r:0,y=0,w=(d)=>{if(y+d>b.length)return null;let x=b.slice(y,y+d);return y+=d,x};if(g==="Z"){e.push(4),t=o,r=a,S="Z";continue}let N=!0;while(y<b.length||N&&g==="Z"){switch(g){case"M":{let d=w(2);if(!d)return e;if(t=d[0]+l(),r=d[1]+p(),N)e.push(0,t,r),o=t,a=r;else e.push(1,t,r);S=N?"M":"L";break}case"L":{let d=w(2);if(!d)return e;t=d[0]+l(),r=d[1]+p(),e.push(1,t,r),S="L";break}case"H":{let d=w(1);if(!d)return e;t=d[0]+l(),e.push(1,t,r),S="L";break}case"V":{let d=w(1);if(!d)return e;r=d[0]+p(),e.push(1,t,r),S="L";break}case"C":{let d=w(6);if(!d)return e;let x=d[0]+l(),R=d[1]+p();c=d[2]+l(),u=d[3]+p(),t=d[4]+l(),r=d[5]+p(),e.push(2,x,R,c,u,t,r),S="C";break}case"S":{let d=w(4);if(!d)return e;let x=S==="C"?2*t-c:t,R=S==="C"?2*r-u:r;c=d[0]+l(),u=d[1]+p(),t=d[2]+l(),r=d[3]+p(),e.push(2,x,R,c,u,t,r),S="C";break}case"Q":{let d=w(4);if(!d)return e;f=d[0]+l(),h=d[1]+p(),t=d[2]+l(),r=d[3]+p(),e.push(3,f,h,t,r),S="Q";break}case"T":{let d=w(2);if(!d)return e;f=S==="Q"?2*t-f:t,h=S==="Q"?2*r-h:r,t=d[0]+l(),r=d[1]+p(),e.push(3,f,h,t,r),S="Q";break}case"A":{let d=w(7);if(!d)return e;let x=d[5]+l(),R=d[6]+p();e.push(...xn(t,r,d[0],d[1],d[2],d[3],d[4],x,R)),t=x,r=R,S="A";break}default:return e}N=!1}}return e.map((v)=>q(v))}function rt(n,e,t,r){if(t<=0||r<=0)return[];let o=0.5522847498;return[0,n+t,e,2,n+t,e+o*r,n+o*t,e+r,n,e+r,2,n-o*t,e+r,n-t,e+o*r,n-t,e,2,n-t,e-o*r,n-o*t,e-r,n,e-r,2,n+o*t,e-r,n+t,e-o*r,n+t,e,4].map(q)}function Ae(n,e){switch(n){case"Path":return ot(String(e.d??""));case"Line":return[0,D(e.x1),D(e.y1),1,D(e.x2),D(e.y2)].map(q);case"Rect":{let t=D(e.x),r=D(e.y),o=D(e.width),a=D(e.height);if(o<=0||a<=0)return[];let c=e.rx===void 0?D(e.ry):D(e.rx),u=e.ry===void 0?c:D(e.ry);if(c=Math.min(Math.max(0,c),o/2),u=Math.min(Math.max(0,u),a/2),!c||!u)return[0,t,r,1,t+o,r,1,t+o,r+a,1,t,r+a,4].map(q);let f=0.5522847498;return[0,t+c,r,1,t+o-c,r,2,t+o-c+f*c,r,t+o,r+u-f*u,t+o,r+u,1,t+o,r+a-u,2,t+o,r+a-u+f*u,t+o-c+f*c,r+a,t+o-c,r+a,1,t+c,r+a,2,t+c-f*c,r+a,t,r+a-u+f*u,t,r+a-u,1,t,r+u,2,t,r+u-f*u,t+c-f*c,r,t+c,r,4].map(q)}case"Circle":return rt(D(e.cx),D(e.cy),D(e.r),D(e.r));case"Ellipse":return rt(D(e.cx),D(e.cy),D(e.rx),D(e.ry));case"Polyline":case"Polygon":{let t=Sn(e.points);if(t.length<4)return[];let r=[0,t[0],t[1]];for(let o=2;o<t.length;o+=2)r.push(1,t[o],t[o+1]);if(n==="Polygon")r.push(4);return r.map(q)}default:return null}}function kn(n){let e=/^\s*(\d+(?:\.\d+)?|\.\d+)\s*(ms|s)?\s*$/.exec(String(n??""));if(!e)return null;let t=Number(e[1])/(e[2]==="ms"?1000:1);return t>0?t:null}function Tn(n){if(n.attributeName!=="d")return null;let e=kn(n.dur),t=String(n.values??"").split(";").map((u)=>u.trim()).filter(Boolean);if(e===null||t.length<2)return null;let r=t.map(ot);if(r.some((u)=>!u.length))return null;let o=String(n.keyTimes??"").split(";").map((u)=>u.trim()).filter(Boolean).map(Number),c=o.length===r.length&&o[0]===0&&o[o.length-1]===1&&o.every((u,f)=>Number.isFinite(u)&&(f===0||u>=o[f-1]))?o.map(q):r.map((u,f)=>q(f/(r.length-1)));return{frames:r,frameTimes:c,duration:e}}function _e(n){let e=Tn(n),t={frames:e?.frames??null,frameTimes:e?.frameTimes??null,duration:e?.duration??null};for(let[r,o]of Object.entries(t))if(o===null)delete n[r];else n[r]=o;return t}var Rn=[...st,"accessibilityHint","accessibilityLabel","accessibilityRole","accessibilityState","accessibilityValue","activeOpacity","alwaysBounceHorizontal","alwaysBounceVertical","animationType","autoCapitalize","autoComplete","autoCorrect","autoFocus","contentContainerStyle","currentTime","defaultSource","defaultValue","ellipsizeMode","hidesWhenStopped","hitSlop","imageStyle","initialNumToRender","ios_backgroundColor","keyboardDismissMode","keyboardShouldPersistTaps","keyboardType","keyboardVerticalOffset","keyExtractor","listRole","maxLength","maximumDate","maximumTrackTintColor","maximumValue","maxToRenderPerBatch","minimumDate","minimumTrackTintColor","minimumValue","minuteInterval","numberOfLines","numColumns","onEndReachedThreshold","pagingEnabled","passwordRules","placeholderTextColor","pointerEvents","presentationStyle","nonModal","dismissOnOutsideTap","pressRetentionOffset","progressBackgroundColor","progressViewOffset","refreshControl","resizeMode","returnKeyType","scrollEnabled","scrollTarget","secureTextEntry","selectedValue","selectionColor","showsHorizontalScrollIndicator","showsVerticalScrollIndicator","stickyHeaderIndices","testID","textContentType","thumbColor","thumbTintColor","titleColor","trackColor","underlayColor","windowSize","initialRegion","tileOverlay","edgePadding","fitToBounds","showsUserLocation","zoomEnabled","rotateEnabled","pitchEnabled","mapType","fillColor","strokeColor","pinColor","showsCompass","showsScale","cameraPitch","cameraHeading","autoScrollBottom","scrollKey","pictureInPicture","transitionID"],at=new Set(["alwaysBounceHorizontal","alwaysBounceVertical","animating","autoCorrect","autoFocus","autoplay","autoPlay","bounces","controls","disabled","editable","hidesWhenStopped","horizontal","loop","multiline","muted","pagingEnabled","paused","refreshing","scrollEnabled","secureTextEntry","selectTextOnFocus","showsHorizontalScrollIndicator","showsVerticalScrollIndicator","transparent","visible","nonModal","dismissOnOutsideTap","fitToBounds","showsUserLocation","zoomEnabled","rotateEnabled","pitchEnabled","showsCompass","showsScale","pictureInPicture"]),An=new Map(Rn.map((n)=>[ct(n),n]));function ct(n){return n.replace(/[-_]/g,"").toLowerCase()}function Ee(n,e){if((e==="Image"||e==="Video")&&n.toLowerCase()==="src")return"source";return An.get(ct(n))??n}var _n={view:"View",sidebar:"Sidebar",splitview:"SplitView",textinput:"TextInput",pressable:"Pressable",icon:"Icon",text:"Text",button:"Button",image:"Image",img:"Image",video:"Video",map:"Map",mappolyline:"MapPolyline",mappolygon:"MapPolygon",mapmarker:"MapMarker",input:"TextInput",textarea:"TextInput",scroll:"ScrollView",scrollview:"ScrollView",list:"FlatList",flatlist:"FlatList",modal:"Modal",switch:"Switch",checkbox:"Checkbox",slider:"Slider",picker:"Picker",select:"Picker",loading:"ActivityIndicator",spinner:"ActivityIndicator",div:"View",span:"Text",p:"Text",h1:"Text",h2:"Text",h3:"Text",h4:"Text",h5:"Text",h6:"Text",a:"TouchableOpacity",section:"View",article:"View",header:"SafeAreaView",footer:"View",main:"View",nav:"View",aside:"View",form:"View",label:"Text",fieldset:"View",legend:"Text",option:"Text",dialog:"Modal",figure:"View",figcaption:"Text",picture:"View",hr:"View",ul:"View",ol:"View",li:"View",dl:"View",dt:"Text",dd:"Text",table:"View",thead:"View",tbody:"View",tfoot:"View",tr:"View",th:"Text",td:"Text",caption:"Text",strong:"Text",b:"Text",em:"Text",i:"Text",u:"Text",s:"Text",small:"Text",mark:"Text",abbr:"Text",time:"Text",code:"Text",kbd:"Text",samp:"Text",pre:"Text",blockquote:"Text",cite:"Text",q:"Text",sub:"Text",sup:"Text"};function lt(n){return _n[n.toLowerCase()]||n}var En={activity:"waveform.path.ecg","alarm-clock":"alarm","alert-circle":"exclamationmark.circle","alert-triangle":"exclamationmark.triangle",apple:"leaf",archive:"archivebox",armchair:"sofa","arrow-down":"arrow.down","arrow-left":"arrow.left","arrow-right":"arrow.right","arrow-up":"arrow.up","arrow-up-right":"arrow.up.right","at-sign":"at","audio-lines":"waveform",award:"rosette",backpack:"backpack","badge-check":"checkmark.seal","badge-x":"xmark.seal",ban:"nosign","bar-chart":"chart.bar","bar-chart-2":"chart.bar","bar-chart-3":"chart.bar",battery:"battery.100","battery-charging":"battery.100.bolt",bean:"leaf",bed:"bed.double",beef:"fork.knife",bell:"bell","bell-off":"bell.slash","bell-ring":"bell.and.waves.left.and.right",bike:"figure.outdoor.cycle",blocks:"square.grid.2x2",bluetooth:"antenna.radiowaves.left.and.right",book:"book","book-open":"book",bookmark:"bookmark",box:"shippingbox",brain:"brain",building:"building","building-2":"building.2",cable:"cable.connector","cake-slice":"birthday.cake",calendar:"calendar","calendar-check":"calendar.badge.checkmark","calendar-clock":"calendar.badge.clock","calendar-days":"calendar","calendar-minus":"calendar.badge.minus","calendar-minus-2":"calendar.badge.minus","calendar-off":"calendar.badge.exclamationmark","calendar-plus":"calendar.badge.plus","calendar-range":"calendar","calendar-sync":"arrow.triangle.2.circlepath","calendar-x":"calendar.badge.exclamationmark","calendar-x-2":"calendar.badge.exclamationmark",camera:"camera",carrot:"carrot","chart-bar":"chart.bar","chart-column":"chart.bar","chart-line":"chart.xyaxis.line","chart-no-axes-gantt":"chart.bar.doc.horizontal",check:"checkmark","check-circle":"checkmark.circle","check-circle-2":"checkmark.circle","chevron-down":"chevron.down","chevron-left":"chevron.left","chevron-right":"chevron.right","chevron-up":"chevron.up",circle:"circle","circle-alert":"exclamationmark.circle","circle-arrow-out-up-left":"arrow.uturn.backward.circle","circle-minus":"minus.circle","circle-arrow-down":"arrow.down.circle","circle-check":"checkmark.circle","circle-check-big":"checkmark.circle","circle-dot":"smallcircle.filled.circle","circle-help":"questionmark.circle","circle-play":"play.circle","circle-plus":"plus.circle","circle-user":"person.crop.circle","circle-x":"xmark.circle",clapperboard:"film",clipboard:"clipboard","clipboard-list":"list.clipboard",clock:"clock","clock-12":"clock","clock-2":"clock","clock-3":"clock","clock-4":"clock","clock-8":"clock","clock-alert":"clock.badge.exclamationmark",cloud:"cloud","cloud-off":"icloud.slash",coffee:"cup.and.saucer",cookie:"birthday.cake",copy:"doc.on.doc","credit-card":"creditcard","cup-soda":"takeoutbag.and.cup.and.straw",cylinder:"cylinder",disc:"opticaldisc",download:"arrow.down.circle",droplet:"drop",droplets:"drop",drumstick:"fork.knife",dumbbell:"dumbbell",edit:"pencil",egg:"frying.pan","external-link":"arrow.up.right.square",eye:"eye","eye-off":"eye.slash",file:"doc","file-text":"doc.text",filter:"line.3.horizontal.decrease",fish:"fish",flag:"flag",flame:"flame","flower-2":"camera.macro",footprints:"figure.run",gauge:"gauge",gift:"gift","glass-water":"waterbottle",globe:"globe","graduation-cap":"graduationcap","grip-vertical":"line.3.horizontal",hamburger:"takeoutbag.and.cup.and.straw","hand-fist":"hand.raised",heart:"heart","heart-off":"heart.slash","heart-pulse":"heart.text.square","help-circle":"questionmark.circle",history:"clock.arrow.circlepath",home:"house",hourglass:"hourglass",house:"house","id-card":"person.text.rectangle",image:"photo",inbox:"tray",info:"info.circle",layers:"square.3.layers.3d","layout-dashboard":"rectangle.3.group","layout-grid":"square.grid.2x2",leaf:"leaf",library:"books.vertical",link:"link",list:"list.bullet","list-checks":"checklist",loader:"arrow.triangle.2.circlepath","loader-2":"arrow.triangle.2.circlepath","loader-circle":"arrow.triangle.2.circlepath",lock:"lock","log-in":"arrow.right.to.line","log-out":"rectangle.portrait.and.arrow.right",mail:"envelope",map:"map","map-pin":"mappin.and.ellipse",medal:"medal",megaphone:"megaphone",menu:"line.3.horizontal","message-circle":"bubble.left","message-square":"text.bubble","message-square-quote":"quote.bubble","messages-square":"bubble.left.and.bubble.right",mic:"mic",milk:"waterbottle",minus:"minus",moon:"moon","more-horizontal":"ellipsis","more-vertical":"ellipsis",mountain:"mountain.2",music:"music.note","music-2":"music.note",nut:"leaf",package:"shippingbox",pause:"pause","pause-circle":"pause.circle",pencil:"pencil","person-standing":"figure.walk",phone:"phone",play:"play.fill",plug:"powerplug",plus:"plus","plus-circle":"plus.circle","rectangle-horizontal":"rectangle","refresh-cw":"arrow.clockwise",repeat:"repeat","rotate-ccw":"arrow.counterclockwise",route:"point.topleft.down.to.point.bottomright.curvepath",ruler:"ruler",sailboat:"sailboat",salad:"leaf",satellite:"antenna.radiowaves.left.and.right",save:"square.and.arrow.down",scale:"scalemass","scan-line":"barcode.viewfinder",search:"magnifyingglass",send:"paperplane",settings:"gearshape","settings-2":"slider.horizontal.3",share:"square.and.arrow.up","share-2":"square.and.arrow.up",shield:"shield","shield-check":"checkmark.shield","shopping-bag":"bag","shopping-cart":"cart",shuffle:"shuffle","skip-back":"backward.end","skip-forward":"forward.end",sliders:"slider.horizontal.3","sliders-horizontal":"slider.horizontal.3",smartphone:"iphone",snowflake:"snowflake",soup:"mug",sparkles:"sparkles",sprout:"leaf",square:"square",star:"star",stopwatch:"stopwatch",store:"storefront","stretch-horizontal":"rectangle.split.1x2",sun:"sun.max",sunrise:"sunrise",sunset:"sunset",tag:"tag",target:"scope",thermometer:"thermometer.medium","thumbs-up":"hand.thumbsup",timer:"timer",trash:"trash","trash-2":"trash","trending-down":"chart.line.downtrend.xyaxis","trending-up":"chart.line.uptrend.xyaxis","triangle-alert":"exclamationmark.triangle",trophy:"trophy",unlink:"personalhotspot.slash",upload:"arrow.up.circle",user:"person","user-check":"person.crop.circle.badge.checkmark","user-minus":"person.badge.minus","user-plus":"person.badge.plus","user-round":"person","user-round-check":"person.crop.circle.badge.checkmark","user-round-minus":"person.crop.circle.badge.minus","user-round-plus":"person.crop.circle.badge.plus","user-round-x":"person.crop.circle.badge.xmark","user-x":"person.crop.circle.badge.xmark",users:"person.2","users-round":"person.2",utensils:"fork.knife",video:"video","volume-2":"speaker.wave.2",warehouse:"building.2",watch:"applewatch",waves:"figure.pool.swim",weight:"scalemass",wheat:"laurel.leading",wifi:"wifi","wifi-off":"wifi.slash",wind:"wind",wine:"wineglass",x:"xmark","x-circle":"xmark.circle",zap:"bolt"};function Ie(n,e=!1){let t=String(n??"").trim();if(!t)return{symbol:"circle",known:!1};if(e)return{symbol:t,known:!0};let r=/^i-([a-z0-9]+)-(.+)$/.exec(t)??/^([a-z0-9]+):(.+)$/.exec(t),o=r?r[1]:"lucide",a=r?r[2]:t;if(o==="lucide"){let c=En[a];if(c)return{symbol:c,iconify:`i-lucide-${a}`,known:!0};if(!r&&t.includes("."))return{symbol:t,known:!0}}return{symbol:"circle",iconify:r?t:`i-lucide-${a}`,known:!1}}var dt=/^--[\w\u0080-\uFFFF-]+$/u;function ut(n,e){if(!/var\(/i.test(n))return n;let t="",r="",o=!1;for(let a=0;a<n.length;a++){let c=n[a];if(c==="\\"){t+=n.slice(a,a+2),a++;continue}if(r){if(t+=c,c===r)r="";continue}if(c==='"'||c==="'"){r=c,t+=c;continue}if(n.slice(a,a+4).toLowerCase()!=="var("||a>0&&/[\w-]/.test(n[a-1])){t+=c;continue}let u=1,f=-1,h="",S=a+4;for(;S<n.length;S++){let m=n[S];if(m==="\\"){S++;continue}if(h){if(m===h)h="";continue}if(m==='"'||m==="'"){h=m;continue}if(m==="(")u++;if(m===")"&&--u===0)break;if(m===","&&u===1&&f===-1)f=S}if(u!==0)return;let v=n.slice(a+4,f===-1?S:f).trim();if(!dt.test(v))return;let b=e(v,f===-1?void 0:n.slice(f+1,S).trim());if(b===void 0||t.length+b.length>65536)return;t+=b,o=!0,a=S}return o&&t.length>65536?void 0:t}function Z(n,e){let t=new Map,r=new Set;for(let[l,p]of n){let y=l.trim();if(!dt.test(y))continue;if(typeof p==="string"||typeof p==="number"&&Number.isFinite(p))t.set(y,String(p).trim())}let o=new Map,a=new Set;for(let[l,p]of t){let y=new Set,w=(N,d=0)=>d>64?void 0:ut(N,(x,R)=>(y.add(x),R===void 0?"":w(R,d+1)));if(w(p)===void 0)a.add(l);o.set(l,y)}let c=new Map,u=new Map,f=[],h=new Set,S=0;function v(l,p=0){if(p>64){a.add(l);return}c.set(l,S),u.set(l,S++),f.push(l),h.add(l);for(let N of o.get(l)??[]){if(!t.has(N))continue;if(!c.has(N)){if(v(N,p+1),u.has(N))u.set(l,Math.min(u.get(l),u.get(N)))}else if(h.has(N))u.set(l,Math.min(u.get(l),c.get(N)))}if(u.get(l)!==c.get(l))return;let y=[],w;do w=f.pop(),h.delete(w),y.push(w);while(w!==l);if(y.length>1||o.get(l)?.has(l))y.forEach((N)=>a.add(N))}for(let l of t.keys())if(!c.has(l))v(l);let b=new Map;function m(l,p){if(r.add(l),b.has(l))return b.get(l);let y=t.get(l),w=y===void 0||/^(?:inherit|unset)$/i.test(y)?e?.get(l):a.has(l)||/^(?:initial|revert|revert-layer)$/i.test(y)?void 0:g(y,p+1);return b.set(l,w),w}function g(l,p=0){if(p>64)return;return ut(l,(y,w)=>m(y,p)??(w===void 0?void 0:g(w,p+1)))}return{resolve:g,used:r,computed(){let l=new Map(e);for(let p of t.keys())l.set(p,m(p,0));return l}}}function Ce(n){if(n.display==="flex"&&n.flexDirection==null)return{...n,flexDirection:"row"};return n}var ft=new Set(["display","gridColumns","gridTemplateColumns","gridTemplateRows","gridAutoRows","flex","flexGrow","flexShrink","flexBasis","flexDirection","flexWrap","order","justifyContent","alignItems","alignSelf","alignContent","position","top","right","bottom","left","zIndex","width","height","minWidth","maxWidth","minHeight","maxHeight","aspectRatio","margin","marginTop","marginRight","marginBottom","marginLeft","marginHorizontal","marginVertical","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingHorizontal","paddingVertical","gap","rowGap","columnGap","borderWidth","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor","borderRadius","borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius","borderStyle","backgroundColor","backgroundImage","opacity","shadowColor","shadowOffset","shadowOpacity","shadowRadius","elevation","color","fontSize","fontWeight","fontStyle","fontFamily","lineHeight","letterSpacing","textAlign","textDecorationLine","textDecorationColor","textTransform","resizeMode","tintColor","transform","overflow","fill","stroke","strokeWidth","gradientDirection","gradientFrom","gradientVia","gradientTo"]),In=new Set(["gridColumns","gridAutoRows","flex","flexGrow","flexShrink","order","zIndex","aspectRatio","gap","rowGap","columnGap","borderWidth","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderRadius","borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius","opacity","shadowOpacity","shadowRadius","elevation","fontSize","lineHeight","letterSpacing","strokeWidth"]),ht=new Set(["top","right","bottom","left","width","height","minWidth","maxWidth","minHeight","maxHeight","flexBasis","margin","marginTop","marginRight","marginBottom","marginLeft","marginHorizontal","marginVertical","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingHorizontal","paddingVertical"]),Cn=/^[+-]?(?:\d+\.?\d*|\.\d+)(?:e[+-]?\d+)?$/i,On=/^([+-]?(?:\d+\.?\d*|\.\d+)(?:e[+-]?\d+)?)(px|rem|em)?$/i,Pn=new Set(["rotate","rotateX","rotateY","rotateZ","skewX","skewY"]),Bn=new Set(["perspective","scale","scaleX","scaleY","translateX","translateY"]);function Mn(n){if(typeof n!=="string")return n;let e=On.exec(n);return e?Number(e[1])*(/^r?em$/i.test(e[2]||"")?16:1):n}function K(n){return typeof n==="number"&&Number.isFinite(n)}function Dn(n,e){if(n==="shadowOffset"&&e&&typeof e==="object"&&!Array.isArray(e)){let{width:t,height:r}=e;return K(t)&&K(r)?{width:t,height:r}:void 0}if(n==="transform"&&Array.isArray(e)){let t=[];for(let r of e){if(!r||typeof r!=="object"||Array.isArray(r)||Object.keys(r).length!==1)return;let[o,a]=Object.entries(r)[0];if(Bn.has(o)&&K(a))t.push({[o]:a});else if(Pn.has(o)&&typeof a==="string"&&/^[+-]?(?:\d+\.?\d*|\.\d+)(?:deg|rad)$/.test(a))t.push({[o]:a});else return}return t}return}function Ln(n){let e=[],t=0,r=0,o="";for(let a=0;a<=n.length;a++){let c=n[a];if(c==="\\"){a++;continue}if(o){if(c===o)o="";continue}if(c==='"'||c==="'"){o=c;continue}if(c==="(")r++;if(c===")")r=Math.max(0,r-1);if(a!==n.length&&(c!==";"||r))continue;let u=n.slice(t,a),f=u.indexOf(":");if(f!==-1)e.push([u.slice(0,f).trim(),u.slice(f+1).trim()]);t=a+1}return e}function $n(n,e){let t;if(typeof n==="string"){if(n=n.trim(),!n)return[];try{n=JSON.parse(n)}catch{}}if(typeof n==="string")t=Ln(n);else if(n&&typeof n==="object"&&!Array.isArray(n))t=Object.entries(n);else{if(n!=null&&n!==!1)e({kind:"non-numeric-style",name:"style"});return[]}return t}function mt(n,e=()=>{},t={}){let r=$n(n,e),o=Z(r,t.inheritedVariables);return t.onVariables?.(o.computed()),jn(r,o,e)}function jn(n,e,t){let r={},o=[];for(let[a,c]of n){if(a.trim().startsWith("--")){o.push(a.trim());continue}let u=ft.has(a)||a.trim().startsWith("--")?a:a.trim().toLowerCase().replace(/-([a-z])/g,(S,v)=>v.toUpperCase());if(!ft.has(u)){t({kind:"unknown-style",name:u});continue}if(c==null||c==="")continue;let f=typeof c==="string"?e.resolve(c.trim()):c;if(f===void 0){t({kind:"non-numeric-style",name:u});continue}if(f==="")continue;let h;if(In.has(u)||ht.has(u)){if(h=Mn(f),!K(h)&&!(ht.has(u)&&typeof h==="string"&&h.endsWith("%")&&Cn.test(h.slice(0,-1))&&Number.isFinite(Number(h.slice(0,-1)))))h=void 0}else if(u==="display"&&f==="inline-flex")h="flex";else if(u==="shadowOffset"||u==="transform")h=Dn(u,f);else if(u==="gridTemplateColumns"||u==="gridTemplateRows")h=K(f)||typeof f==="string"?f:void 0;else if(u==="fontWeight"&&K(f))h=String(f);else if(typeof f==="string")h=f;if(h===void 0)t({kind:"non-numeric-style",name:u});else r[u]=h}for(let a of o)if(!e.used.has(a))t({kind:"unknown-style",name:a});return r}import{generate as ee,parse as yt}from"@stacksjs/ts-css/parse";async function bt(n,e){let t={light:new Map,dark:new Map},r=new Set,o=(v)=>{if(!r.has(v))r.add(v),e(v)},a=(v,b,m)=>{for(let g of m){let l=t[g].get(v);if(!l||Number(b.important)>Number(l.important)||b.important===l.important&&b.specificity>=l.specificity)t[g].set(v,b)}},c=(v)=>{if(v.type==="Declaration")return v.property.startsWith("--");if(v.type==="Rule"||v.type==="Atrule")return!!v.block&&[...v.block.children].some(c);return!1},u=(v)=>{let b=v.replace(/\s+/g,"").toLowerCase();if(!b||b==="all"||b==="screen")return["light","dark"];let m=/^(?:screenand)?\(prefers-color-scheme:(light|dark)\)$/.exec(b);return m?[m[1]]:void 0};function f(v,b){for(let m of v){if(!c(m))continue;if(m.type==="Atrule"){let l=m.prelude?ee(m.prelude):"",p=m.name.toLowerCase()==="media"?u(l):void 0;if(!p){o(`@${m.name} ${l}`.trim());continue}f(m.block.children,b.filter((y)=>p.includes(y)));continue}if(m.type!=="Rule")continue;let g=m.prelude.type==="SelectorList"?[...m.prelude.children].map(ee):[ee(m.prelude)];for(let l of g){let p=/^(html|:root)?(?:\.(dark|light))?$/.exec(l.trim());if(!p||!p[1]&&!p[2]){o(l);continue}let y=(p[1]===":root"?10:p[1]?1:0)+(p[2]?10:0);for(let w of m.block.children){if(w.type!=="Declaration"){if(c(w))o(`nested rule in ${l}`);continue}if(!w.property.startsWith("--"))continue;let N={value:ee(w.value),important:!!w.important,specificity:y};a(w.property,N,b.filter((d)=>!p[2]||p[2]===d))}}}}let h="",S;return await new HTMLRewriter().on("html",{element(v){let b=v.getAttribute("style");if(!b)return;try{let m=yt(b,{context:"declarationList"});if(m.type!=="DeclarationList")return;for(let g of m.children)if(g.type==="Declaration"&&g.property.startsWith("--"))a(g.property,{value:ee(g.value),important:!!g.important,specificity:1000},["light","dark"])}catch{o("invalid document inline theme")}}}).on("style",{element(v){h="";let b=v.getAttribute("type");S=!b||b.toLowerCase()==="text/css"?u(v.getAttribute("media")??""):void 0,v.onEndTag(()=>{try{let m=yt(h);if(m.type!=="StyleSheet")return;if(!S){if([...m.children].some(c))o("style type/media");return}f(m.children,S)}catch{o("invalid stylesheet")}})},text(v){h+=v.text}}).transform(new Response(n)).text(),{light:[...t.light].map(([v,b])=>[v,b.value]),dark:[...t.dark].map(([v,b])=>[v,b.value])}}function z(n,e={},t={},r={},o=[]){return{type:n,props:e,style:t,events:r,children:o}}function vt(n,e,t={}){return{version:"1.0.0",root:n,script:e,meta:{source:t.source||"unknown",compiledAt:t.compiledAt||Date.now(),headwindConfig:t.headwindConfig}}}var wt=new Set(["script","style","head","meta","link","title","base","noscript"]),St=new Set(["template","body","html","main","fragment"]),se=new Set,Wn=new Set(["onBlur","onChange","onChangeText","onDismiss","onEnd","onEndEditing","onEndReached","onError","onFocus","onLayout","onLoad","onLoadEnd","onLoadStart","onLongPress","onMomentumScrollBegin","onMomentumScrollEnd","onPause","onPictureInPictureStart","onPictureInPictureStop","onPlay","onPress","onPressIn","onPressOut","onProgress","onRequestClose","onRegionChangeComplete","onRefresh","onScroll","onScrollBeginDrag","onScrollEndDrag","onShow","onSlidingComplete","onSubmitEditing","onValueChange"]),Oe=new Set(["Sidebar","SplitView","View","ScrollView","SafeAreaView","KeyboardAvoidingView","Text","TextInput","Button","Link","TouchableOpacity","TouchableHighlight","Pressable","Icon","Image","ImageBackground","Video","Map","MapPolyline","MapPolygon","MapMarker","FlatList","SectionList","Switch","Checkbox","Slider","Picker","DatePicker","Modal","ActivityIndicator","StatusBar","RefreshControl",...ke]),Fn=new Map([["data","data"],["sections","sections"],["renderitem","renderItem"],["rendersectionheader","renderSectionHeader"],["keyextractor","keyExtractor"]]),Nt=new Set(["View","SafeAreaView","ScrollView","KeyboardAvoidingView"]),Xn={amp:"&",lt:"<",gt:">",quot:'"',apos:"'",nbsp:" ","#39":"'","#x27":"'"};function J(n){return n.replace(/&(#x?[0-9a-f]+|\w+);/gi,(e,t)=>{let r=Xn[t.toLowerCase()];if(r!==void 0)return r;if(t[0]==="#"){let o=t[1]==="x"||t[1]==="X"?Number.parseInt(t.slice(2),16):Number.parseInt(t.slice(1),10);return Number.isFinite(o)?String.fromCodePoint(o):e}return e})}function xt(n,e,t,r={}){let o=r.inheritedVariables,a={},c={},u={},f="",h={};for(let[m,g]of e){let l=m.toLowerCase();if(l==="class"||l==="classname"){f=f?`${f} ${g}`:g;continue}if(l==="style"){h={...h,...zn(n,g,t,{...r,onVariables(w){o=w,r.onVariables?.(w)}})};continue}if(l.startsWith(":")||l.startsWith("x-")&&l!=="x-cloak"){u[l.startsWith(":")?l.slice(1):l.slice(2)]=J(g);continue}if(l==="x-cloak")continue;if(l.startsWith("@")||l.startsWith("v-on:")){let w=l.startsWith("@")?l.slice(1):l.slice(5),[N]=w.split("."),d=Se[N]??(N.startsWith("on")?N:"");if(!d||!Wn.has(d)){t.push({kind:"unread-event",tag:n,name:m});continue}c[d]=J(g);continue}if(l==="key"){a.key=g;continue}let p=J(g),y=Ee(m);if(p===""&&at.has(y)){a[y]=!0;continue}try{a[y]=JSON.parse(p)}catch{a[y]=p}}let S=a["data-native"]?a["data-native"]==="TextInput":n==="textarea"||n==="input"&&!["checkbox","radio","hidden"].includes(String(a.type??"text").toLowerCase()),v=f?Q(f,o,{focus:S,focusWithin:!0}):void 0;for(let m of new Set(v?.unknown??[]))t.push({kind:"unknown-class",tag:n,name:m});let b=Ce({...v?.style,...h});return{props:a,style:b,events:c,bindings:u,classes:f,inline:h}}function zn(n,e,t,r){return mt(J(e),(o)=>t.push({...o,tag:n}),r)}function Pe(n){return n.children.map((e)=>typeof e==="string"?e:Pe(e)).join("").replace(/\s+/g," ").trim()}function Hn(n,e){let t=n.node,r=t.children.filter((a)=>typeof a!=="string"),o=t.children.filter((a)=>typeof a==="string").join("").trim();if(n.tag==="button"&&t.type==="Button"&&!n.declaredNative&&r.length>0)return t.type="Pressable",t.props.role??="button",t.children=t.children.flatMap((a)=>typeof a==="string"?a.trim()?[z("Text",{},{},{},[a.trim()])]:[]:[a]),t;if(t.type==="Button"&&r.length===0)return t.children=o?[o]:[],t;if(t.type==="Svg"||t.type==="G")return t.children=r,t;if(t.type==="SvgText"){let a=Pe(t);return t.children=a?[a]:[],t}if(Nt.has(t.type)&&r.length===0&&o)return t.type="Text",t.children=[o],t;if(t.type==="Text"&&!o&&r.length===0&&typeof t.props.text==="string")return t.children=t.props.text?[t.props.text]:[],delete t.props.text,t;if(t.type==="Text"&&r.length>0){if(/(?:^|\s)(?:inline-)?(?:flex|grid)(?:\s|$)/.test(t._classes??"")||r.some((u)=>u.type!=="Text"))return t.type="View",t.children=t.children.map((u)=>typeof u==="string"?z("Text",{},{},{},[u]):u),t;let c=Pe(t);return e.push({kind:"flattened-text",tag:n.tag}),t.children=c?[c]:[],t}if(Nt.has(t.type)&&r.length>0)t.children=r;return t}async function qn(n,e={}){let t=[],r=await bt(n,(g)=>t.push({kind:"unsupported-theme-rule",tag:"style",name:g})),o=Z(r.light).computed(),a=[],c=[],u=new Set;function f(g){let l=c[c.length-1];if(!l)a.push(g);else if(!l.dropped)l.node.children.push(g)}function h(g){let l=(y)=>{if(g.tag!=="html"&&g.node._styleSource)y._styleAncestors=[g.node._styleSource,...y._styleAncestors??[]]};if(g.node.bindings&&Object.keys(g.node.bindings).length>0){let y=g.node.children,w=y.filter((d)=>typeof d!=="string"),N=w.length===1&&w.length===y.length?w[0]:z("View",{},{},{},y);if(N.bindings={...g.node.bindings,...N.bindings},N.bindingId===void 0&&g.node.bindingId!==void 0)N.bindingId=g.node.bindingId;l(N),f(N);return}let p=c[c.length-1];for(let y of g.node.children){if(typeof y==="string"){if(p&&!p.dropped)p.node.children.push(y);continue}if(l(y),!p)a.push(y);else if(!p.dropped)p.node.children.push(y)}}function S(g,l){let p=c[c.length-1];if(g==="svg"||p?.svg)return v(g,l,p);let y=wt.has(g)&&!se.has(g),w=c[c.length-1]?.dropped??!1,N=p?.variables??o,{props:d,style:x,events:R,bindings:W,classes:T,inline:L}=y||w?{props:{},style:{},events:{},bindings:{},classes:"",inline:{}}:xt(g,l,t,{inheritedVariables:N,onVariables:(E)=>{N=E}});if(g==="html")N=o;let P=d["data-native"],k;if(typeof P==="string"&&Oe.has(P))k=P,delete d["data-native"];else if(k=se.has(g)?"View":lt(g),g==="input"){let E=String(d.type??"text").toLowerCase();if(E==="checkbox")k="Checkbox",d.formValue=d.value??"on",d.checked=d.checked===""||d.checked===!0||d.checked==="true",d.value=d.checked;else if(E==="hidden")k="View",x.display="none",L.display="none";else if(E==="radio")k="View",d.accessibilityRole="radio",t.push({kind:"unsupported-control",tag:g,name:"input:radio"})}if(!w&&k===g&&!Oe.has(k)&&!wt.has(g)&&!St.has(g)&&!u.has(g))u.add(g),t.push({kind:"unmapped-tag",tag:g});if((y||se.has(g))&&!u.has(`drop:${g}`))u.add(`drop:${g}`),t.push({kind:"dropped-subtree",tag:g});if(k==="View"&&/(?:^|\s)overflow-x-(?:auto|scroll)(?:\s|$)/.test(T))k="ScrollView",d.horizontal=!0,d.showsHorizontalScrollIndicator??=!1;else if(k==="View"&&/(?:^|\s)overflow-y-(?:auto|scroll)(?:\s|$)/.test(T))k="ScrollView";if(g==="form")d["data-stx-form"]=!0;if(g==="button"&&d.type===void 0)d.type="submit";if((k==="Video"||k==="Image")&&d.source===void 0&&d.src!==void 0)d.source=d.src,delete d.src;if(k==="Icon"){let E=Q(T).icon,A=Ie(String(d.symbol||d.name||E||""),Boolean(d.symbol));if(d.symbol=A.symbol,A.iconify)d.iconify=A.iconify}if(k==="FlatList"||k==="SectionList"){let E=new Set([...Object.keys(d),...Object.keys(W)].map((A)=>A.toLowerCase()));for(let[A,B]of Fn)if(E.has(A))t.push({kind:"unsupported-list-prop",tag:k,name:B})}let _=z(k,d,x,R);_._inlineStyle=L,_._styleSource=J(l.find(([E])=>E==="style")?.[1]??"");let I=d["data-stx-b"];if(typeof I==="number"&&Number.isInteger(I))_.bindingId=I;if(delete d["data-stx-b"],T)_._classes=T;if(Object.keys(W).length>0)_.bindings=W;if(typeof d.key==="string")_.key=d.key,delete d.key;return{tag:g,node:_,variables:N,declaredNative:typeof P==="string"&&Oe.has(P),dropped:y||w||se.has(g)||k==="Video",discard:y||w,unwrap:St.has(g)}}function v(g,l,p){let y=p?.dropped??!1,w=xe[g];if(y||!w){if(!y&&!u.has(`drop:${g}`))u.add(`drop:${g}`),t.push({kind:it.has(g)?"dropped-subtree":"unmapped-tag",tag:g});return{tag:g,node:z("G",{},{},{}),svg:!0,dropped:!0,discard:!0,unwrap:!1}}let N=p?.variables??o,{props:d,style:x,events:R,bindings:W,classes:T,inline:L}=xt(g,l,t,{inheritedVariables:N,onVariables:(I)=>{N=I}});if(w==="Svg"){let I=Re(d.viewBox);if(I)d.viewBox=I;else delete d.viewBox;for(let E of["width","height"]){if(typeof d[E]==="number"&&x[E]===void 0)x[E]=d[E];delete d[E]}}if(typeof d.strokeDasharray==="string"||typeof d.strokeDasharray==="number"){let I=String(d.strokeDasharray).split(/[\s,]+/).map(Number).filter(Number.isFinite);d.strokeDasharray=I}let P=Ae(w,d);if(P)d.geometry=P;if(w==="Animate")_e(d);let k=z(w,d,x,R);k._inlineStyle=L,k._styleSource=J(l.find(([I])=>I==="style")?.[1]??"");let _=d["data-stx-b"];if(typeof _==="number"&&Number.isInteger(_))k.bindingId=_;if(delete d["data-stx-b"],T)k._classes=T;if(Object.keys(W).length>0)k.bindings=W;if(typeof d.key==="string")k.key=d.key,delete d.key;return{tag:g,node:k,variables:N,svg:!0,dropped:!1,discard:!1,unwrap:!1}}if(await new HTMLRewriter().on("*",{element(g){let l=g.tagName.toLowerCase(),p=S(l,[...g.attributes]),y=!0;try{g.onEndTag(()=>{if(c.pop(),p.discard)return;if(p.unwrap)h(p);else f(Hn(p,t))})}catch{y=!1}if(y)c.push(p);else if(!p.discard)f(p.node)},text(g){let l=c[c.length-1];if(!l||l.dropped)return;let p=J(g.text).replace(/\s+/g," ");if(!p.trim())return;l.node.children.push(p)}}).transform(new Response(n)).text(),a.length===0)throw Error(`No element to translate in the rendered output of ${e.source??"unknown"}`);let b=a.length===1?a[0]:z("View",{},{},{},a);if(r.light.length||r.dark.length)b._stylesheetTheme=r;let m=(g)=>{let l=we(g.props);if(Object.keys(l).length)g._accessibilitySource=Object.fromEntries(ve.filter((p)=>(p in g.props)).map((p)=>[p,g.props[p]])),Object.assign(g.props,l);for(let p of g.children)if(typeof p!=="string")m(p)};return m(b),{root:b,diagnostics:t}}async function kt(n,e={}){let{root:t,diagnostics:r}=await qn(n,e),o=e.script??{exports:{},functions:[],code:""};return{document:vt(t,o,{source:e.source??"unknown"}),diagnostics:r}}var Tt=/<script\b([^>]*)>([\s\S]*?)<\/script>/gi,Gn=/(?:^|\n)\s*(?:export\s+)?(?:async\s+)?function\s*\*?\s*([$\w]+)\s*\(/g,Jn=/(?:^|\n)\s*(?:export\s+)?(?:const|let|var)\s+([$\w]+)\s*=\s*(?:async\s*)?(?:\([^)]*\)|[$\w]+)\s*=>/g,Rt=/(?:^|\n)\s*(?:export\s+)?const\s+([$\w]+)\s*=\s*(-?[\d.]+|true|false|'[^']*'|"[^"]*")\s*(?=;|\n|$)/g;function Be(n){let e=[];Tt.lastIndex=0;for(let a of n.matchAll(Tt)){let c=a[1]??"";if(/\bserver\b/.test(c))continue;e.push(a[2].trim())}let t=e.filter(Boolean).join(`
4
-
5
- `),r=[];for(let a of[Gn,Jn]){a.lastIndex=0;for(let c of t.matchAll(a))if(!r.includes(c[1]))r.push(c[1])}let o={};Rt.lastIndex=0;for(let a of t.matchAll(Rt)){let c=a[2];try{o[a[1]]=JSON.parse(c.replace(/^'(.*)'$/,'"$1"'))}catch{o[a[1]]=c}}return{exports:o,functions:r,code:t}}var oe=/<script\b([^>]*\bdata-stx-scoped\b[^>]*)>([\s\S]*?)<\/script>/gi,At=/function\s+(__stx_setup_[\w$]+)\s*\(/,Kn=/\bdata-stx-owner\s*=\s*["']([^"']+)["']/i;function Me(n){oe.lastIndex=0;for(let e of n.matchAll(oe)){let t=e[2].trim(),r=At.exec(t)?.[1];if(r)return{name:r,code:t}}return null}function _t(n){let e=[];oe.lastIndex=0;for(let t of n.matchAll(oe)){let r=t[1],o=t[2].trim(),a=Kn.exec(r)?.[1],c=/\bdata-stx-component-factories\b/i.test(r);if(!o||!a&&!c&&!At.test(o))continue;e.push(a?{code:o,owner:a}:{code:o})}return e}function Qn(){let n=[te.join(import.meta.dir,"..","primitives"),te.join(import.meta.dir,"native","primitives")];for(let e of n)if(Yn(te.join(e,"View.stx")))return e;return n[0]}async function Zn(n,e,t={}){let r=t.root??te.dirname(e),o=await i(r),a={root:r,componentsDir:t.componentsDir??o.componentsDir??te.join(r,"components"),buildMode:"serve",cache:!1,_targetComponentDirs:[Qn()],_targetComponentFallbackNames:["Button","Checkbox","Switch"],_nativeHostAttrs:!0,skipEventDirectives:!0,_pluginComponentDirs:o._pluginComponentDirs??[]},c={...t.context??{},__stx_inject_css:!1},u=new Set([e]),f=await s(n,c,e,a,u),{html:h,manifest:S}=ze(f),v=await Ze(r),{document:b,diagnostics:m}=await kt(v?`<style>${v}</style>${h}`:h,{source:e,script:Be(n)}),g=Me(h),l=_t(h);if(Be(n).code.trim()){let d=await Vr(n,e,t.context,{forceClientSetup:!0}),x=Me(d.setupCode??"");if(g=x??g,x&&!l.some((R)=>R.code===x.code))l.push({code:x.code})}let{buildModuleRegistryScript:p,registeredModuleIdsIn:y}=await import("./chunk-hfpv56cp.js"),w=[],N=await p(y(...l.map((d)=>d.code)),{collectInputs:w});for(let d of w)u.add(d);if(N)l.unshift({code:N});return{document:b,manifest:S,setup:g,scripts:l,diagnostics:m,html:h,dependencies:[...u]}}async function ae(n,e={}){return Zn(await Bun.file(n).text(),n,e)}var ne="__app";var ce="__runtime",rr="__messages";function De(n){let t=[C.join(import.meta.dir,"..","runtime",`${n}.ts`),C.join(import.meta.dir,"..","runtime",`${n}.js`),C.join(import.meta.dir,"native","runtime",`${n}.js`)].find((r)=>$e(r));if(!t)throw Error(`Native runtime module ${n} is missing`);return t}async function Le(n,e,t,r,o){let a={name:"stx-screen-inputs",setup(u){u.onLoad({filter:/.*/,namespace:"file"},({path:f})=>{r.add(f);let h=o?.get(f);return h===void 0?void 0:{contents:h,loader:"js"}})}},c=await Bun.build({entrypoints:[n],target:"browser",format:"iife",minify:t,plugins:[a,...e],define:{"process.env.NODE_ENV":JSON.stringify(t?"production":"development")}});if(!c.success){let u=c.logs.map((f)=>String(f.message??f)).join(`
6
- `);throw Error(`Could not bundle ${n}:
7
- ${u}`)}return(await c.outputs[0].text()).trim()}var ir=/^[\w-]+(?:\/[\w-]+)*$/,sr=/^[\w-]+$/;async function or(n,e){let t=C.resolve(n,e.dir);if(!e.languages?.length)throw Error("messages.languages must name at least one language");let r=new Map,o=new Map;for(let a of e.languages){if(!sr.test(a))throw Error(`messages: "${a}" is not a language directory name`);let c=C.join(t,a);if(!$e(c))throw Error(`messages: ${C.relative(n,c)} does not exist`);let u=new Map;for(let f of[...new Bun.Glob("**/*.{ts,js,mjs,json}").scanSync({cwd:c})].sort()){if(/\.(?:test|spec|d)\.[^.]+$/.test(f))continue;let h=f.replace(/\.[^./]+$/,"").split(C.sep).join("/");if(!ir.test(h))throw Error(`messages: ${a}/${f} is not an area name`);if(u.has(h))throw Error(`messages: ${a}/${h} is defined twice`);let S=C.join(c,f),v=await import(S),b=Object.keys(v).filter((l)=>l!=="default");if(b.length)throw Error(`messages: ${a}/${f} exports ${b.join(", ")}; a message module exports its messages as default, and nothing else`);let m=v.default,g=m!==null&&typeof m==="object"&&!Array.isArray(m)?JSON.stringify(m):void 0;if(g===void 0||!Bun.deepEquals(JSON.parse(g),m,!0))throw Error(`messages: ${a}/${f} must export plain data (an object JSON can hold) as default`);u.set(h,g),r.set(S,{language:a,area:h})}o.set(a,u)}return{files:r,data:o}}function ar(n,e){return`export default globalThis.__stxNativeRuntime.messages(${JSON.stringify(n)}, ${JSON.stringify(e)});`}function cr(n){let e=new Map;for(let[t,{language:r,area:o}]of n.files){let a=ar(r,o);e.set(t,a),e.set(nr(t),a)}return e}function lr(n){let e=new Set;for(let t of n.matchAll(/__stxNativeRuntime\.messages\(\s*"[\w-]+"\s*,\s*"([\w/-]+)"\s*\)/g))e.add(t[1]);return[...e].sort()}function ur(n,e){let t=C.isAbsolute(n.meta.source)?C.relative(e,n.meta.source).split(C.sep).join("/"):n.meta.source;return{...n,script:{exports:n.script.exports,functions:[],code:""},meta:{...n.meta,source:t,compiledAt:0}}}async function je(n){let e=Object.keys(n.screens);if(e.length===0)throw Error("screens must name at least one .stx file");let t=n.routed??!0,r=n.initialScreen??e[0];if(!n.screens[r])throw Error(`Initial screen ${r} is not in screens`);let o=C.resolve(n.root??process.cwd());if(n.messages&&!n.routesDir)throw Error("messages ship a language at a time beside route files: they need routesDir");if(n.sharedRuntime&&!n.routesDir)throw Error("sharedRuntime is the route files' runtime: it needs routesDir");if(n.messages&&!n.sharedRuntime)throw Error("messages are read by the shared runtime: they need sharedRuntime");if(n.messages&&n.outFile)throw Error("messages leave the languages out of the screens' code, which the one-file bundle cannot read: build it without messages");let a=n.messages?await or(o,n.messages):null,c=a?cr(a):null,u=[],f=async()=>{for(let T of e){let L=C.resolve(o,n.screens[T]);if(!L.endsWith(".stx"))throw Error(`Screen ${T} must name a .stx file`);u.push({name:T,file:L,compiled:await ae(L,{root:o})})}};if(c)await qs(c,f);else await f();let h=De("jsc-globals"),S=De("shared-screen"),v=n.app?C.resolve(o,n.app):null;if(v&&!$e(v))throw Error(`The app script ${n.app} does not exist`);if(v&&!t)throw Error("An app script needs a routed bundle");if(v&&n.screens[ne])throw Error(`${ne} is the app script's route, not a screen name`);let b=n.browser;if(n.screens[ce])throw Error(`${ce} is the runtime prelude's file, not a screen name`);let m=pt();if(b&&n.routesDir)throw Error("A browser screen is one route; routesDir is for device hosts");let g=(T,L,P)=>{let k=t?`var routeName = g.__stxNativeRoute || ${JSON.stringify(r)};
8
- var isApp = ${v?`routeName === ${JSON.stringify(ne)}`:"false"};
9
- if (!isApp && routeNames.indexOf(routeName) === -1) throw new Error(['Unknown native screen:', routeName].join(' '));
10
- if (isApp ? ${!L} : ${JSON.stringify(T.map(({name:F})=>F))}.indexOf(routeName) === -1) throw new Error(['This bundle does not hold the native screen', routeName].join(' '));`:`var routeName = 'main';
11
- var isApp = false;`,_=T.map(({name:F,compiled:M},j)=>`${j===0?"if":"else if"} (routeName === ${JSON.stringify(t?F:"main")}) {
12
- nativeDocument = ${JSON.stringify(ur(M.document,o))};
13
- manifest = ${JSON.stringify(M.manifest)};
14
- }`).join(`
15
- `),I=T.map(({name:F,compiled:M},j)=>`${j===0?"if":"else if"} (routeName === ${JSON.stringify(t?F:"main")}) {
16
- g.__stx_latestSetup = null;
17
- ${M.scripts.map((V)=>V.owner?` g.__stx_componentSetups = g.__stx_componentSetups || {};
18
- // Kept by id as well as run once: a :for or :if clone of this component
19
- // has no script to copy, and is set up from this (component hydration).
20
- g.__stx_componentSetups[${JSON.stringify(V.owner)}] = function() {
21
- ${V.code}
22
- };
23
- g.__STX_SETUP_ROOT__ = screen && screen.scopeRoot(${JSON.stringify(V.owner)});
24
- try { g.__stx_componentSetups[${JSON.stringify(V.owner)}](); }
25
- finally { g.__STX_SETUP_ROOT__ = null; }`:V.code).join(`
26
- `)}
27
- }`).join(`
28
- `),E=L&&v,A=b?De("browser-screen"):null,B=b?Bun.resolveSync(b.platformModule,o):null;return`
29
- ${P?`var runtime = globalThis.__stxNativeRuntime;
30
- if (!runtime || runtime.version !== ${JSON.stringify(P)}) throw new Error('This screen needs the stx native runtime it was built with: evaluate ${ce}.js from the same build first');
31
- var installJSCGlobals = runtime.installJSCGlobals;
32
- var prepareNativeApp = runtime.prepareNativeApp;
33
- var prepareSharedNativeScreen = runtime.prepareSharedNativeScreen;`:`import { installJSCGlobals } from ${JSON.stringify(h)};
34
- import { prepareNativeApp, prepareSharedNativeScreen } from ${JSON.stringify(S)};`}
35
- ${b?`import { createBrowserScreenBridge } from ${JSON.stringify(A)};
36
- import { createBrowserPlatform } from ${JSON.stringify(B)};`:""}
37
- ${E?`import * as nativeAppModule from ${JSON.stringify(v)};`:"var nativeAppModule = null;"}
38
- ${b?"(async function() {":""}
39
- var g = globalThis;
40
- installJSCGlobals(g);
41
- ${b?`var browserPlatform = await createBrowserPlatform(${JSON.stringify(b.platformOptions??{})});
42
- var browserBridge = createBrowserScreenBridge(browserPlatform, ${JSON.stringify(b)});
43
- var bridge = browserBridge;
44
- g.__stxNativeRoute = ${JSON.stringify(r)};`:"var bridge = g.__stxNativeBridge;"}
45
- if (!bridge) throw new Error('Missing __stxNativeBridge');
46
- var routeNames = ${JSON.stringify(t?e:["main"])};
47
- ${k}
48
- g.__stxNativeRoute = routeName;
49
- var nativeDocument;
50
- var manifest;
51
- ${_}
52
- var screen = null;
53
- var app = null;
54
- if (isApp) {
55
- app = prepareNativeApp(bridge, { routeName: routeName, routeNames: routeNames });
56
- g.__stxNativeUnmount = function() { app.unmount(); };
57
- }
58
- else {
59
- screen = prepareSharedNativeScreen(nativeDocument, manifest, bridge, { routeName: routeName, routeNames: routeNames });
60
- g.__stx_host = screen.host;
61
- g.__stxNativeUnmount = function() { screen.unmount(); };
62
- }
63
- ${P?"runtime.startSignals();":m}
64
- var pageSetup = g.__stx_latestSetup;
65
- var pageRuntimeSetup = g.stx && g.stx._latestSetup;
66
- ${I}
67
- // The screen's setup is the native host's to run. A screen script publishes
68
- // it where a page's document runtime adopts its own, and in a browser that
69
- // runtime's DOMContentLoaded and stx:load ran it a second time: another copy
70
- // of the screen, mounted beside this one. Take it, and hand the page back
71
- // whatever setup it had.
72
- var screenSetup = g.__stx_latestSetup || null;
73
- g.__stx_latestSetup = pageSetup;
74
- if (g.stx) g.stx._latestSetup = pageRuntimeSetup || null;
75
- if (isApp) app.start(nativeAppModule);
76
- else screen.mount(g.stx, screenSetup);
77
- ${b?`var stopApp = nativeAppModule && typeof nativeAppModule.default === 'function' ? nativeAppModule.default(g.craft) : null;
78
- var unmount = g.__stxNativeUnmount;
79
- var ended = false;
80
- g.__stxNativeUnmount = function() { if (ended) return; ended = true; if (typeof stopApp === 'function') stopApp(); unmount(); browserBridge.dispose(); };
81
- g.addEventListener('pagehide', function(event) { if (!event.persisted) g.__stxNativeUnmount(); });
82
- })().catch(function(error) { console.error('[stx browser screen]', error); var node = document.querySelector(${JSON.stringify(b.container)}); if (node) { node.textContent = 'This screen could not start. Reload to try again.'; node.setAttribute('role', 'alert'); } });`:""}
83
- `},l=(T)=>({name:"stx-native-shared-screens",setup(L){L.onResolve({filter:/^stx:native-shared-screens$/},()=>({path:"entry",namespace:"stx-native-shared-screens"})),L.onLoad({filter:/.*/,namespace:"stx-native-shared-screens"},()=>({contents:T,loader:"js"}))}}),p=new Set(u.flatMap(({compiled:T})=>T.dependencies)),y=u.flatMap(({compiled:T})=>T.diagnostics).map((T)=>({level:"warning",message:[T.kind,T.tag,T.name].filter(Boolean).join(": ")})),w=n.minify??!1,N,d,x;if(n.routesDir){let T=C.resolve(o,n.routesDir);Et(T,{recursive:!0});let L=`
84
- import { installJSCGlobals } from ${JSON.stringify(h)};
85
- import { prepareNativeApp, prepareSharedNativeScreen } from ${JSON.stringify(S)};
86
- globalThis.__stxNativeRuntime = {
87
- version: '__STX_NATIVE_RUNTIME_VERSION__',
88
- installJSCGlobals: installJSCGlobals,
89
- prepareNativeApp: prepareNativeApp,
90
- prepareSharedNativeScreen: prepareSharedNativeScreen,
91
- // Each screen starts its own signals runtime, after its host is in place.
92
- startSignals: function() {
93
- ${m}
94
- },
95
- // A language's messages for an area (the compile's \`messages\`), read the
96
- // first time they are looked into: a screen never parses a language it
97
- // is not shown in, nor an area it does not use.
98
- messages: function(language, area) {
99
- var g = globalThis;
100
- var loaded = g.__stxNativeMessages || (g.__stxNativeMessages = {});
101
- function table() {
102
- var forLanguage = loaded[language] || (loaded[language] = {});
103
- if (Object.prototype.hasOwnProperty.call(forLanguage, area)) return forLanguage[area];
104
- var value = null;
105
- if (typeof g.__stxNativeReadMessages === 'function') {
106
- try {
107
- var text = g.__stxNativeReadMessages(language, area);
108
- if (typeof text === 'string') value = JSON.parse(text);
109
- }
110
- catch (error) { console.error('[stx native] could not read the ' + language + ' messages for ' + area, error); }
111
- }
112
- forLanguage[area] = value;
113
- return value;
114
- }
115
- var own = Object.prototype.hasOwnProperty;
116
- return new Proxy({}, {
117
- get: function(target, name) { var messages = table(); return messages && own.call(messages, name) ? messages[name] : undefined; },
118
- has: function(target, name) { var messages = table(); return !!messages && own.call(messages, name); },
119
- ownKeys: function() { var messages = table(); return messages ? Object.keys(messages) : []; },
120
- getOwnPropertyDescriptor: function(target, name) {
121
- var messages = table();
122
- return messages && own.call(messages, name) ? { value: messages[name], writable: false, enumerable: true, configurable: true } : undefined;
123
- },
124
- });
125
- },
126
- };
127
- `,P,k=C.join(T,`${ce}.js`);if(n.sharedRuntime){let A=await Le("stx:native-shared-screens",[l(L)],w,p);P=Bun.hash(A).toString(36),d=k,await Bun.write(d,A.replace("__STX_NATIVE_RUNTIME_VERSION__",P))}else It(k,{force:!0});let _=C.join(T,rr);It(_,{recursive:!0,force:!0});let I={},E=[...u.map((A)=>({name:A.name,screens:[A],app:!1})),...v?[{name:ne,screens:[],app:!0}]:[]];N={};for(let A=0;A<E.length;A+=6)await Promise.all(E.slice(A,A+6).map(async(B)=>{let H=C.join(T,`${B.name}.js`),U=await Le("stx:native-shared-screens",[l(g(B.screens,B.app,P))],w,p,c??void 0);if(await Bun.write(H,U),N[B.name]=H,a)I[B.name]=lr(U)}));if(a){for(let[B,H]of a.data)for(let[U,F]of H)await Bun.write(C.join(_,B,`${U}.json`),F);let A=Object.fromEntries(Object.keys(I).sort().map((B)=>[B,I[B]]));await Bun.write(C.join(_,"routes.json"),JSON.stringify(A));for(let B of a.files.keys())p.add(B);x={dir:_,languages:[...a.data.keys()],routes:A}}if(!n.outFile)return{code:"",routes:N,runtime:d,...x?{messages:x}:{},diagnostics:y,dependencies:[...p]}}let R=await Le("stx:native-shared-screens",[l(g(u,!0))],w,p);if(!n.outFile)return{code:R,diagnostics:y,dependencies:[...p]};let W=C.resolve(o,n.outFile);return Et(C.dirname(W),{recursive:!0}),await Bun.write(W,R),{code:R,outFile:W,...N?{routes:N,runtime:d}:{},...x?{messages:x}:{},diagnostics:y,dependencies:[...p]}}async function dr(n,e={}){return je({...e,screens:{main:n},routed:!1})}function Ct(n,e={}){return dr(n,e)}var Ot=["native.config.json","stx-native.config.json"];function gr(n=process.cwd(),e){let t=e?X.resolve(n,e):Ot.map((f)=>X.join(n,f)).find((f)=>le(f));if(!t)return null;if(!le(t))throw Error(`Native config not found: ${t}`);let r=JSON.parse(pr(t,"utf8")),o=Object.entries(r.screens??{});if(o.length===0)throw Error(`${X.basename(t)} must name at least one screen in "screens"`);let a={};for(let[f,h]of o){if(!/^[A-Z][\w-]*$/i.test(f))throw Error(`Invalid native screen name: ${f}`);if(typeof h!=="string"||!h.endsWith(".stx"))throw Error(`Screen ${f} must name a .stx file`);if(a[f]=X.resolve(X.dirname(t),h),!le(a[f]))throw Error(`Screen ${f} not found: ${a[f]}`)}let c=r.initialScreen||o[0][0];if(!a[c])throw Error(`Initial screen ${c} is not in screens`);if(r.app!==void 0&&typeof r.app!=="string")throw Error(`"app" must name the app script's file`);let u=r.app?X.resolve(X.dirname(t),r.app):void 0;if(u&&!le(u))throw Error(`App script not found: ${u}`);return{initialScreen:c,screens:a,file:t,...u?{app:u}:{}}}async function xs(n,e={}){let t=X.resolve(e.cwd??process.cwd()),r=e.format??"ir";if(r!=="ir"&&r!=="bundle")throw Error(`Unknown compile format: ${r}. Expected ir or bundle.`);let o=n?null:gr(t,e.config);if(!n&&!o)throw Error(`Please specify an input file: stx native compile <file.stx>, or add ${Ot[0]}`);let a,c=[];if(r==="bundle"){let f=o?await je({screens:o.screens,initialScreen:o.initialScreen,minify:e.minify,root:t,...o.app?{app:o.app}:{}}):await Ct(X.resolve(t,n),{minify:e.minify});a=f.code,c=f.diagnostics}else{let f=async(S)=>{let v=await ae(S);return c.push(...v.diagnostics.map((b)=>({level:"warning",message:[b.kind,b.tag,b.name].filter(Boolean).join(": ")}))),v.document},h=o?{initialScreen:o.initialScreen,screens:Object.fromEntries(await Promise.all(Object.entries(o.screens).map(async([S,v])=>[S,await f(v)])))}:await f(X.resolve(t,n));a=JSON.stringify(h,null,2)}if(!e.output)return{output:a,diagnostics:c};let u=X.resolve(t,e.output);return fr(X.dirname(u),{recursive:!0}),await Bun.write(u,a),{output:a,written:u,diagnostics:c}}export{xs as runNativeCompile};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Hn,s}from"./chunk-pbtkbe48.js";import"./chunk-qfe7ps3v.js";import"./chunk-prf164ct.js";import"./chunk-nj1t4g3a.js";import"./chunk-radggg3p.js";import"./chunk-3zyjqvsq.js";import"./chunk-ymymwzt5.js";import"./chunk-0vkawews.js";import{me}from"./chunk-r1r6311d.js";import"./chunk-ye8tgmd3.js";import"./chunk-pxs7sgnp.js";import"./chunk-3q163st5.js";import"./chunk-e87xa4r3.js";import"./chunk-a3d0g4mr.js";import"./chunk-04kg16qs.js";import"./chunk-p44kmbdg.js";import"./chunk-gv793yqq.js";import{Re,ps,gs}from"./chunk-zsgcsqat.js";import"./chunk-x5tjb4y4.js";import"./chunk-2h8ea0we.js";import"./chunk-55zaxb4s.js";import"./chunk-ce6zddpf.js";import"./chunk-7rta163c.js";export{Hn as buildModulesTag,me as injectRouterScript,s as processDirectives,ps as processJsonDirective,gs as processOnceDirective,Re as validateClientScript};