@stacksjs/stx 0.2.280 → 0.2.283

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 (190) hide show
  1. package/dist/a11y.d.ts +3 -3
  2. package/dist/a11y.js +40 -0
  3. package/dist/build-externalize.js +3 -3
  4. package/dist/build-views.d.ts +1 -1
  5. package/dist/build-views.js +2 -2
  6. package/dist/builtins/transition-group.d.ts +1 -1
  7. package/dist/{chunk-0ym08enb.js → chunk-0f1kz0x2.js} +1 -1
  8. package/dist/{chunk-shh4jfwc.js → chunk-0fgcnv6y.js} +1 -1
  9. package/dist/chunk-0h7ty10c.js +2 -0
  10. package/dist/{chunk-6vaa771b.js → chunk-1a8e5xpf.js} +1 -1
  11. package/dist/chunk-1rcn9yfj.js +2 -0
  12. package/dist/{chunk-5vday0wx.js → chunk-2g9jwgs7.js} +1 -1
  13. package/dist/chunk-3828z7q8.js +2 -0
  14. package/dist/{chunk-w1asc0zd.js → chunk-39f40yc4.js} +1 -1
  15. package/dist/{chunk-9y5xb0p4.js → chunk-3bv8h4r6.js} +1 -1
  16. package/dist/{chunk-yqkjgz9q.js → chunk-4ds1cmgq.js} +1 -1
  17. package/dist/chunk-50mpsfpx.js +3 -0
  18. package/dist/{chunk-shyqtvbq.js → chunk-52mh63sp.js} +1 -1
  19. package/dist/{chunk-71r0nchv.js → chunk-5aq35j2e.js} +1 -1
  20. package/dist/chunk-5k3qb1am.js +22 -0
  21. package/dist/chunk-5v6atbsr.js +2 -0
  22. package/dist/{chunk-gex3spzq.js → chunk-7etzqabz.js} +1 -1
  23. package/dist/chunk-7n45tcyf.js +2 -0
  24. package/dist/{chunk-y3r71hx6.js → chunk-7p9ns60j.js} +1 -1
  25. package/dist/{chunk-tyr2z96r.js → chunk-7rxtra1g.js} +1 -1
  26. package/dist/chunk-822x6vhb.js +2 -0
  27. package/dist/{chunk-5v2wk7sj.js → chunk-90qr4f9m.js} +1 -1
  28. package/dist/{chunk-0cdkfqw6.js → chunk-9236skjs.js} +2 -2
  29. package/dist/{chunk-exwgbdz5.js → chunk-9x4jejq0.js} +1 -1
  30. package/dist/{chunk-e8jazdsk.js → chunk-9zndrzb3.js} +1 -1
  31. package/dist/{chunk-3kj7kd8g.js → chunk-a2qghr2x.js} +1 -1
  32. package/dist/{chunk-jj6nrqje.js → chunk-a54n1r1q.js} +1 -1
  33. package/dist/{chunk-37dznstc.js → chunk-a63y3aa0.js} +1 -1
  34. package/dist/chunk-a95mf15m.js +2 -0
  35. package/dist/{chunk-9w2e55wt.js → chunk-abydddye.js} +2 -2
  36. package/dist/{chunk-3tr99nn5.js → chunk-areethga.js} +1 -1
  37. package/dist/{chunk-q4desjj6.js → chunk-ayrjwkyw.js} +1 -1
  38. package/dist/chunk-b29wbjs5.js +2 -0
  39. package/dist/chunk-ba6tthsm.js +2 -0
  40. package/dist/{chunk-sfaayvmn.js → chunk-bf8wf3r2.js} +38 -38
  41. package/dist/{chunk-w1zde8wp.js → chunk-bz2gytfs.js} +1 -1
  42. package/dist/{chunk-6gb72zp2.js → chunk-c0an64km.js} +1 -1
  43. package/dist/{chunk-gfhzedsr.js → chunk-c6fw33zh.js} +1 -1
  44. package/dist/chunk-crmgatrx.js +2 -0
  45. package/dist/{chunk-n3j3z889.js → chunk-cvhyxt55.js} +1 -1
  46. package/dist/{chunk-2fx2xdre.js → chunk-cvnh7dma.js} +1 -1
  47. package/dist/{chunk-dyd3jdrn.js → chunk-d0c3v7ax.js} +1 -1
  48. package/dist/{chunk-5d0jtpqm.js → chunk-e4hhz9j3.js} +1 -1
  49. package/dist/{chunk-x4w3awav.js → chunk-e7jfpyqy.js} +1 -1
  50. package/dist/{chunk-4k0y2fnh.js → chunk-e9nmf863.js} +1 -1
  51. package/dist/chunk-ef5663vk.js +2 -0
  52. package/dist/{chunk-q2twgdxk.js → chunk-f16kkw9v.js} +1 -1
  53. package/dist/{chunk-e5vy94ck.js → chunk-f3hfk78e.js} +1 -1
  54. package/dist/chunk-f80wwn5x.js +2 -0
  55. package/dist/chunk-ffqddern.js +2 -0
  56. package/dist/{chunk-08q58gc0.js → chunk-fjkstnz3.js} +1 -1
  57. package/dist/{chunk-y1637mma.js → chunk-fskfes13.js} +1 -1
  58. package/dist/chunk-fxyrvwqw.js +2 -0
  59. package/dist/{chunk-zkbgy7kj.js → chunk-g3fy0tw8.js} +1 -1
  60. package/dist/{chunk-c9t5x0rg.js → chunk-gjemavhx.js} +56 -56
  61. package/dist/{chunk-debdyxmk.js → chunk-gn9q45yp.js} +2 -2
  62. package/dist/chunk-gp3s8020.js +2 -0
  63. package/dist/chunk-gzxbnyde.js +2 -0
  64. package/dist/chunk-j03bare5.js +2 -0
  65. package/dist/{chunk-azfjfrns.js → chunk-jn6m8zf7.js} +1 -1
  66. package/dist/{chunk-d8j22791.js → chunk-jt4gqtag.js} +1 -1
  67. package/dist/{chunk-z4mrwx1z.js → chunk-k4qx7jbk.js} +1 -1
  68. package/dist/{chunk-4xbakvp1.js → chunk-kdrpx9ft.js} +1 -1
  69. package/dist/{chunk-4963bekg.js → chunk-kzyhvrp8.js} +1 -1
  70. package/dist/{chunk-9p25rqhp.js → chunk-mb518a4n.js} +1 -1
  71. package/dist/{chunk-04k37rg4.js → chunk-mjkfc2v6.js} +1 -1
  72. package/dist/chunk-mrbw9vts.js +2 -0
  73. package/dist/chunk-mx8k7bwh.js +2 -0
  74. package/dist/{chunk-k484xgz0.js → chunk-nvgxjvnb.js} +1 -1
  75. package/dist/{chunk-b1tjzeb0.js → chunk-p396xrew.js} +1 -1
  76. package/dist/{chunk-gjhwmkw8.js → chunk-pbk8jxe2.js} +1 -1
  77. package/dist/{chunk-zbynjn6g.js → chunk-phhzfeh9.js} +1 -1
  78. package/dist/{chunk-mx5sme23.js → chunk-pmw28376.js} +1 -1
  79. package/dist/chunk-q68xmak4.js +60 -0
  80. package/dist/chunk-qccdz9t1.js +3756 -0
  81. package/dist/{chunk-ha5zt2y3.js → chunk-qd8ggjdx.js} +1 -1
  82. package/dist/chunk-qp97dx7x.js +2 -0
  83. package/dist/chunk-r5fp0bse.js +2 -0
  84. package/dist/{chunk-gdhyfrst.js → chunk-s2284nbk.js} +1 -1
  85. package/dist/chunk-s5ttqj6h.js +2 -0
  86. package/dist/chunk-s5y267vs.js +2 -0
  87. package/dist/{chunk-4z157x30.js → chunk-s67mgegv.js} +1 -1
  88. package/dist/{chunk-e7avk421.js → chunk-sb7k89hq.js} +1 -1
  89. package/dist/{chunk-y91519ss.js → chunk-se360fvh.js} +1 -1
  90. package/dist/{chunk-kr0r8x5w.js → chunk-snknv47x.js} +1 -1
  91. package/dist/{chunk-z45t29sf.js → chunk-sskbegsz.js} +1 -1
  92. package/dist/{chunk-3p2w5dag.js → chunk-sw16pkqg.js} +1 -1
  93. package/dist/{chunk-82kkkpw2.js → chunk-t1k5dpbr.js} +1 -1
  94. package/dist/{chunk-k47az0ta.js → chunk-vbdca0k1.js} +1 -1
  95. package/dist/{chunk-ysrwm6fr.js → chunk-vckr41zn.js} +11 -11
  96. package/dist/{chunk-86d1vte8.js → chunk-vhsrgtcg.js} +1 -1
  97. package/dist/chunk-vrvehb01.js +2 -0
  98. package/dist/chunk-w4eykv3z.js +2 -0
  99. package/dist/{chunk-s6759be9.js → chunk-x0zv8dt4.js} +1 -1
  100. package/dist/chunk-x11dh3a3.js +2 -0
  101. package/dist/{chunk-xay59qky.js → chunk-y6kw0wb7.js} +1 -1
  102. package/dist/{chunk-5mkc9fvx.js → chunk-yq1d9hb3.js} +1 -1
  103. package/dist/{chunk-xqwmj65h.js → chunk-ysnk7x79.js} +1 -1
  104. package/dist/chunk-ytgnzeeb.js +2 -0
  105. package/dist/{chunk-1w9s36v0.js → chunk-zfr4d08r.js} +1 -1
  106. package/dist/chunk-zkzmxy32.js +2 -0
  107. package/dist/chunk-zn5jgmqw.js +5 -0
  108. package/dist/cli.js +14 -14
  109. package/dist/color-mode-boot.js +10 -6
  110. package/dist/component-processing.d.ts +40 -2
  111. package/dist/component-processing.js +13 -2
  112. package/dist/component-renderer.js +18 -6
  113. package/dist/craft-entry.js +1 -1
  114. package/dist/craft.js +1 -1
  115. package/dist/database.js +1 -1
  116. package/dist/dev-server/index.d.ts +2 -2
  117. package/dist/dev-server/index.js +1 -1
  118. package/dist/dev-server/serve-app.js +12 -12
  119. package/dist/dev-server/serve-file.js +6 -6
  120. package/dist/dev-server/serve-multi.js +3 -3
  121. package/dist/dev-server/ts-css.d.ts +108 -0
  122. package/dist/dev-server/{crosswind.js → ts-css.js} +86 -88
  123. package/dist/document-shell.d.ts +1 -1
  124. package/dist/expressions.js +4 -4
  125. package/dist/i18n.d.ts +24 -0
  126. package/dist/i18n.js +45 -0
  127. package/dist/index.d.ts +3 -3
  128. package/dist/index.js +2 -2
  129. package/dist/misc-directives.d.ts +0 -11
  130. package/dist/misc-directives.js +6 -4
  131. package/dist/process.js +2 -2
  132. package/dist/production-builder.js +3 -3
  133. package/dist/pwa.js +2 -2
  134. package/dist/render-memo.d.ts +1 -1
  135. package/dist/render.js +2 -2
  136. package/dist/safe-evaluator.d.ts +0 -15
  137. package/dist/safe-evaluator.js +12 -2
  138. package/dist/site-builder/build.d.ts +1 -1
  139. package/dist/site-builder/build.js +2 -2
  140. package/dist/ssg.d.ts +2 -2
  141. package/dist/ssg.js +10 -10
  142. package/dist/story/collect/analyzer.d.ts +1 -1
  143. package/dist/story/index.d.ts +2 -2
  144. package/dist/story/index.js +1 -1
  145. package/dist/story/renderer.d.ts +3 -3
  146. package/dist/story/renderer.js +2 -2
  147. package/dist/story/ts-css.d.ts +29 -0
  148. package/dist/story/{crosswind.js → ts-css.js} +9 -9
  149. package/dist/story/types.d.ts +1 -1
  150. package/dist/theme-tokens.d.ts +1 -1
  151. package/dist/{crosswind-config.d.ts → ts-css-config.d.ts} +5 -5
  152. package/dist/{crosswind-config.js → ts-css-config.js} +1 -1
  153. package/dist/types/config-types.d.ts +3 -3
  154. package/dist/visual-testing.js +1 -1
  155. package/package.json +6 -6
  156. package/dist/chunk-0kexd0d9.js +0 -2
  157. package/dist/chunk-2218hm3h.js +0 -2
  158. package/dist/chunk-3rbdvrp0.js +0 -2
  159. package/dist/chunk-3yg0f94g.js +0 -5
  160. package/dist/chunk-57y6g4bj.js +0 -2
  161. package/dist/chunk-61rfw29f.js +0 -2
  162. package/dist/chunk-8vk9jjf1.js +0 -2
  163. package/dist/chunk-8x3fhher.js +0 -2
  164. package/dist/chunk-99ppngnm.js +0 -2
  165. package/dist/chunk-bavv2k2z.js +0 -2
  166. package/dist/chunk-bkbnxd7s.js +0 -2
  167. package/dist/chunk-edctags2.js +0 -2
  168. package/dist/chunk-gm2wsf2d.js +0 -3
  169. package/dist/chunk-h0t73k2z.js +0 -3801
  170. package/dist/chunk-hcjmvwnt.js +0 -2
  171. package/dist/chunk-hqsadyfr.js +0 -2
  172. package/dist/chunk-hysmnz0q.js +0 -2
  173. package/dist/chunk-jkd1185y.js +0 -2
  174. package/dist/chunk-k7m8p93y.js +0 -2
  175. package/dist/chunk-nmxc5vnq.js +0 -2
  176. package/dist/chunk-pghw8xrx.js +0 -2
  177. package/dist/chunk-pgvskhg2.js +0 -2
  178. package/dist/chunk-qp1shwek.js +0 -2
  179. package/dist/chunk-qrx23zbx.js +0 -2
  180. package/dist/chunk-ragz3hr7.js +0 -2
  181. package/dist/chunk-rvmt27kv.js +0 -2
  182. package/dist/chunk-t7snemp0.js +0 -2
  183. package/dist/chunk-vxskcekj.js +0 -2
  184. package/dist/chunk-wkb78edm.js +0 -2
  185. package/dist/chunk-wknpthr7.js +0 -2
  186. package/dist/chunk-xen25bsv.js +0 -2
  187. package/dist/chunk-xpxw2ked.js +0 -15
  188. package/dist/chunk-ydzmhy4c.js +0 -22
  189. package/dist/dev-server/crosswind.d.ts +0 -132
  190. package/dist/story/crosswind.d.ts +0 -29
package/dist/a11y.d.ts CHANGED
@@ -17,11 +17,9 @@
17
17
  * - Form inputs have associated labels
18
18
  * - Heading hierarchy is maintained
19
19
  * - Document has lang attribute
20
+ * - A right-to-left lang is paired with dir="rtl"
20
21
  */
21
22
  import type { CustomDirective, StxOptions } from './types';
22
- /**
23
- * Accessibility violation found during a11y checks
24
- */
25
23
  export interface A11yViolation {
26
24
  /** Type/category of violation */
27
25
  type: string;
@@ -191,6 +189,8 @@ export interface A11yAutoFixConfig {
191
189
  fixTableHeaders?: boolean;
192
190
  /** Add lang attribute to html element */
193
191
  fixMissingLang?: boolean;
192
+ /** Add dir="rtl" when the html element's lang is a right-to-left language */
193
+ fixMissingDir?: boolean;
194
194
  /** Fix positive tabindex values */
195
195
  fixPositiveTabindex?: boolean;
196
196
  /** Fix custom buttons without tabindex */
package/dist/a11y.js CHANGED
@@ -1,5 +1,11 @@
1
1
  import path from "node:path";
2
+ import { getLocaleDirection } from "./i18n.js";
2
3
  import { resolveStxTargets } from "./resolve-stx-targets.js";
4
+ function rtlLangMissingDir(lang, dir) {
5
+ if (!lang || getLocaleDirection(lang) !== "rtl")
6
+ return !1;
7
+ return !dir || dir.trim().toLowerCase() !== "rtl";
8
+ }
3
9
  export function isPresentationalRole(role) {
4
10
  if (!role)
5
11
  return !1;
@@ -168,6 +174,16 @@ export function checkA11yWithRegex(html, _filePath) {
168
174
  help: "Add lang attribute to the html element",
169
175
  helpUrl: "https://web.dev/learn/accessibility/more-html/#language"
170
176
  });
177
+ const htmlOpenTag = html.match(/<html\b([^>]*)>/i);
178
+ if (htmlOpenTag && rtlLangMissingDir(attributeValue(htmlOpenTag[1], "lang"), attributeValue(htmlOpenTag[1], "dir")))
179
+ violations.push({
180
+ type: "missing-dir",
181
+ element: htmlOpenTag[0].substring(0, 100),
182
+ message: 'Document language is right-to-left but dir="rtl" is not set',
183
+ impact: "serious",
184
+ help: 'Add dir="rtl" to the html element so the layout mirrors the text',
185
+ helpUrl: "https://www.w3.org/International/questions/qa-html-dir"
186
+ });
171
187
  const tableRegex = /<table([^>]*)>([\s\S]*?)<\/table>/gi;
172
188
  match = tableRegex.exec(html);
173
189
  while (match !== null) {
@@ -309,6 +325,15 @@ export async function checkA11y(html, filePath) {
309
325
  help: "Add lang attribute to the html element",
310
326
  helpUrl: "https://web.dev/learn/accessibility/more-html/#language"
311
327
  });
328
+ if (htmlElement && rtlLangMissingDir(htmlElement.getAttribute("lang"), htmlElement.getAttribute("dir")))
329
+ violations.push({
330
+ type: "missing-dir",
331
+ element: "<html>",
332
+ message: 'Document language is right-to-left but dir="rtl" is not set',
333
+ impact: "serious",
334
+ help: 'Add dir="rtl" to the html element so the layout mirrors the text',
335
+ helpUrl: "https://www.w3.org/International/questions/qa-html-dir"
336
+ });
312
337
  container.querySelectorAll("a").forEach((link) => {
313
338
  const hasText = link.textContent && link.textContent.trim().length > 0, hasAriaLabel = link.hasAttribute("aria-label") || link.hasAttribute("aria-labelledby"), hasTitle = link.hasAttribute("title"), hasImg = link.querySelector("img[alt]");
314
339
  if (!hasText && !hasAriaLabel && !hasTitle && !hasImg)
@@ -450,6 +475,7 @@ const defaultAutoFixConfig = {
450
475
  fixMissingFormLabels: !0,
451
476
  fixTableHeaders: !0,
452
477
  fixMissingLang: !0,
478
+ fixMissingDir: !0,
453
479
  fixPositiveTabindex: !0,
454
480
  fixButtonFocusable: !0,
455
481
  defaultLang: "en"
@@ -526,6 +552,20 @@ export function autoFixA11y(html, config = {}) {
526
552
  });
527
553
  return after;
528
554
  });
555
+ if (mergedConfig.fixMissingDir)
556
+ fixed = fixed.replace(/<html([^>]*)>/gi, (match, attrs) => {
557
+ const lang = attributeValue(attrs, "lang");
558
+ if (!rtlLangMissingDir(lang, attributeValue(attrs, "dir")))
559
+ return match;
560
+ const after = /\bdir\s*=/i.test(attrs) ? `<html${attrs.replace(/\bdir\s*=\s*(["'])[^"']*\1/i, 'dir="rtl"')}>` : `<html${attrs} dir="rtl">`;
561
+ fixes.push({
562
+ type: "missing-dir",
563
+ description: `Added dir="rtl" to html element (lang="${lang}" is right-to-left)`,
564
+ before: match,
565
+ after
566
+ });
567
+ return after;
568
+ });
529
569
  if (mergedConfig.fixPositiveTabindex)
530
570
  fixed = fixed.replace(/\btabindex\s*=\s*["']([1-9]\d*)["']/gi, (match, value) => {
531
571
  const before = match, after = 'tabindex="0"';
@@ -34,11 +34,11 @@ const BLOB_KINDS = [
34
34
  replace: (href) => `<script data-stx-router src="${href}"></script>`
35
35
  },
36
36
  {
37
- pattern: /<style\b([^>]*\bdata-crosswind=(?:"generated"|'generated')[^>]*)>([\s\S]*?)<\/style>/gi,
38
- prefix: "crosswind",
37
+ pattern: /<style\b([^>]*\bdata-css=(?:"generated"|'generated')[^>]*)>([\s\S]*?)<\/style>/gi,
38
+ prefix: "css",
39
39
  extension: "css",
40
40
  contentType: "text/css; charset=utf-8",
41
- replace: (href) => `<link data-crosswind="generated" rel="stylesheet" href="${href}">`
41
+ replace: (href) => `<link data-css="generated" rel="stylesheet" href="${href}">`
42
42
  }
43
43
  ];
44
44
  export function externalizeHtml(html, basePath = `/${EXTERNALIZED_ASSET_DIR}`) {
@@ -16,7 +16,7 @@ export declare function watchViews(options: ViewBuildOptions, callback?: (result
16
16
  *
17
17
  * Optimized for email rendering:
18
18
  * - Disables SEO tag injection
19
- * - Inlines utility classes as style attributes (via Crosswind)
19
+ * - Inlines utility classes as style attributes (via Css)
20
20
  * - Strips <style> and <script> blocks
21
21
  * - Returns clean HTML + plain text suitable for email
22
22
  *
@@ -130,10 +130,10 @@ export async function renderEmail(templatePath, props = {}, options = {}) {
130
130
  }
131
131
  async function inlineCssClasses(html) {
132
132
  try {
133
- const { generateCrosswindCSS, extractClassNames } = await import("./dev-server/crosswind.js");
133
+ const { generateCss, extractClassNames } = await import("./dev-server/ts-css.js");
134
134
  if (extractClassNames(html).size === 0)
135
135
  return html;
136
- const css = await generateCrosswindCSS(html);
136
+ const css = await generateCss(html);
137
137
  if (!css)
138
138
  return html;
139
139
  const classStyles = parseCssToMap(css);
@@ -15,7 +15,7 @@
15
15
  * </TransitionGroup>
16
16
  * ```
17
17
  *
18
- * With `name="card"`, supply the transition classes (e.g. via crosswind/CSS):
18
+ * With `name="card"`, supply the transition classes (e.g. via css/CSS):
19
19
  * `card-enter-from` / `card-enter-active` / `card-enter-to`,
20
20
  * `card-leave-from` / `card-leave-active` / `card-leave-to`, and `card-move`
21
21
  * (applied to elements that shift position during a reorder). The first render
@@ -1,4 +1,4 @@
1
1
  // @bun
2
2
  var K={},Y=[],O={};function I(){return K}function h(){return O}function D(){K={},Y.length=0,O={}}function U(j){K=Q(K,j)}function Q(j,z){return{title:z.title??j.title,titleTemplate:z.titleTemplate??j.titleTemplate,base:z.base??j.base,meta:[...j.meta||[],...z.meta||[]],link:[...j.link||[],...z.link||[]],script:[...j.script||[],...z.script||[]],style:[...j.style||[],...z.style||[]],htmlAttrs:{...j.htmlAttrs,...z.htmlAttrs},bodyAttrs:{...j.bodyAttrs,...z.bodyAttrs}}}function Z(j){U(_(j))}function _(j){let z=[];if(j.description)z.push({name:"description",content:j.description});if(j.keywords){let L=Array.isArray(j.keywords)?j.keywords.join(", "):j.keywords;z.push({name:"keywords",content:L})}if(j.author)z.push({name:"author",content:j.author});if(j.robots)z.push({name:"robots",content:j.robots});let A=j.ogTitle??j.title,B=j.ogDescription??j.description;if(A)z.push({property:"og:title",content:A});if(B)z.push({property:"og:description",content:B});if(j.ogImage)z.push({property:"og:image",content:j.ogImage});if(j.ogUrl)z.push({property:"og:url",content:j.ogUrl});if(j.ogType)z.push({property:"og:type",content:j.ogType});if(j.ogSiteName)z.push({property:"og:site_name",content:j.ogSiteName});if(j.ogLocale)z.push({property:"og:locale",content:j.ogLocale});let E=j.twitterTitle??j.title,F=j.twitterDescription??j.description,J=j.twitterImage??j.ogImage;if(j.twitterCard)z.push({name:"twitter:card",content:j.twitterCard});if(E)z.push({name:"twitter:title",content:E});if(F)z.push({name:"twitter:description",content:F});if(J)z.push({name:"twitter:image",content:J});if(j.twitterSite)z.push({name:"twitter:site",content:j.twitterSite});if(j.twitterCreator)z.push({name:"twitter:creator",content:j.twitterCreator});if(j.articleAuthor)z.push({property:"article:author",content:j.articleAuthor});if(j.articlePublishedTime)z.push({property:"article:published_time",content:j.articlePublishedTime});if(j.articleModifiedTime)z.push({property:"article:modified_time",content:j.articleModifiedTime});if(j.articleSection)z.push({property:"article:section",content:j.articleSection});if(j.articleTags)for(let L of j.articleTags)z.push({property:"article:tag",content:L});let G=[];if(j.canonical)G.push({rel:"canonical",href:j.canonical});return{title:j.title,titleTemplate:j.titleTemplate,meta:z,link:G}}function S(j){if(O={...O,...j},j.title||j.description)Z({title:j.title,description:j.description})}function P(j){let z=typeof j==="function"?j():j;U({title:z})}function C(j=K){let z=[];if(j.title){let A=j.title;if(j.titleTemplate)A=typeof j.titleTemplate==="function"?j.titleTemplate(A):j.titleTemplate.replace("%s",A);z.push(`<title>${N(A)}</title>`)}if(j.base){let A=Object.entries(j.base).map(([B,E])=>`${B}="${N(E)}"`).join(" ");z.push(`<base ${A}>`)}for(let A of j.meta||[]){let B=Object.entries(A).filter(([E,F])=>F!==void 0).map(([E,F])=>{return`${E==="httpEquiv"?"http-equiv":E}="${N(String(F))}"`}).join(" ");z.push(`<meta ${B}>`)}for(let A of j.link||[]){let B=Object.entries(A).filter(([E,F])=>F!==void 0).map(([E,F])=>`${E}="${N(String(F))}"`).join(" ");z.push(`<link ${B}>`)}for(let A of j.script||[]){let{content:B,...E}=A,F=Object.entries(E).filter(([J,G])=>G!==void 0).map(([J,G])=>{if(typeof G==="boolean")return G?J:"";return`${J}="${N(String(G))}"`}).filter(Boolean).join(" ");if(B)z.push(`<script ${F}>${B}</script>`);else z.push(`<script ${F}></script>`)}for(let A of j.style||[]){let B=A.type?` type="${A.type}"`:"";z.push(`<style${B}>${A.content}</style>`)}return z.join(`
3
3
  `)}function M(j=K){if(!j.htmlAttrs)return"";return Object.entries(j.htmlAttrs).map(([z,A])=>`${z}="${N(A)}"`).join(" ")}function V(j=K){if(!j.bodyAttrs)return"";return Object.entries(j.bodyAttrs).map(([z,A])=>`${z}="${N(A)}"`).join(" ")}function N(j){return j.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;")}function w(j=K){if(typeof document>"u")return;if(j.title){let z=j.title;if(j.titleTemplate)z=typeof j.titleTemplate==="function"?j.titleTemplate(z):j.titleTemplate.replace("%s",z);document.title=z}for(let z of j.meta||[]){let A=z.name?`meta[name="${z.name}"]`:z.property?`meta[property="${z.property}"]`:null;if(A){let B=document.querySelector(A);if(!B){if(B=document.createElement("meta"),z.name)B.setAttribute("name",z.name);if(z.property)B.setAttribute("property",z.property);document.head.appendChild(B)}B.setAttribute("content",z.content)}}for(let z of j.link||[]){let A=`link[rel="${z.rel}"]${z.href?`[href="${z.href}"]`:""}`,B=document.querySelector(A);if(!B)B=document.createElement("link"),document.head.appendChild(B);for(let[E,F]of Object.entries(z))if(F!==void 0)B.setAttribute(E,String(F))}if(j.htmlAttrs)for(let[z,A]of Object.entries(j.htmlAttrs))if(z==="class")for(let B of String(A).split(/\s+/).filter(Boolean))document.documentElement.classList.add(B);else document.documentElement.setAttribute(z,A);if(j.bodyAttrs)for(let[z,A]of Object.entries(j.bodyAttrs))document.body.setAttribute(z,A)}function y(j){let z="";return{content:j.replace(/@head\s*([\s\S]*?)@endhead/g,(B,E)=>{return z+=E.trim()+`
4
- `,""}),headContent:z.trim()}}function x(j,z){return j.replace(/@title\s*\(\s*(?:(['"`])(.+?)\1|([^)]+))\s*\)/g,(A,B,E,F)=>{let J=B?E:z[(F||"").trim()]??F,G=z.__stx_runtime_head??{};return z.__stx_runtime_head=Q(G,{title:J}),""})}function T(j,z){return j.replace(/@meta\s*\(\s*(['"`])(.+?)\1\s*,\s*(?:(['"`])(.+?)\3|([^)]+))\s*\)/g,(A,B,E,F,J,G)=>{let L=F?J:G,R=F?L:z[(L||"").trim()]??L,W=E.includes(":")?{property:E,content:R}:{name:E,content:R},X=z.__stx_runtime_head??{};return z.__stx_runtime_head=Q(X,{meta:[W]}),""})}export{I as xt,h as yt,D as zt,U as At,Q as Bt,Z as Ct,_ as Dt,S as Et,P as Ft,C as Gt,M as Ht,V as It,w as Jt,y as Kt,x as Lt,T as Mt};
4
+ `,""}),headContent:z.trim()}}function x(j,z){return j.replace(/@title\s*\(\s*(?:(['"`])(.+?)\1|([^)]+))\s*\)/g,(A,B,E,F)=>{let J=B?E:z[(F||"").trim()]??F,G=z.__stx_runtime_head??{};return z.__stx_runtime_head=Q(G,{title:J}),""})}function T(j,z){return j.replace(/@meta\s*\(\s*(['"`])(.+?)\1\s*,\s*(?:(['"`])(.+?)\3|([^)]+))\s*\)/g,(A,B,E,F,J,G)=>{let L=F?J:G,R=F?L:z[(L||"").trim()]??L,W=E.includes(":")?{property:E,content:R}:{name:E,content:R},X=z.__stx_runtime_head??{};return z.__stx_runtime_head=Q(X,{meta:[W]}),""})}export{I as Bt,h as Ct,D as Dt,U as Et,Q as Ft,Z as Gt,_ as Ht,S as It,P as Jt,C as Kt,M as Lt,V as Mt,w as Nt,y as Ot,x as Pt,T as Qt};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{Ag as p,Bg as F,Cg as T,Fg as I,Gg as f,Hg as l,Ig as n,Jg as i,Kg as P,Lg as o,Mg as a,xg as L,yg as w,zg as x}from"./chunk-e8jazdsk.js";import{Js as ZG}from"./chunk-6gb72zp2.js";function HG(X,Z={}){let{src:G,alt:J,width:q,height:$,sizes:K="100vw",loading:Q="lazy",priority:Y=!1,quality:M=x,placeholder:N="none",formats:j=w,widths:C=L,decoding:B="async",fetchpriority:V,objectFit:O,objectPosition:W}=X,H=X.class,z=X.style,{processedImage:R,variants:_,optimize:E=!0,isDev:S=!1}=Z;if(_&&_.length>0)return OG(X,_,R);if(S||!E)return MG(X);return VG(X)}function OG(X,Z,G){let{src:J,alt:q,width:$,height:K,sizes:Q="100vw",loading:Y="lazy",priority:M=!1,decoding:N="async",fetchpriority:j,objectFit:C,objectPosition:B,placeholder:V="none"}=X,O=X.class,W=X.style,H=n(Z),z=l(Z),R=typeof Q==="object"?f(Q):Q,_=G?G.aspectRatio:$&&K?Number($)/Number(K):void 0,E=[];if(_)E.push(`aspect-ratio: ${_}`);if(C)E.push(`object-fit: ${C}`);if(B)E.push(`object-position: ${B}`);if(W)E.push(W);let S=E.length>0?` style="${E.join("; ")}"`:"",b=O?` class="${O}"`:"",u=M?"":` loading="${Y}"`,d=` decoding="${N}"`,h=j?` fetchpriority="${j}"`:M?' fetchpriority="high"':"",r=["avif","webp","jpeg","png"],s=[];for(let U of r){let D=H.get(U);if(D&&D.length>0){let m=I(D),QG=P(U);s.push(` <source type="${QG}" srcset="${m}" sizes="${R}" />`)}}let e="",t="",g;if(V!=="none"&&G?.placeholder){let U=`img-${Math.random().toString(36).slice(2,8)}`;if(e=`<div class="stx-image-wrapper" id="${U}">`,t="</div>",V==="blur")g=`
2
+ import{Ag as p,Bg as F,Cg as T,Fg as I,Gg as f,Hg as l,Ig as n,Jg as i,Kg as P,Lg as o,Mg as a,xg as L,yg as w,zg as x}from"./chunk-9zndrzb3.js";import{Os as ZG}from"./chunk-c0an64km.js";function HG(X,Z={}){let{src:G,alt:J,width:q,height:$,sizes:K="100vw",loading:Q="lazy",priority:Y=!1,quality:M=x,placeholder:N="none",formats:j=w,widths:C=L,decoding:B="async",fetchpriority:V,objectFit:O,objectPosition:W}=X,H=X.class,z=X.style,{processedImage:R,variants:_,optimize:E=!0,isDev:S=!1}=Z;if(_&&_.length>0)return OG(X,_,R);if(S||!E)return MG(X);return VG(X)}function OG(X,Z,G){let{src:J,alt:q,width:$,height:K,sizes:Q="100vw",loading:Y="lazy",priority:M=!1,decoding:N="async",fetchpriority:j,objectFit:C,objectPosition:B,placeholder:V="none"}=X,O=X.class,W=X.style,H=n(Z),z=l(Z),R=typeof Q==="object"?f(Q):Q,_=G?G.aspectRatio:$&&K?Number($)/Number(K):void 0,E=[];if(_)E.push(`aspect-ratio: ${_}`);if(C)E.push(`object-fit: ${C}`);if(B)E.push(`object-position: ${B}`);if(W)E.push(W);let S=E.length>0?` style="${E.join("; ")}"`:"",b=O?` class="${O}"`:"",u=M?"":` loading="${Y}"`,d=` decoding="${N}"`,h=j?` fetchpriority="${j}"`:M?' fetchpriority="high"':"",r=["avif","webp","jpeg","png"],s=[];for(let U of r){let D=H.get(U);if(D&&D.length>0){let m=I(D),QG=P(U);s.push(` <source type="${QG}" srcset="${m}" sizes="${R}" />`)}}let e="",t="",g;if(V!=="none"&&G?.placeholder){let U=`img-${Math.random().toString(36).slice(2,8)}`;if(e=`<div class="stx-image-wrapper" id="${U}">`,t="</div>",V==="blur")g=`
3
3
  #${U} {
4
4
  position: relative;
5
5
  background-image: url('${G.placeholder}');
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{mk as a,nk as b,ok as c,pk as d}from"./chunk-e9nmf863.js";import"./chunk-9236skjs.js";import"./chunk-qccdz9t1.js";import"./chunk-q68xmak4.js";import"./chunk-c0an64km.js";import"./chunk-t1k5dpbr.js";import"./chunk-52mh63sp.js";import"./chunk-5k3qb1am.js";import"./chunk-39f40yc4.js";import"./chunk-ysnk7x79.js";import"./chunk-0f1kz0x2.js";import"./chunk-ayrjwkyw.js";import"./chunk-c6fw33zh.js";import"./chunk-bf8wf3r2.js";import"./chunk-jn6m8zf7.js";import"./chunk-sskbegsz.js";export{b as getAvailableTargets,c as getAvailableFormats,d as default,a as buildNative};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{$q as D,dr as T}from"./chunk-h0t73k2z.js";import{Ws as N}from"./chunk-ydzmhy4c.js";import{$u as L}from"./chunk-z45t29sf.js";import Q from"fs";import Y from"path";var b=new Map,V=new Map;async function v(j){let z;for(let K=0;K<3;K++)try{let W=(await Q.promises.stat(j)).mtime.getTime(),J=V.get(j);if(J&&J.mtime===W)return J.content;let X=await Bun.file(j).text(),U=(await Q.promises.stat(j)).mtime.getTime();if(U!==W)continue;return V.set(j,{content:X,mtime:U}),X}catch(I){z=I;break}throw V.delete(j),Error(`File not found: ${j}${z?` (${z.message})`:""}`)}function E(j){V.delete(j)}function F(j){for(let B of V.keys())if(B.startsWith(j))V.delete(B)}var $=null,G=null,k=null;function R(j){k=j}async function S(j=!1){let B=k??await import("./chunk-y1637mma.js");if(j)return B.generateSignalsRuntimeDev();if($===null)$=B.generateSignalsRuntime();return $}var q=null;async function _(){if(q===null){let{getRouterScript:j}=await import("./chunk-5vday0wx.js");q=j()}return q}function g(){V.clear(),T(),N(),$=null,G=null,q=null}function y(j){let B={debug:j.debug===!0,middleware:(j.middleware??[]).map((z)=>({name:z.name,timing:z.timing,handler:String(z.handler)})),customDirectives:(j.customDirectives??[]).map((z)=>({name:z.name,hasEndTag:z.hasEndTag===!0,handler:String(z.handler)}))};return new Bun.CryptoHasher("sha1").update(JSON.stringify(B)).digest("hex")}async function C(j,B){try{if(!B.cachePath)return null;let z=Y.resolve(B.cachePath),K=Y.join(z,`${M(j)}.html`),I=Y.join(z,`${M(j)}.meta.json`);if(!await D(K)||!await D(I))return null;let W=await Bun.file(I).text(),J=JSON.parse(W);if(J.cacheVersion!==B.cacheVersion)return null;if(J.optionsSignature!==y(B))return null;if((await Q.promises.stat(j)).mtime.getTime()>J.mtime)return null;for(let Z of J.dependencies)if(await D(Z)){if((await Q.promises.stat(Z)).mtime.getTime()>J.mtime)return null}else return null;return await Bun.file(K).text()}catch(z){return console.warn(`Cache error for ${j}:`,z),null}}async function u(j,B,z,K){try{if(!K.cachePath)return;let I=Y.resolve(K.cachePath);await Q.promises.mkdir(I,{recursive:!0});let W=Y.join(I,`${M(j)}.html`),J=Y.join(I,`${M(j)}.meta.json`),X=await Q.promises.stat(j);await Bun.write(W,B);let Z={sourcePath:j,mtime:X.mtime.getTime(),dependencies:Array.from(z),cacheVersion:K.cacheVersion,optionsSignature:y(K),generatedAt:Date.now()};await Bun.write(J,JSON.stringify(Z,null,2)),b.set(j,{output:B,mtime:X.mtime.getTime(),dependencies:z})}catch(I){console.warn(`Failed to cache template ${j}:`,I)}}var O=16;function M(j){return new Bun.CryptoHasher("sha1").update(j).digest("hex").substring(0,O)}
2
+ import{Up as D,Yp as T}from"./chunk-qccdz9t1.js";import{$s as N}from"./chunk-5k3qb1am.js";import{dv as L}from"./chunk-sskbegsz.js";import Q from"fs";import Y from"path";var b=new Map,V=new Map;async function v(j){let z;for(let K=0;K<3;K++)try{let W=(await Q.promises.stat(j)).mtime.getTime(),J=V.get(j);if(J&&J.mtime===W)return J.content;let X=await Bun.file(j).text(),U=(await Q.promises.stat(j)).mtime.getTime();if(U!==W)continue;return V.set(j,{content:X,mtime:U}),X}catch(I){z=I;break}throw V.delete(j),Error(`File not found: ${j}${z?` (${z.message})`:""}`)}function E(j){V.delete(j)}function F(j){for(let B of V.keys())if(B.startsWith(j))V.delete(B)}var $=null,G=null,k=null;function R(j){k=j}async function S(j=!1){let B=k??await import("./chunk-fskfes13.js");if(j)return B.generateSignalsRuntimeDev();if($===null)$=B.generateSignalsRuntime();return $}var q=null;async function _(){if(q===null){let{getRouterScript:j}=await import("./chunk-2g9jwgs7.js");q=j()}return q}function g(){V.clear(),T(),N(),$=null,G=null,q=null}function y(j){let B={debug:j.debug===!0,middleware:(j.middleware??[]).map((z)=>({name:z.name,timing:z.timing,handler:String(z.handler)})),customDirectives:(j.customDirectives??[]).map((z)=>({name:z.name,hasEndTag:z.hasEndTag===!0,handler:String(z.handler)}))};return new Bun.CryptoHasher("sha1").update(JSON.stringify(B)).digest("hex")}async function C(j,B){try{if(!B.cachePath)return null;let z=Y.resolve(B.cachePath),K=Y.join(z,`${M(j)}.html`),I=Y.join(z,`${M(j)}.meta.json`);if(!await D(K)||!await D(I))return null;let W=await Bun.file(I).text(),J=JSON.parse(W);if(J.cacheVersion!==B.cacheVersion)return null;if(J.optionsSignature!==y(B))return null;if((await Q.promises.stat(j)).mtime.getTime()>J.mtime)return null;for(let Z of J.dependencies)if(await D(Z)){if((await Q.promises.stat(Z)).mtime.getTime()>J.mtime)return null}else return null;return await Bun.file(K).text()}catch(z){return console.warn(`Cache error for ${j}:`,z),null}}async function u(j,B,z,K){try{if(!K.cachePath)return;let I=Y.resolve(K.cachePath);await Q.promises.mkdir(I,{recursive:!0});let W=Y.join(I,`${M(j)}.html`),J=Y.join(I,`${M(j)}.meta.json`),X=await Q.promises.stat(j);await Bun.write(W,B);let Z={sourcePath:j,mtime:X.mtime.getTime(),dependencies:Array.from(z),cacheVersion:K.cacheVersion,optionsSignature:y(K),generatedAt:Date.now()};await Bun.write(J,JSON.stringify(Z,null,2)),b.set(j,{output:B,mtime:X.mtime.getTime(),dependencies:z})}catch(I){console.warn(`Failed to cache template ${j}:`,I)}}var O=16;function M(j){return new Bun.CryptoHasher("sha1").update(j).digest("hex").substring(0,O)}
3
3
  export{b as Oj,v as Pj,E as Qj,F as Rj,R as Sj,S as Tj,_ as Uj,g as Vj,C as Wj,u as Xj,M as Yj};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{ar as a,br as b,cr as c,dr as d,er as e,fr as f}from"./chunk-qccdz9t1.js";import"./chunk-q68xmak4.js";import"./chunk-c0an64km.js";import"./chunk-t1k5dpbr.js";import"./chunk-52mh63sp.js";import"./chunk-5k3qb1am.js";import"./chunk-39f40yc4.js";import"./chunk-ysnk7x79.js";import"./chunk-0f1kz0x2.js";import"./chunk-ayrjwkyw.js";import"./chunk-c6fw33zh.js";import"./chunk-bf8wf3r2.js";import"./chunk-jn6m8zf7.js";import"./chunk-sskbegsz.js";export{f as validateConfig,b as resolveStxDirectories,c as loadStxConfig,e as defineStxConfig,a as defaultConfig,d as config};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{Au as w,Bu as x,Cu as y,Du as z,Eu as A,Fu as B,Gu as C,Hu as D,Iu as E,Ju as F,Ku as G,Lu as H,Mu as I,Nu as J,Pu as K,Ru as L,eu as a,fu as b,gu as c,hu as d,iu as e,ju as f,ku as g,lu as h,mu as i,nu as j,ou as k,pu as l,qu as m,ru as n,su as o,tu as p,uu as q,vu as r,wu as s,xu as t,yu as u,zu as v}from"./chunk-sfaayvmn.js";import"./chunk-z45t29sf.js";L();export{o as setAppUrl,H as runMiddleware,r as route,j as resolveLayoutChain,s as resetRoutes,z as registerMiddleware,g as patternToRegex,t as navigateTo,h as matchRoute,E as loadMiddlewareFromDirectory,c as isNonPageRoutePattern,b as isNonPageRoutePath,B as hasMiddleware,K as getRouterScript,D as getMiddlewareNames,A as getMiddleware,d as generateRouteTypes,e as generateRouteManifest,n as formatRoutes,m as findErrorPage,f as filePathToPattern,J as extractLayoutMetadata,I as deriveLayoutGroup,q as defineRoutes,p as defineRoute,v as defineMiddleware,y as createStorageManager,w as createServerCookieManager,l as createRouter,F as createRouteLocation,G as createMiddlewareContext,x as createClientCookieManager,C as clearMiddleware,i as bracketPathToRegex,u as abortNavigation,k as Router,a as NON_PAGE_DIRS};
2
+ import{Au as s,Bu as t,Cu as u,Du as v,Eu as w,Fu as x,Gu as y,Hu as z,Iu as A,Ju as B,Ku as C,Lu as D,Mu as E,Nu as F,Ou as G,Pu as H,Qu as I,Ru as J,Tu as K,Vu as L,iu as a,ju as b,ku as c,lu as d,mu as e,nu as f,ou as g,pu as h,qu as i,ru as j,su as k,tu as l,uu as m,vu as n,wu as o,xu as p,yu as q,zu as r}from"./chunk-bf8wf3r2.js";import"./chunk-sskbegsz.js";L();export{o as setAppUrl,H as runMiddleware,r as route,j as resolveLayoutChain,s as resetRoutes,z as registerMiddleware,g as patternToRegex,t as navigateTo,h as matchRoute,E as loadMiddlewareFromDirectory,c as isNonPageRoutePattern,b as isNonPageRoutePath,B as hasMiddleware,K as getRouterScript,D as getMiddlewareNames,A as getMiddleware,d as generateRouteTypes,e as generateRouteManifest,n as formatRoutes,m as findErrorPage,f as filePathToPattern,J as extractLayoutMetadata,I as deriveLayoutGroup,q as defineRoutes,p as defineRoute,v as defineMiddleware,y as createStorageManager,w as createServerCookieManager,l as createRouter,F as createRouteLocation,G as createMiddlewareContext,x as createClientCookieManager,C as clearMiddleware,i as bracketPathToRegex,u as abortNavigation,k as Router,a as NON_PAGE_DIRS};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{Oj as a,Pj as b,Qj as c,Rj as d,Sj as e,Tj as f,Uj as g,Vj as h,Wj as i,Xj as j,Yj as k}from"./chunk-1a8e5xpf.js";import"./chunk-qccdz9t1.js";import"./chunk-q68xmak4.js";import"./chunk-c0an64km.js";import"./chunk-t1k5dpbr.js";import"./chunk-52mh63sp.js";import"./chunk-5k3qb1am.js";import"./chunk-39f40yc4.js";import"./chunk-ysnk7x79.js";import"./chunk-0f1kz0x2.js";import"./chunk-ayrjwkyw.js";import"./chunk-c6fw33zh.js";import"./chunk-bf8wf3r2.js";import"./chunk-jn6m8zf7.js";import"./chunk-sskbegsz.js";export{a as templateCache,b as readFileCached,d as invalidateFileCacheByDir,c as invalidateFileCache,k as hashFilePath,f as getCachedSignalsRuntime,g as getCachedRouterScript,h as clearDevCaches,i as checkCache,j as cacheTemplate,e as __setSignalsGeneratorsForTest};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
2
  import C from"path";var G=".stx",K="STX_DIR",J=null;function O(j){J=j?.trim()||null}function H(){return process.env[K]?.trim()||J||G}function Q(j=process.cwd(),...q){let B=H();return C.isAbsolute(B)?C.join(B,...q):C.join(j,B,...q)}function W(j){if(!j||C.isAbsolute(j))return j;let q=j.replace(/\\/g,"/");if(q!==G&&!q.startsWith(`${G}/`))return j;let B=q.slice(G.length+1);return B?C.join(H(),B):H()}
3
- export{G as ot,K as pt,O as qt,H as rt,Q as st,W as tt};
3
+ export{G as st,K as tt,O as ut,H as vt,Q as wt,W as xt};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import"./chunk-z45t29sf.js";var Y=null,S=[],F=new WeakMap;function I(z){let K=z,B=new Set,G={get value(){if(Y){let H=F.get(G);if(!H)H=new Set,F.set(G,H);H.add(Y)}return K},set value(H){if(!Object.is(K,H)){K=H,B.forEach((J)=>J(H));let L=F.get(G);if(L)L.forEach((J)=>J())}},subscribe(H){return B.add(H),()=>B.delete(H)},peek(){return K}};return G}function W(z){return z!==null&&typeof z==="object"&&"value"in z&&"subscribe"in z&&"peek"in z}function P(z){return W(z)?z.value:z}function j(z){let K={};for(let B in z)if(Object.prototype.hasOwnProperty.call(z,B))K[B]=I(z[B]);return K}function D(z){return I(z)}function U(z){let K=typeof z==="function",B=K?z:z.get,G=K?void 0:z.set,H=K?Object.is:z.equals||Object.is,L,J=!0,Q=new Set,X=new Set,_=()=>{if(J=!0,X.size>0){let N=T.value;X.forEach(($)=>$(N))}};function Z(){Q.clear();let N=Y;Y=_,S.push(_);try{return B()}finally{S.pop(),Y=N}}let T={get value(){if(Y){let N=F.get(T);if(!N)N=new Set,F.set(T,N);N.add(Y)}if(J){let N=Z();if(!H(L,N))L=N;J=!1}return L},set value(N){if(G)G(N);else console.warn("Computed property is readonly")},subscribe(N){return X.add(N),()=>X.delete(N)},peek(){if(J)L=B(),J=!1;return L},invalidate(){J=!0},get dirty(){return J},get deps(){return Q}};return T}function x(z,K,B={}){let{immediate:G=!1,deep:H=!1,flush:L="pre",once:J=!1}=B,Q,X=!0,_=!1,Z=()=>{if(W(z))return H?q(z.value):z.value;return z()},T=()=>{if(!X||_)return;let M=Z();if(Q!==void 0&&Object.is(Q,M)&&!H)return;let A=()=>{if(K(M,Q),Q=H?q(M):M,J)$()};if(L==="sync")A();else if(L==="post")queueMicrotask(A);else Promise.resolve().then(A)},N=null;if(W(z))N=z.subscribe(()=>T());else N=U(z).subscribe(()=>T());if(G)Q=void 0,T();else Q=Z();let $=()=>{if(X=!1,N)N(),N=null};return $.pause=()=>{_=!0},$.resume=()=>{_=!1},$}function E(z,K,B={}){let{immediate:G=!1,once:H=!1}=B,L=z.map((T)=>W(T)?T.value:void 0),J=!0,Q=!1,X=()=>{if(!J||Q)return;let T=z.map((N)=>W(N)?N.value:void 0);if(K(T,L),L=[...T],H)Z()},_=z.map((T)=>{if(W(T))return T.subscribe(()=>X());return()=>{}});if(G)X();let Z=()=>{J=!1,_.forEach((T)=>T())};return Z.pause=()=>{Q=!0},Z.resume=()=>{Q=!1},Z}function y(z,K={}){let{flush:B="pre"}=K,G,H=!0,L=!1,J=()=>{if(!H||L)return;if(G)G();let X=Y;Y=J,S.push(J);try{G=z()}finally{S.pop(),Y=X}};if(B==="sync")J();else if(B==="post")queueMicrotask(J);else Promise.resolve().then(J);let Q=()=>{if(H=!1,G)G()};return Q.pause=()=>{L=!0},Q.resume=()=>{L=!1},Q}function C(z,K={},B){let G=/@computed\s*\(\s*(\w+)\s*,\s*(.+?)\s*\)/gi;return z.replace(G,(H,L,J)=>{try{let X=Function(...Object.keys(K),`return ${J}`)(...Object.values(K));return K[L]=X,`<!-- computed: ${L} = ${X} -->`}catch(Q){return`<!-- computed error: ${L} - ${Q} -->`}})}function R(z,K={},B){let G=/@watch\s*\(\s*(\w+)\s*\)\s*([\s\S]*?)@endwatch/gi;return z.replace(G,(H,L,J)=>{return`
2
+ import"./chunk-sskbegsz.js";var Y=null,S=[],F=new WeakMap;function I(z){let K=z,B=new Set,G={get value(){if(Y){let H=F.get(G);if(!H)H=new Set,F.set(G,H);H.add(Y)}return K},set value(H){if(!Object.is(K,H)){K=H,B.forEach((J)=>J(H));let L=F.get(G);if(L)L.forEach((J)=>J())}},subscribe(H){return B.add(H),()=>B.delete(H)},peek(){return K}};return G}function W(z){return z!==null&&typeof z==="object"&&"value"in z&&"subscribe"in z&&"peek"in z}function P(z){return W(z)?z.value:z}function j(z){let K={};for(let B in z)if(Object.prototype.hasOwnProperty.call(z,B))K[B]=I(z[B]);return K}function D(z){return I(z)}function U(z){let K=typeof z==="function",B=K?z:z.get,G=K?void 0:z.set,H=K?Object.is:z.equals||Object.is,L,J=!0,Q=new Set,X=new Set,_=()=>{if(J=!0,X.size>0){let N=T.value;X.forEach(($)=>$(N))}};function Z(){Q.clear();let N=Y;Y=_,S.push(_);try{return B()}finally{S.pop(),Y=N}}let T={get value(){if(Y){let N=F.get(T);if(!N)N=new Set,F.set(T,N);N.add(Y)}if(J){let N=Z();if(!H(L,N))L=N;J=!1}return L},set value(N){if(G)G(N);else console.warn("Computed property is readonly")},subscribe(N){return X.add(N),()=>X.delete(N)},peek(){if(J)L=B(),J=!1;return L},invalidate(){J=!0},get dirty(){return J},get deps(){return Q}};return T}function x(z,K,B={}){let{immediate:G=!1,deep:H=!1,flush:L="pre",once:J=!1}=B,Q,X=!0,_=!1,Z=()=>{if(W(z))return H?q(z.value):z.value;return z()},T=()=>{if(!X||_)return;let M=Z();if(Q!==void 0&&Object.is(Q,M)&&!H)return;let A=()=>{if(K(M,Q),Q=H?q(M):M,J)$()};if(L==="sync")A();else if(L==="post")queueMicrotask(A);else Promise.resolve().then(A)},N=null;if(W(z))N=z.subscribe(()=>T());else N=U(z).subscribe(()=>T());if(G)Q=void 0,T();else Q=Z();let $=()=>{if(X=!1,N)N(),N=null};return $.pause=()=>{_=!0},$.resume=()=>{_=!1},$}function E(z,K,B={}){let{immediate:G=!1,once:H=!1}=B,L=z.map((T)=>W(T)?T.value:void 0),J=!0,Q=!1,X=()=>{if(!J||Q)return;let T=z.map((N)=>W(N)?N.value:void 0);if(K(T,L),L=[...T],H)Z()},_=z.map((T)=>{if(W(T))return T.subscribe(()=>X());return()=>{}});if(G)X();let Z=()=>{J=!1,_.forEach((T)=>T())};return Z.pause=()=>{Q=!0},Z.resume=()=>{Q=!1},Z}function y(z,K={}){let{flush:B="pre"}=K,G,H=!0,L=!1,J=()=>{if(!H||L)return;if(G)G();let X=Y;Y=J,S.push(J);try{G=z()}finally{S.pop(),Y=X}};if(B==="sync")J();else if(B==="post")queueMicrotask(J);else Promise.resolve().then(J);let Q=()=>{if(H=!1,G)G()};return Q.pause=()=>{L=!0},Q.resume=()=>{L=!1},Q}function C(z,K={},B){let G=/@computed\s*\(\s*(\w+)\s*,\s*(.+?)\s*\)/gi;return z.replace(G,(H,L,J)=>{try{let X=Function(...Object.keys(K),`return ${J}`)(...Object.values(K));return K[L]=X,`<!-- computed: ${L} = ${X} -->`}catch(Q){return`<!-- computed error: ${L} - ${Q} -->`}})}function R(z,K={},B){let G=/@watch\s*\(\s*(\w+)\s*\)\s*([\s\S]*?)@endwatch/gi;return z.replace(G,(H,L,J)=>{return`
3
3
  <script data-watch="${`watch-${Math.random().toString(36).substring(2,9)}`}">
4
4
  (function() {
5
5
  // Watch implementation for ${L}
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{Rl as d,ks as t}from"./chunk-h0t73k2z.js";import{Vs as l,Zs as P}from"./chunk-ydzmhy4c.js";import{st as g}from"./chunk-w1asc0zd.js";import Y from"path";import O from"fs";function Gz(z){if(!z||typeof z!=="object")return!1;let G=z;return typeof G.message==="string"&&(G.name==="BuildMessage"||G.name==="ResolveMessage"||("position"in G))}function Jz(z){if(z&&typeof z==="object"&&Array.isArray(z.errors))return z.errors;return[z]}function B(z,G){let J=[];for(let $ of Jz(z)){if(Gz($)){let Q=$.position||void 0;J.push({file:G||Q?.file,line:Q?.line,column:Q?.column,message:$.message??"",lineText:Q?.lineText});continue}J.push({file:G,message:$ instanceof Error?$.message:String($)})}return J}function p(z,G){return B(z,G).map((J)=>{let $=J.file?`${J.file}${J.line?`:${J.line}${J.column?`:${J.column}`:""}`:""}`:"",Q=J.lineText?`
2
+ import{Rl as d,dr as t}from"./chunk-qccdz9t1.js";import{_s as l,ct as P}from"./chunk-5k3qb1am.js";import{wt as g}from"./chunk-39f40yc4.js";import Y from"path";import O from"fs";function Gz(z){if(!z||typeof z!=="object")return!1;let G=z;return typeof G.message==="string"&&(G.name==="BuildMessage"||G.name==="ResolveMessage"||("position"in G))}function Jz(z){if(z&&typeof z==="object"&&Array.isArray(z.errors))return z.errors;return[z]}function B(z,G){let J=[];for(let $ of Jz(z)){if(Gz($)){let Q=$.position||void 0;J.push({file:G||Q?.file,line:Q?.line,column:Q?.column,message:$.message??"",lineText:Q?.lineText});continue}J.push({file:G,message:$ instanceof Error?$.message:String($)})}return J}function p(z,G){return B(z,G).map((J)=>{let $=J.file?`${J.file}${J.line?`:${J.line}${J.column?`:${J.column}`:""}`:""}`:"",Q=J.lineText?`
3
3
  ${J.lineText.trim()}`:"";return $?`${$}: ${J.message}${Q}`:`${J.message}${Q}`}).join(`
4
4
  `)}var Kz=5,r=1,s=new Map,E=600,Zz=100,v=new Map;async function $z(z){let G=v.get(z)??0;if(G>0&&G<Zz){v.set(z,G+1);return}v.set(z,1);try{let J=(await O.promises.readdir(z)).filter((W)=>W.endsWith(".js"));if(J.length<=E)return;let Q=(await Promise.all(J.map(async(W)=>{try{return{name:W,at:(await O.promises.stat(Y.join(z,W))).mtimeMs}}catch{return null}}))).filter((W)=>W!==null);Q.sort((W,K)=>K.at-W.at);for(let W of Q.slice(E)){let K=W.name.slice(0,-3);await O.promises.rm(Y.join(z,`${K}.js`),{force:!0}),await O.promises.rm(Y.join(z,`${K}.deps.json`),{force:!0})}M("pruned bundle cache to",E,"entries")}catch{}}function Lz(z){return s.get(z)??[]}function b(z,G){if(z)s.set(z,G)}function Wz(z=process.env){return z.STX_DEBUG==="true"||z.STX_DEBUG==="1"}function M(...z){if(Wz())console.log("[stx:bundler]",...z)}var m=[];function h(z,G,J){m.push({filePath:z||"<inline>",message:G,details:J})}function Sz(){return m.slice()}function Cz(){m.length=0}var f;function Az(z){f=z}function c(){if(f)return f;try{let z=t.strict;return typeof z==="object"&&z!==null?z.bundlerFallback??"warn":"warn"}catch{return"warn"}}var o=[/^stx$/,/^@stacksjs\/stx$/,/^@stores$/,/^stx\/stores$/,/^@composables$/];function Iz(z){let G=/^[ \t]*import[ \t]+(?!type(?:[ \t]|{))[\s\S]*?\s+from\s+['"]([^'"]+)['"][ \t]*;?/gm,J;while((J=G.exec(z))!==null){let Q=J[1];if(!o.some((K)=>K.test(Q)))return M("detected user import:",Q),!0}let $=/^[ \t]*import[ \t]+['"]([^'"]+)['"]/gm;while((J=$.exec(z))!==null){let Q=J[1];if(/\.css(?:\?.*)?$/.test(Q))continue;if(!o.some((K)=>K.test(Q)))return M("detected side-effect import:",Q),!0}return!1}function Qz(z,G,J,$){let Q=(W,K)=>{let Z=W===J?G:Y.dirname(W),X=Y.resolve(Z,K),j=[X,`${X}.ts`,`${X}.tsx`,`${X}.js`,`${X}.mjs`,`${X}.jsx`,Y.join(X,"index.ts"),Y.join(X,"index.tsx"),Y.join(X,"index.js"),Y.join(X,"index.mjs")];for(let k of j)try{if(O.existsSync(k)&&O.statSync(k,{throwIfNoEntry:!1})?.isFile())return k}catch{}return X};return{name:"stx-client-bundle",setup(W){W.onResolve({filter:/^(stx|@stacksjs\/stx)$/},(K)=>({path:K.path,external:!0})),W.onResolve({filter:/^(@stores|@composables|stx\/stores)$/},(K)=>({path:K.path,external:!0})),W.onResolve({filter:/^\//},(K)=>{if(O.existsSync(K.path))return{path:K.path};return{path:K.path,external:!0}}),W.onResolve({filter:/^\.\.?\//},(K)=>{let Z=Q(K.importer,K.path);return $.add(Z),{path:Z}}),W.onResolve({filter:/^[@~]\//},(K)=>{let Z=Y.resolve(z,K.path.slice(2)),X=[Z,`${Z}.ts`,`${Z}.tsx`,`${Z}.js`,`${Z}.mjs`,`${Z}.jsx`,Y.join(Z,"index.ts"),Y.join(Z,"index.tsx"),Y.join(Z,"index.js"),Y.join(Z,"index.mjs")];for(let j of X)if(O.existsSync(j)&&O.statSync(j,{throwIfNoEntry:!1})?.isFile())return M(`resolved ${K.path[0]}/ import:`,K.path,"\u2192",j),$.add(j),{path:j};return console.warn(`[stx:bundler] could not resolve ${K.path[0]}/ import:`,K.path),{path:Z}}),W.onLoad({filter:/\.(?:[cm]?[jt]sx?|json)$/},(K)=>{let Z=Y.extname(K.path).toLowerCase(),X=Z===".json"?"json":Z===".tsx"?"tsx":Z===".jsx"?"jsx":Z===".ts"||Z===".mts"||Z===".cts"?"ts":"js";if(K.path!==J)$.add(K.path);return{contents:O.readFileSync(K.path,"utf8"),loader:X}})}}}var D=new Map,_=l(64),n=Symbol.for("stx.client-bundle-build-queue");function Xz(z){let G=globalThis,$=(G[n]??Promise.resolve()).then(z,z);return G[n]=$.then(()=>{return},()=>{return}),$}async function yz(z,G,J={}){let $=J.projectRoot||process.cwd(),Q=J.minify??!1,W=J.cacheDir||g($,"bundle-cache"),K=new Bun.CryptoHasher("md5");K.update(`${Kz}\x00${z}\x00${G}`);let Z=K.digest("hex").slice(0,12),X=Y.join(W,`${Z}.js`),j=_.get(X);if(j){if(P(j.files)){M("memo hit:",Z);let S=j.files.map((U)=>U.path);return b(G,S),J.collectInputs?.push(...S),j.code}_.delete(X),M("memo invalidated by dep change:",Z)}let k=Y.join(W,`${Z}.deps.json`),T=Bun.file(X);if(await T.exists()){let S=Bun.file(k),U=!0,H=null;if(await S.exists())try{let A=JSON.parse(await S.text());if(A.metadataVersion!==r||!Array.isArray(A.files))U=!1;else H=A.files;if(H&&!P(H))U=!1}catch{U=!1}if(U){if(M("cache hit:",Z),H)b(G,H.map((R)=>R.path)),J.collectInputs?.push(...H.map((R)=>R.path));let A=await T.text();if(H)_.set(X,{code:A,files:H});return A}M("cache invalidated by dep change:",Z)}let F=D.get(Z);if(F){let S=await F;if(J.collectInputs)J.collectInputs.push(...(_.get(X)?.files??[]).map((U)=>U.path));return S}let L=Xz(()=>Yz(z,G,{projectRoot:$,minify:Q,cacheDir:W,hash:Z,cachePath:X,depsPath:k,collectInputs:J.collectInputs}));D.set(Z,L);try{return await L}finally{D.delete(Z)}}async function Yz(z,G,J){let{projectRoot:$,minify:Q,cacheDir:W,hash:K,cachePath:Z,depsPath:X}=J,j=g($,"bundle-tmp"),k=Y.join(j,`${K}.ts`),T=Y.join(j,"out",K);O.mkdirSync(j,{recursive:!0}),O.mkdirSync(T,{recursive:!0});let F=Y.dirname(G),L=[],S=/^[ \t]*(export\s+)?(?:const|let|var)\s+(?:\{([^}]+)\}|(\w+))/gm,U=/^[ \t]*(export\s+)?(?:async\s+)?function\s+(\w+)/gm,H;while((H=S.exec(z))!==null){if(H[1])continue;if(H[2])H[2].split(",").forEach((w)=>{let V=qz(w);if(V)L.push(V)});else if(H[3])L.push(H[3])}while((H=U.exec(z))!==null){if(H[1])continue;L.push(H[2])}let A=L.length>0?`
5
5
  export { ${L.join(", ")} }`:"";await Bun.write(k,z+A),M("bundling:",K,"from:",Y.basename(G));let R=new Set;try{let w=await Bun.build({entrypoints:[k],outdir:T,target:"browser",format:"esm",minify:Q,plugins:[Qz($,F,k,R)],define:{"process.env.NODE_ENV":Q?'"production"':'"development"',...d()},root:$});if(!w.success){let I=w.logs.filter((y)=>y.level==="error").map((y)=>y.message).join(", ")||`Unable to bundle ${Y.basename(G)}`,x=B(w.logs,G||void 0);if(console.warn("[stx:bundler] build failed:",I),h(G||"",I,x),c()==="error")throw Error(I);return z}let V="";for(let q of w.outputs){V=await q.text();break}let C=[];for(let q of V.matchAll(/^\s*export\s*\{([^}]*)\}\s*;?\s*$/gm))for(let I of q[1].split(",")){let x=I.trim().match(/^([A-Za-z_$][\w$]*)\s+as\s+([A-Za-z_$][\w$]*)$/);if(x){C.push([x[2],x[1]]);continue}let y=I.trim();if(/^[A-Za-z_$][\w$]*$/.test(y))C.push([y,y])}let i=V.match(/^\s*import\s+[^;]+;?\s*$/gm)||[];V=V.replace(/^\s*import\s+[^;]+;?\s*$/gm,"").replace(/^\s*export\s*\{[^}]*\}\s*;?\s*$/gm,"").replace(/^\s*export\s+default\s+.*$/gm,"").trim();let u=`__stxBundle_${K}`,a=C.map(([q,I])=>`${JSON.stringify(q)}: ${I}`).join(", "),e=C.map(([q])=>`var ${q} = undefined;`).join(`
@@ -0,0 +1,3 @@
1
+ // @bun
2
+ import{om as I}from"./chunk-qccdz9t1.js";import{Wr as F,Zr as V}from"./chunk-q68xmak4.js";function R(j,W){let U=1,z=W,G="<template",X="</template";while(z<j.length&&U>0){let J=j.indexOf("<",z);if(J===-1)break;if(z=J,j.startsWith(G,z)&&(z+G.length>=j.length||/[\s>\/]/.test(j[z+G.length]))){U++,z+=G.length;continue}if(j.startsWith(X,z)){let Y=j.indexOf(">",z+X.length);if(Y!==-1){if(U--,U===0)return Y+1;z=Y+1;continue}}z++}return U===0?z:-1}var P=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]);function D(j,W){let U=null;for(let z=W;z<j.length;z++){let G=j[z];if(U){if(G==="\\"){z++;continue}if(G===U)U=null;continue}if(G==='"'||G==="'"){U=G;continue}if(G===">")return z+1}return-1}function b(j){let W=[],U=[],z=/^<template\s+(?:#([a-zA-Z][\w-]*)|v-slot:([a-zA-Z][\w-]*)|slot="([a-zA-Z][\w-]*)")(?:\s*=\s*"([^"]*)")?[^>]*>$/i,G=0;while(G<j.length){let X=j.indexOf("<",G);if(X===-1)break;if(j.startsWith("<!--",X)){let $=j.indexOf("-->",X+4);G=$===-1?j.length:$+3;continue}let J=D(j,X+1);if(J===-1)break;let Y=j.slice(X,J),Q=Y.match(/^<\s*(\/?)\s*([a-zA-Z][\w-]*)/);if(!Q){G=J;continue}let Z=Q[1]==="/",H=Q[2].toLowerCase();if(Z){let $=U.lastIndexOf(H);if($!==-1)U.splice($);G=J;continue}if(H==="template"&&U.length===0){let $=Y.match(z);if($){let K=R(j,J);if(K!==-1){let O=$[1]||$[2]||$[3];W.push({start:X,end:K,slotName:O,content:j.slice(J,K-11).trim(),propsBinding:$[4]||void 0}),G=K;continue}}}if(!/\/\s*>$/.test(Y)&&!P.has(H)){if(U.push(H),H==="script"||H==="style"){let $=j.toLowerCase().indexOf(`</${H}>`,J);if($!==-1){G=$;continue}}}G=J}return W}function w(j){let W={default:"",named:new Map},U=j,z=b(j);for(let Q of z)W.named.set(Q.slotName,{name:Q.slotName,content:Q.content,propsBinding:Q.propsBinding});z.sort((Q,Z)=>Z.start-Q.start);for(let Q of z)U=U.slice(0,Q.start)+U.slice(Q.end);let G=[],X=/<([a-zA-Z][a-zA-Z0-9-]*)\b([^>]*?)\bslot="([^"]+)"([^>]*)>([\s\S]*?)<\/\1>/gi,J;while((J=X.exec(U))!==null){let[Q,Z,H,_,$,K]=J,O=H.replace(/\s*slot="[^"]*"\s*/," ").trimEnd(),B=$.replace(/\s*slot="[^"]*"\s*/," ").trimEnd(),L=(O+B).trim(),q=`<${Z}${L?" "+L:""}>${K}</${Z}>`;G.push({start:J.index,end:J.index+Q.length,slotName:_,element:q})}let Y=/<([a-zA-Z][a-zA-Z0-9-]*)\b([^>]*?)\bslot="([^"]+)"([^>]*?)\/>/gi;while((J=Y.exec(U))!==null){let[Q,Z,H,_,$]=J,K=H.replace(/\s*slot="[^"]*"\s*/," ").trimEnd(),O=$.replace(/\s*slot="[^"]*"\s*/," ").trimEnd(),B=(K+O).trim(),L=`<${Z}${B?" "+B:""} />`;G.push({start:J.index,end:J.index+Q.length,slotName:_,element:L})}G.sort((Q,Z)=>Z.start-Q.start);for(let Q of G){let Z=W.named.get(Q.slotName);if(Z)Z.content+=Q.element;else W.named.set(Q.slotName,{name:Q.slotName,content:Q.element});U=U.slice(0,Q.start)+U.slice(Q.end)}return W.default=U.trim(),W}function C(j){let W=j.match(/name\s*=\s*["']([^"']+)["']/),U=W?W[1]:"",z={},G=/:([a-zA-Z][\w-]*)\s*=\s*["']([^"']+)["']/g,X;while((X=G.exec(j))!==null)z[X[1]]=X[2];let J=j.match(/<slot[^>]*>([\s\S]*?)<\/slot>/i),Y=J?J[1].trim():"";return{name:U,props:z,defaultContent:Y}}async function N(j,W,U,z){if(!j)return U;let G=j.content;if(j.propsBinding&&Object.keys(W).length>0){let X=j.propsBinding.trim(),J={...z};if(X.startsWith("{")&&X.endsWith("}")){let Y=X.slice(1,-1).split(",").map((Q)=>Q.trim()).filter(Boolean);for(let Q of Y){let[Z,H]=Q.split(":").map(($)=>$.trim()),_=H||Z;if(W[Z]!==void 0)J[_]=W[Z]}}else J[X]=W;G=k(G,J)}return G}function k(j,W){return j.replace(/\{\{\s*([^}]+)\s*\}\}/g,(U,z)=>{try{let G=z.trim(),X=y(G,W);return I(String(X??""))}catch{return`{{ ${z} }}`}})}function y(j,W){if(/^[a-zA-Z_$][\w$]*(\.[a-zA-Z_$][\w$]*)*$/.test(j)){let z=j.split("."),G=W;for(let X of z)if(G&&typeof G==="object"&&X in G)G=G[X];else return;return G}let U=j.match(/^([a-zA-Z_$][\w$]*)\s*([+\-*/])\s*(\d+)$/);if(U){let[,z,G,X]=U,J=W[z],Y=parseInt(X,10);if(typeof J==="number")switch(G){case"+":return J+Y;case"-":return J-Y;case"*":return J*Y;case"/":return J/Y}}try{if(!F(j))return;return V(j,Object.keys(W))(...Object.values(W))}catch{return}}async function A(j,W,U){let z=j;z=await v(z,/<slot\s+name\s*=\s*["']([^"']+)["']([^>]*?)(?:\/>|>([\s\S]*?)<\/slot>)/gi,async(J,Y,Q,Z)=>{let H=W.named.get(Y),_=Z?.trim()||"",$=Q||"",K={},O=/:([a-zA-Z_$][\w$-]*)\s*=\s*["']([^"']+)["']/g,B;while((B=O.exec($))!==null){let L=B[1],q=B[2];K[L]=y(q,U)}return await N(H,K,_,U)});let X=/<slot\s*(?:\/>|>([\s\S]*?)<\/slot>)/gi;return z=z.replace(X,(J,Y)=>{if(J.includes("name="))return J;let Q=Y?.trim()||"";return W.default||Q}),z}async function v(j,W,U){let z=[],G=[];j.replace(W,(Y,...Q)=>{let Z=Q[Q.length-2];return G.push({match:Y,index:Z}),z.push(U(Y,...Q.slice(0,-2))),Y});let X=await Promise.all(z),J=j;for(let Y=G.length-1;Y>=0;Y--){let{match:Q,index:Z}=G[Y];J=J.slice(0,Z)+X[Y]+J.slice(Z+Q.length)}return J}function E(j){let W=w(j);return{defaultSlot:W.default,namedSlots:W.named}}async function M(j,W,U,z){return await A(j,{default:W,named:U},z)}
3
+ export{w as Eh,C as Fh,N as Gh,A as Hh,E as Ih,M as Jh};
@@ -8,4 +8,4 @@ function G(j,x){let g=j[x],v=x+1;while(v<j.length){if(j[v]==="\\"){v+=2;continue
8
8
  `:" ",g++}x+=" ",g++;continue}if(z==="`"){x+=" ",g++;while(g<j.length&&j[g]!=="`"){if(j[g]==="\\"){x+=" ",g+=2;continue}if(j[g]==="$"&&j[g+1]==="{"){let B=g+2,D=F(j,B);if(x+=" ",x+=J(j.slice(B,D)),D<j.length)x+=" ";g=D+1;continue}x+=j[g]===`
9
9
  `?`
10
10
  `:" ",g++}x+=" ",g++;continue}x+=z,g++}return x}
11
- export{F as Qs,J as Rs};
11
+ export{F as Vs,J as Ws};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{Kg as T}from"./chunk-e8jazdsk.js";import{$u as I}from"./chunk-z45t29sf.js";import E from"fs";import X from"path";import U from"crypto";var _=new Set(["webp","avif","jpeg","png"]),F=new Set(["cover","contain","fill","inside","outside"]),A=new Set([".jpg",".jpeg",".png",".webp",".avif",".gif"]),S=4096,y=80,D="cover";async function g(k,G){let J=G.routePath??"/_stx/img",B=new URL(k.url);if(B.pathname!==J)return null;let $=q(B,G);if(!$.ok)return new Response($.error,{status:$.status,headers:{"Content-Type":"text/plain"}});let{srcFsPath:j,srcUrl:K,width:H,height:v,format:Z,quality:Y,fit:z}=$,C;try{C=E.statSync(j)}catch{return new Response(`Source image not found: ${K}`,{status:404,headers:{"Content-Type":"text/plain"}})}if(!C.isFile())return new Response("Not a file",{status:404,headers:{"Content-Type":"text/plain"}});let N=G.cacheDir??".stx/cache/img";await E.promises.mkdir(N,{recursive:!0});let V=`${j}:${C.mtimeMs}:${C.size}`,O=`${H}x${v}:${Z}:${Y}:${z}`,b=U.createHash("sha256").update(`${V}|${O}`).digest("hex").slice(0,16),Q=X.join(N,`${b}.${Z}`),W={"Content-Type":T(Z),"Cache-Control":"public, max-age=31536000, immutable",ETag:`"${b}"`,"X-Stx-Image-Cache":"HIT"};if(k.headers.get("if-none-match")===`"${b}"`)return new Response(null,{status:304,headers:W});let L=Bun.file(Q);if(await L.exists())return new Response(L,{headers:W});try{let R=Buffer.from(await Bun.file(j).arrayBuffer()),{resizeAndConvert:M}=await P(),w=await M(R,{width:H,height:v,format:Z,quality:Y,fit:z});return await Bun.write(Q,w),W["X-Stx-Image-Cache"]="MISS",new Response(new Uint8Array(w),{headers:W})}catch(R){let M=R.message;return new Response(`Image processing failed: ${M}`,{status:500,headers:{"Content-Type":"text/plain"}})}}function l(k){return async(G)=>{return await g(G,k)??new Response("Not Found",{status:404,headers:{"Content-Type":"text/plain"}})}}function q(k,G){let J=k.searchParams.get("src");if(!J)return{ok:!1,error:"Missing required param: src",status:400};if(!J.startsWith("/"))return{ok:!1,error:"src must be an absolute URL path (start with /)",status:400};if(J.startsWith("//"))return{ok:!1,error:"src must be a local path",status:400};let B=X.extname(J).toLowerCase();if(!A.has(B))return{ok:!1,error:`Unsupported source extension: ${B}`,status:400};let $=X.resolve(G.publicDir),j=X.resolve($,J.slice(1));if(!j.startsWith(`${$}${X.sep}`)&&j!==$)return{ok:!1,error:"src is outside publicDir",status:400};let K=G.maxWidth??S,H=G.maxHeight??S,v=k.searchParams.get("w"),Z=k.searchParams.get("h"),Y=v?Number.parseInt(v,10):0,z=Z?Number.parseInt(Z,10):0;if(v&&(!Number.isFinite(Y)||Y<=0))return{ok:!1,error:"Invalid w (must be positive integer)",status:400};if(Z&&(!Number.isFinite(z)||z<=0))return{ok:!1,error:"Invalid h (must be positive integer)",status:400};if(!v&&!Z)return{ok:!1,error:"At least one of w or h is required",status:400};let C=Math.min(Y||K,K),N=Math.min(z||H,H),V=k.searchParams.get("f")||"webp";if(!_.has(V))return{ok:!1,error:`Invalid f (must be one of: ${[..._].join(", ")})`,status:400};let O=V,b=k.searchParams.get("q"),Q=b?Number.parseInt(b,10):G.defaultQuality??y;if(!Number.isFinite(Q)||Q<1||Q>100)return{ok:!1,error:"Invalid q (must be 1-100)",status:400};let x=k.searchParams.get("fit")||G.defaultFit||D;if(!F.has(x))return{ok:!1,error:`Invalid fit (must be one of: ${[...F].join(", ")})`,status:400};return{ok:!0,srcFsPath:j,srcUrl:J,width:C,height:N,format:O,quality:Q,fit:x}}async function P(){return await import("./chunk-x4w3awav.js")}
2
+ import{Kg as T}from"./chunk-9zndrzb3.js";import{dv as I}from"./chunk-sskbegsz.js";import E from"fs";import X from"path";import U from"crypto";var _=new Set(["webp","avif","jpeg","png"]),F=new Set(["cover","contain","fill","inside","outside"]),A=new Set([".jpg",".jpeg",".png",".webp",".avif",".gif"]),S=4096,y=80,D="cover";async function g(k,G){let J=G.routePath??"/_stx/img",B=new URL(k.url);if(B.pathname!==J)return null;let $=q(B,G);if(!$.ok)return new Response($.error,{status:$.status,headers:{"Content-Type":"text/plain"}});let{srcFsPath:j,srcUrl:K,width:H,height:v,format:Z,quality:Y,fit:z}=$,C;try{C=E.statSync(j)}catch{return new Response(`Source image not found: ${K}`,{status:404,headers:{"Content-Type":"text/plain"}})}if(!C.isFile())return new Response("Not a file",{status:404,headers:{"Content-Type":"text/plain"}});let N=G.cacheDir??".stx/cache/img";await E.promises.mkdir(N,{recursive:!0});let V=`${j}:${C.mtimeMs}:${C.size}`,O=`${H}x${v}:${Z}:${Y}:${z}`,b=U.createHash("sha256").update(`${V}|${O}`).digest("hex").slice(0,16),Q=X.join(N,`${b}.${Z}`),W={"Content-Type":T(Z),"Cache-Control":"public, max-age=31536000, immutable",ETag:`"${b}"`,"X-Stx-Image-Cache":"HIT"};if(k.headers.get("if-none-match")===`"${b}"`)return new Response(null,{status:304,headers:W});let L=Bun.file(Q);if(await L.exists())return new Response(L,{headers:W});try{let R=Buffer.from(await Bun.file(j).arrayBuffer()),{resizeAndConvert:M}=await P(),w=await M(R,{width:H,height:v,format:Z,quality:Y,fit:z});return await Bun.write(Q,w),W["X-Stx-Image-Cache"]="MISS",new Response(new Uint8Array(w),{headers:W})}catch(R){let M=R.message;return new Response(`Image processing failed: ${M}`,{status:500,headers:{"Content-Type":"text/plain"}})}}function l(k){return async(G)=>{return await g(G,k)??new Response("Not Found",{status:404,headers:{"Content-Type":"text/plain"}})}}function q(k,G){let J=k.searchParams.get("src");if(!J)return{ok:!1,error:"Missing required param: src",status:400};if(!J.startsWith("/"))return{ok:!1,error:"src must be an absolute URL path (start with /)",status:400};if(J.startsWith("//"))return{ok:!1,error:"src must be a local path",status:400};let B=X.extname(J).toLowerCase();if(!A.has(B))return{ok:!1,error:`Unsupported source extension: ${B}`,status:400};let $=X.resolve(G.publicDir),j=X.resolve($,J.slice(1));if(!j.startsWith(`${$}${X.sep}`)&&j!==$)return{ok:!1,error:"src is outside publicDir",status:400};let K=G.maxWidth??S,H=G.maxHeight??S,v=k.searchParams.get("w"),Z=k.searchParams.get("h"),Y=v?Number.parseInt(v,10):0,z=Z?Number.parseInt(Z,10):0;if(v&&(!Number.isFinite(Y)||Y<=0))return{ok:!1,error:"Invalid w (must be positive integer)",status:400};if(Z&&(!Number.isFinite(z)||z<=0))return{ok:!1,error:"Invalid h (must be positive integer)",status:400};if(!v&&!Z)return{ok:!1,error:"At least one of w or h is required",status:400};let C=Math.min(Y||K,K),N=Math.min(z||H,H),V=k.searchParams.get("f")||"webp";if(!_.has(V))return{ok:!1,error:`Invalid f (must be one of: ${[..._].join(", ")})`,status:400};let O=V,b=k.searchParams.get("q"),Q=b?Number.parseInt(b,10):G.defaultQuality??y;if(!Number.isFinite(Q)||Q<1||Q>100)return{ok:!1,error:"Invalid q (must be 1-100)",status:400};let x=k.searchParams.get("fit")||G.defaultFit||D;if(!F.has(x))return{ok:!1,error:`Invalid fit (must be one of: ${[...F].join(", ")})`,status:400};return{ok:!0,srcFsPath:j,srcUrl:J,width:C,height:N,format:O,quality:Q,fit:x}}async function P(){return await import("./chunk-e7jfpyqy.js")}
3
3
  export{g as Cf,l as Df};
@@ -0,0 +1,22 @@
1
+ // @bun
2
+ import{wt as IJ}from"./chunk-39f40yc4.js";import{dv as VJ}from"./chunk-sskbegsz.js";import O from"path";import{hasLocalConfig as FJ}from"bunfig";var JJ={fg:{light:"gray-900",dark:"gray-100",description:"Primary text"},"fg-strong":{light:"gray-700",dark:"gray-300",description:"Labels, secondary headings"},"fg-muted":{light:"gray-600",dark:"gray-400",description:"Supporting text"},"fg-soft":{light:"gray-500",dark:"gray-400",description:"De-emphasised text"},"fg-subtle":{light:"gray-400",dark:"gray-500",description:"Placeholders, disabled text"},surface:{light:"gray-50",dark:"gray-800",description:"Page and panel background"},"surface-raised":{light:"gray-100",dark:"gray-700",description:"Cards, popovers"},"surface-sunken":{light:"gray-200",dark:"gray-700",description:"Wells, track backgrounds"},line:{light:"gray-200",dark:"gray-700",description:"Default border, divider"},"line-strong":{light:"gray-300",dark:"gray-600",description:"Input border, focus ring track"},accent:{light:"indigo-600",dark:"indigo-400",description:"Primary action, selected state"},info:{light:"blue-600",dark:"blue-400",description:"Informational emphasis, links"},danger:{light:"red-600",dark:"red-400",description:"Errors, destructive actions"},success:{light:"green-600",dark:"green-400",description:"Confirmation"},warning:{light:"yellow-500",dark:"yellow-400",description:"Caution"},"accent-solid":{light:"indigo-600",dark:"indigo-500",description:"Primary button fill"},"info-solid":{light:"blue-600",dark:"blue-500",description:"Informational fill"},"danger-solid":{light:"red-600",dark:"red-500",description:"Destructive button fill"},"success-solid":{light:"green-600",dark:"green-500",description:"Confirmation fill"}};function g(Q){return`--stx-${Q}`}function m(Q,J){let Y=J.lastIndexOf("-");if(Y===-1)return typeof Q[J]==="string"?Q[J]:void 0;let $=Q[J.slice(0,Y)];if(!$||typeof $!=="object")return;let Z=$[J.slice(Y+1)];return typeof Z==="string"?Z:void 0}function QJ(Q){let J={};for(let[Y,$]of Object.entries(JJ)){let Z=m(Q,$.light);if(Z===void 0)continue;J[Y]=`var(${g(Y)}, ${Z})`}return J}function YJ(Q){let J=[],Y=[];for(let[$,Z]of Object.entries(JJ)){let q=m(Q,Z.light),U=m(Q,Z.dark);if(q===void 0)continue;if(J.push(` ${g($)}: ${q};`),U!==void 0)Y.push(` ${g($)}: ${U};`)}if(J.length===0)return"";return["/* stx role tokens \u2014 override any of these to re-theme by meaning. */",":root {",...J,"}",".dark {",...Y,"}",""].join(`
3
+ `)}function $J(Q){return typeof Q==="object"&&Q!==null&&!Array.isArray(Q)}function u(Q,J){let Y={...Q};for(let[$,Z]of Object.entries(J))Y[$]=$J(Z)&&$J(Y[$])?u(Y[$],Z):Z;return Y}function ZJ(Q={},J={}){let Y=Q.theme||{},$=J.theme||{},{extend:Z,...q}=$,{extend:U,...j}=Y,F=j.colors||{};j.colors={...F,...QJ(F)};let V=u(j,q),I=u(U||{},Z||{});if(Object.keys(I).length>0)V.extend=I;let L=[...Q.safelist||[],...J.safelist||[]],T={...Q.shortcuts||{},...J.shortcuts||{}},K=[...Q.preflights||[],...J.preflights||[]];return{config:{...Q,...J,theme:V,safelist:L,shortcuts:T,...K.length>0?{preflights:K}:{},content:[],output:""},safelist:L,shortcuts:T,includePreflight:J.preflight!==!1,minify:J.minify===!0,tokenCSS:YJ(F)}}var W={reset:"\x1B[0m",bright:"\x1B[1m",dim:"\x1B[2m",underscore:"\x1B[4m",blink:"\x1B[5m",reverse:"\x1B[7m",hidden:"\x1B[8m",black:"\x1B[30m",red:"\x1B[31m",green:"\x1B[32m",yellow:"\x1B[33m",blue:"\x1B[34m",magenta:"\x1B[35m",cyan:"\x1B[36m",white:"\x1B[37m",gray:"\x1B[90m",bgBlack:"\x1B[40m",bgRed:"\x1B[41m",bgGreen:"\x1B[42m",bgYellow:"\x1B[43m",bgBlue:"\x1B[44m",bgMagenta:"\x1B[45m",bgCyan:"\x1B[46m",bgWhite:"\x1B[47m",bgGray:"\x1B[100m"};import OJ from"fs";class h{cache=new Map;maxSize;options;sizes;bytes=0;constructor(Q=100,J){this.maxSize=Q,this.options=J??null,this.sizes=J?new Map:null}get byteSize(){return this.bytes}setMaxBytes(Q){if(!this.options)return;this.options={...this.options,maxBytes:Q};while(this.bytes>Q&&this.cache.size>0){let J=this.cache.keys().next().value;if(J===void 0)break;this.delete(J)}}get(Q){if(!this.cache.has(Q))return;let J=this.cache.get(Q);return this.cache.delete(Q),this.cache.set(Q,J),J}set(Q,J){if(this.cache.has(Q))this.delete(Q);let Y=this.options?this.options.sizeOf(J):0;if(this.options&&Y>this.options.maxBytes)return;while(this.cache.size>0&&(this.cache.size>=this.maxSize||this.options!==null&&this.bytes+Y>this.options.maxBytes)){let $=this.cache.keys().next().value;if($===void 0)break;this.delete($)}if(this.cache.set(Q,J),this.sizes)this.sizes.set(Q,Y),this.bytes+=Y}has(Q){return this.cache.has(Q)}delete(Q){if(this.sizes){let J=this.sizes.get(Q);if(J!==void 0)this.bytes-=J,this.sizes.delete(Q)}return this.cache.delete(Q)}clear(){this.cache.clear(),this.sizes?.clear(),this.bytes=0}get size(){return this.cache.size}keys(){return this.cache.keys()}values(){return this.cache.values()}}var B=new Map,_J=500;function mJ(Q,J){if(J?.includes("g"))return new RegExp(Q,J);let Y=`${Q}:${J||""}`;if(!B.has(Y)){if(B.size>=_J){let $=B.keys().next().value;if($)B.delete($)}B.set(Y,new RegExp(Q,J))}return B.get(Y)}class qJ{pool=[];maxPoolSize=10;fnCache=new Map;fnCacheMaxSize=200;getEvaluator(Q){let J=Array.from(new Set(Q)),Y=J.sort().join(","),$=this.pool.find((j)=>j.context.join(",")===Y);if($)return $.func;let Z=this.fnCache,q=this.fnCacheMaxSize,U=(...j)=>{return(F)=>{try{let V=`${Y}:${F}`,I=Z.get(V);if(!I){if(Z.size>=q){let L=Z.keys().next().value;if(L)Z.delete(L)}I=Function(...J,`
4
+ 'use strict';
5
+ try {
6
+ return ${F};
7
+ }
8
+ catch (e) {
9
+ if (e instanceof ReferenceError || e instanceof TypeError) {
10
+ return undefined;
11
+ }
12
+ throw e;
13
+ }
14
+ `),Z.set(V,I)}return I(...j)}catch{return}}};if(this.pool.length<this.maxPoolSize)this.pool.push({func:U,context:J.slice()});return U}clear(){this.pool.length=0,this.fnCache.clear()}}var uJ=new qJ;class UJ{metrics=new Map;budgets=new Map;violations=[];maxViolations=100;violationHandlers=[];enabled=!0;setEnabled(Q){this.enabled=Q}isEnabled(){return this.enabled}setBudget(Q,J){this.budgets.set(Q,{warnThreshold:0.8,action:"warn",...J})}setBudgets(Q){for(let[J,Y]of Object.entries(Q))this.setBudget(J,Y)}removeBudget(Q){this.budgets.delete(Q)}getBudgets(){let Q={};for(let[J,Y]of this.budgets.entries())Q[J]=Y;return Q}onViolation(Q){this.violationHandlers.push(Q)}offViolation(Q){let J=this.violationHandlers.indexOf(Q);if(J!==-1)this.violationHandlers.splice(J,1)}time(Q,J){if(!this.enabled)return J();let Y=performance.now(),$=J(),Z=performance.now()-Y;return this.recordTime(Q,Z),this.checkBudget(Q,Z),$}async timeAsync(Q,J){if(!this.enabled)return J();let Y=performance.now(),$=await J(),Z=performance.now()-Y;return this.recordTime(Q,Z),this.checkBudget(Q,Z),$}checkBudget(Q,J){let Y=this.budgets.get(Q);if(!Y)return;let $=J/Y.maxTime*100,Z=Y.warnThreshold!==void 0?J>=Y.maxTime*Y.warnThreshold&&J<Y.maxTime:!1,q=J>=Y.maxTime;if(!Z&&!q)return;let U={label:Q,actualTime:J,budgetTime:Y.maxTime,exceedancePercent:$,timestamp:new Date,isWarning:Z};this.violations.push(U);while(this.violations.length>this.maxViolations)this.violations.shift();for(let F of this.violationHandlers)try{F(U)}catch{}let j=Z?`[Performance Warning] "${Q}" took ${J.toFixed(2)}ms (${$.toFixed(1)}% of ${Y.maxTime}ms budget)`:`[Performance Budget Exceeded] "${Q}" took ${J.toFixed(2)}ms (exceeded ${Y.maxTime}ms budget by ${($-100).toFixed(1)}%)`;switch(Y.action){case"log":console.log(j);break;case"warn":console.warn(j);break;case"error":console.error(j);break;case"throw":if(q)throw Error(j);else console.warn(j);break}}recordTime(Q,J){let Y=this.metrics.get(Q);if(Y)Y.count++,Y.totalTime+=J,Y.maxTime=Math.max(Y.maxTime,J),Y.minTime=Math.min(Y.minTime,J);else this.metrics.set(Q,{count:1,totalTime:J,maxTime:J,minTime:J})}getStats(Q){if(Q){let Y=this.metrics.get(Q);if(!Y)return{};let $=this.budgets.get(Q);return{count:Y.count,avgTime:Y.totalTime/Y.count,totalTime:Y.totalTime,maxTime:Y.maxTime,minTime:Y.minTime,budget:$?.maxTime,budgetUtilization:$?Y.totalTime/Y.count/$.maxTime*100:void 0}}let J={};for(let[Y,$]of this.metrics.entries()){let Z=this.budgets.get(Y);J[Y]={count:$.count,avgTime:$.totalTime/$.count,totalTime:$.totalTime,maxTime:$.maxTime,minTime:$.minTime,budget:Z?.maxTime,budgetUtilization:Z?$.totalTime/$.count/Z.maxTime*100:void 0}}return J}getViolations(Q){if(Q)return this.violations.filter((J)=>J.label===Q);return[...this.violations]}getViolationStats(){let Q={},J=0,Y=0;for(let $ of this.violations)if(Q[$.label]=(Q[$.label]||0)+1,$.isWarning)J++;else Y++;return{total:this.violations.length,byLabel:Q,warnings:J,errors:Y}}clear(){this.metrics.clear()}clearViolations(){this.violations.length=0}clearBudgets(){this.budgets.clear()}reset(){this.clear(),this.clearViolations(),this.clearBudgets(),this.violationHandlers.length=0}}var d=null;function HJ(){if(!d)d=new UJ;return d}var dJ=new Proxy({},{get(Q,J){return HJ()[J]}});var WJ=[];function jJ(Q){let J=new h(Q);return WJ.push(J),J}function lJ(){for(let Q of WJ)Q.clear()}function i(Q,...J){return`${J.map((Y)=>String(Y??"")).join("\x00")}\x00${Q.length}\x00${Bun.hash(Q)}`}function nJ(Q){let J=[];for(let Y of new Set(Q))try{J.push({path:Y,mtimeMs:OJ.statSync(Y).mtimeMs})}catch{}return J}function oJ(Q){for(let J of Q)try{if(OJ.statSync(J.path).mtimeMs!==J.mtimeMs)return!1}catch{return!1}return!0}var N=null,l=!1,X=null,M="",w=!1,NJ=256,_=new Map,z=new Map,H=null,E=null;function x(Q){return Bun.hash(Q).toString(16).padStart(16,"0").slice(0,16)}function c(Q,J){if(_.has(Q))_.delete(Q);else if(_.size>=NJ)_.delete(_.keys().next().value);_.set(Q,J)}function TJ(Q){let J=x(Q);if(z.has(J))z.delete(J);else if(z.size>=NJ)z.delete(z.keys().next().value);return z.set(J,Q),J}function YQ(Q){let J=z.get(Q);if(J===void 0)return;return z.delete(Q),z.set(Q,J),J}async function BJ(Q){if(!H)return null;try{let J=Bun.file(O.join(H,`cw-${x(Q)}.css`));if(!await J.exists())return null;return await J.text()}catch{return null}}async function wJ(Q,J){if(!H)return;try{if(!fs.existsSync(H))fs.mkdirSync(H,{recursive:!0});await Bun.write(O.join(H,`cw-${x(Q)}.css`),J)}catch{}}async function GJ(Q){try{let J=await import(Q);if(J&&J.CSSGenerator)return{CSSGenerator:J.CSSGenerator,config:J.config,build:J.build,defaultConfig:J.defaultConfig,extractClasses:J.extractClasses}}catch{}return null}var KJ=[["@stacksjs","ts-css","dist","engine","index.js"],["@stacksjs","ts-css","src","engine","index.ts"]],DJ=["@stacksjs/ts-css/engine","@stacksjs/ts-css/dist/engine/index.js"];function RJ(){let Q=[],J=process.cwd();while(J!==O.dirname(J)){for(let Y of["node_modules","pantry"])for(let $ of KJ)Q.push(O.join(J,Y,...$));J=O.dirname(J)}return Q}function PJ(){let Q=[],J=process.env.HOME||process.env.USERPROFILE||"",Y=[J&&O.join(J,"Code","Tools","crosswind"),J&&O.join(J,"repos","stacks-org","crosswind"),O.join(process.cwd(),"..","crosswind"),O.join(process.cwd(),"..","ts-css")].filter(Boolean);for(let $ of Y)Q.push(O.join($,"packages","toolkit","dist","engine","index.js")),Q.push(O.join($,"packages","toolkit","src","engine","index.ts"));if(J)Q.push(O.join(J,"Code","Tools","stx","node_modules","@stacksjs","ts-css","dist","engine","index.js"));return Q}async function zJ(){if(l)return N;l=!0;try{let Q=async(Z)=>{for(let q of Z){if(!await Bun.file(q).exists())continue;let U=await GJ(q);if(U){if(!process.env.STACKS_DEV_QUIET)console.log(`${W.green}[ts-css]${W.reset} CSS engine loaded from ${O.dirname(O.dirname(q))}`);return U}}return null};if(process.env.CROSSWIND_SRC){let Z=O.resolve(process.env.CROSSWIND_SRC),q=await Q([Z]);if(!q)throw Error(`CROSSWIND_SRC did not resolve to a Css module: ${Z}`);return N=q,N}let J=await Q(RJ());if(J)return N=J,N;let Y=DJ;for(let Z of Y){let q=await GJ(Z);if(q){if(N=q,!process.env.STACKS_DEV_QUIET)console.log(`${W.green}[ts-css]${W.reset} CSS engine loaded`);return N}}let $=await Q(PJ());if($)return N=$,N;throw Error("Css CSSGenerator not found in any location")}catch{return console.warn(`${W.yellow}[ts-css] CSS engine not available, Tailwind styles will not be generated${W.reset}`),console.warn(`${W.yellow}Run 'bun add @stacksjs/ts-css' to enable CSS generation${W.reset}`),null}}function $Q(){n.clear(),N=null,l=!1,X=null,M="",_.clear(),z.clear(),E=null}var XJ=!1;async function AJ(Q){try{let J=FJ({name:"css",cwd:Q})?"css":FJ({name:"crosswind",cwd:Q})?"crosswind":null;if(!J)return null;if(J==="crosswind"&&!process.env.STACKS_DEV_QUIET&&!XJ)XJ=!0,console.warn(`${W.yellow}[ts-css]${W.reset} Reading the CSS config from a \`crosswind\` file. Rename it to \`css\` (e.g. config/css.ts) \u2014 the old name is deprecated.`);let{loadConfigWithResult:Y}=await import("bunfig"),$=await Y({name:J,cwd:Q,defaultConfig:{},checkEnv:!1,verbose:!1});if(!$?.path||!$.config||Object.keys($.config).length===0)return null;let Z=O.relative(Q,$.path);if(!process.env.STACKS_DEV_QUIET)console.log(`${W.green}[ts-css]${W.reset} Loaded config from ${Z||$.path}`);return $.config}catch(J){if(J instanceof Error&&J.name==="ConfigNotFoundError")return null;return console.warn(`${W.yellow}[ts-css]${W.reset} Failed to load css config:`,J instanceof Error?J.message:J),null}}async function MJ(Q){let J=null;try{let{loadStxConfig:Y}=await import("./chunk-1rcn9yfj.js"),$=await Y(Q);if($.css)if(typeof $.css==="string"){let Z=O.isAbsolute($.css)?$.css:O.resolve(Q,$.css);if(await Bun.file(Z).exists()){let q=await import(Z);J=q.default||q,console.log(`${W.green}[ts-css]${W.reset} Loaded config from stx.config.ts \u2192 ${$.css}`)}}else{if(J={...$.css,content:$.css.content||[],preflight:$.css.preflight??!0,minify:$.css.minify??!1},$.css.config){let Z=O.isAbsolute($.css.config)?$.css.config:O.resolve(Q,$.css.config);if(await Bun.file(Z).exists()){let q=await import(Z);J={...q.default||q,...J}}}console.log(`${W.green}[ts-css]${W.reset} Using inline CSS config from stx.config.ts`)}}catch{}return J||await AJ(Q)}function EJ(Q){try{let J=new WeakSet;return x(JSON.stringify(Q??{},(Y,$)=>{if(typeof $==="function")return`[fn]${String($)}`;if(typeof $==="object"&&$!==null){if(J.has($))return"[circular]";J.add($)}return $})??"")}catch{return"unhashable"}}async function SJ(Q){if(w)return M;w=!0;try{let J=await zJ();if(!J||!J.build)return w=!1,"";if(!X)X=await AJ(Q);if(!X)return w=!1,"";let Y=J.defaultConfig?.theme||{},$=X.theme||{},Z={...J.defaultConfig,...X,theme:{...Y,...$,extend:{...Y.extend||{},...$.extend||{}}}},q=performance.now(),U=await J.build(Z),j=performance.now()-q;if(M=U.css,console.log(`${W.cyan}[ts-css]${W.reset} Built ${U.classes.size} classes in ${j.toFixed(1)}ms`),Z.output){let F=O.isAbsolute(Z.output)?Z.output:O.join(Q,Z.output),V=O.dirname(F);if(!fs.existsSync(V))fs.mkdirSync(V,{recursive:!0});await Bun.write(F,U.css)}return w=!1,U.css}catch(J){return console.error(`${W.red}[ts-css]${W.reset} Build error:`,J),w=!1,M}}async function ZQ(Q){X=null,await SJ(Q)}function qQ(){return M}function vJ(Q){let J=new Set,Y=/class\s*=\s*["']([^"']+)["']/gi,$=Y.exec(Q);while($!==null){for(let U of $[1].split(/\s+/))if(U.trim())J.add(U.trim());$=Y.exec(Q)}let Z=/(?:x-class|:class)\s*=\s*"([^"]+)"/gi,q=Z.exec(Q);while(q!==null){let U=q[1].match(/'([^']+)'/g);if(U){for(let j of U)for(let F of j.slice(1,-1).split(/\s+/))if(F.trim())J.add(F.trim())}q=Z.exec(Q)}return J}var n=jJ(64);async function xJ(Q,J){let Y=n.get(i(Q,J,E));if(Y!==void 0)return Y;let $=await kJ(Q,J);if($)n.set(i(Q,J,E),$);return $}async function kJ(Q,J){try{let Y=await zJ();if(!Y)return"";let $=typeof Y.extractClasses==="function"?Y.extractClasses(Q):vJ(Q);if($.size===0)return"";let Z=J?O.resolve(J):process.cwd();if(!H)H=IJ(Z,"cache");let q=[...$].sort().join(" "),U=`${E||"default"}::${q}`,j=_.get(U);if(j!==void 0)return c(U,j),j;let F=await BJ(U);if(F!==null)return c(U,F),F;if(!X)X=await MJ(Z),E=EJ(X);let V=Y.defaultConfig||Y.config,I=X||{},L=ZJ(V,I),{safelist:T,includePreflight:K,minify:k,tokenCSS:LJ}=L,o=L.config,D=new Y.CSSGenerator(o);for(let G of T)D.generate(G);for(let G of $)D.generate(G);let A=D.toCSS(K,k),r=o.shortcuts||I.shortcuts||{};for(let[G,b]of Object.entries(r)){if(!$.has(G)&&!T.includes(G))continue;let y=b.split(/\s+/).filter(Boolean);for(let P of y)D.generate(P)}A=D.toCSS(K,k);let R=A.split(`
15
+ `);for(let[G,b]of Object.entries(r)){if(!$.has(G)&&!T.includes(G))continue;let y=b.split(/\s+/).filter(Boolean),P=[],f=[];for(let p of y){let a=p.startsWith("dark:"),s=`.${(a?p.slice(5):p).replace(/\//g,"\\/").replace(/:/g,"\\:").replace(/\./g,"\\.").replace(/\[/g,"\\[").replace(/\]/g,"\\]").replace(/%/g,"\\%")}`;for(let S=0;S<R.length;S++){let t=R[S].trim();if(t===`${s} {`||t.startsWith(`${s} {`)){let v=S,e="";while(v<R.length){if(e+=R[v],R[v].includes("}"))break;v++}let C=e.match(/\{([^}]+)\}/);if(C)if(a)f.push(C[1].trim());else P.push(C[1].trim());break}}}if(P.length)A+=`
16
+ .${G} { ${P.join(" ")} }`;if(f.length)A+=`
17
+ @media (prefers-color-scheme: dark) { .dark .${G} { ${f.join(" ")} } }`}return A=LJ+A,c(U,A),wJ(U,A),A}catch(Y){return console.warn("Failed to generate Css CSS:",Y),""}}async function UQ(Q,J,Y=!1){let $=await xJ(Q,J);if(!$)return Q;let Z=Y?`<link data-css="generated" rel="stylesheet" href="/_stx/css.${TJ($)}.css">`:`<style data-css="generated">
18
+ ${$}
19
+ </style>`,q=/(?:<style\b[^>]*\bdata-css=(?:"generated"|'generated')[^>]*>[\s\S]*?<\/style>|<link\b[^>]*\bdata-css=(?:"generated"|'generated')[^>]*>)/g;if(q.test(Q)){let U=!1;return Q.replace(q,()=>{if(U)return"";return U=!0,Z})}if(Q.includes("</head>"))return Q.replace("</head>",`${Z}
20
+ </head>`);if(Q.includes("<body"))return Q.replace(/<body([^>]*)>/,`<body$1>
21
+ ${Z}`);return Z+Q}
22
+ export{h as Xs,mJ as Ys,dJ as Zs,jJ as _s,lJ as $s,i as at,nJ as bt,oJ as ct,u as dt,ZJ as et,W as ft,YQ as gt,zJ as ht,$Q as it,AJ as jt,MJ as kt,EJ as lt,SJ as mt,ZQ as nt,qQ as ot,vJ as pt,xJ as qt,UQ as rt};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{$ as tl,$a as nn,$b as Fo,$c as Fp,$d as Fq,A as dk,Aa as xm,Ab as Zn,Ac as ep,Ad as eq,Ae as kr,B as ek,Ba as ym,Bb as _n,Bc as fp,Bd as fq,Be as lr,C as fk,Ca as Lm,Cb as $n,Cc as gp,Cd as gq,Ce as mr,D as gk,Da as Mm,Db as ao,Dc as hp,Dd as hq,De as nr,E as Yk,Ea as Nm,Eb as bo,Ec as ip,Ed as iq,Ee as or,F as Zk,Fa as Om,Fb as co,Fc as jp,Fd as jq,Fe as pr,G as _k,Ga as Pm,Gb as eo,Gc as kp,Gd as kq,Ge as qr,H as $k,Ha as Qm,Hb as fo,Hc as lp,Hd as lq,He as rr,I as al,Ia as Um,Ib as go,Ic as mp,Id as mq,Ie as sr,J as bl,Ja as Vm,Jb as ho,Jc as np,Jd as nq,Je as tr,K as cl,Ka as Wm,Kb as io,Kc as op,Kd as oq,Ke as ur,L as dl,La as Xm,Lb as jo,Lc as pp,Ld as pq,Le as vr,M as el,Ma as Ym,Mb as qo,Mc as qp,Md as qq,Me as wr,N as fl,Na as Zm,Nb as ro,Nc as rp,Nd as rq,Ne as xr,O as gl,Oa as _m,Ob as so,Oc as sp,Od as sq,Oe as yr,P as hl,Pa as $m,Pb as to,Pc as tp,Pd as tq,Pe as zr,Q as il,Qa as an,Qb as uo,Qc as up,Qd as uq,Qe as Ar,R as jl,Ra as bn,Rb as vo,Rc as vp,Rd as vq,Re as Br,S as kl,Sa as cn,Sb as wo,Sc as wp,Sd as wq,Se as Cr,T as ll,Ta as dn,Tb as xo,Tc as xp,Td as xq,Te as Dr,U as ml,Ua as en,Ub as yo,Uc as yp,Ud as yq,Ue as Er,V as nl,Va as fn,Vb as zo,Vc as zp,Vd as zq,Ve as Fr,W as ol,Wa as hn,Wb as Ao,Wc as Ap,Wd as Aq,We as Gr,X as pl,Xa as jn,Xb as Bo,Xc as Bp,Xd as Bq,Y as ql,Ya as kn,Yb as Co,Yc as Cp,Yd as Cq,Z as rl,Za as ln,Zb as Do,Zc as Dp,Zd as Dq,_ as sl,_a as mn,_b as Eo,_c as Ep,_d as Eq,aa as ul,ab as on,ac as Go,ad as Gp,ae as Gq,ba as vl,bb as pn,bc as Ho,bd as Hp,be as Hq,ca as wl,cb as qn,cc as Io,cd as Ip,ce as Iq,da as xl,db as rn,dc as Jo,dd as Jp,de as Jq,ea as yl,eb as sn,ec as Ko,ed as Kp,ee as Kq,fa as zl,fb as tn,fc as Lo,fd as Lp,fe as Lq,ga as Al,gb as un,gc as Mo,gd as Mp,ge as Mq,ha as Bl,hb as vn,hc as No,hd as Np,he as Nq,ia as Cl,ib as wn,ic as Oo,id as Op,ie as Oq,ja as Dl,jb as xn,jc as Po,jd as Pp,je as Pq,ka as El,kb as yn,kc as Qo,kd as Qp,ke as Qq,la as Fl,lb as zn,lc as Ro,ld as Rp,le as Rq,ma as Gl,mb as An,mc as So,md as Sp,me as Sq,na as Hl,nb as Dn,nc as To,nd as Tp,ne as Zq,o as a,oa as Il,ob as En,oc as Uo,od as Up,oe as _q,p as Qj,pa as mm,pb as Fn,pc as Vo,pd as Vp,pe as $q,q as Rj,qa as nm,qb as Gn,qc as Wo,qd as Wp,qe as ar,r as Sj,ra as om,rb as Mn,rc as Xo,rd as Xp,re as br,s as Tj,sa as pm,sb as Nn,sc as Yo,sd as Yp,se as cr,t as Uj,ta as qm,tb as On,tc as Zo,td as Zp,te as dr,u as Vj,ua as rm,ub as Pn,uc as _o,ud as _p,ue as er,v as Wj,va as sm,vb as Un,vc as $o,vd as $p,ve as fr,w as Xj,wa as tm,wb as Vn,wc as ap,wd as aq,we as gr,x as Yj,xa as um,xb as Wn,xc as bp,xd as bq,xe as hr,y as bk,ya as vm,yb as Xn,yc as cp,yd as cq,ye as ir,z as ck,za as wm,zb as Yn,zc as dp,zd as dq,ze as jr}from"./chunk-vckr41zn.js";import{$e as Qk,Xe as Mk,Ye as Nk,Ze as Ok,_e as Pk,af as Rk,bf as Sk,cf as Tk,df as Uk,ef as Vk,ff as Wk,gf as Xk}from"./chunk-0fgcnv6y.js";import{hf as ko,if as lo,jf as mo,kf as no,lf as oo,mf as po}from"./chunk-se360fvh.js";import{nf as Bn,of as Cn}from"./chunk-n3ggrhb3.js";import{pf as Hn}from"./chunk-k4qx7jbk.js";import{Af as Jm,Bf as Km,qf as zm,rf as Am,sf as Bm,tf as Cm,uf as Dm,vf as Em,wf as Fm,xf as Gm,yf as Hm,zf as Im}from"./chunk-vqxmxgaj.js";import{Cf as Kk,Df as Lk}from"./chunk-5aq35j2e.js";import{Ef as lm}from"./chunk-cvhyxt55.js";import{Ff as Rm,Gf as Sm,Hf as Tm,If as gn,Jf as In,Kf as Jn,Lf as Kn,Mf as Ln,Nf as Qn,Of as Rn,Pf as Sn,Qf as Tn}from"./chunk-9x4jejq0.js";import{$f as rk,Rf as hk,Sf as ik,Tf as jk,Uf as kk,Vf as lk,Wf as mk,Xf as nk,Yf as ok,Zf as pk,_f as qk,ag as sk,bg as tk,cg as uk,dg as vk}from"./chunk-nx5qkm8k.js";import{eg as dj,fg as ej,gg as fj,hg as gj,ig as hj,jg as ij,kg as jj,lg as kj,mg as lj,ng as mj,og as nj}from"./chunk-e4hhz9j3.js";import{pg as Fj,rg as Gj}from"./chunk-bz820epz.js";import{Ag as zk,Bg as Ak,Cg as Bk,Dg as Ck,Fg as Dk,Gg as Ek,Hg as Fk,Ig as Gk,Jg as Hk,Kg as Ik,Ng as Jk,xg as wk,yg as xk,zg as yk}from"./chunk-9zndrzb3.js";import{Og as am,Pg as bm,Qg as cm,Rg as dm,Sg as gm,Tg as km}from"./chunk-gn9q45yp.js";import{Ug as em,Xg as fm}from"./chunk-7etzqabz.js";import{dh as Jl,eh as Kl,fh as Ll,gh as Ml,hh as Nl,ih as Ol,jh as Pl,kh as Ql,lh as Rl,mh as Sl,nh as Tl,oh as Ul,ph as Vl,qh as Wl,rh as Xl,sh as hm,th as im,uh as jm}from"./chunk-pmw28376.js";import{vh as ph,wh as qh,xh as rh,yh as sh}from"./chunk-49kk0s96.js";import{Dh as th}from"./chunk-w3ycm4na.js";import{Eh as Ah,Fh as Bh,Gh as Ch,Hh as Dh,Ih as Eh,Jh as Fh}from"./chunk-50mpsfpx.js";import{Kh as Ui,Lh as Vi,Mh as Wi,Qh as Xi,Rh as Yi,Sh as Zi}from"./chunk-mb518a4n.js";import{$h as Ri,Th as Ki,Uh as Li,Vh as Mi,Wh as Ni,Xh as Oi,Zh as Pi,_h as Qi,ai as Si,bi as Ti}from"./chunk-74cv4ta1.js";import{ci as Ag,di as Bg,ei as Cg,fi as Dg,gi as Eg,hi as Fg}from"./chunk-wcm80anz.js";import{ii as Gg,ji as Hg,ki as Ig,li as Jg,mi as Kg}from"./chunk-y7m2dpd3.js";import{ni as Lg,oi as Mg,pi as Ng,qi as Og,ri as Pg}from"./chunk-9y0g8kzt.js";import{si as Qg,ti as Rg,ui as Sg,vi as Tg,wi as Ug,xi as Vg,yi as Wg}from"./chunk-t6nseeb9.js";import{Ai as Yg,Bi as Zg,Ci as _g,Di as $g,Ei as ah,zi as Xg}from"./chunk-xttsqmkm.js";import{Gi as bh,Hi as ch,Ii as dh,Ji as eh,Ki as fh,Li as gh,Mi as hh,Ni as ih,Oi as jh,Pi as kh,Qi as lh,Ri as mh,Si as nh,Ti as oh}from"./chunk-54st8g2j.js";import{Vi as ug,Wi as vg}from"./chunk-jt4gqtag.js";import{Zi as wg}from"./chunk-sb7k89hq.js";import"./chunk-9n0gvfrg.js";import{bj as xg}from"./chunk-7q9mwh4v.js";import{cj as yg,dj as zg}from"./chunk-refwkt87.js";import{ej as ie,fj as je,gj as ke,hj as le,ij as me,jj as ne,kj as oe,lj as pe,mj as qe,nj as re,oj as se,pj as te,qj as ue,rj as ve}from"./chunk-f16kkw9v.js";import{sj as We,tj as Xe}from"./chunk-g3fy0tw8.js";import{Aj as Ie,Bj as Je,Cj as Ke,Dj as Le,Ej as Me,Fj as Ne,Gj as Oe,Hj as Pe,Ij as Qe,Jj as Re,Kj as Se,Lj as Te,Mj as Ue,Nj as Ve}from"./chunk-w95sp0k9.js";import{Oj as Ye,Pj as Ze,Qj as _e,Rj as $e,Sj as af,Tj as bf,Uj as cf,Vj as df,Wj as ef,Xj as ff,Yj as gf}from"./chunk-1a8e5xpf.js";import{qk as Tq,rk as Uq,sk as Vq,tk as Wq,uk as Xq,vk as Yq}from"./chunk-9236skjs.js";import{Ak as Yl,Bk as Zl,Ck as _l,Dk as $l,wk as Zj,xk as _j,yk as $j,zk as ak}from"./chunk-zn5jgmqw.js";import"./chunk-58f0mthg.js";import"./chunk-4ds1cmgq.js";import{$l as ac,$m as dd,$n as He,$o as Qf,$p as Wh,$q as Ej,Al as Oa,Am as Fc,An as Ed,Ao as pf,Ap as pg,Aq as Ei,Bl as ib,Bm as Gc,Bn as Fd,Bo as qf,Bp as qg,Bq as Fi,Cl as jb,Cm as Hc,Cn as Wd,Co as rf,Cp as rg,Cq as Gi,Dl as kb,Dm as Ic,Dn as Xd,Do as sf,Dp as sg,Dq as Hi,El as lb,Em as Jc,En as Yd,Eo as tf,Ep as tg,Eq as Ii,Fl as mb,Fn as Zd,Fo as uf,Fp as uh,Fq as Ji,Gl as nb,Gm as Kc,Gn as _d,Go as vf,Gp as vh,Gq as _i,Hm as Lc,Hn as $d,Ho as wf,Hp as wh,Hq as $i,Im as Mc,In as ae,Io as xf,Ip as xh,Iq as aj,Jl as Eb,Jm as Nc,Jn as be,Jo as yf,Jp as yh,Jq as bj,Kl as Fb,Km as Oc,Kn as ce,Ko as zf,Kp as zh,Kq as cj,Ll as Gb,Lm as Pc,Ln as de,Lo as Af,Lp as Gh,Lq as oj,Ml as Hb,Mm as Qc,Mn as ee,Mo as Bf,Mp as Hh,Mq as pj,Nl as Ib,Nm as Rc,Nn as fe,No as Cf,Np as Ih,Nq as qj,Om as Sc,On as ge,Oo as Df,Op as Jh,Oq as rj,Pm as Tc,Pn as he,Po as Ef,Pp as Kh,Pq as sj,Ql as Lb,Qm as Uc,Qo as Ff,Qp as Lh,Qq as tj,Rl as Mb,Rm as Vc,Rn as ze,Ro as Gf,Rp as Mh,Rq as uj,Sl as Nb,Sm as Wc,Sn as Ae,So as Hf,Sp as Nh,Sq as vj,Tl as Ub,Tm as Xc,Tn as Be,To as If,Tp as Oh,Tq as wj,Ul as Vb,Um as Yc,Un as Ce,Uo as Jf,Up as Ph,Uq as xj,Vl as Wb,Vm as Zc,Vn as De,Vo as Kf,Vp as Qh,Vq as yj,Wl as Xb,Wm as _c,Wn as Ee,Wo as Lf,Wp as Rh,Wq as zj,Xl as Yb,Xm as $c,Xn as Fe,Xo as Mf,Xp as Sh,Xq as Aj,Yl as Zb,Ym as ad,Yo as Nf,Yp as Th,Yq as Bj,Zl as _b,Zm as bd,Zo as Of,Zp as Uh,Zq as Cj,_l as $b,_m as cd,_n as Ge,_o as Pf,_p as Vh,_q as Dj,am as bc,an as ed,ap as Rf,aq as ei,ar as Hj,bm as cc,bn as fd,bo as hf,bp as Sf,bq as fi,br as Ij,cm as dc,cn as gd,cp as Tf,cq as gi,cr as Jj,dm as ec,dn as hd,dp as Uf,dq as hi,dr as Kj,em as fc,en as id,ep as Vf,eq as ii,er as Lj,fm as gc,fn as jd,fp as Wf,fq as ji,fr as Mj,gm as hc,gn as kd,gp as Xf,gq as ki,gr as Nj,hn as ld,hp as Yf,hq as li,hr as Oj,in as md,ip as Zf,iq as mi,ir as Pj,jl as xa,jm as ic,jn as nd,jp as _f,jq as ni,kl as ya,km as jc,kn as od,kp as $f,kq as oi,ll as za,lm as kc,ln as pd,lp as ag,lq as pi,ml as Aa,mm as lc,mn as qd,mp as bg,mq as qi,nl as Ba,nm as mc,nn as rd,np as cg,nq as ri,ol as Ca,om as nc,on as sd,op as dg,oq as si,pl as Da,pm as oc,pn as td,pp as eg,pq as ti,ql as Ea,qm as pc,qn as ud,qp as fg,qq as ui,rl as Fa,rm as qc,rn as vd,rp as gg,rq as vi,sl as Ga,sm as rc,sn as wd,so as jf,sp as hg,sq as wi,tl as Ha,tm as sc,tn as xd,tp as ig,tq as xi,ul as Ia,um as tc,un as yd,uo as kf,up as jg,uq as yi,vl as Ja,vm as uc,vn as zd,vp as kg,vq as zi,wl as Ka,wm as vc,wn as Ad,wo as lf,wp as lg,wq as Ai,xl as La,xm as wc,xn as Bd,xo as mf,xp as mg,xq as Bi,yl as Ma,ym as Dc,yn as Cd,yo as nf,yp as ng,yq as Ci,zl as Na,zm as Ec,zn as Dd,zo as of,zp as og,zq as Di}from"./chunk-qccdz9t1.js";import{$r as M,Ar as s,As as na,Br as t,Bs as oa,Cr as u,Cs as pa,Dr as v,Ds as qa,Er as w,Es as ra,Fr as x,Fs as sa,Gr as y,Gs as ta,Hr as z,Hs as ua,Ir as A,Is as va,Jr as B,Js as wa,Kr as C,Lr as D,Mr as E,Nr as F,Or as G,Pr as H,Qr as I,Rr as J,Sr as K,Tr as L,as as N,bs as O,cs as P,ds as Q,es as R,fs as S,gs as T,hs as U,is as V,jr as b,js as W,kr as c,ks as X,lr as d,ls as Y,mr as e,ms as Z,nr as f,ns as _,or as g,os as $,pr as h,ps as aa,qr as i,qs as ba,rr as j,rs as ca,sr as k,ss as da,tr as l,ts as ea,ur as m,us as fa,vr as n,vs as ia,wr as o,ws as ja,xr as p,xs as ka,yr as q,ys as la,zr as r,zs as ma}from"./chunk-q68xmak4.js";import{Ks as Xh,Ls as Yh,Ms as Zh,Ns as _h,Os as $h,Ps as ai,Qs as bi,Rs as ci,Ss as di}from"./chunk-c0an64km.js";import{Ts as ga,Us as ha}from"./chunk-t1k5dpbr.js";import{Vs as Jb,Ws as Kb}from"./chunk-52mh63sp.js";import{dt as xc,et as yc,gt as zc,pt as Ac,qt as Bc,rt as Cc}from"./chunk-5k3qb1am.js";import{st as Ob,tt as Pb,ut as Qb,vt as Rb,wt as Sb,xt as Tb}from"./chunk-39f40yc4.js";import{At as ye,yt as we,zt as xe}from"./chunk-ysnk7x79.js";import{Bt as Gd,Ct as Hd,Dt as Id,Et as Jd,Ft as Kd,Gt as Ld,Ht as Md,It as Nd,Jt as Od,Kt as Pd,Lt as Qd,Mt as Rd,Nt as Sd,Ot as Td,Pt as Ud,Qt as Vd}from"./chunk-0f1kz0x2.js";import"./chunk-ayrjwkyw.js";import{$t as vb,Ut as ob,Vt as pb,Wt as qb,Xt as rb,Yt as sb,Zt as tb,_t as ub,au as wb,bu as xb,cu as yb,du as zb,eu as Ab,fu as Bb,gu as Cb,hu as Db}from"./chunk-c6fw33zh.js";import{Bu as Ua,Cu as Va,Du as Wa,Eu as Xa,Fu as Ya,Gu as Za,Hu as _a,Iu as $a,Ju as ab,Ku as bb,Lu as cb,Mu as db,Nu as eb,Ou as fb,Pu as gb,Ru as hb,lu as Pa,mu as Qa,pu as Ra,uu as Sa,vu as Ta}from"./chunk-bf8wf3r2.js";import"./chunk-jn6m8zf7.js";import"./chunk-sskbegsz.js";export{rk as writeNetlifyConfig,im as writeManifest,Wk as writeImageManifest,zo as wrapComponentForHMR,tr as withDefaults,Ej as webComponentDirectiveHandler,op as watermark,qq as watchViews,el as watchMultiple,fl as watchEffect,dl as watch,De as warmImagePlaceholders,sl as waitForStore,X as waitForLocale,lo as virtualPathFor,rj as videoDirective,G as validators,xr as validated,fe as validateValueEnhanced,vh as validateTemplate,tp as validateParams,ge as validateFormEnhanced,fq as validateFile,be as validateFields,ae as validateField,xh as validateDirective,Ad as validateCspDirectives,Mj as validateConfig,nm as validateComponentScripts,Lm as validateComponentProps,tg as validateClientScript,sh as v,pc as usesSignalsInScript,ub as usesReactiveRuntime,Kh as userComponentFileExists,_g as useVirtualList,Od as useTitle,rl as useStoreOrThrow,Ro as useStore,bk as useStorage,Bq as useSlots,dk as useSessionStorage,Ld as useSeoMeta,tl as useRouteParams,vl as useRouteParamOrThrow,ul as useRouteParam,Od as usePageTitle,Ve as useOptimistic,xl as useMiddlewareValue,wl as useMiddlewareState,ck as useLocalStorage,so as useLoadingIndicator,Jd as useHead,ph as useForm,Dq as useAttrs,hq as uploadFiles,gq as uploadFile,ol as updateInstance,Te as untrack,_h as unregisterDirective,pl as unmountInstance,wc as unescapeHtml,oo as typecheckStxFiles,Jh as transpileTypeScript,gr as translate,Ba as transitionDirective,Yb as transformAutoImports,Fm as toUsers,Em as toUser,Zo as thumbnail,_p as thumbHashToRGBA,$p as thumbHashToDataURL,wb as templateNeedsRuntime,vb as templateHasReactiveContext,Ye as templateCache,Sc as syncRecordedResponse,wo as stxClientHelpers,Df as structuredDataDirective,jr as stripLocalePrefix,Vl as stripDocumentWrapper,Kb as stripCommentsAndLiterals,rn as stringToStream,od as strictCspPreset,qe as streamingSuspenseDirective,ue as streamToResponse,oe as streamTemplateSimple,ie as streamTemplate,Yj as stopHmrServer,Bm as stopBroadcasting,Rb as stateDirName,Sb as stateDir,Ie as state,ng as startsDocument,Tn as startProductionServer,Hn as startInteractive,Am as startBroadcasting,lr as stampLocaleLayoutGroup,Ia as staggerDirective,rp as srcsetUrls,Ja as springDirective,Zc as splitByPipe,Rl as spaNavVaryHeaders,mo as sourcePathFor,yp as smartBatchSign,Mh as slotContentHasExpressions,wp as signUrl,Hh as shouldTranspileTypeScript,Vj as shouldReloadOnChange,Bp as shouldRefreshSignature,Wj as shouldIgnoreFile,Sg as shouldCacheComponent,bp as sharpen,Ar as shape,Qb as setStateDir,Bl as setRouteParams,Cl as setMiddlewareState,Ce as setImagePlaceholder,vq as setGlobalProvide,b as setErrorLocale,Yk as setCurrentInstance,fj as setCachedVideoResult,Wi as setCachedImageResult,Qi as setCached,Dr as serveStxFile,Fr as serveMultipleStxFiles,Qj as serveMarkdownFile,bo as serveFile,Gr as serveApp,ao as serve,Co as serializeState,gn as serializeSetCookie,dp as sepia,Md as seoMetaToHeadConfig,Ca as scrollAnimateDirective,va as screenReaderDirective,vj as scopeHTML,uj as scopeCSS,Gf as scanForSitemapEntries,pa as scanA11yTargets,qa as scanA11yIssues,hp as saturation,up as sanitizeParams,I as sanitizeFilePath,J as sanitizeExpression,K as sanitizeDirectiveParams,H as sanitizeDirectiveParam,L as sanitizeComponentProps,B as safeExecuteAsync,A as safeExecute,Cb as runtimeHandledXAttrsLiteral,wf as runPreProcessingMiddleware,xf as runPostProcessingMiddleware,Kn as runPageAction,Oe as runMountCallbacks,gb as runMiddleware,ml as runHooks,$q as runDoctor,Pe as runDestroyCallbacks,Lf as runComposers,ip as rotate,th as rewriteImagesWithSiblings,Tc as responseBindings,Qh as resolveTemplatePath,ha as resolveStxTargets,Ij as resolveStxDirectories,fr as resolveI18n,Xo as resize,cc as resetPlaceholders,Id as resetHead,Bo as resetHMRHandler,o as resetErrorConfig,vr as required,gc as replacePlaceholders,oq as renderView,oj as renderVideoComponent,Vb as renderVendorStyleTags,Kq as renderToString,Lq as renderToStream,Mq as renderToDOM,Zp as renderThumbhashToCanvas,Yq as renderTemplateString,Wq as renderTemplate,Xq as renderString,le as renderStreamingPage,Ch as renderSlot,Ig as renderSSRSuspense,Jp as renderProtectedVideo,Ip as renderProtectedImg,vp as renderMediaUpload,Vq as renderMarkdownView,_l as renderLayoutTypes,_i as renderImgComponent,Mk as renderImageComponent,Qd as renderHtmlAttrs,Pd as renderHead,rq as renderEmail,Oh as renderComponentWithSlot,Rd as renderBodyAttrs,Mo as render,qd as relaxedCspPreset,$d as registerValidationRule,se as registerStreamingDirectives,To as registerStoresClient,zl as registerStore,Ef as registerSeoDirectives,_a as registerMiddleware,kc as registerFilters,jc as registerFilter,d as registerErrorMessages,ee as registerEnhancedValidationRule,Xh as registerDirective,zd as registerCspDirectives,Om as registerComponentDirectives,Oa as registerAnimationDirectives,wa as registerA11yDirectives,al as ref,zn as redirect,Oc as recordResponseStatus,Pc as recordResponseHeader,Tb as rebaseOntoStateDir,Qc as readResponseStatus,Rc as readResponseHeaders,Oj as readMarkdownFile,Ze as readFileCached,bl as reactive,mp as quality,Gp as pruneSignatureCache,Ti as pruneCache,tq as provide,Uq as protectCodeBlocks,ur as prop,Of as processVueTemplate,Yg as processVirtualListDirectives,ah as processVirtualGridDirectives,nj as processVideo,ce as processValidateDirective,ea as processTranslateDirective,Cg as processTransitionDirectives,Fg as processTransitionAttributes,Ud as processTitleDirective,Gc as processTemplateBindings,yg as processTeleportDirectives,Gg as processSuspenseDirectives,zf as processStructuredData,me as processStreamDirectives,Uc as processStatusDirective,nh as processStaticDirectives,uf as processStackReplacements,tf as processStackPushDirectives,Dh as processSlots,Tl as processShell,Fe as processServerBindings,Af as processSeoDirective,te as processSectionDirectives,Rf as processScopedStyles,Ec as processReactiveBindings,Kp as processProtectedMedia,gh as processPartialHydrationDirectives,sg as processOnceDirective,vf as processMiddleware,yf as processMetaDirectives,Vd as processMetaDirective,Pj as processMarkdownFileDirectives,Vh as processMarkdownDirectives,of as processLoops,Qg as processKeepAliveDirectives,rg as processJsonDirective,$g as processInfiniteListDirectives,sf as processIncludes,aj as processImgComponents,Ok as processImageComponents,Bk as processImage,Td as processHeadDirective,Xd as processForms,Zd as processFormInputDirectives,tc as processExpressions,Hb as processEventDirectives,_d as processErrorDirective,Pf as processDynamicComponents,uh as processDirectives,di as processDirectiveAttributes,xg as processDeferDirectives,Ed as processCustomDirectives,wd as processCspDirectives,Br as processComponentProps,bc as processClientScript,Yd as processBasicFormDirectives,Lg as processAsyncDirectives,Fd as processAppearanceBootstrapDirective,Fa as processAnimationDirectives,ka as processA11yDirectives,ye as prepareImageDelivery,T as preloadTranslationsBackground,S as preloadTranslations,ro as preloadIslandHandlers,Ee as preloadIconCollection,wm as poolStrings,Gj as pluginManager,Ae as placeholdersWarmed,Bg as performLeave,Ag as performEnter,Qe as pendingLifecycleCounts,Ue as peek,pf as partialsCache,pj as parseVideoDirectiveOptions,Vo as parseUrl,aq as parseThumbhashString,dd as parseSwitchBlock,Ah as parseSlots,Bh as parseSlotElement,id as parseScriptDeclarations,Cj as parseSFCComponent,Lp as parseProtectedArgs,nf as parseLoopBinding,$i as parseImgComponent,ri as parseImageUrl,Nk as parseImageComponent,In as parseFormBody,fd as parseExpressionWithFilters,Pm as parseDefaults,wn as parseCookies,Ll as parseContainerSelector,ad as parseConditionalBlock,gd as parseArguments,Ma as parseAnimationShorthand,wr as optional,xm as optimizeTemplate,Tk as optimizeImage,Uk as optimizeDirectory,yr as oneOf,qf as onceStore,jl as onUpdated,Dc as onUpdate,ll as onUnmounted,Gl as onServer,hl as onMounted,Me as onMount,mh as onHydrated,zq as onErrorCaptured,Ne as onDestroy,Wg as onDeactivated,Fl as onClient,il as onBeforeUpdate,kl as onBeforeUnmount,gl as onBeforeMount,Vg as onActivated,Vp as observeElement,An as notFound,Wf as normalizeCriticalHeadOrder,yq as nextTick,Sm as negotiateEncoding,Ua as navigateTo,nl as mountInstance,Ea as motionDirective,pd as moderateCspPreset,vm as minifyHtml,Cf as metaDirective,fg as metaDedupKey,Wo as mergeParams,hg as mergeHtmlAttrs,Kd as mergeHeadConfigs,yc as mergeCssConfig,td as mergeCspDirectives,Ra as matchRoute,Wh as markdownDirectiveHandler,Nj as markdownCache,ga as looksLikeGlob,ir as localizePath,U as loadTranslationLazy,_ as loadTranslation,Jj as loadStxConfig,db as loadMiddlewareFromDirectory,jm as loadManifest,Rp as loadElement,Cm as loadChannels,pr as lintStxStrict,Tp as lazyLoadAll,Sp as lazyLoad,Ha as keyframeDirective,Iq as jsxs,Jq as jsxDEV,Hq as jsx,yn as jsonResponse,re as islandDirective,l as isTest,Wl as isSpaNavigation,Pl as isSpaNavRequest,zp as isSignatureValid,Re as isSignal,zk as isSharpAvailable,kn as isServerEnvironment,Dl as isServer,yb as isRuntimeOwnedColonAttr,da as isRtlLocale,j as isProduction,ia as isPresentationalRole,Op as isNativeLazySupported,Tq as isMarkdownPath,Q as isLoading,R as isLoaded,Gh as isJavaScriptScript,Pp as isIntersectionObserverSupported,Hk as isImageFile,Ak as isImageBackendAvailable,aa as isICUFormat,lh as isHydrated,Lh as isHydrateTrigger,Mc as isHttpStatus,jn as isEdgeEnvironment,qr as isDirectiveKind,k as isDevelopment,Se as isDerived,Uj as isCssOnlyChange,Rm as isCompressible,El as isClient,Ng as isAsyncComponent,Jn as isActionableMethod,ep as invert,$e as invalidateFileCacheByDir,_e as invalidateFileCache,sc as interpolateScriptsInTemplate,qc as interpolateScriptExpressions,rc as interpolateScriptAttributes,x as inlineError,er as injectThemeBootstrap,Bf as injectSeoTags,br as injectSeo,hf as injectRouterScript,Tj as injectHotReload,kb as injectHeatmap,Cc as injectCss,ud as injectCspMetaTag,pg as injectConfigHeadTags,Vf as injectColorModeBootScript,jg as injectCloakStyle,ag as injectBuildId,Xb as injectBrowserCoreAutoImports,Ic as injectAnalytics,uq as inject,yl as initStoreRegistry,uk as initNetlify,to as initLoadingIndicator,Qp as initLazyLoading,Gn as initFile,Yp as initBlurUp,cq as initAllBlurUp,cj as imgDirective,Rk as imageDirective,Rn as hydrateTemplateStream,Qn as hydrateTemplate,qo as hydrateIslands,ih as hydrateIsland,Sn as hydrateFragment,jh as hydrateByStrategy,kh as hydrateAll,Jo as hydrate,$n as htmlResponse,lg as hoistLeadingHeadTags,Xf as hoistColorModeBootScript,lb as heatmapDirective,Mi as hashString,gf as hashFilePath,Ki as hashFile,Li as hashBuffer,Nf as hasVueTemplateSyntax,mf as hasVariables,Oo as hasStore,hc as hasPlaceholders,sk as hasNetlifyConfig,ab as hasMiddleware,Ib as hasEventDirectives,og as hasDocumentShell,yh as hasDirectives,ma as hasDOMSupport,Kk as handleImageRequest,Aq as handleError,Qq as h,Gk as groupVariantsByFormat,cp as grayscale,Un as gitHash,pm as getUnusedDirectives,V as getTranslationSync,O as getTranslationCacheStats,W as getTranslationAsync,ba as getTranslation,nk as getTotalSize,Ap as getTimeUntilExpiry,ug as getStoreScript,Po as getStoreNames,No as getStore,gk as getStorageSize,fk as getStorageKeys,Rh as getSourceLineInfo,Ih as getSharedTranspiler,la as getScreenReaderOnlyStyle,wj as getScopeAttribute,He as getRouteParams,Mb as getPublicEnvDefine,Nb as getPublicEnv,wh as getPositionInfo,ec as getPlaceholderRegistry,Ji as getPlaceholderCacheStats,Hd as getPageMeta,kd as getNonce,Ik as getMimeType,cb as getMiddlewareNames,$a as getMiddleware,ca as getLocaleDirection,P as getLoadingState,Y as getLoadingLocales,ze as getImagePlaceholder,Ck as getImageMetadata,we as getImageDelivery,Io as getHydrationRuntime,Al as getHydratedStoreState,Xj as getHmrServer,Gd as getHead,Ao as getHMRHandler,vi as getFormatExtension,Oi as getFileMtime,Fk as getFallbackVariant,f as getErrorMessage,c as getErrorLocale,n as getErrorConfig,i as getErrorCodeName,Zh as getDirectives,Yh as getDirective,Zk as getCurrentInstance,zc as getCssServeAsset,sd as getCspPreset,Bd as getCspHeaderName,Uh as getComponentCacheStats,ej as getCachedVideoResult,Ep as getCachedSignature,bf as getCachedSignalsRuntime,cf as getCachedRouterScript,Hi as getCachedPlaceholder,Vi as getCachedImageResult,Pi as getCached,Si as getCacheStats,_f as getBuildId,zm as getBroadcastServer,ui as getBestVariant,lc as getAllFilters,ii as generateWidthSrcset,Zg as generateVirtualListCSS,jq as generateVideoPreview,he as generateValidationScript,kq as generateUploadRuntime,qm as generateTreeShakenBundle,Eg as generateTransitionRuntime,Dg as generateTransitionCSS,ij as generateThumbnails,Ai as generateThumbhashPlaceholder,$m as generateTemplatesDocs,Kg as generateSuspenseRuntime,Jg as generateSuspenseCSS,Do as generateStateScript,si as generateSrcsetData,Zi as generateSrcset,Dk as generateSrcSet,jj as generateSpriteSheet,sq as generateSpaShell,ti as generateSourceTags,oi as generateSizesFromBreakpoints,ni as generateSizesAttribute,Ek as generateSizes,Ff as generateSitemapIndex,cr as generateSitemap,Np as generateSimpleMediaPicker,Hp as generateSignatureRuntime,Xe as generateSignalsRuntimeDev,We as generateSignalsRuntime,ac as generateServerDataBridge,tj as generateScopeId,Dj as generateSFCWebComponent,Fb as generateRuntimeScript,Pa as generateRouteTypes,Qa as generateRouteManifest,Hf as generateRobotsTxt,dr as generateRobots,Yi as generateResponsiveVariants,zj as generateReactiveWebComponentTS,yj as generateReactiveWebComponent,Bj as generateReactiveRuntime,Aj as generateReactiveMixin,hj as generatePoster,Gi as generatePlaceholderStyle,Fi as generatePlaceholderCSS,zi as generatePlaceholder,hh as generatePartialHydrationCSS,jd as generateNonce,ok as generateNetlifyToml,mq as generateMinifiedMediaRuntime,lq as generateMediaRuntime,Mp as generateMediaManagerEmbed,hm as generateManifest,vo as generateLoadingIndicatorHtml,Xp as generateLazyLoadRuntime,$l as generateLayoutTypes,Ci as generateLQIP,Ug as generateKeepAliveRuntime,Tg as generateKeepAliveCSS,oh as generateIslandManifest,iq as generateImagePreview,Vk as generateImageManifest,Ho as generateHydrationScript,ve as generateHydrationRuntime,Ko as generateHydrationCSS,bh as generateHydrationBootstrap,Sj as generateHotReloadScript,jb as generateHeatmapScript,yo as generateHMRClientScript,kj as generateHLSManifest,Eo as generateEventBindings,mi as generateDprSrcsetWithVariableQuality,li as generateDprSrcset,mg as generateDocumentShell,en as generateDocs,an as generateDirectivesDocs,ci as generateDirectiveRuntime,If as generateDefaultRobotsTxt,lj as generateDASHManifest,Bc as generateCss,nd as generateCspMetaTag,md as generateCspHeader,Fq as generateCompositionRuntime,_m as generateComponentsDocs,ch as generateComponentManifest,Ym as generateComponentDoc,Ei as generateColorPlaceholder,Uf as generateColorModeBootScript,ql as generateClientRuntime,Ni as generateCacheKey,_b as generateBrowserAutoImportDestructuring,dq as generateBlurUpRuntime,eq as generateBlurUpCSS,Fc as generateBindingsRuntime,ji as generateAutoWidthSrcset,Zb as generateAutoImportDestructuring,Pg as generateAsyncComponentRuntime,Og as generateAsyncComponentCSS,Na as generateAnimationRuntime,La as generateAnimationCSS,Hc as generateAnalyticsScript,po as formatTypecheckDiagnostics,jo as formatTypeErrors,Dn as formatStxContent,mk as formatSize,Ta as formatRoutes,En as formatMarkdownContent,g as formatLocalizedError,$ as formatICU,p as formatFilePath,w as formatError,ar as formatDoctorReport,bn as formatDocsAsMarkdown,dn as formatDocsAsJson,cn as formatDocsAsHtml,lp as format,um as foldConstants,kp as flipVertical,jp as flipHorizontal,am as fingerprint,no as findRuntimeTypeDeclarations,_q as findPantryPackage,$c as findMatchingEndTag,Xc as findMatchingDelimiter,Jb as findInterpolationEnd,bd as findIfBlocks,ed as findExpressions,Sa as findErrorPage,cd as findDirectiveBlocks,rm as findDeadCode,rm as findDeadBranches,Ml as findContainerRegion,Zm as findComponentFiles,Er as findCommonDir,lk as filterRequiredFiles,Ph as fileExists,jf as extractVariables,fm as extractTemplateExpressions,ne as extractStreamBoundaries,Fo as extractState,Eh as extractSlotContent,lf as extractScriptFromTemplate,em as extractScriptBlocks,fc as extractPlaceholders,_c as extractParenthesizedExpression,Nc as extractPageResponseStatus,hb as extractLayoutMetadata,Di as extractDominantColor,hd as extractDirectiveParams,zh as extractDirectiveNames,Xl as extractContainerContent,Wm as extractComponentProps,dh as extractComponentName,Xm as extractComponentDescription,Ac as extractClassNames,$b as extractBridgeData,eh as extractBoundProps,Yc as extractBalancedExpression,Ub as extractAndStripCssImports,xj as extractAndScopeStyles,Gb as extractAndProcessEvents,$j as externalizeSharedAssets,ak as externalizeRepeatedAssets,_j as externalizeHtml,vc as evaluateExpression,tm as evaluateConstant,Vc as evaluateAuthExpression,oc as escapeHtmlValue,nc as escapeHtml,C as errorRecovery,E as errorLogger,zg as ensureTeleportTargets,qg as ensureDocumentShell,de as enhancedValidationRules,Um as enableDevTools,sm as eliminateDeadCode,Ke as effect,sp as dprUrls,fn as docsCommand,Zl as discoverLayoutNames,Wp as disconnectObserver,Vm as disableDevTools,F as devHelpers,Sl as detectShell,hn as detectRuntime,pk as detectProjectConfig,wi as detectFormat,mm as detectBuildMode,Je as derived,tk as deploy,Lj as defineStxConfig,So as defineStore,Cq as defineSlots,or as defineSiteConfig,sr as definePropsWithValidation,rr as defineProps,Fj as definePlugin,Nd as definePageMeta,Wa as defineMiddleware,qh as defineForm,xq as defineExpose,wq as defineEmits,$h as defineDirective,Sq as defineCustomElement,Pn as defineConfig,ai as defineClientDirective,Mg as defineAsyncComponent,nq as defaultMediaConfig,Xk as defaultImageConfig,M as defaultI18nConfig,ib as defaultHeatmapConfig,Wd as defaultFormClasses,ic as defaultFilters,Dd as defaultCspConfig,Hj as defaultConfig,Cr as default,xc as deepMergeThemes,Qf as dedupeScopedStyles,Bi as decodeThumbhash,yd as cspNonceDirective,xd as cspDirective,bq as crossfadeTransition,Yo as crop,Xg as createVirtualList,qj as createVideoDirective,un as createVercelHandler,go as createTypeChecker,fa as createTranslateFilter,qn as createTextEncoderStream,Rq as createStxApp,pn as createStreamingResponse,pe as createStreamRenderer,Qo as createStore,Za as createStorageManager,Xa as createServerCookieManager,$k as createScope,Hg as createSSRSuspense,Ge as createRouter,eb as createRouteLocation,eo as createRoute,al as createRef,bl as createReactive,Eq as createProvideContext,Wn as createProject,On as createProductionBuild,dc as createPlaceholder,ym as createOptimizedBuild,vn as createNetlifyHandler,hk as createNetlifyClient,fb as createMiddlewareContext,co as createMiddleware,Up as createLazyObserver,Rg as createKeepAliveCache,mn as createKVNamespace,fh as createIslandRegistry,bj as createImgDirective,Sk as createImagePlugin,Lk as createImageHandler,Qk as createImageDirective,nb as createHeatmapAggregator,kk as createFileManifest,ln as createEnvAccessor,z as createEnhancedError,on as createEdgeHandler,nn as createEdgeCache,Sh as createDetailedErrorMessage,tn as createDenoHandler,qk as createDefaultNetlifyConfig,Cd as createCspHeaders,xn as createCookie,cl as createComputed,_k as createComponentInstance,sn as createCloudflareHandler,Ya as createClientCookieManager,bi as createBuiltinDirectives,Rq as createApp,Ka as createAnimationTimeline,$o as cover,kf as convertToCommonJS,gp as contrast,_o as contain,y as consoleError,m as configureErrorHandling,Kj as config,cl as computed,Tm as compressResponse,Kf as composerPattern,Jf as composer,Ul as composeShellWithPage,Nm as componentDirective,Nh as componentClientSignalNames,gm as compileTemplate,a as collectRepeatedFlag,jk as collectDeployFiles,kg as cloakStyleFragment,gj as clearVideoCache,N as clearTranslationCache,vg as clearStoreCache,ek as clearStorage,Fp as clearSignatureCache,Ii as clearPlaceholderCache,rf as clearOnceStore,ld as clearNonce,bb as clearMiddleware,Be as clearImagePlaceholders,xe as clearImageDeliveryCatalog,Pk as clearImageCache,e as clearErrorMessages,df as clearDevCaches,mc as clearCustomFilters,Mf as clearComposers,wg as clearComposableCache,Th as clearComponentCache,Ri as clearCache,uo as cleanupLoadingIndicator,Jl as classifyScript,Kl as classifyAllScripts,ho as checkTemplateFile,io as checkTemplate,ef as checkCache,Cp as checkAuthAccess,na as checkA11yWithRegex,oa as checkA11y,Im as channel,Cn as captureScreenshots,Bn as captureScreenshot,Z as cancelPendingLoads,ik as calculateSha1,ki as calculateOptimalWidths,ff as cacheTemplate,sj as buildWebComponents,ko as buildVirtualSource,pq as buildViews,Uo as buildUrl,je as buildSuspenseResolveScript,nr as buildStaticSite,qb as buildRuntimeGlobalsDestructure,bm as buildRuntimeAsset,cm as buildRouterAsset,mr as buildLangPickerScript,qi as buildImageUrl,bg as buildIdFragment,gg as buildHtmlAttrs,km as buildForProduction,Qm as buildComponentLibrary,Dp as buildAuthParams,lm as buildApp,kr as buildAlternateLinks,Nn as build,Gm as broadcastPrivate,Hm as broadcastPresence,Dm as broadcast,fp as brightness,ap as blur,Db as blankInertHtmlRegions,xp as batchSignUrls,Le as batch,sa as autoFixA11yFile,ta as autoFixA11yDirectory,ra as autoFixA11y,np as auto,ja as attributeValue,dm as assetTags,Eb as asInvocableStatement,zr as arrayOf,hr as applyTranslations,Xi as applyTransformations,Fh as applySlots,Mm as applyPropDefaults,qp as applyPreset,ig as applyHtmlAttrs,Sd as applyHead,uc as applyFilters,Ql as appendVary,rd as apiCspPreset,Da as animationGroupDirective,mj as analyzeVideo,om as analyzeUsage,Hl as analyzeTemplate,Il as analyzeProject,om as analyzeDirectiveUsage,Jc as analyticsDirective,Zn as addStore,Yn as addPage,vd as addNonceToInlineContent,_n as addLayout,Xn as addComponent,Ln as actionRedirectResponse,Va as abortNavigation,ua as a11yDirective,af as __setSignalsGeneratorsForTest,$f as __setBuildIdForTest,dj as VideoProcessorCache,rh as Validator,xa as TransitionType,za as TransitionEase,ya as TransitionDirection,Wc as Tokenizer,fo as TemplateTypeChecker,Fn as TEMPLATE_PRESETS,v as StxValidationError,r as StxSyntaxError,t as StxSecurityError,s as StxRuntimeError,u as StxFileError,q as StxError,Nq as Show,ke as SUSPENSE_RESOLVER_RUNTIME,ob as STX_RUNTIME_GLOBALS,Wb as STX_AUTO_IMPORTS,Pb as STATE_DIR_ENV_VAR,Ga as SPRING_PRESETS,Nl as SPA_NAV_HEADER,xb as RUNTIME_OWNED_COLON_ATTRS,zb as RUNTIME_HANDLED_X_ATTRS,Kc as RESPONSE_STATUS_KEY,Lc as RESPONSE_HEADERS_KEY,tb as REACTIVE_RUNTIME_GLOBALS,Mn as ProductionBuild,Pq as Portal,Vn as PROJECT_TEMPLATES,pp as PRESETS,sb as NON_CLIENT_PRIMITIVES,Lo as MemorySessionStore,hi as MIME_TYPES,ei as MEDIA_DEFAULT_WIDTHS,gi as MEDIA_DEFAULT_FORMATS,Yl as LAYOUT_TYPES_FILE,Ui as ImageProcessorCache,Jk as ImageProcessingError,Go as HydrationRuntime,Rj as HotReloadServer,mb as HeatmapAggregator,eg as HTML_CLASS_MARKER,dg as HTML_ATTRS_MARKER,Gq as Fragment,Oq as For,Ol as FRAGMENT_CACHE_CONTROL,D as ErrorLogger,h as ErrorCodes,Zj as EXTERNALIZED_ASSET_DIR,vk as DeployError,wk as DEFAULT_WIDTHS,Aa as DEFAULT_TRANSITION_OPTIONS,Ob as DEFAULT_STATE_DIR,yk as DEFAULT_QUALITY,xi as DEFAULT_PLACEHOLDER_OPTIONS,xk as DEFAULT_FORMATS,fi as DEFAULT_DPR_VALUES,xo as ComponentHMRHandler,pb as COMPONENT_SCOPE_LOCAL_GLOBALS,Bb as COMPONENT_PASSTHROUGH_X_ATTRS,rb as COMPILE_TIME_ONLY_GLOBALS,pi as COMMON_SIZES,Sf as COLOR_MODE_BOOT_MARKER,Tf as COLOR_MODE_BOOT_GLOBAL,cg as CLOAK_STYLE,Km as BroadcastServer,Jm as Broadcast,Yf as BUILD_ID_META,Zf as BUILD_ID_HEADER,Lb as BROWSER_CORE_IMPORTS,yi as BLUR_UP_CSS,Ab as ALPINE_BRIDGE_X_ATTRS,Zq as $path};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{Ql as C}from"./chunk-h0t73k2z.js";import{Rs as Y}from"./chunk-shyqtvbq.js";import{Qt as D}from"./chunk-gfhzedsr.js";import u from"path";var S=/<script(\s[^>]*)?>([\s\S]*?)<\/script>/gi;function h(K){let J=(Q)=>Q.replace(/[^\n]/g," ");return K.replace(/<!--[\s\S]*?-->/g,J).replace(/\{\{--[\s\S]*?--\}\}/g,J)}function m(K){let J=[],Q=h(K);S.lastIndex=0;let $;while(($=S.exec(Q))!==null){let j=($[1]||"").trim(),F=($[0].match(/^<script(?:\s[^>]*)?>/i)?.[0]??"<script>").length,z=($[0].match(/<\/script\s*>$/i)?.[0]??"</script>").length,W=$.index+F,Z=$.index+$[0].length-z,G=K.slice(W,Z);if(/\bsrc\s*=/.test(j))continue;let q=j.match(/\btype\s*=\s*["']([^"']+)["']/i);if(q&&!/^(?:module|text\/(?:javascript|typescript))$/i.test(q[1]))continue;let X=/\bserver\b/.test(j)?"server":/\bclient\b/.test(j)?"client":"plain",U=B(K,W);J.push({kind:X,code:G,startLine:U,attrs:j})}return J}function B(K,J){let Q=1;for(let $=0;$<J&&$<K.length;$++)if(K.charCodeAt($)===10)Q++;return Q}function N(K,J){let Q=K.lastIndexOf(`
2
+ import{Ql as C}from"./chunk-qccdz9t1.js";import{Ws as Y}from"./chunk-52mh63sp.js";import{Ut as D}from"./chunk-c6fw33zh.js";import u from"path";var S=/<script(\s[^>]*)?>([\s\S]*?)<\/script>/gi;function h(K){let J=(Q)=>Q.replace(/[^\n]/g," ");return K.replace(/<!--[\s\S]*?-->/g,J).replace(/\{\{--[\s\S]*?--\}\}/g,J)}function m(K){let J=[],Q=h(K);S.lastIndex=0;let $;while(($=S.exec(Q))!==null){let j=($[1]||"").trim(),F=($[0].match(/^<script(?:\s[^>]*)?>/i)?.[0]??"<script>").length,z=($[0].match(/<\/script\s*>$/i)?.[0]??"</script>").length,W=$.index+F,Z=$.index+$[0].length-z,G=K.slice(W,Z);if(/\bsrc\s*=/.test(j))continue;let q=j.match(/\btype\s*=\s*["']([^"']+)["']/i);if(q&&!/^(?:module|text\/(?:javascript|typescript))$/i.test(q[1]))continue;let X=/\bserver\b/.test(j)?"server":/\bclient\b/.test(j)?"client":"plain",U=B(K,W);J.push({kind:X,code:G,startLine:U,attrs:j})}return J}function B(K,J){let Q=1;for(let $=0;$<J&&$<K.length;$++)if(K.charCodeAt($)===10)Q++;return Q}function N(K,J){let Q=K.lastIndexOf(`
3
3
  `,J-1)+1;return J-Q+1}function g(K){let J=K.split(""),Q=(j,F)=>{for(let z=j;z<F&&z<J.length;z++)if(J[z]!==`
4
4
  `)J[z]=" "},$=[/<script(?:\s[^>]*)?>[\s\S]*?<\/script>/gi,/<style(?:\s[^>]*)?>[\s\S]*?<\/style>/gi,/<!--[\s\S]*?-->/g,/\{\{--[\s\S]*?--\}\}/g,/@verbatim\b[\s\S]*?@endverbatim\b/g];for(let j of $){j.lastIndex=0;let F;while((F=j.exec(K))!==null)Q(F.index,F.index+F[0].length)}return J.join("")}function p(K){let J=0,Q="";for(let $=0;$<K.length;$++){let j=K[$];if(Q){if(j==="\\"){$++;continue}if(j===Q)Q="";continue}if(j==='"'||j==="'"||j==="`"){Q=j;continue}if(j==="("||j==="["||j==="{"){J++;continue}if(j===")"||j==="]"||j==="}"){J--;continue}if(j==="|"&&J===0){if(K[$+1]==="|"){$++;continue}if(K[$-1]==="|")continue;return K.slice(0,$)}}return K}var R=new Set([":for","x-for","v-for"]),w=/(?:^|\s)((?::|x-|v-|@)[\w.:-]+)\s*=\s*(["'])([\s\S]*?)\2/g,O="__stx_interpolated",y="__StxElement",f="__StxTemplateValue",l=`type ${f}<T> = T extends { readonly _isSignal: true } | { readonly _isDerived: true } ? (T extends () => infer V ? T & V : T) : T`;function L(K){return K.replace(/\{\{[\s\S]*?\}\}/g,O).replace(/\{!![\s\S]*?!!\}/g,O)}function Vj(K){return K.replace(/\{\{[\s\S]*?\}\}|\{!![\s\S]*?!!\}/g,(J)=>{let Q=J.split(`
5
5
  `).length-1,$=J.length-Q;return`0${" ".repeat(Math.max(0,$-1))}${`
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{oo as a,po as b,qo as c,ro as d,so as e,to as f,uo as g,vo as h,wo as i,xo as j}from"./chunk-qccdz9t1.js";import"./chunk-q68xmak4.js";import"./chunk-c0an64km.js";import"./chunk-t1k5dpbr.js";import"./chunk-52mh63sp.js";import"./chunk-5k3qb1am.js";import"./chunk-39f40yc4.js";import"./chunk-ysnk7x79.js";import"./chunk-0f1kz0x2.js";import"./chunk-ayrjwkyw.js";import"./chunk-c6fw33zh.js";import"./chunk-bf8wf3r2.js";import"./chunk-jn6m8zf7.js";import"./chunk-sskbegsz.js";export{b as stripTypeScript,h as splitDeclaration,c as isModuleResolutionFailure,d as isMissingBindingFailure,f as isCompleteImport,j as hasVariables,e as extractVariables,i as extractScriptFromTemplate,g as convertToCommonJS,a as STX_ENGINE_BINDING_NAMES};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{ci as a,di as b,ei as c,fi as d,gi as e,hi as f}from"./chunk-wcm80anz.js";import"./chunk-z45t29sf.js";export{c as processTransitionDirectives,f as processTransitionAttributes,b as performLeave,a as performEnter,e as generateTransitionRuntime,d as generateTransitionCSS};
2
+ import{ci as a,di as b,ei as c,fi as d,gi as e,hi as f}from"./chunk-wcm80anz.js";import"./chunk-sskbegsz.js";export{c as processTransitionDirectives,f as processTransitionAttributes,b as performLeave,a as performEnter,e as generateTransitionRuntime,d as generateTransitionCSS};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{$e as x,Xe as t,Ye as u,Ze as v,_e as w,af as y,bf as z,cf as A,df as B,ef as C,ff as D,gf as E}from"./chunk-shh4jfwc.js";import{Cf as r,Df as s}from"./chunk-71r0nchv.js";import{Ag as e,Bg as f,Cg as g,Dg as h,Fg as i,Gg as j,Hg as k,Ig as l,Jg as m,Kg as n,Lg as o,Mg as p,Ng as q,xg as b,yg as c,zg as d}from"./chunk-e8jazdsk.js";import{Dh as a}from"./chunk-w3ycm4na.js";import"./chunk-6gb72zp2.js";import"./chunk-z45t29sf.js";export{D as writeImageManifest,a as rewriteImagesWithSiblings,t as renderImageComponent,v as processImageComponents,g as processImage,u as parseImageComponent,A as optimizeImage,B as optimizeDirectory,e as isSharpAvailable,m as isImageFile,f as isImageBackendAvailable,y as imageDirective,r as handleImageRequest,l as groupVariantsByFormat,o as getTotalSize,n as getMimeType,h as getImageMetadata,k as getFallbackVariant,i as generateSrcSet,j as generateSizes,C as generateImageManifest,p as formatSize,E as defaultImageConfig,z as createImagePlugin,s as createImageHandler,x as createImageDirective,w as clearImageCache,q as ImageProcessingError,b as DEFAULT_WIDTHS,d as DEFAULT_QUALITY,c as DEFAULT_FORMATS};
2
+ import{$e as x,Xe as t,Ye as u,Ze as v,_e as w,af as y,bf as z,cf as A,df as B,ef as C,ff as D,gf as E}from"./chunk-0fgcnv6y.js";import{Cf as r,Df as s}from"./chunk-5aq35j2e.js";import{Ag as e,Bg as f,Cg as g,Dg as h,Fg as i,Gg as j,Hg as k,Ig as l,Jg as m,Kg as n,Lg as o,Mg as p,Ng as q,xg as b,yg as c,zg as d}from"./chunk-9zndrzb3.js";import{Dh as a}from"./chunk-w3ycm4na.js";import"./chunk-c0an64km.js";import"./chunk-sskbegsz.js";export{D as writeImageManifest,a as rewriteImagesWithSiblings,t as renderImageComponent,v as processImageComponents,g as processImage,u as parseImageComponent,A as optimizeImage,B as optimizeDirectory,e as isSharpAvailable,m as isImageFile,f as isImageBackendAvailable,y as imageDirective,r as handleImageRequest,l as groupVariantsByFormat,o as getTotalSize,n as getMimeType,h as getImageMetadata,k as getFallbackVariant,i as generateSrcSet,j as generateSizes,C as generateImageManifest,p as formatSize,E as defaultImageConfig,z as createImagePlugin,s as createImageHandler,x as createImageDirective,w as clearImageCache,q as ImageProcessingError,b as DEFAULT_WIDTHS,d as DEFAULT_QUALITY,c as DEFAULT_FORMATS};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{jm as a,km as b,lm as c,mm as d,nm as e,om as f,pm as g,qm as h,rm as i,sm as j,tm as k,um as l,vm as m,wm as n,xm as o}from"./chunk-qccdz9t1.js";import"./chunk-q68xmak4.js";import"./chunk-c0an64km.js";import"./chunk-t1k5dpbr.js";import"./chunk-52mh63sp.js";import"./chunk-5k3qb1am.js";import"./chunk-39f40yc4.js";import"./chunk-ysnk7x79.js";import"./chunk-0f1kz0x2.js";import"./chunk-ayrjwkyw.js";import"./chunk-c6fw33zh.js";import"./chunk-bf8wf3r2.js";import"./chunk-jn6m8zf7.js";import"./chunk-sskbegsz.js";export{h as usesSignalsInScript,o as unescapeHtml,c as registerFilters,b as registerFilter,l as processExpressions,k as interpolateScriptsInTemplate,i as interpolateScriptExpressions,j as interpolateScriptAttributes,d as getAllFilters,n as evaluateExpression,g as escapeHtmlValue,f as escapeHtml,a as defaultFilters,e as clearCustomFilters,m as applyFilters};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{Ki as a,Li as b,Mi as c,Ni as d,Oi as e,Pi as f,Qi as g,Ri as h,Si as i,Ti as j,Ui as k}from"./chunk-54st8g2j.js";import"./chunk-z45t29sf.js";export{i as processStaticDirectives,b as processPartialHydrationDirectives,h as onHydrated,g as isHydrated,d as hydrateIsland,e as hydrateByStrategy,f as hydrateAll,c as generatePartialHydrationCSS,j as generateIslandManifest,k as default,a as createIslandRegistry};
2
+ import{Ki as a,Li as b,Mi as c,Ni as d,Oi as e,Pi as f,Qi as g,Ri as h,Si as i,Ti as j,Ui as k}from"./chunk-54st8g2j.js";import"./chunk-sskbegsz.js";export{i as processStaticDirectives,b as processPartialHydrationDirectives,h as onHydrated,g as isHydrated,d as hydrateIsland,e as hydrateByStrategy,f as hydrateAll,c as generatePartialHydrationCSS,j as generateIslandManifest,k as default,a as createIslandRegistry};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{Hl as A,Il as D,Mq as k,Sm as T,Tm as y,Xo as x,_l as B,am as F,hs as w,ip as M,zp as R}from"./chunk-h0t73k2z.js";import{$u as P}from"./chunk-z45t29sf.js";function b(K){return K.endsWith(".md")||K.endsWith(".markdown")}function C(K){let z=[];_(/<pre\b[^>]*>[\s\S]*?<\/pre>/gi);let G=[...z];_(/<code\b[^>]*>[\s\S]*?<\/code>/gi,G);function _(J,X){let $;while(($=J.exec(K))!==null){let q=$.index,N=q+$[0].length;if(X?.some((Y)=>q>=Y.start&&N<=Y.end))continue;z.push({start:q,end:N})}}if(z.length===0)return K;z.sort((J,X)=>J.start-X.start);let U="",Q=0;for(let J of z){if(J.start<Q)continue;U+=K.slice(Q,J.start),U+=`@raw${K.slice(J.start,J.end)}@endraw`,Q=J.end}return U+=K.slice(Q),U}async function j(K,z={}){let{data:G,content:_}=A(K),Q=await(z.renderer??((J)=>D(J)))(_);return{html:C(Q),frontmatter:G??{}}}import{dirname as v,resolve as H}from"path";function f(K){let z=K,G=x(K);if(G)z=G.content.trim();let _=/<script\b([^>]*)>([\s\S]*?)<\/script>/gi,U=[],Q=[],J=[],X=(N)=>/\b(?:state|derived|effect|batch)\s*(?:<[^<>()]*>)?\s*\(/.test(N),$;while(($=_.exec(K))!==null){let N=$[1],Y=$[2],E=$[0],Z=N.includes("server");if(X(Y))J.push(E);else if(Z)Q.push(Y);else U.push(E)}let q=z;{let N=/<script\b(?![^>]*\b(?:client|type\s*=\s*["']module["']|src\s*=))[^>]*>/gi,Y,E=[];while((Y=N.exec(q))!==null){let Z=Y.index+Y[0].length,L=q.indexOf("</script>",Z);if(L===-1)continue;E.push({start:Y.index,end:L+9}),N.lastIndex=L+9}for(let Z=E.length-1;Z>=0;Z--)q=q.substring(0,E[Z].start)+q.substring(E[Z].end)}for(let N of U)q=q.replace(N,"");return{templateContent:q,serverScripts:Q,clientScripts:U,signalsScripts:J}}function g(K,z){return`<!DOCTYPE html>
2
+ import{Fp as k,Hl as A,Il as D,Om as T,Pm as y,Qn as x,_l as B,am as F,ar as w,bo as M,so as R}from"./chunk-qccdz9t1.js";import{dv as P}from"./chunk-sskbegsz.js";function b(K){return K.endsWith(".md")||K.endsWith(".markdown")}function C(K){let z=[];_(/<pre\b[^>]*>[\s\S]*?<\/pre>/gi);let G=[...z];_(/<code\b[^>]*>[\s\S]*?<\/code>/gi,G);function _(J,X){let $;while(($=J.exec(K))!==null){let q=$.index,N=q+$[0].length;if(X?.some((Y)=>q>=Y.start&&N<=Y.end))continue;z.push({start:q,end:N})}}if(z.length===0)return K;z.sort((J,X)=>J.start-X.start);let U="",Q=0;for(let J of z){if(J.start<Q)continue;U+=K.slice(Q,J.start),U+=`@raw${K.slice(J.start,J.end)}@endraw`,Q=J.end}return U+=K.slice(Q),U}async function j(K,z={}){let{data:G,content:_}=A(K),Q=await(z.renderer??((J)=>D(J)))(_);return{html:C(Q),frontmatter:G??{}}}import{dirname as v,resolve as H}from"path";function f(K){let z=K,G=x(K);if(G)z=G.content.trim();let _=/<script\b([^>]*)>([\s\S]*?)<\/script>/gi,U=[],Q=[],J=[],X=(N)=>/\b(?:state|derived|effect|batch)\s*(?:<[^<>()]*>)?\s*\(/.test(N),$;while(($=_.exec(K))!==null){let N=$[1],Y=$[2],E=$[0],Z=N.includes("server");if(X(Y))J.push(E);else if(Z)Q.push(Y);else U.push(E)}let q=z;{let N=/<script\b(?![^>]*\b(?:client|type\s*=\s*["']module["']|src\s*=))[^>]*>/gi,Y,E=[];while((Y=N.exec(q))!==null){let Z=Y.index+Y[0].length,L=q.indexOf("</script>",Z);if(L===-1)continue;E.push({start:Y.index,end:L+9}),N.lastIndex=L+9}for(let Z=E.length-1;Z>=0;Z--)q=q.substring(0,E[Z].start)+q.substring(E[Z].end)}for(let N of U)q=q.replace(N,"");return{templateContent:q,serverScripts:Q,clientScripts:U,signalsScripts:J}}function S(K,z){return`<!DOCTYPE html>
3
3
  <html lang="en">
4
4
  <head>
5
5
  <meta charset="UTF-8">
@@ -14,5 +14,5 @@ ${Q.join(`
14
14
  `)}`}else{if(G.processClientScripts!==!1&&Q.length>0){let N=X.__stx_event_bindings||[],Y=B(X),Z=(await Promise.all(Q.map(async(V)=>{let W=V.match(/<script\b[^>]*>([\s\S]*?)<\/script>/);if(!W)return V;return await F(W[1],{eventBindings:N,templateContent:q,serverData:Y,filePath:z})}))).join(`
15
15
  `);if(q.match(/(<\/body>)/i))q=q.replace(/(<\/body>)/i,`${Z}
16
16
  $1`);else q+=`
17
- ${Z}`}q=await M(q)}if(G.wrapInDocument){if(!q.trim().toLowerCase().startsWith("<!doctype")&&!q.trim().toLowerCase().startsWith("<html"))q=g(q,G.title)}if(G.injectCSS)try{let{injectCrosswindCSS:N}=await import("./chunk-99ppngnm.js");q=await N(q)}catch{}return q}
17
+ ${Z}`}q=await M(q)}if(G.wrapInDocument){if(!q.trim().toLowerCase().startsWith("<!doctype")&&!q.trim().toLowerCase().startsWith("<html"))q=S(q,G.title)}if(G.injectCSS)try{let{injectCss:N}=await import("./chunk-x11dh3a3.js");q=await N(q)}catch{}return q}
18
18
  export{b as qk,C as rk,j as sk,s as tk,i as uk,I as vk};