@absolutejs/absolute 0.20.0-beta.180 → 0.20.0-beta.182

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 (129) hide show
  1. package/CHANGELOG.md +41 -0
  2. package/changelog.json +70 -0
  3. package/dist/angular/browser.js +2 -2
  4. package/dist/angular/browser.js.map +4 -4
  5. package/dist/angular/components/constants.js +4 -0
  6. package/dist/angular/components/core/streamingSlotRegistrar.js +1 -1
  7. package/dist/angular/components/core/streamingSlotRegistry.js +2 -2
  8. package/dist/angular/index.js +349 -48
  9. package/dist/angular/index.js.map +11 -11
  10. package/dist/angular/server.js +349 -48
  11. package/dist/angular/server.js.map +11 -11
  12. package/dist/build.js +605 -114
  13. package/dist/build.js.map +20 -20
  14. package/dist/cli/{add-8gw9mk2b.js → add-jft96bp4.js} +9 -9
  15. package/dist/cli/{analyze-e57zz9x8.js → analyze-5w46d1f0.js} +3 -3
  16. package/dist/cli/{androidEmulatorController-vqc5m2rp.js → androidEmulatorController-gbf9r660.js} +6 -6
  17. package/dist/cli/{androidNativeWatcher-s03aczxv.js → androidNativeWatcher-3astrxxz.js} +6 -6
  18. package/dist/cli/{api-8ppxw487.js → api-zmvnvdsf.js} +8 -8
  19. package/dist/cli/{build-fz7qbdn3.js → build-mskrk9zb.js} +3 -3
  20. package/dist/cli/{build-fntmf42w.js → build-p3qra1nj.js} +65 -7
  21. package/dist/cli/{buildDepVendor-qnwfct22.js → buildDepVendor-36d1aa7c.js} +2 -2
  22. package/dist/cli/{buildReactServerComponents-fq6mw10d.js → buildReactServerComponents-vc9hh2rd.js} +5 -5
  23. package/dist/cli/{compile-54rb8szn.js → compile-7mjd739p.js} +10 -6
  24. package/dist/cli/config/server.js +18 -17
  25. package/dist/cli/{db-qbzjw3en.js → db-mpmj37jq.js} +2 -2
  26. package/dist/cli/{dev-6s6g5tnk.js → dev-9d6d7757.js} +14 -14
  27. package/dist/cli/{doctor-m36tmx4d.js → doctor-nng9szw6.js} +3 -3
  28. package/dist/cli/{emulatorDoctor-s1z5tkp7.js → emulatorDoctor-3eszsqs8.js} +5 -5
  29. package/dist/cli/{emulatorInstaller-pgkdswvq.js → emulatorInstaller-1r6cawm0.js} +6 -6
  30. package/dist/cli/{env-5nz1qm8e.js → env-bfa7vs35.js} +3 -3
  31. package/dist/cli/{expoDevController-018anvbm.js → expoDevController-s0msdwbm.js} +6 -6
  32. package/dist/cli/{generate-5vyz1s44.js → generate-xk3a7qnc.js} +8 -8
  33. package/dist/cli/{heapDiff-kncvdtn8.js → heapDiff-3ba8p8wf.js} +3 -3
  34. package/dist/cli/{htmx-26hs6jdm.js → htmx-an2x3gpx.js} +6 -6
  35. package/dist/cli/{index-7854xf0m.js → index-1bszxtdj.js} +1 -1
  36. package/dist/cli/{index-kx2d067c.js → index-3066eqr3.js} +8 -5
  37. package/dist/cli/{index-8khbn8qr.js → index-3a9h87v5.js} +3 -3
  38. package/dist/cli/{index-9djrap79.js → index-3pz5sjaz.js} +1 -1
  39. package/dist/cli/{index-50ag35xg.js → index-3ys9tz53.js} +2 -2
  40. package/dist/cli/{index-6f448d7m.js → index-4ynx0cq6.js} +26 -12
  41. package/dist/cli/{index-btp4fyf1.js → index-785hpa2r.js} +2 -2
  42. package/dist/cli/{index-w79snsxv.js → index-7zwzyymv.js} +2 -2
  43. package/dist/cli/{index-kes8he5s.js → index-9sqqzeq4.js} +1 -1
  44. package/dist/cli/{index-pr1skxen.js → index-akseq9ps.js} +1 -1
  45. package/dist/cli/{index-23hvdyxf.js → index-c6j2727a.js} +1 -1
  46. package/dist/cli/{index-pkw3jktb.js → index-eh786rj4.js} +2 -2
  47. package/dist/cli/{index-aemhvvwb.js → index-eydgkr7w.js} +1 -1
  48. package/dist/cli/{index-rz56x932.js → index-fbmfpqk8.js} +1 -1
  49. package/dist/cli/{index-xf9sfr8a.js → index-fgqh48qr.js} +63 -1
  50. package/dist/cli/{index-c8rcfe5a.js → index-fy4th3n0.js} +1 -1
  51. package/dist/cli/{index-prza6tkp.js → index-gx6pjzzk.js} +3 -3
  52. package/dist/cli/{index-125cfzvn.js → index-hker5fs4.js} +2 -2
  53. package/dist/cli/{index-cgmp9d02.js → index-hqkcxa2p.js} +1 -1
  54. package/dist/cli/{index-x1vvn549.js → index-mmm6d3k5.js} +3 -3
  55. package/dist/cli/{index-enbw9484.js → index-wpgsermq.js} +1 -1
  56. package/dist/cli/{index-0z5fgb80.js → index-wqpg377f.js} +1 -1
  57. package/dist/cli/{index-3sfcmb49.js → index-x7h6w6td.js} +1 -1
  58. package/dist/cli/{index-a6xx0p9e.js → index-ydaxsftq.js} +1 -1
  59. package/dist/cli/{index-3ewt17wm.js → index-yhkg5by0.js} +1 -1
  60. package/dist/cli/{index-aqe25w4h.js → index-zeeep92g.js} +1 -1
  61. package/dist/cli/index.js +32 -32
  62. package/dist/cli/{info-k124sh7g.js → info-5rwsbhe2.js} +4 -4
  63. package/dist/cli/{inspect-n6pcfvfw.js → inspect-nmwb0q5k.js} +5 -5
  64. package/dist/cli/{iosNativeWatcher-wdq2fvj1.js → iosNativeWatcher-7r9gnk87.js} +7 -7
  65. package/dist/cli/{iosSimulatorController-n97dpa8p.js → iosSimulatorController-w963vv9r.js} +7 -7
  66. package/dist/cli/{islands-17tfx8jf.js → islands-w9xrehpk.js} +3 -3
  67. package/dist/cli/{logs-shg23fbt.js → logs-m793x8a7.js} +3 -3
  68. package/dist/cli/{ls-0wr74w0b.js → ls-k31npd5b.js} +3 -3
  69. package/dist/cli/{mem-16sy1707.js → mem-jm6kw6gr.js} +5 -5
  70. package/dist/cli/{migrate-k91k050s.js → migrate-95bjkqkr.js} +2 -2
  71. package/dist/cli/{mobile-hpqpy61f.js → mobile-cpp8vfn7.js} +13 -13
  72. package/dist/cli/prerender-26pzynh4.js +13 -0
  73. package/dist/cli/{prettier-dh5fh786.js → prettier-0ws9pbc1.js} +1 -1
  74. package/dist/cli/{ps-pk7ncjac.js → ps-fx8mz3e3.js} +6 -6
  75. package/dist/cli/{psTui-50wf0b72.js → psTui-0e9c7an6.js} +7 -7
  76. package/dist/cli/{remoteMacProtocol-g10s408w.js → remoteMacProtocol-y7h79gr8.js} +7 -7
  77. package/dist/cli/{remove-x987pvd3.js → remove-xhvph8bz.js} +8 -8
  78. package/dist/cli/{routes-mc3ymp8t.js → routes-hq9yje5z.js} +3 -3
  79. package/dist/cli/{start-mbn2zgs2.js → start-5mjh9hh2.js} +5 -5
  80. package/dist/cli/{staticAnalyzeSpaRoutes-2nev05m1.js → staticAnalyzeSpaRoutes-rcc1d3az.js} +3 -1
  81. package/dist/cli/{typecheck-488txsfc.js → typecheck-yjme4fv1.js} +71 -35
  82. package/dist/cli/{workspace-7sbyyc59.js → workspace-xeb6abxj.js} +5 -5
  83. package/dist/index.js +620 -126
  84. package/dist/index.js.map +22 -22
  85. package/dist/islands/index.js +312 -23
  86. package/dist/islands/index.js.map +5 -5
  87. package/dist/mobile/index.js +2 -2
  88. package/dist/mobile/index.js.map +3 -3
  89. package/dist/react/browser.js +18 -1
  90. package/dist/react/browser.js.map +6 -4
  91. package/dist/react/components/index.js +2 -2
  92. package/dist/react/components/index.js.map +3 -3
  93. package/dist/react/index.js +366 -61
  94. package/dist/react/index.js.map +14 -13
  95. package/dist/react/server.js +47 -35
  96. package/dist/react/server.js.map +10 -10
  97. package/dist/src/angular/components/constants.d.ts +1 -0
  98. package/dist/src/angular/components/defer-slot-payload.d.ts +5 -0
  99. package/dist/src/angular/staticAnalyzeSpaRoutes.d.ts +9 -0
  100. package/dist/src/cli/scripts/manifestKeysEditorHint.d.ts +9 -0
  101. package/dist/src/cli/scripts/typecheck.d.ts +7 -0
  102. package/dist/src/constants.d.ts +1 -0
  103. package/dist/src/core/prerender.d.ts +10 -0
  104. package/dist/src/dev/spaRouteRefresh.d.ts +12 -5
  105. package/dist/src/react/browser.d.ts +1 -0
  106. package/dist/src/react/index.d.ts +1 -0
  107. package/dist/src/svelte/lowerAwaitSlotSyntax.d.ts +23 -0
  108. package/dist/src/utils/pageCspNonce.d.ts +14 -0
  109. package/dist/src/utils/spaRouteManifest.d.ts +2 -0
  110. package/dist/svelte/components/Image.svelte +1 -1
  111. package/dist/svelte/components/Island.svelte +1 -1
  112. package/dist/svelte/index.js +368 -68
  113. package/dist/svelte/index.js.map +11 -11
  114. package/dist/svelte/router/Router.svelte.d.ts +31 -1
  115. package/dist/svelte/server.js +359 -59
  116. package/dist/svelte/server.js.map +11 -11
  117. package/dist/types/manifest.d.ts +3 -2
  118. package/dist/types/svelte.d.ts +3 -0
  119. package/dist/vue/components/Image.js +2 -2
  120. package/dist/vue/components/Image.js.map +3 -3
  121. package/dist/vue/components/index.js +2 -2
  122. package/dist/vue/components/index.js.map +3 -3
  123. package/dist/vue/index.js +360 -60
  124. package/dist/vue/index.js.map +11 -11
  125. package/dist/vue/server.js +50 -39
  126. package/dist/vue/server.js.map +9 -9
  127. package/package.json +4 -1
  128. package/dist/cli/prerender-w65xp6h8.js +0 -11
  129. /package/dist/cli/{index-t8jmj8w1.js → index-fm9x6sjs.js} +0 -0
package/dist/index.js CHANGED
@@ -114,7 +114,7 @@ var resolveAngularPackageDir = (specifier) => {
114
114
  var init_resolveAngularPackage = () => {};
115
115
 
116
116
  // src/constants.ts
117
- var ANGULAR_INIT_TIMEOUT_MS = 500, ANSI_ESCAPE_CODE = 27, ANSI_ESCAPE_LENGTH = 3, ASCII_SPACE = 32, BASE_36_RADIX = 36, BUN_BUILD_WARNING_SUPPRESSION = "wildcard sideEffects are not supported yet", TAILWIND_BUN_CSS_WARNING_PATTERN, BODY_SLICE_LENGTH = 2000, BYTES_PER_KILOBYTE = 1024, CLI_ARGS_OFFSET = 3, CSS_ERROR_RESOLVE_DELAY_MS = 50, CSS_MAX_CHECK_ATTEMPTS = 10, CSS_MAX_PARSE_TIMEOUT_MS = 500, CSS_RELOAD_BACKOFF_BASE_MS = 1000, CSS_RELOAD_BACKOFF_MAX_MS = 60000, CSS_SHEET_READY_TIMEOUT_MS = 100, DEFAULT_CHUNK_SIZE = 16384, DEFAULT_DEBOUNCE_MS = 15, DEFAULT_PORT = 3000, DEV_SERVER_RESTART_DEBOUNCE_MS = 100, DOM_UPDATE_DELAY_MS = 50, FILE_PROTOCOL_PREFIX_LENGTH = 7, FOCUS_ID_PREFIX_LENGTH = 3, FOCUS_IDX_PREFIX_LENGTH = 4, FOCUS_NAME_PREFIX_LENGTH = 5, ESLINT_STUDIO_DEFAULT_HOST = "eslint.absolute.localhost", ESLINT_STUDIO_DEFAULT_PORT = 4099, CONFIG_DEFAULT_HOST = "config.absolute.localhost", CONFIG_DEFAULT_PORT = 4099, HMR_UPDATE_TIMEOUT_MS = 2000, HOOK_SIGNATURE_LENGTH = 12, EXCLUDE_LAST_OFFSET = -1, HTTP_STATUS_OK = 200, HTTP_STATUS_BAD_REQUEST = 400, HTTP_STATUS_NOT_FOUND = 404, HTTP_STATUS_GONE = 410, HTTP_STATUS_INTERNAL_SERVER_ERROR = 500, HOURS_IN_DAY = 24, HOURS_IN_HALF_DAY = 12, IMAGE_DEFAULT_DEVICE_SIZES, IMAGE_DEFAULT_IMAGE_SIZES, IMAGE_DEFAULT_QUALITY = 75, IMAGE_GLOB_SUFFIX_LENGTH = 2, INSTANCE_PROBE_TIMEOUT_MS = 250, MAX_ERROR_LENGTH = 200, MAX_RECONNECT_ATTEMPTS = 60, MILLISECONDS_IN_A_SECOND = 1000, MINUTES_IN_AN_HOUR = 60, SECONDS_IN_A_MINUTE = 60, MILLISECONDS_IN_A_MINUTE, MILLISECONDS_IN_A_DAY, OVERLAY_FADE_DURATION_MS = 150, PING_INTERVAL_MS = 30000, LIST_LOG_TAIL_MAX_BYTES = 65536, LIST_TUI_COLUMN_GAP = 2, LIST_TUI_DEFAULT_HEIGHT = 28, LIST_TUI_DEFAULT_WIDTH = 100, LIST_TUI_ESCAPE_SEQUENCE_TIMEOUT_MS = 30, LIST_TUI_FOOTER_LINE_COUNT = 2, LIST_TUI_MARKER_WIDTH = 2, LIST_TUI_MIN_LOG_HEIGHT = 3, LIST_TUI_MIN_URL_WIDTH = 16, LIST_TUI_RENDER_DEBOUNCE_MS = 16, LIST_TUI_STATUS_MESSAGE_TIMEOUT_MS = 4000, LIST_WATCH_REFRESH_MS = 1000, RAF_BATCH_COUNT = 3, RANDOM_ID_END_INDEX = 11, REBUILD_BATCH_DELAY_MS = 10, REBUILD_RELOAD_DELAY_MS = 200, RECONNECT_INITIAL_DELAY_MS = 500, RECONNECT_POLL_INTERVAL_MS = 300, REACT_STREAM_SLOT_FAST_DELAY_MS = 5, REACT_STREAM_SLOT_SLOW_DELAY_MS = 20, SIGINT_EXIT_CODE = 130, SIGTERM_EXIT_CODE = 143, SVELTE_CSS_LOAD_TIMEOUT_MS = 500, TIME_PRECISION = 2, TWO_THIRDS, UNFOUND_INDEX = -1, WEBSOCKET_NORMAL_CLOSURE = 1000, DEFAULT_WEBSOCKET_IDLE_TIMEOUT_SECONDS = 240, DEFAULT_HTTP_IDLE_TIMEOUT_SECONDS = 240, MAX_HTTP_IDLE_TIMEOUT_SECONDS = 255, WORKSPACE_COMMAND_ARGS_OFFSET = 3, WORKSPACE_FAILURE_LOG_PRINT_LIMIT = 30, WORKSPACE_FAILURE_RECENT_LOG_LIMIT = 60, WORKSPACE_READY_ATTEMPT_TIMEOUT_MS = 5000, WORKSPACE_READY_PROBE_INTERVAL_MS = 250, WORKSPACE_READY_TIMEOUT_MS = 30000, WORKSPACE_SHUTDOWN_TIMEOUT_MS = 1e4, WORKSPACE_TUI_DEFAULT_HEIGHT = 28, WORKSPACE_TUI_DEFAULT_WIDTH = 100, WORKSPACE_TUI_ESCAPE_SEQUENCE_TIMEOUT_MS = 30, WORKSPACE_TUI_FOOTER_LINE_COUNT = 3, WORKSPACE_TUI_MIN_LOG_HEIGHT = 3, WORKSPACE_TUI_MIN_SERVICE_NAME_WIDTH = 7, WORKSPACE_TUI_MIN_TARGET_WIDTH = 8, WORKSPACE_TUI_MIN_WRAP_WIDTH = 12, WORKSPACE_TUI_PROMPT_CURSOR_OFFSET = 3, WORKSPACE_TUI_RECENT_LOG_LIMIT = 40, WORKSPACE_TUI_RENDER_DEBOUNCE_MS = 16, WORKSPACE_TUI_STATUS_WIDTH = 10, WORKSPACE_TUI_TARGET_PADDING_WIDTH = 6, WORKSPACE_TUI_VISIBILITY_WIDTH = 8;
117
+ var ANGULAR_INIT_TIMEOUT_MS = 500, ANSI_ESCAPE_CODE = 27, ANSI_ESCAPE_LENGTH = 3, ASCII_SPACE = 32, BASE_36_RADIX = 36, BUN_BUILD_WARNING_SUPPRESSION = "wildcard sideEffects are not supported yet", TAILWIND_BUN_CSS_WARNING_PATTERN, BODY_SLICE_LENGTH = 2000, BYTES_PER_KILOBYTE = 1024, CLI_ARGS_OFFSET = 3, CSS_ERROR_RESOLVE_DELAY_MS = 50, CSS_MAX_CHECK_ATTEMPTS = 10, CSS_MAX_PARSE_TIMEOUT_MS = 500, CSS_RELOAD_BACKOFF_BASE_MS = 1000, CSS_RELOAD_BACKOFF_MAX_MS = 60000, CSS_SHEET_READY_TIMEOUT_MS = 100, DEFAULT_CHUNK_SIZE = 16384, DEFAULT_DEBOUNCE_MS = 15, DEFAULT_PORT = 3000, DEV_SERVER_RESTART_DEBOUNCE_MS = 100, DOM_UPDATE_DELAY_MS = 50, FILE_PROTOCOL_PREFIX_LENGTH = 7, FOCUS_ID_PREFIX_LENGTH = 3, FOCUS_IDX_PREFIX_LENGTH = 4, FOCUS_NAME_PREFIX_LENGTH = 5, ESLINT_STUDIO_DEFAULT_HOST = "eslint.absolute.localhost", ESLINT_STUDIO_DEFAULT_PORT = 4099, CONFIG_DEFAULT_HOST = "config.absolute.localhost", CONFIG_DEFAULT_PORT = 4099, HMR_UPDATE_TIMEOUT_MS = 2000, HOOK_SIGNATURE_LENGTH = 12, EXCLUDE_LAST_OFFSET = -1, HTML_CONTENT_TYPE = "text/html; charset=utf-8", HTTP_STATUS_OK = 200, HTTP_STATUS_BAD_REQUEST = 400, HTTP_STATUS_NOT_FOUND = 404, HTTP_STATUS_GONE = 410, HTTP_STATUS_INTERNAL_SERVER_ERROR = 500, HOURS_IN_DAY = 24, HOURS_IN_HALF_DAY = 12, IMAGE_DEFAULT_DEVICE_SIZES, IMAGE_DEFAULT_IMAGE_SIZES, IMAGE_DEFAULT_QUALITY = 75, IMAGE_GLOB_SUFFIX_LENGTH = 2, INSTANCE_PROBE_TIMEOUT_MS = 250, MAX_ERROR_LENGTH = 200, MAX_RECONNECT_ATTEMPTS = 60, MILLISECONDS_IN_A_SECOND = 1000, MINUTES_IN_AN_HOUR = 60, SECONDS_IN_A_MINUTE = 60, MILLISECONDS_IN_A_MINUTE, MILLISECONDS_IN_A_DAY, OVERLAY_FADE_DURATION_MS = 150, PING_INTERVAL_MS = 30000, LIST_LOG_TAIL_MAX_BYTES = 65536, LIST_TUI_COLUMN_GAP = 2, LIST_TUI_DEFAULT_HEIGHT = 28, LIST_TUI_DEFAULT_WIDTH = 100, LIST_TUI_ESCAPE_SEQUENCE_TIMEOUT_MS = 30, LIST_TUI_FOOTER_LINE_COUNT = 2, LIST_TUI_MARKER_WIDTH = 2, LIST_TUI_MIN_LOG_HEIGHT = 3, LIST_TUI_MIN_URL_WIDTH = 16, LIST_TUI_RENDER_DEBOUNCE_MS = 16, LIST_TUI_STATUS_MESSAGE_TIMEOUT_MS = 4000, LIST_WATCH_REFRESH_MS = 1000, RAF_BATCH_COUNT = 3, RANDOM_ID_END_INDEX = 11, REBUILD_BATCH_DELAY_MS = 10, REBUILD_RELOAD_DELAY_MS = 200, RECONNECT_INITIAL_DELAY_MS = 500, RECONNECT_POLL_INTERVAL_MS = 300, REACT_STREAM_SLOT_FAST_DELAY_MS = 5, REACT_STREAM_SLOT_SLOW_DELAY_MS = 20, SIGINT_EXIT_CODE = 130, SIGTERM_EXIT_CODE = 143, SVELTE_CSS_LOAD_TIMEOUT_MS = 500, TIME_PRECISION = 2, TWO_THIRDS, UNFOUND_INDEX = -1, WEBSOCKET_NORMAL_CLOSURE = 1000, DEFAULT_WEBSOCKET_IDLE_TIMEOUT_SECONDS = 240, DEFAULT_HTTP_IDLE_TIMEOUT_SECONDS = 240, MAX_HTTP_IDLE_TIMEOUT_SECONDS = 255, WORKSPACE_COMMAND_ARGS_OFFSET = 3, WORKSPACE_FAILURE_LOG_PRINT_LIMIT = 30, WORKSPACE_FAILURE_RECENT_LOG_LIMIT = 60, WORKSPACE_READY_ATTEMPT_TIMEOUT_MS = 5000, WORKSPACE_READY_PROBE_INTERVAL_MS = 250, WORKSPACE_READY_TIMEOUT_MS = 30000, WORKSPACE_SHUTDOWN_TIMEOUT_MS = 1e4, WORKSPACE_TUI_DEFAULT_HEIGHT = 28, WORKSPACE_TUI_DEFAULT_WIDTH = 100, WORKSPACE_TUI_ESCAPE_SEQUENCE_TIMEOUT_MS = 30, WORKSPACE_TUI_FOOTER_LINE_COUNT = 3, WORKSPACE_TUI_MIN_LOG_HEIGHT = 3, WORKSPACE_TUI_MIN_SERVICE_NAME_WIDTH = 7, WORKSPACE_TUI_MIN_TARGET_WIDTH = 8, WORKSPACE_TUI_MIN_WRAP_WIDTH = 12, WORKSPACE_TUI_PROMPT_CURSOR_OFFSET = 3, WORKSPACE_TUI_RECENT_LOG_LIMIT = 40, WORKSPACE_TUI_RENDER_DEBOUNCE_MS = 16, WORKSPACE_TUI_STATUS_WIDTH = 10, WORKSPACE_TUI_TARGET_PADDING_WIDTH = 6, WORKSPACE_TUI_VISIBILITY_WIDTH = 8;
118
118
  var init_constants = __esm(() => {
119
119
  TAILWIND_BUN_CSS_WARNING_PATTERN = /invalid @ rule encountered: '@(theme|tailwind|source|utility|variant|custom-variant|apply|reference|plugin|config)'/;
120
120
  IMAGE_DEFAULT_DEVICE_SIZES = [
@@ -6199,7 +6199,7 @@ var CONVENTIONS_KEY = "__absoluteConventions", isConventionsMap = (value) => Boo
6199
6199
  nonce: readCspNonce()
6200
6200
  });
6201
6201
  return new Response(stream, {
6202
- headers: { "Content-Type": "text/html" },
6202
+ headers: { "Content-Type": HTML_CONTENT_TYPE },
6203
6203
  status: 500
6204
6204
  });
6205
6205
  }, renderSvelteError = async (conventionPath, errorProps) => {
@@ -6215,7 +6215,7 @@ var CONVENTIONS_KEY = "__absoluteConventions", isConventionsMap = (value) => Boo
6215
6215
  });
6216
6216
  const html = `<!DOCTYPE html><html><head>${nonceSvelteHeadStyles(head)}</head><body>${body}</body></html>`;
6217
6217
  return new Response(html, {
6218
- headers: { "Content-Type": "text/html" },
6218
+ headers: { "Content-Type": HTML_CONTENT_TYPE },
6219
6219
  status: 500
6220
6220
  });
6221
6221
  }, unescapeVueStyles = (ssrBody) => {
@@ -6239,7 +6239,7 @@ var CONVENTIONS_KEY = "__absoluteConventions", isConventionsMap = (value) => Boo
6239
6239
  const { styles, body } = unescapeVueStyles(rawBody);
6240
6240
  const html = `<!DOCTYPE html><html><head>${styles}</head><body><div id="root">${body}</div></body></html>`;
6241
6241
  return new Response(html, {
6242
- headers: { "Content-Type": "text/html" },
6242
+ headers: { "Content-Type": HTML_CONTENT_TYPE },
6243
6243
  status: 500
6244
6244
  });
6245
6245
  }, renderAngularError = async (conventionPath, errorProps) => {
@@ -6249,14 +6249,14 @@ var CONVENTIONS_KEY = "__absoluteConventions", isConventionsMap = (value) => Boo
6249
6249
  return null;
6250
6250
  const html = renderFn(errorProps);
6251
6251
  return new Response(html, {
6252
- headers: { "Content-Type": "text/html" },
6252
+ headers: { "Content-Type": HTML_CONTENT_TYPE },
6253
6253
  status: 500
6254
6254
  });
6255
6255
  }, escapeHtml = (value) => value.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#39;"), replaceErrorTokens = (template, errorProps) => template.replace(/\{\{\s*name\s*\}\}/g, escapeHtml(errorProps.name)).replace(/\{\{\s*message\s*\}\}/g, escapeHtml(errorProps.message)).replace(/\{\{\s*stack\s*\}\}/g, errorProps.stack ? escapeHtml(errorProps.stack) : ""), renderHtmlError = async (conventionPath, errorProps) => {
6256
6256
  const template = await nonceStaticHtml(await Bun.file(conventionPath).text());
6257
6257
  const html = replaceErrorTokens(template, errorProps);
6258
6258
  return new Response(html, {
6259
- headers: { "Content-Type": "text/html" },
6259
+ headers: { "Content-Type": HTML_CONTENT_TYPE },
6260
6260
  status: 500
6261
6261
  });
6262
6262
  }, logConventionRenderError = (framework, label, renderError) => {
@@ -6335,7 +6335,7 @@ var CONVENTIONS_KEY = "__absoluteConventions", isConventionsMap = (value) => Boo
6335
6335
  nonce: readCspNonce()
6336
6336
  });
6337
6337
  return new Response(stream, {
6338
- headers: { "Content-Type": "text/html" },
6338
+ headers: { "Content-Type": HTML_CONTENT_TYPE },
6339
6339
  status: 404
6340
6340
  });
6341
6341
  }, renderSvelteNotFound = async (conventionPath) => {
@@ -6348,7 +6348,7 @@ var CONVENTIONS_KEY = "__absoluteConventions", isConventionsMap = (value) => Boo
6348
6348
  const { head, body } = render(NotFoundComponent, nonce ? { csp: { nonce } } : {});
6349
6349
  const html = `<!DOCTYPE html><html><head>${nonceSvelteHeadStyles(head)}</head><body>${body}</body></html>`;
6350
6350
  return new Response(html, {
6351
- headers: { "Content-Type": "text/html" },
6351
+ headers: { "Content-Type": HTML_CONTENT_TYPE },
6352
6352
  status: 404
6353
6353
  });
6354
6354
  }, renderVueNotFound = async (conventionPath) => {
@@ -6365,7 +6365,7 @@ var CONVENTIONS_KEY = "__absoluteConventions", isConventionsMap = (value) => Boo
6365
6365
  const { styles, body } = unescapeVueStyles(rawBody);
6366
6366
  const html = `<!DOCTYPE html><html><head>${styles}</head><body><div id="root">${body}</div></body></html>`;
6367
6367
  return new Response(html, {
6368
- headers: { "Content-Type": "text/html" },
6368
+ headers: { "Content-Type": HTML_CONTENT_TYPE },
6369
6369
  status: 404
6370
6370
  });
6371
6371
  }, renderAngularNotFound = async (conventionPath) => {
@@ -6375,13 +6375,13 @@ var CONVENTIONS_KEY = "__absoluteConventions", isConventionsMap = (value) => Boo
6375
6375
  return null;
6376
6376
  const html = renderFn();
6377
6377
  return new Response(html, {
6378
- headers: { "Content-Type": "text/html" },
6378
+ headers: { "Content-Type": HTML_CONTENT_TYPE },
6379
6379
  status: 404
6380
6380
  });
6381
6381
  }, renderHtmlNotFound = async (conventionPath) => {
6382
6382
  const html = await nonceStaticHtml(await Bun.file(conventionPath).text());
6383
6383
  return new Response(html, {
6384
- headers: { "Content-Type": "text/html" },
6384
+ headers: { "Content-Type": HTML_CONTENT_TYPE },
6385
6385
  status: 404
6386
6386
  });
6387
6387
  }, NOT_FOUND_RENDERERS, renderConventionNotFound = async (framework) => {
@@ -6415,6 +6415,7 @@ var CONVENTIONS_KEY = "__absoluteConventions", isConventionsMap = (value) => Boo
6415
6415
  return renderNext(options.preferHtmx ? ["htmx", ...NOT_FOUND_PRIORITY.filter((key) => key !== "htmx")] : NOT_FOUND_PRIORITY);
6416
6416
  };
6417
6417
  var init_resolveConvention = __esm(() => {
6418
+ init_constants();
6418
6419
  init_cspNonceRef();
6419
6420
  init_staticHtmlNonce();
6420
6421
  init_ssrErrorPage();
@@ -6607,14 +6608,14 @@ var init_logger = __esm(() => {
6607
6608
 
6608
6609
  // src/core/pageResponseCache.ts
6609
6610
  import { createHash as createHash2 } from "crypto";
6610
- var STREAMING_PAGE_HEADER = "x-absolute-stream", HTML_CONTENT_TYPE = "text/html", streamingPageHeaders = (extra) => {
6611
+ var STREAMING_PAGE_HEADER = "x-absolute-stream", HTML_MEDIA_TYPE = "text/html", streamingPageHeaders = (extra) => {
6611
6612
  const headers = new Headers(extra);
6612
6613
  headers.set("content-type", HTML_CONTENT_TYPE);
6613
6614
  headers.set(STREAMING_PAGE_HEADER, "1");
6614
6615
  return headers;
6615
6616
  }, computeEtag = (html) => `W/"${createHash2("sha1").update(html).digest("base64url")}"`, withPageCacheHeaders = async (response, request, options) => {
6616
6617
  const contentType = response.headers.get("content-type") ?? "";
6617
- if (!contentType.includes(HTML_CONTENT_TYPE))
6618
+ if (!contentType.includes(HTML_MEDIA_TYPE))
6618
6619
  return response;
6619
6620
  const isStreaming = response.headers.get(STREAMING_PAGE_HEADER) === "1";
6620
6621
  if (isStreaming && !options?.bufferStreamForEtag || !response.body) {
@@ -6640,7 +6641,9 @@ var STREAMING_PAGE_HEADER = "x-absolute-stream", HTML_CONTENT_TYPE = "text/html"
6640
6641
  statusText: response.statusText
6641
6642
  });
6642
6643
  };
6643
- var init_pageResponseCache = () => {};
6644
+ var init_pageResponseCache = __esm(() => {
6645
+ init_constants();
6646
+ });
6644
6647
 
6645
6648
  // src/core/islandManifest.ts
6646
6649
  var ISLAND_BOOTSTRAP_MANIFEST_KEY = "AbsoluteIslandBootstrap", LEGACY_ISLAND_BOOTSTRAP_MANIFEST_KEY = "BootstrapClient", REACT_PAGE_ROOT_EVENT = "absolute:react-page-root", toIslandFrameworkSegment = (framework) => framework[0]?.toUpperCase() + framework.slice(1), collectFrameworkIslands = (manifest, prefix) => {
@@ -7157,9 +7160,9 @@ var SLOT_ID_PREFIX = "abs-slot-", CLOSING_BODY_TAG = "</body>", CLOSING_HEAD_TAG
7157
7160
  tail: ""
7158
7161
  };
7159
7162
  };
7160
- const handleBaseWinner = (controller, winner, baseRead, tail, footer) => {
7163
+ const handleBaseWinner = (controller, winner, baseRead, tail, footer, baseDone) => {
7161
7164
  if (winner.kind !== "base") {
7162
- return { baseDone: false, baseRead, footer, handled: false, tail };
7165
+ return { baseDone, baseRead, footer, handled: false, tail };
7163
7166
  }
7164
7167
  if (winner.done) {
7165
7168
  return finalizeCompletedBaseWinner(controller, tail + decoder.decode(), baseRead);
@@ -7202,7 +7205,7 @@ var SLOT_ID_PREFIX = "abs-slot-", CLOSING_BODY_TAG = "</body>", CLOSING_HEAD_TAG
7202
7205
  return footer;
7203
7206
  }
7204
7207
  const winner = await Promise.race(racers);
7205
- const baseWinnerState = applyBaseWinnerState(handleBaseWinner(controller, winner, baseRead, tail, footer), winner, (slotWinner) => {
7208
+ const baseWinnerState = applyBaseWinnerState(handleBaseWinner(controller, winner, baseRead, tail, footer, baseDone), winner, (slotWinner) => {
7206
7209
  handleResolvedSlot(controller, slotWinner);
7207
7210
  });
7208
7211
  ({ baseDone, baseRead, footer, tail } = baseWinnerState);
@@ -8657,23 +8660,247 @@ var AWAIT_STREAM_DIRECTIVE = "<!-- absolute:stream -->", DIRECTIVE_RE, BRANCH_TA
8657
8660
  index = markup.indexOf("{", end);
8658
8661
  }
8659
8662
  return tags;
8660
- }, escapeTemplateLiteral = (value) => value.replaceAll("\\", "\\\\").replaceAll("`", "\\`").replaceAll("${", "\\${"), markupToTemplateLiteral = (markup) => {
8661
- const parts = topLevelTags(markup.trim());
8662
- const trimmed = markup.trim();
8663
- let cursor = 0;
8664
- let literal = "";
8665
- for (const { end, start, text } of parts) {
8666
- literal += escapeTemplateLiteral(trimmed.slice(cursor, start));
8667
- literal += `\${${text.slice(1, -1).trim()}}`;
8668
- cursor = end;
8663
+ }, escapeTemplateLiteral = (value) => value.replaceAll("\\", "\\\\").replaceAll("`", "\\`").replaceAll("${", "\\${"), HTML_HELPERS = "__absoluteAwaitHtml", AWAIT_SCOPE_CLASS_PLACEHOLDER = "__absoluteAwaitScopeClass__", AWAIT_HTML_HELPERS_SOURCE, applyAwaitScopeClass = (code, scopeClass) => code.replaceAll(AWAIT_SCOPE_CLASS_PLACEHOLDER, scopeClass), createAwaitScopeClassCapture = () => {
8664
+ let scopeClass = "";
8665
+ const cssHash = ({ css, filename, hash }) => {
8666
+ scopeClass = `svelte-${hash(filename === "(unknown)" ? css : filename ?? css)}`;
8667
+ return scopeClass;
8668
+ };
8669
+ const apply = (code) => applyAwaitScopeClass(code, scopeClass);
8670
+ return { apply, cssHash };
8671
+ }, BOOLEAN_ATTRIBUTES, DIRECTIVE_ATTRIBUTE_RE, ATTRIBUTE_NAME_END_RE, RAW_TEXT_ELEMENTS, helperCall = (name, ...args) => `\${${HTML_HELPERS}.${name}(${args.join(", ")})}`, SHADOW_VALUE, END_TAG_RE, isShadowAttribute = (name) => !DIRECTIVE_ATTRIBUTE_RE.test(name) && !/^on/i.test(name), pushText = (scan, text) => {
8672
+ scan.literal += escapeTemplateLiteral(text);
8673
+ }, readExpressionTag = (scan) => {
8674
+ const end = findTagEnd(scan.source, scan.index);
8675
+ if (end === -1) {
8676
+ fail(scan.filePath, `unterminated tag in the ${scan.branch} branch`);
8677
+ }
8678
+ const inner = scan.source.slice(scan.index + 1, end - 1).trim();
8679
+ scan.index = end;
8680
+ return inner;
8681
+ }, failAttribute = (scan, detail) => fail(scan.filePath, `the ${scan.branch} branch of a streamed {#await} has ${detail}`), atValueEnd = (scan, quote) => {
8682
+ const char = scan.source[scan.index] ?? "";
8683
+ if (quote)
8684
+ return char === quote;
8685
+ return /[\s>]/.test(char) || scan.source.startsWith("/>", scan.index);
8686
+ }, readValueText = (scan, quote) => {
8687
+ const start = scan.index;
8688
+ while (scan.index < scan.source.length && scan.source[scan.index] !== "{" && !atValueEnd(scan, quote)) {
8689
+ scan.index += 1;
8690
+ }
8691
+ return scan.source.slice(start, scan.index);
8692
+ }, readAttributeValue = (scan) => {
8693
+ const { source } = scan;
8694
+ const quote = source[scan.index];
8695
+ const chunks = [];
8696
+ const isQuoted = quote === '"' || quote === "'";
8697
+ if (isQuoted)
8698
+ scan.index += 1;
8699
+ if (!isQuoted && source[scan.index] === "{") {
8700
+ chunks.push({ code: readExpressionTag(scan) });
8701
+ return chunks;
8702
+ }
8703
+ const valueQuote = isQuoted ? quote : undefined;
8704
+ while (scan.index < source.length && !atValueEnd(scan, valueQuote)) {
8705
+ chunks.push({ text: readValueText(scan, valueQuote) });
8706
+ if (source[scan.index] === "{")
8707
+ chunks.push({ code: readExpressionTag(scan) });
8708
+ }
8709
+ if (isQuoted)
8710
+ scan.index += 1;
8711
+ return chunks.filter((chunk) => !("text" in chunk) || chunk.text !== "");
8712
+ }, pushDynamicAttribute = (scan, name, chunks) => {
8713
+ if (DIRECTIVE_ATTRIBUTE_RE.test(name) || /^on/i.test(name)) {
8714
+ failAttribute(scan, `an expression in ${name}= (directives and event handlers need Svelte to run them)`);
8715
+ }
8716
+ const tag = chunks.find((chunk) => ("code" in chunk) && /^[#:/@]/.test(chunk.code));
8717
+ if (tag && "code" in tag) {
8718
+ failAttribute(scan, `{${tag.code}} in the ${name}= attribute`);
8719
+ }
8720
+ if (isShadowAttribute(name))
8721
+ scan.shadow += ` ${name}=${SHADOW_VALUE}`;
8722
+ const isClass = name === "class";
8723
+ if (isClass)
8724
+ scan.hasClass = true;
8725
+ const [only] = chunks;
8726
+ const codes = chunks.flatMap((chunk) => ("code" in chunk) ? [`(${chunk.code})`] : []);
8727
+ if (isClass && chunks.length > 1 && codes.length === chunks.length) {
8728
+ scan.literal += helperCall("class", `${HTML_HELPERS}.join(${codes.join(", ")})`);
8729
+ return;
8730
+ }
8731
+ if (chunks.length === 1 && only && "code" in only) {
8732
+ const value = `(${only.code})`;
8733
+ if (name === "class")
8734
+ scan.literal += helperCall("class", value);
8735
+ else if (name === "style")
8736
+ scan.literal += helperCall("style", value);
8737
+ else
8738
+ scan.literal += helperCall("attr", JSON.stringify(name), value, String(BOOLEAN_ATTRIBUTES.has(name)));
8739
+ return;
8740
+ }
8741
+ pushText(scan, ` ${name}="`);
8742
+ for (const chunk of chunks) {
8743
+ if ("code" in chunk)
8744
+ scan.literal += helperCall("part", `(${chunk.code})`);
8745
+ else
8746
+ pushText(scan, chunk.text.replaceAll('"', "&quot;"));
8747
+ }
8748
+ if (isClass)
8749
+ scan.literal += helperCall("scoped");
8750
+ pushText(scan, '"');
8751
+ }, pushStaticAttribute = (scan, whitespace, name, value) => {
8752
+ if (isShadowAttribute(name))
8753
+ scan.shadow += `${whitespace}${name}=${value}`;
8754
+ if (name !== "class") {
8755
+ pushText(scan, `${whitespace}${name}=${value}`);
8756
+ return;
8757
+ }
8758
+ scan.hasClass = true;
8759
+ const [first = ""] = value;
8760
+ const isQuoted = first === '"' || first === "'";
8761
+ const quote = isQuoted ? first : '"';
8762
+ const classes = isQuoted ? value.slice(1, -1) : value;
8763
+ if (classes === "") {
8764
+ scan.literal += helperCall("class", "''");
8765
+ return;
8766
+ }
8767
+ pushText(scan, `${whitespace}${name}=${quote}${classes}`);
8768
+ scan.literal += helperCall("scoped");
8769
+ pushText(scan, quote);
8770
+ }, readAttributeName = (scan) => {
8771
+ const { source } = scan;
8772
+ const start = scan.index;
8773
+ while (scan.index < source.length && !ATTRIBUTE_NAME_END_RE.test(source[scan.index] ?? "")) {
8774
+ scan.index += 1;
8775
+ }
8776
+ return source.slice(start, scan.index);
8777
+ }, skipWhitespace = (scan) => {
8778
+ const start = scan.index;
8779
+ while (/\s/.test(scan.source[scan.index] ?? ""))
8780
+ scan.index += 1;
8781
+ return scan.source.slice(start, scan.index);
8782
+ }, pushTagExpression = (scan) => {
8783
+ const inner = readExpressionTag(scan);
8784
+ if (!/^[A-Za-z_$][\w$]*$/.test(inner)) {
8785
+ failAttribute(scan, `{${inner}} in a start tag`);
8786
+ }
8787
+ pushDynamicAttribute(scan, inner, [{ code: inner }]);
8788
+ }, pushAttribute = (scan) => {
8789
+ const { source } = scan;
8790
+ const whitespace = skipWhitespace(scan);
8791
+ const closing = source.startsWith("/>", scan.index) ? "/>" : ">";
8792
+ const isEnd = scan.index >= source.length;
8793
+ if (isEnd || source.startsWith(closing, scan.index)) {
8794
+ if (!scan.hasClass)
8795
+ scan.literal += helperCall("scope");
8796
+ const tagEnd = isEnd ? "" : closing;
8797
+ pushText(scan, whitespace + tagEnd);
8798
+ scan.shadow += whitespace + (isEnd ? ">" : closing);
8799
+ scan.index += tagEnd.length;
8800
+ return false;
8801
+ }
8802
+ if (source[scan.index] === "{") {
8803
+ pushTagExpression(scan);
8804
+ return true;
8805
+ }
8806
+ const name = readAttributeName(scan);
8807
+ if (!name) {
8808
+ pushText(scan, whitespace + (source[scan.index] ?? ""));
8809
+ scan.index += 1;
8810
+ return true;
8811
+ }
8812
+ const beforeEquals = scan.index;
8813
+ skipWhitespace(scan);
8814
+ if (source[scan.index] !== "=") {
8815
+ scan.index = beforeEquals;
8816
+ pushText(scan, whitespace + name);
8817
+ if (isShadowAttribute(name))
8818
+ scan.shadow += whitespace + name;
8819
+ return true;
8820
+ }
8821
+ scan.index += 1;
8822
+ skipWhitespace(scan);
8823
+ const valueStart = scan.index;
8824
+ const chunks = readAttributeValue(scan);
8825
+ if (chunks.some((chunk) => ("code" in chunk))) {
8826
+ pushDynamicAttribute(scan, name, chunks);
8827
+ return true;
8669
8828
  }
8670
- literal += escapeTemplateLiteral(trimmed.slice(cursor));
8671
- return `\`${literal}\``;
8829
+ pushStaticAttribute(scan, whitespace, name, source.slice(valueStart, scan.index));
8830
+ return true;
8831
+ }, pushStartTag = (scan) => {
8832
+ const { source } = scan;
8833
+ const nameMatch = source.slice(scan.index + 1).match(/^[^\s/>{]+/);
8834
+ const tagName = nameMatch?.[0] ?? "";
8835
+ pushText(scan, `<${tagName}`);
8836
+ scan.shadow += `<${tagName}`;
8837
+ scan.hasClass = RAW_TEXT_ELEMENTS.has(tagName.toLowerCase());
8838
+ scan.index += 1 + tagName.length;
8839
+ while (pushAttribute(scan))
8840
+ ;
8841
+ return tagName.toLowerCase();
8842
+ }, pushRawText = (scan, tagName, shadowStart) => {
8843
+ const { source } = scan;
8844
+ const close = source.toLowerCase().indexOf(`</${tagName}`, scan.index);
8845
+ const closeEnd = close === -1 ? -1 : source.indexOf(">", close);
8846
+ const end = closeEnd === -1 ? source.length : closeEnd + 1;
8847
+ pushText(scan, source.slice(scan.index, end));
8848
+ scan.shadow = scan.shadow.slice(0, shadowStart);
8849
+ scan.index = end;
8850
+ }, pushTextExpression = (scan) => {
8851
+ const inner = readExpressionTag(scan);
8852
+ const rawHtml = inner.match(/^@html\s([\s\S]*)$/);
8853
+ if (rawHtml) {
8854
+ scan.literal += helperCall("html", `(${(rawHtml[1] ?? "").trim()})`);
8855
+ return;
8856
+ }
8857
+ scan.literal += helperCall("text", `(${inner})`);
8858
+ }, pushComment = (scan) => {
8859
+ const close = scan.source.indexOf("-->", scan.index + "<!--".length);
8860
+ const end = close === -1 ? scan.source.length : close + "-->".length;
8861
+ pushText(scan, scan.source.slice(scan.index, end));
8862
+ scan.index = end;
8863
+ }, scanTextPosition = (scan) => {
8864
+ const { index, source } = scan;
8865
+ if (source.startsWith("<!--", index)) {
8866
+ pushComment(scan);
8867
+ return;
8868
+ }
8869
+ if (source[index] === "<" && /[A-Za-z]/.test(source[index + 1] ?? "")) {
8870
+ const shadowStart = scan.shadow.length;
8871
+ const tagName = pushStartTag(scan);
8872
+ if (RAW_TEXT_ELEMENTS.has(tagName))
8873
+ pushRawText(scan, tagName, shadowStart);
8874
+ return;
8875
+ }
8876
+ if (source[index] === "{") {
8877
+ pushTextExpression(scan);
8878
+ return;
8879
+ }
8880
+ const next = source.slice(index + 1).search(/[<{]/);
8881
+ const end = next === -1 ? source.length : index + 1 + next;
8882
+ const text = source.slice(index, end);
8883
+ pushText(scan, text);
8884
+ scan.shadow += (text.match(END_TAG_RE) ?? []).join("");
8885
+ scan.index = end;
8886
+ }, lowerBranch = (markup, branch, filePath) => {
8887
+ const scan = {
8888
+ branch,
8889
+ filePath,
8890
+ hasClass: false,
8891
+ index: 0,
8892
+ literal: "",
8893
+ shadow: "",
8894
+ source: markup.trim()
8895
+ };
8896
+ while (scan.index < scan.source.length)
8897
+ scanTextPosition(scan);
8898
+ return { literal: `\`${scan.literal}\``, shadow: scan.shadow };
8672
8899
  }, fail = (filePath, message) => {
8673
8900
  throw new Error(`${filePath ? `${filePath}: ` : ""}${message} (${AWAIT_STREAM_DIRECTIVE} streams plain HTML; remove the directive to let Svelte render the block and hydrate it)`);
8674
8901
  }, assertPlainHtml = (markup, branch, filePath) => {
8675
8902
  const withoutExpressions = topLevelTags(markup).reduceRight((text, { end, start }) => text.slice(0, start) + text.slice(end), markup);
8676
- const nestedTag = topLevelTags(markup).find(({ text }) => /^\{[#:/@]/.test(text));
8903
+ const nestedTag = topLevelTags(markup).find(({ text }) => /^\{(?:[#:/]|@(?!html\s))/.test(text));
8677
8904
  if (nestedTag || SVELTE_ONLY_MARKUP_RE.test(withoutExpressions)) {
8678
8905
  fail(filePath, `the ${branch} branch of a streamed {#await} holds Svelte markup (${nestedTag?.text ?? withoutExpressions.match(SVELTE_ONLY_MARKUP_RE)?.[0]}\u2026)`);
8679
8906
  }
@@ -8717,12 +8944,16 @@ var AWAIT_STREAM_DIRECTIVE = "<!-- absolute:stream -->", DIRECTIVE_RE, BRANCH_TA
8717
8944
  thenIdentifier: thenMatch?.[2],
8718
8945
  thenMarkup
8719
8946
  };
8720
- }, renderSlot = (block, slotId, dynamic) => {
8947
+ }, renderSlot = (block, slotId, dynamic, filePath) => {
8721
8948
  const thenValueIdentifier = block.thenIdentifier ?? "__awaitValue";
8722
8949
  const catchValueIdentifier = block.catchIdentifier ?? "__awaitError";
8723
- const catchBranch = block.catchMarkup === undefined ? "catch (_absoluteAwaitError) { throw _absoluteAwaitError; }" : `catch (${catchValueIdentifier}) { return ${markupToTemplateLiteral(block.catchMarkup)}; }`;
8724
- return `<AbsoluteAwaitSlot id="${slotId}"${dynamic ? " dynamic" : ""} fallbackHtml={${markupToTemplateLiteral(block.pendingMarkup)}} resolve={async () => { try { const ${thenValueIdentifier} = await (${block.expression}); return ${markupToTemplateLiteral(block.thenMarkup)}; } ${catchBranch} }} />`;
8725
- }, IMPORT_LINE = 'import AbsoluteAwaitSlot from "@absolutejs/absolute/svelte/components/AwaitSlot.svelte";', lowerSvelteAwaitSlotSyntax = (source, filePath) => {
8950
+ const pending = lowerBranch(block.pendingMarkup, "pending", filePath);
8951
+ const then = lowerBranch(block.thenMarkup, "then", filePath);
8952
+ const caught = block.catchMarkup === undefined ? undefined : lowerBranch(block.catchMarkup, "catch", filePath);
8953
+ const catchBranch = caught ? `catch (${catchValueIdentifier}) { return ${caught.literal}; }` : "catch (_absoluteAwaitError) { throw _absoluteAwaitError; }";
8954
+ const shadows = [pending, then, caught].map((branch) => branch ? `<svelte:element this={'div'} data-absolute-slot="true">${branch.shadow}</svelte:element>` : "").join("");
8955
+ return `<AbsoluteAwaitSlot id="${slotId}"${dynamic ? " dynamic" : ""} fallbackHtml={${pending.literal}} resolve={async () => { try { const ${thenValueIdentifier} = await (${block.expression}); return ${then.literal}; } ${catchBranch} }} />{#if ${HTML_HELPERS}.shadow}${shadows}{/if}`;
8956
+ }, IMPORT_LINE = 'import AbsoluteAwaitSlot from "@absolutejs/absolute/svelte/components/AwaitSlot.svelte";', INJECTED_SCRIPT, lowerSvelteAwaitSlotSyntax = (source, filePath) => {
8726
8957
  if (!source.includes("absolute:stream")) {
8727
8958
  return { code: source, transformed: false };
8728
8959
  }
@@ -8737,7 +8968,7 @@ var AWAIT_STREAM_DIRECTIVE = "<!-- absolute:stream -->", DIRECTIVE_RE, BRANCH_TA
8737
8968
  const slotId = `absolute-svelte-await-${awaitIndex.toString(BASE_36_RADIX)}`;
8738
8969
  awaitIndex += 1;
8739
8970
  lowered += source.slice(cursor, directive.index);
8740
- lowered += renderSlot(block, slotId, directive[1] !== undefined);
8971
+ lowered += renderSlot(block, slotId, directive[1] !== undefined, filePath);
8741
8972
  cursor = block.end;
8742
8973
  }
8743
8974
  if (awaitIndex === 0) {
@@ -8747,14 +8978,14 @@ var AWAIT_STREAM_DIRECTIVE = "<!-- absolute:stream -->", DIRECTIVE_RE, BRANCH_TA
8747
8978
  if (lowered.includes("<script")) {
8748
8979
  return {
8749
8980
  code: lowered.replace(/<script(\s[^>]*)?>/, (match) => `${match}
8750
- ${IMPORT_LINE}
8981
+ ${INJECTED_SCRIPT}
8751
8982
  `),
8752
8983
  transformed: true
8753
8984
  };
8754
8985
  }
8755
8986
  return {
8756
8987
  code: `<script lang="ts">
8757
- ${IMPORT_LINE}
8988
+ ${INJECTED_SCRIPT}
8758
8989
  </script>
8759
8990
  ${lowered}`,
8760
8991
  transformed: true
@@ -8766,6 +8997,64 @@ var init_lowerAwaitSlotSyntax = __esm(() => {
8766
8997
  BRANCH_TAG_RE = /^\{:(then|catch)(?:\s+([A-Za-z_$][\w$]*))?\s*\}$/;
8767
8998
  SVELTE_ONLY_MARKUP_RE = /\{[#:/@]|<[A-Z]|<svelte:/;
8768
8999
  QUOTES = new Set(['"', "'", "`"]);
9000
+ AWAIT_HTML_HELPERS_SOURCE = [
9001
+ `const ${HTML_HELPERS} = (() => {`,
9002
+ ` const scope = ${JSON.stringify(AWAIT_SCOPE_CLASS_PLACEHOLDER)};`,
9003
+ ` const escape = (value, isAttr) => String(value ?? '').replace(isAttr ? /[&"<]/g : /[&<]/g, (char) => char === '&' ? '&amp;' : char === '"' ? '&quot;' : '&lt;');`,
9004
+ "\tconst stringify = (value) => typeof value === 'string' ? value : value == null ? '' : value + '';",
9005
+ "\tconst classNames = (value) => { if (Array.isArray(value)) return value.filter(Boolean).map(classNames).filter(Boolean).join(' '); if (value && typeof value === 'object') return Object.keys(value).filter((key) => value[key]).join(' '); return typeof value === 'string' || typeof value === 'number' ? String(value) : ''; };",
9006
+ "\treturn {",
9007
+ ` attr: (name, value, isBoolean) => { const boolean = isBoolean || (name === 'hidden' && value !== 'until-found'); if (value == null || (!value && boolean)) return ''; const normalized = name === 'translate' && typeof value === 'boolean' ? (value ? 'yes' : 'no') : value; return boolean ? ' ' + name + '=""' : ' ' + name + '="' + escape(normalized, true) + '"'; },`,
9008
+ ` class: (value) => { const resolved = typeof value === 'object' ? classNames(value) : value ?? ''; let name = '' + resolved; if (scope) name = name ? name + ' ' + scope : scope; return name ? ' class="' + escape(name, true) + '"' : ''; },`,
9009
+ "\t\thtml: (value) => String(value ?? ''),",
9010
+ "\t\tjoin: (...values) => values.map(stringify).join(''),",
9011
+ "\t\tpart: (value) => escape(stringify(value), true),",
9012
+ ` scope: () => scope ? ' class="' + scope + '"' : '',`,
9013
+ "\t\tscoped: () => scope ? ' ' + scope : '',",
9014
+ "\t\tshadow: false,",
9015
+ ` style: (value) => { const style = value == null ? '' : String(value); return style ? ' style="' + escape(style, true) + '"' : ''; },`,
9016
+ "\t\ttext: (value) => escape(value, false)",
9017
+ "\t};",
9018
+ "})();"
9019
+ ].join(`
9020
+ `);
9021
+ BOOLEAN_ATTRIBUTES = new Set([
9022
+ "allowfullscreen",
9023
+ "async",
9024
+ "autofocus",
9025
+ "autoplay",
9026
+ "checked",
9027
+ "controls",
9028
+ "default",
9029
+ "defer",
9030
+ "disabled",
9031
+ "disablepictureinpicture",
9032
+ "disableremoteplayback",
9033
+ "formnovalidate",
9034
+ "indeterminate",
9035
+ "inert",
9036
+ "ismap",
9037
+ "loop",
9038
+ "multiple",
9039
+ "muted",
9040
+ "nomodule",
9041
+ "novalidate",
9042
+ "open",
9043
+ "playsinline",
9044
+ "readonly",
9045
+ "required",
9046
+ "reversed",
9047
+ "seamless",
9048
+ "selected",
9049
+ "webkitdirectory"
9050
+ ]);
9051
+ DIRECTIVE_ATTRIBUTE_RE = /^(?:animate|bind|class|in|let|on|out|style|transition|use):/;
9052
+ ATTRIBUTE_NAME_END_RE = /[\s=>/{]/;
9053
+ RAW_TEXT_ELEMENTS = new Set(["script", "style"]);
9054
+ SHADOW_VALUE = `{${HTML_HELPERS}.shadow}`;
9055
+ END_TAG_RE = /<\/[A-Za-z][^\s>]*\s*>/g;
9056
+ INJECTED_SCRIPT = `${IMPORT_LINE}
9057
+ ${AWAIT_HTML_HELPERS_SOURCE}`;
8769
9058
  });
8770
9059
 
8771
9060
  // src/svelte/router/lazyModule.ts
@@ -8961,15 +9250,18 @@ var serverCacheRoot2, compiledModuleCache2, originalSourcePathCache, syncIslandG
8961
9250
  for (const [spec, resolvedModuleImport] of rewrittenModulePaths) {
8962
9251
  transpiled = replaceQuotedSpecifier(transpiled, spec, resolvedModuleImport);
8963
9252
  }
8964
- let compiledCode = compile(transpiled, {
9253
+ const scopeClass = createAwaitScopeClassCapture();
9254
+ const compiledServer = compile(transpiled, {
8965
9255
  css: "injected",
9256
+ cssHash: scopeClass.cssHash,
8966
9257
  experimental: {
8967
9258
  async: loweredAwaitSource.transformed || loweredSource.transformed
8968
9259
  },
8969
9260
  filename: resolutionSourcePath,
8970
9261
  generate: "server",
8971
9262
  hmr: isDevelopmentRuntime()
8972
- }).js.code;
9263
+ });
9264
+ let compiledCode = scopeClass.apply(compiledServer.js.code);
8973
9265
  for (const [spec, compiledChildPath] of childModulePaths) {
8974
9266
  compiledCode = replaceQuotedSpecifier(compiledCode, spec, ensureRelativeImportPath(getCachedModulePath2(sourcePath), compiledChildPath));
8975
9267
  }
@@ -11268,6 +11560,11 @@ var SPA_ROUTES_KEY = "__absoluteSpaRoutes", setSpaRouteManifest = (hosts) => {
11268
11560
  }, isRuntimeSpaHost = (value) => typeof value === "object" && value !== null && typeof Reflect.get(value, "framework") === "string", getSpaRouteManifest = () => {
11269
11561
  const value = Reflect.get(globalThis, SPA_ROUTES_KEY);
11270
11562
  return Array.isArray(value) ? value.filter(isRuntimeSpaHost) : [];
11563
+ }, OBSERVED_SPA_ROUTES_KEY = "__absoluteObservedSpaRoutes", getObservedSpaRoutes = () => {
11564
+ const value = Reflect.get(globalThis, OBSERVED_SPA_ROUTES_KEY);
11565
+ return Array.isArray(value) ? value.filter(isRuntimeSpaHost) : [];
11566
+ }, setObservedSpaRoutes = (hosts) => {
11567
+ Reflect.set(globalThis, OBSERVED_SPA_ROUTES_KEY, hosts);
11271
11568
  }, normalizePath = (path) => {
11272
11569
  const withLeadingSlash = path.startsWith("/") ? path : `/${path}`;
11273
11570
  const trimmed = withLeadingSlash.replace(/\/+$/, "");
@@ -16817,43 +17114,91 @@ var describe = (path, root) => relative16(root, path) || path, includeError = (c
16817
17114
  include chain: ${context.chain.map((path) => describe(path, context.root)).join(" \u2192 ")}`), findTagClose = (html, start) => {
16818
17115
  const match = /^<[^>"']*(?:(?:"[^"]*"|'[^']*')[^>"']*)*>/.exec(html.slice(start));
16819
17116
  return match ? start + match[0].length : -1;
16820
- }, findElement = (html, tag, from) => {
16821
- const opening = new RegExp(`<${tag}(?=[\\s/>])`, "gi");
16822
- opening.lastIndex = from;
16823
- const first = opening.exec(html);
16824
- if (!first)
17117
+ }, readOpeningTag = (html, tag, start) => {
17118
+ const end = findTagClose(html, start);
17119
+ const raw = html.slice(start + tag.length + 1, end === -1 ? html.length : end - 1);
17120
+ const selfClosing = end !== -1 && raw.trimEnd().endsWith("/");
17121
+ const opening = {
17122
+ attributes: selfClosing ? raw.trimEnd().slice(0, -1) : raw,
17123
+ closing: false,
17124
+ end,
17125
+ selfClosing,
17126
+ start
17127
+ };
17128
+ return opening;
17129
+ }, nextTag = (html, tag, from) => {
17130
+ const tokens = new RegExp(`<${tag}(?=[\\s/>])|</${tag}\\s*>`, "gi");
17131
+ tokens.lastIndex = from;
17132
+ const token = tokens.exec(html);
17133
+ if (!token)
16825
17134
  return null;
16826
- const tagEnd = findTagClose(html, first.index);
16827
- if (tagEnd === -1)
17135
+ if (!token[0].startsWith("</"))
17136
+ return readOpeningTag(html, tag, token.index);
17137
+ const closing = {
17138
+ attributes: "",
17139
+ closing: true,
17140
+ end: token.index + token[0].length,
17141
+ selfClosing: false,
17142
+ start: token.index
17143
+ };
17144
+ return closing;
17145
+ }, depthChange = (token) => {
17146
+ if (token.selfClosing)
17147
+ return 0;
17148
+ return token.closing ? -1 : 1;
17149
+ }, findElement = (html, tag, from) => {
17150
+ let open = nextTag(html, tag, from);
17151
+ while (open?.closing)
17152
+ open = nextTag(html, tag, open.end);
17153
+ if (!open || open.end === -1)
16828
17154
  return null;
16829
- const attributes = html.slice(first.index + tag.length + 1, tagEnd - 1);
16830
- if (attributes.trimEnd().endsWith("/")) {
16831
- const selfClosing = {
16832
- attributes: attributes.trimEnd().slice(0, -1),
16833
- end: tagEnd,
17155
+ if (open.selfClosing) {
17156
+ const empty = {
17157
+ attributes: open.attributes,
17158
+ end: open.end,
16834
17159
  inner: "",
16835
- start: first.index
17160
+ start: open.start
16836
17161
  };
16837
- return selfClosing;
17162
+ return empty;
16838
17163
  }
16839
- const tokens = new RegExp(`<${tag}(?=[\\s/>])|</${tag}\\s*>`, "gi");
16840
- tokens.lastIndex = tagEnd;
16841
17164
  let depth = 1;
16842
- let token = tokens.exec(html);
16843
- while (token && depth > 0) {
16844
- depth += token[0].startsWith("</") ? -1 : 1;
16845
- if (depth > 0)
16846
- token = tokens.exec(html);
17165
+ let token = nextTag(html, tag, open.end);
17166
+ while (token && token.end !== -1) {
17167
+ depth += depthChange(token);
17168
+ if (depth === 0)
17169
+ break;
17170
+ token = nextTag(html, tag, token.end);
16847
17171
  }
16848
- if (!token)
17172
+ if (!token || token.end === -1)
16849
17173
  return null;
16850
17174
  const element = {
16851
- attributes,
16852
- end: token.index + token[0].length,
16853
- inner: html.slice(tagEnd, token.index),
16854
- start: first.index
17175
+ attributes: open.attributes,
17176
+ end: token.end,
17177
+ inner: html.slice(open.end, token.start),
17178
+ start: open.start
16855
17179
  };
16856
17180
  return element;
17181
+ }, lineOf = (html, index) => html.slice(0, index).split(`
17182
+ `).length, assertBalanced = (html, tag, file, context) => {
17183
+ const open = [];
17184
+ let token = nextTag(html, tag, 0);
17185
+ while (token) {
17186
+ const where = `${describe(file, context.root)}:${lineOf(html, token.start)}`;
17187
+ if (token.end === -1)
17188
+ throw includeError(context, `Unterminated <${tag}> tag in ${where}`);
17189
+ if (token.closing && !open.pop())
17190
+ throw includeError(context, `</${tag}> without a matching <${tag}> in ${where}`);
17191
+ if (!token.closing && !token.selfClosing)
17192
+ open.push(token);
17193
+ token = nextTag(html, tag, token.end);
17194
+ }
17195
+ const [unclosed] = open;
17196
+ if (!unclosed)
17197
+ return;
17198
+ throw includeError(context, `Unclosed <${tag}${unclosed.attributes.trimEnd()}> in ${describe(file, context.root)}:${lineOf(html, unclosed.start)}: close it with </${tag}> or make it self-closing (<${tag} \u2026 />)`);
17199
+ }, INCLUDE_TAGS, assertIncludeTagsBalanced = (html, file, context) => {
17200
+ for (const tag of INCLUDE_TAGS)
17201
+ assertBalanced(html, tag, file, context);
16857
17202
  }, readAttribute = (attributes, name) => new RegExp(`(?:^|\\s)${name}\\s*=\\s*(?:"([^"]*)"|'([^']*)')`, "i").exec(attributes)?.slice(1).find((value) => value !== undefined), replaceElements = (html, tag, replace) => {
16858
17203
  let output = "";
16859
17204
  let cursor = 0;
@@ -16895,6 +17240,7 @@ var describe = (path, root) => relative16(root, path) || path, includeError = (c
16895
17240
  throw includeError({ ...context, chain }, `<abs-include src="${src}"> in ${describe(file, context.root)}: file not found (${target})`);
16896
17241
  }
16897
17242
  context.dependencies.add(target);
17243
+ assertIncludeTagsBalanced(source, target, { ...context, chain });
16898
17244
  const values = new Map([...collectSlotValues(element.inner)].map(([name, value]) => [
16899
17245
  name,
16900
17246
  expandWithin(value, file, context)
@@ -16919,10 +17265,13 @@ var describe = (path, root) => relative16(root, path) || path, includeError = (c
16919
17265
  readFile: options.readFile ?? readUtf8,
16920
17266
  root: options.root ?? process.cwd()
16921
17267
  };
17268
+ assertIncludeTagsBalanced(html, file, context);
16922
17269
  const expanded = expandWithin(html, file, context);
16923
17270
  return { dependencies: [...context.dependencies], html: expanded };
16924
17271
  };
16925
- var init_htmlIncludes = () => {};
17272
+ var init_htmlIncludes = __esm(() => {
17273
+ INCLUDE_TAGS = ["abs-include", "abs-slot"];
17274
+ });
16926
17275
 
16927
17276
  // src/build/spaSideManifests.ts
16928
17277
  import { writeFile as writeFile7 } from "fs/promises";
@@ -17541,6 +17890,8 @@ var init_routing = __esm(() => {
17541
17890
  // src/angular/staticAnalyzeSpaRoutes.ts
17542
17891
  var exports_staticAnalyzeSpaRoutes = {};
17543
17892
  __export(exports_staticAnalyzeSpaRoutes, {
17893
+ analyzeAngularColocatedRouteFile: () => analyzeAngularColocatedRouteFile,
17894
+ analyzeAngularColocatedRoutes: () => analyzeAngularColocatedRoutes,
17544
17895
  analyzeAngularSpaRouteFile: () => analyzeAngularSpaRouteFile,
17545
17896
  analyzeAngularSpaRoutes: () => analyzeAngularSpaRoutes
17546
17897
  });
@@ -17728,6 +18079,47 @@ var DYNAMIC_SEGMENT_PATTERN, pathHasDynamic = (path) => path.split("/").some((se
17728
18079
  routes,
17729
18080
  sourceFile: filePath
17730
18081
  };
18082
+ }, unwrapExpression = (expression) => {
18083
+ if (lazyTypescript.isAsExpression(expression) || lazyTypescript.isSatisfiesExpression(expression) || lazyTypescript.isParenthesizedExpression(expression))
18084
+ return unwrapExpression(expression.expression);
18085
+ return expression;
18086
+ }, findColocatedRoutesArray = (sourceFile) => {
18087
+ for (const statement of sourceFile.statements) {
18088
+ if (!lazyTypescript.isVariableStatement(statement))
18089
+ continue;
18090
+ const exported = statement.modifiers?.some((modifier) => modifier.kind === lazyTypescript.SyntaxKind.ExportKeyword);
18091
+ if (!exported)
18092
+ continue;
18093
+ for (const declaration of statement.declarationList.declarations) {
18094
+ if (!lazyTypescript.isIdentifier(declaration.name))
18095
+ continue;
18096
+ if (declaration.name.text !== "routes")
18097
+ continue;
18098
+ if (!declaration.initializer)
18099
+ continue;
18100
+ const initializer = unwrapExpression(declaration.initializer);
18101
+ if (lazyTypescript.isArrayLiteralExpression(initializer))
18102
+ return initializer;
18103
+ }
18104
+ }
18105
+ return null;
18106
+ }, COLOCATED_ROUTES_EXPORT, analyzeAngularColocatedRouteFile = async (filePath) => {
18107
+ let source;
18108
+ try {
18109
+ source = await fs.readFile(filePath, "utf-8");
18110
+ } catch {
18111
+ return null;
18112
+ }
18113
+ if (!COLOCATED_ROUTES_EXPORT.test(source))
18114
+ return null;
18115
+ const sourceFile = lazyTypescript.createSourceFile(filePath, source, lazyTypescript.ScriptTarget.Latest, true, lazyTypescript.ScriptKind.TS);
18116
+ const routesArray = findColocatedRoutesArray(sourceFile);
18117
+ if (!routesArray)
18118
+ return null;
18119
+ const routes = [];
18120
+ extractRoutePaths(routesArray, "", false, routes);
18121
+ const host = { baseHref: "/", routes, sourceFile: filePath };
18122
+ return host;
17731
18123
  }, walkTsFiles = async (dir, files) => {
17732
18124
  let items;
17733
18125
  try {
@@ -17749,6 +18141,22 @@ var DYNAMIC_SEGMENT_PATTERN, pathHasDynamic = (path) => path.split("/").some((se
17749
18141
  }
17750
18142
  }
17751
18143
  await Promise.all(directories.map((directory) => walkTsFiles(directory, files)));
18144
+ }, analyzeAngularColocatedRoutes = async (angularDirectory) => {
18145
+ if (!existsSync27(angularDirectory))
18146
+ return [];
18147
+ const tsFiles = [];
18148
+ await walkTsFiles(angularDirectory, tsFiles);
18149
+ const pages = [];
18150
+ await Promise.all(tsFiles.map(async (file) => {
18151
+ try {
18152
+ if (await analyzeAngularSpaRouteFile(file))
18153
+ return;
18154
+ const page = await analyzeAngularColocatedRouteFile(file);
18155
+ if (page)
18156
+ pages.push(page);
18157
+ } catch {}
18158
+ }));
18159
+ return pages;
17752
18160
  }, analyzeAngularSpaRoutes = async (angularDirectory) => {
17753
18161
  if (!existsSync27(angularDirectory))
17754
18162
  return [];
@@ -17769,6 +18177,7 @@ var DYNAMIC_SEGMENT_PATTERN, pathHasDynamic = (path) => path.split("/").some((se
17769
18177
  var init_staticAnalyzeSpaRoutes = __esm(() => {
17770
18178
  init_lazyTypescript();
17771
18179
  DYNAMIC_SEGMENT_PATTERN = /^[:*]/;
18180
+ COLOCATED_ROUTES_EXPORT = /\bexport\s+(?:const|let|var)\s+routes\b/;
17772
18181
  });
17773
18182
 
17774
18183
  // src/react/staticAnalyzeSpaRoutes.ts
@@ -23498,13 +23907,13 @@ var SKIP_DIRS2, SOURCE_EXTENSIONS3, getScriptKind3 = (filePath) => {
23498
23907
  return name.text;
23499
23908
  }
23500
23909
  return null;
23501
- }, unwrapExpression = (node) => {
23910
+ }, unwrapExpression2 = (node) => {
23502
23911
  if (lazyTypescript.isAsExpression(node) || lazyTypescript.isSatisfiesExpression(node) || lazyTypescript.isParenthesizedExpression(node) || lazyTypescript.isTypeAssertionExpression(node)) {
23503
- return unwrapExpression(node.expression);
23912
+ return unwrapExpression2(node.expression);
23504
23913
  }
23505
23914
  return node;
23506
23915
  }, readLiteral = (node) => {
23507
- const inner = unwrapExpression(node);
23916
+ const inner = unwrapExpression2(node);
23508
23917
  if (lazyTypescript.isStringLiteral(inner) || lazyTypescript.isNoSubstitutionTemplateLiteral(inner)) {
23509
23918
  return inner.text;
23510
23919
  }
@@ -23523,7 +23932,7 @@ var SKIP_DIRS2, SOURCE_EXTENSIONS3, getScriptKind3 = (filePath) => {
23523
23932
  lazyTypescript.forEachChild(sourceFile, visit);
23524
23933
  return constants;
23525
23934
  }, readStringValue = (node, constants) => {
23526
- const inner = unwrapExpression(node);
23935
+ const inner = unwrapExpression2(node);
23527
23936
  if (lazyTypescript.isIdentifier(inner))
23528
23937
  return constants.get(inner.text) ?? null;
23529
23938
  return readLiteral(inner);
@@ -24296,6 +24705,7 @@ var withResolvedSources = (map, sourceFile) => {
24296
24705
  };
24297
24706
  const generate = (mode) => {
24298
24707
  const transpiled = mode === "server" ? transpiledServer : transpiledClient;
24708
+ const scopeClass = createAwaitScopeClassCapture();
24299
24709
  const compiled = isModule ? compileModule(transpiled, {
24300
24710
  dev: mode === "client" && dev,
24301
24711
  experimental: {
@@ -24304,6 +24714,7 @@ var withResolvedSources = (map, sourceFile) => {
24304
24714
  filename: src
24305
24715
  }) : compile(transpiled, {
24306
24716
  css: externalCss && mode === "client" ? "external" : "injected",
24717
+ cssHash: scopeClass.cssHash,
24307
24718
  dev: mode === "client" && dev,
24308
24719
  experimental: {
24309
24720
  async: transformedByLowering
@@ -24313,7 +24724,7 @@ var withResolvedSources = (map, sourceFile) => {
24313
24724
  hmr: isDev
24314
24725
  });
24315
24726
  const compiledJs = compiled.js;
24316
- let code = compiledJs.code.replace(/\.svelte(?:\.(?:ts|js))?(['"])/g, ".js$1");
24727
+ let code = scopeClass.apply(compiledJs.code).replace(/\.svelte(?:\.(?:ts|js))?(['"])/g, ".js$1");
24317
24728
  if (mode === "client" && isDev) {
24318
24729
  const moduleKey = `/@src/${relative24(process.cwd(), src).replace(/\\/g, "/")}`;
24319
24730
  code = code.replace(/if\s*\(import\.meta\.hot\)\s*\{/, `if (typeof window !== "undefined") {
@@ -26583,10 +26994,10 @@ var isInterpolatedExpressionStart = (value, index) => value[index] === "{" && va
26583
26994
  }
26584
26995
  return {
26585
26996
  content: parsedBlock.content.trim(),
26586
- nextIndex: input.keyword === "@placeholder" ? skipWhitespace(input.template, parsedBlock.nextIndex) : parsedBlock.nextIndex
26997
+ nextIndex: input.keyword === "@placeholder" ? skipWhitespace2(input.template, parsedBlock.nextIndex) : parsedBlock.nextIndex
26587
26998
  };
26588
26999
  }, resolveDeferSlotStart = (template, deferIndex, markerCursor) => {
26589
- const nextMarkerCursor = skipWhitespace(template, markerCursor);
27000
+ const nextMarkerCursor = skipWhitespace2(template, markerCursor);
26590
27001
  if (template[nextMarkerCursor] === "{") {
26591
27002
  return {
26592
27003
  changed: false,
@@ -26811,7 +27222,7 @@ var isInterpolatedExpressionStart = (value, index) => value[index] === "{" && va
26811
27222
  template: resolvedBlockState.template
26812
27223
  };
26813
27224
  }
26814
- const blockContent = parsePlaceholderAndErrorBlocks(template, skipWhitespace(template, resolvedBlock.nextIndex));
27225
+ const blockContent = parsePlaceholderAndErrorBlocks(template, skipWhitespace2(template, resolvedBlock.nextIndex));
26815
27226
  const builtSlot = buildDeferredSlot({
26816
27227
  cursorAfterResolved: blockContent.cursorAfterResolved,
26817
27228
  errorHtml: blockContent.errorHtml,
@@ -26841,14 +27252,14 @@ var isInterpolatedExpressionStart = (value, index) => value[index] === "{" && va
26841
27252
  ({ cursor, depth } = consumed);
26842
27253
  }
26843
27254
  return { content: value.slice(start + 1), nextIndex: value.length };
26844
- }, skipWhitespace = (value, index) => {
27255
+ }, skipWhitespace2 = (value, index) => {
26845
27256
  let cursor = index;
26846
27257
  while (cursor < value.length && /\s/.test(value[cursor] ?? "")) {
26847
27258
  cursor += 1;
26848
27259
  }
26849
27260
  return cursor;
26850
27261
  }, parseOptionalParenthesizedBlock = (value, index) => {
26851
- let cursor = skipWhitespace(value, index);
27262
+ let cursor = skipWhitespace2(value, index);
26852
27263
  if (value[cursor] !== "(") {
26853
27264
  return null;
26854
27265
  }
@@ -26912,7 +27323,7 @@ var isInterpolatedExpressionStart = (value, index) => value[index] === "{" && va
26912
27323
  return null;
26913
27324
  }
26914
27325
  const blockKeywordCursor = cursorAfterResolved + keyword.length;
26915
- const blockStart = skipWhitespace(template, blockKeywordCursor);
27326
+ const blockStart = skipWhitespace2(template, blockKeywordCursor);
26916
27327
  if (template[blockStart] !== "{") {
26917
27328
  return null;
26918
27329
  }
@@ -27574,7 +27985,7 @@ ${importLine}${source.slice(insertAt)}`;
27574
27985
  const rawExpression = value.slice(interpolationStart + 2, nextCursor - 2).trim();
27575
27986
  const expression = rawExpression.length === 0 ? "''" : rawExpression;
27576
27987
  const expressionLiteral = JSON.stringify(expression);
27577
- parts.push(`\${this.__absoluteDeferResolveTemplateExpression(${expressionLiteral})}`);
27988
+ parts.push(`\${this.__absoluteDeferEscapeHtml(this.__absoluteDeferResolveTemplateExpression(${expressionLiteral}))}`);
27578
27989
  cursor = nextCursor;
27579
27990
  }
27580
27991
  return parts.join("");
@@ -27605,6 +28016,10 @@ ${importLine}${source.slice(insertAt)}`;
27605
28016
  ` + ` return value;
27606
28017
  ` + ` }
27607
28018
 
28019
+ ` + ` __absoluteDeferEscapeHtml(value: string) {
28020
+ ` + ` return value.replace(/[&<>"']/g, (char) => char === '&' ? '&amp;' : char === '<' ? '&lt;' : char === '>' ? '&gt;' : char === '"' ? '&quot;' : '&#39;');
28021
+ ` + ` }
28022
+
27608
28023
  `, buildDeferSlotFields = (slots) => [
27609
28024
  buildDeferSlotTemplateResolver(),
27610
28025
  ...slots.map((slot, index) => {
@@ -31511,6 +31926,11 @@ ${offenders.map((o) => ` \u2022 ${o}`).join(`
31511
31926
  }))
31512
31927
  ];
31513
31928
  setSpaRouteManifest(spaRouteHosts);
31929
+ const observedAngularHosts = isDev && angularDir ? await Promise.resolve().then(() => (init_staticAnalyzeSpaRoutes(), {})).then((module) => analyzeAngularColocatedRoutes(angularDir)) : [];
31930
+ setObservedSpaRoutes(observedAngularHosts.map((host) => ({
31931
+ ...host,
31932
+ framework: "angular"
31933
+ })));
31514
31934
  writeFileSync16(join64(buildPath, "spa-routes.json"), JSON.stringify(spaRouteHosts, null, "\t"));
31515
31935
  if (isIncremental) {
31516
31936
  writeBuildTrace(buildPath);
@@ -33232,7 +33652,7 @@ var init_assetStore = __esm(() => {
33232
33652
  ".css": "text/css",
33233
33653
  ".eot": "application/vnd.ms-fontobject",
33234
33654
  ".gif": "image/gif",
33235
- ".html": "text/html",
33655
+ ".html": "text/html; charset=utf-8",
33236
33656
  ".ico": "image/x-icon",
33237
33657
  ".jpeg": "image/jpeg",
33238
33658
  ".jpg": "image/jpeg",
@@ -33674,10 +34094,15 @@ var normalizePath3 = (path) => resolve61(path).replace(/\\/g, "/"), owningFramew
33674
34094
  default:
33675
34095
  return null;
33676
34096
  }
34097
+ }, analyzeObservedFile = async (framework, file) => {
34098
+ if (framework !== "angular")
34099
+ return null;
34100
+ return (await Promise.resolve().then(() => (init_staticAnalyzeSpaRoutes(), exports_staticAnalyzeSpaRoutes))).analyzeAngularColocatedRouteFile(file);
33677
34101
  }, readHost = async (framework, file) => {
33678
34102
  try {
33679
34103
  const host = await analyzeFile(framework, file);
33680
- return { host };
34104
+ const observed = host ? null : await analyzeObservedFile(framework, file);
34105
+ return { host, observed };
33681
34106
  } catch (error) {
33682
34107
  logWarn(`Could not re-read SPA routes from ${file}: ${error instanceof Error ? error.message : String(error)}`);
33683
34108
  return null;
@@ -33689,43 +34114,73 @@ var normalizePath3 = (path) => resolve61(path).replace(/\\/g, "/"), owningFramew
33689
34114
  added: [...afterPaths].filter((path) => !beforePaths.has(path)),
33690
34115
  removed: [...beforePaths].filter((path) => !afterPaths.has(path))
33691
34116
  };
33692
- }, refreshSpaRoutesForFiles = async (files, paths) => {
34117
+ }, findHost = (hosts, framework, file) => hosts.find((host) => host.framework === framework && normalizePath3(host.sourceFile) === file), replaceHost = (hosts, change, next) => {
34118
+ const previous = findHost(hosts, change.framework, change.file);
34119
+ return [
34120
+ ...hosts.filter((host) => host !== previous),
34121
+ ...next ? [{ ...next, framework: change.framework }] : []
34122
+ ];
34123
+ }, writeRouteTable = async (hosts, paths) => {
34124
+ setSpaRouteManifest(hosts);
34125
+ try {
34126
+ await writeFile16(join70(paths.buildDir, "spa-routes.json"), JSON.stringify(hosts, null, "\t"));
34127
+ } catch {}
34128
+ }, publishRouteChanges = async (pending, paths) => {
34129
+ if (pending.length === 0)
34130
+ return;
34131
+ let hosts = getSpaRouteManifest();
34132
+ let observed = getObservedSpaRoutes();
34133
+ let enforcedChanged = false;
34134
+ for (const change of pending) {
34135
+ const previous = findHost(hosts, change.framework, change.file);
34136
+ if (hostSignature(previous) !== hostSignature(change.next))
34137
+ enforcedChanged = true;
34138
+ hosts = replaceHost(hosts, change, change.next);
34139
+ observed = replaceHost(observed, change, change.nextObserved);
34140
+ }
34141
+ setObservedSpaRoutes(observed);
34142
+ if (enforcedChanged)
34143
+ await writeRouteTable(hosts, paths);
34144
+ for (const change of pending) {
34145
+ logRoutesUpdate(change.file, change.framework, change.added, change.removed);
34146
+ }
34147
+ }, readSpaRouteChanges = async (files, paths) => {
33693
34148
  const candidates = [...new Set(files.map(normalizePath3))].flatMap((file) => {
33694
34149
  const framework = owningFramework(file, paths);
33695
34150
  return framework ? [{ file, framework }] : [];
33696
34151
  });
33697
- if (candidates.length === 0)
33698
- return [];
33699
- let hosts = getSpaRouteManifest();
33700
- const changes = [];
34152
+ const hosts = getSpaRouteManifest();
34153
+ const observed = getObservedSpaRoutes();
34154
+ const pending = [];
33701
34155
  await Promise.all(candidates.map(async ({ file, framework }) => {
33702
34156
  const read = await readHost(framework, file);
33703
34157
  if (!read)
33704
34158
  return;
33705
- const next = read.host;
33706
- const previous = hosts.find((host) => host.framework === framework && normalizePath3(host.sourceFile) === file);
33707
- if (hostSignature(previous) === hostSignature(next ?? undefined))
34159
+ const previous = findHost(hosts, framework, file);
34160
+ const previousObserved = findHost(observed, framework, file);
34161
+ if (hostSignature(previous) === hostSignature(read.host) && hostSignature(previousObserved) === hostSignature(read.observed))
33708
34162
  return;
33709
- hosts = [
33710
- ...hosts.filter((host) => host !== previous),
33711
- ...next ? [{ ...next, framework }] : []
33712
- ];
33713
- changes.push({
34163
+ pending.push({
33714
34164
  file,
33715
34165
  framework,
33716
- ...diffRoutes(previous, next ?? undefined)
34166
+ next: read.host,
34167
+ nextObserved: read.observed,
34168
+ ...diffRoutes(previous ?? previousObserved, read.host ?? read.observed)
33717
34169
  });
33718
34170
  }));
33719
- if (changes.length === 0)
33720
- return changes;
33721
- setSpaRouteManifest(hosts);
33722
- try {
33723
- await writeFile16(join70(paths.buildDir, "spa-routes.json"), JSON.stringify(hosts, null, "\t"));
33724
- } catch {}
33725
- for (const change of changes) {
33726
- logRoutesUpdate(change.file, change.framework, change.added, change.removed);
33727
- }
33728
- return changes;
34171
+ const changes = pending.map(({ added, file, framework, removed }) => ({
34172
+ added,
34173
+ file,
34174
+ framework,
34175
+ removed
34176
+ }));
34177
+ const publish = async (frameworks) => {
34178
+ const batch = pending.filter((change) => !frameworks || frameworks.includes(change.framework));
34179
+ for (const change of batch)
34180
+ pending.splice(pending.indexOf(change), 1);
34181
+ await publishRouteChanges(batch, paths);
34182
+ };
34183
+ return { changes, publish };
33729
34184
  };
33730
34185
  var init_spaRouteRefresh = __esm(() => {
33731
34186
  init_logger();
@@ -34583,8 +35038,10 @@ ${code}`;
34583
35038
  }).js.code;
34584
35039
  }, compileSvelteComponent = (raw, filePath, projectRoot, enableAsync = false) => {
34585
35040
  const compiler = getLoadedSvelteCompiler();
35041
+ const scopeClass = createAwaitScopeClassCapture();
34586
35042
  const compiled = compiler.compile(raw, {
34587
35043
  css: "external",
35044
+ cssHash: scopeClass.cssHash,
34588
35045
  dev: true,
34589
35046
  experimental: {
34590
35047
  async: enableAsync
@@ -34593,7 +35050,7 @@ ${code}`;
34593
35050
  generate: "client",
34594
35051
  hmr: true
34595
35052
  });
34596
- let { code } = compiled.js;
35053
+ let code = scopeClass.apply(compiled.js.code);
34597
35054
  if (compiled.css?.code) {
34598
35055
  const cssPath = `${filePath}.css`;
34599
35056
  svelteExternalCss.set(cssPath, compiled.css.code);
@@ -35346,6 +35803,7 @@ var emberCacheBuster = 0, invalidateEmberSsrCache = () => {
35346
35803
  emberCacheBuster = Date.now();
35347
35804
  };
35348
35805
  var init_pageHandler = __esm(() => {
35806
+ init_constants();
35349
35807
  init_escapeScriptContent();
35350
35808
  init_cspNonceRef();
35351
35809
  init_pageResponseCache();
@@ -36327,7 +36785,7 @@ var records, recordFor = (path) => {
36327
36785
  for (const update of updates)
36328
36786
  update(value);
36329
36787
  }
36330
- }, managedModulePaths = () => [...records.keys()], moduleRecord = (path) => records.get(path), nextTag = (path) => {
36788
+ }, managedModulePaths = () => [...records.keys()], moduleRecord = (path) => records.get(path), nextTag2 = (path) => {
36331
36789
  const record = recordFor(path);
36332
36790
  record.tag += 1;
36333
36791
  return record.tag;
@@ -36462,7 +36920,7 @@ var MAX_PROPAGATION_STEPS = 500, realPath4 = (path) => {
36462
36920
  return call === 1 || meta[name]?.kind !== "function";
36463
36921
  }));
36464
36922
  }, importNextVersion = async (path) => {
36465
- const namespace = await import(`${path}?absolute-hot=${nextTag(path)}`);
36923
+ const namespace = await import(`${path}?absolute-hot=${nextTag2(path)}`);
36466
36924
  if (typeof namespace !== "object" || namespace === null)
36467
36925
  throw new Error(`${path} did not evaluate to a module`);
36468
36926
  return Object.fromEntries(Object.entries(namespace));
@@ -38174,16 +38632,21 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, clearDevSs
38174
38632
  ctx.inFlight = drive();
38175
38633
  ctx.inFlight.then(resolveFn, resolveFn);
38176
38634
  };
38177
- return () => {
38635
+ return ({ immediate = false } = {}) => {
38178
38636
  if (!ctx.debouncedPromise) {
38179
38637
  ctx.debouncedPromise = new Promise((resolve) => {
38180
38638
  ctx.debouncedResolve = resolve;
38181
38639
  });
38182
38640
  }
38641
+ const scheduled = ctx.debouncedPromise;
38183
38642
  if (ctx.debounceTimer)
38184
38643
  clearTimeout(ctx.debounceTimer);
38185
- ctx.debounceTimer = setTimeout(fire, SVELTE_BUNDLE_DEBOUNCE_MS);
38186
- return ctx.debouncedPromise;
38644
+ ctx.debounceTimer = null;
38645
+ if (immediate)
38646
+ fire();
38647
+ else
38648
+ ctx.debounceTimer = setTimeout(fire, SVELTE_BUNDLE_DEBOUNCE_MS);
38649
+ return scheduled;
38187
38650
  };
38188
38651
  }, handleSvelteFastPath = async (state, config, filesToRebuild, startTime, onRebuildComplete) => {
38189
38652
  const svelteDir = config.svelteDirectory ?? "";
@@ -38458,16 +38921,21 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, clearDevSs
38458
38921
  ctx.inFlight = drive();
38459
38922
  ctx.inFlight.then(resolveFn, resolveFn);
38460
38923
  };
38461
- return () => {
38924
+ return ({ immediate = false } = {}) => {
38462
38925
  if (!ctx.debouncedPromise) {
38463
38926
  ctx.debouncedPromise = new Promise((resolve) => {
38464
38927
  ctx.debouncedResolve = resolve;
38465
38928
  });
38466
38929
  }
38930
+ const scheduled = ctx.debouncedPromise;
38467
38931
  if (ctx.debounceTimer)
38468
38932
  clearTimeout(ctx.debounceTimer);
38469
- ctx.debounceTimer = setTimeout(fire, VUE_BUNDLE_DEBOUNCE_MS);
38470
- return ctx.debouncedPromise;
38933
+ ctx.debounceTimer = null;
38934
+ if (immediate)
38935
+ fire();
38936
+ else
38937
+ ctx.debounceTimer = setTimeout(fire, VUE_BUNDLE_DEBOUNCE_MS);
38938
+ return scheduled;
38471
38939
  };
38472
38940
  }, handleVueFastPath = async (state, config, filesToRebuild, startTime, onRebuildComplete) => {
38473
38941
  const vueFiles = filesToRebuild.filter((file) => file.endsWith(".vue") && detectFramework(file, state.resolvedPaths) === "vue");
@@ -39197,9 +39665,29 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, clearDevSs
39197
39665
  await processMarkupFiles(markupFiles);
39198
39666
  }, runHtmlFastPath = async (state, config, filesToRebuild, startTime) => runMarkupFastPath(state, config, filesToRebuild, startTime, "html"), runHtmxFastPath = async (state, config, filesToRebuild, startTime) => runMarkupFastPath(state, config, filesToRebuild, startTime, "htmx"), markHandledFiles = (files, framework, resolvedPaths, handled) => {
39199
39667
  files.filter((f) => detectFramework(f, resolvedPaths) === framework).forEach((f) => handled.add(f));
39668
+ }, rebuildSsrForRouteChanges = async (state, config, changes) => {
39669
+ const changedFiles = (framework) => changes.filter((change) => change.framework === framework).map((change) => change.file);
39670
+ const vueFiles = changedFiles("vue");
39671
+ const svelteFiles = changedFiles("svelte");
39672
+ await Promise.all([
39673
+ vueFiles.length > 0 && config.vueDirectory ? scheduleVueBundleRebuild(state, vueFiles, config)({ immediate: true }) : undefined,
39674
+ svelteFiles.length > 0 && config.svelteDirectory ? scheduleSvelteBundleRebuild(state, svelteFiles, config)({ immediate: true }) : undefined
39675
+ ]);
39676
+ }, flushAngularBundleRebuild = async (state) => {
39677
+ const ctx = angularBundleState.get(state);
39678
+ if (!ctx)
39679
+ return;
39680
+ if (ctx.debounceTimer) {
39681
+ await scheduleAngularBundleRebuild(state, ctx.pageEntries, ctx.angularDir)({ immediate: true });
39682
+ return;
39683
+ }
39684
+ if (ctx.inFlight)
39685
+ await ctx.inFlight;
39200
39686
  }, runFrameworkFastPaths = async (state, config, affectedFrameworks, files, startTime, onRebuildComplete) => {
39201
39687
  const handled = new Set;
39202
- await refreshSpaRoutesForFiles(files, state.resolvedPaths);
39688
+ const routeChanges = await readSpaRouteChanges(files, state.resolvedPaths);
39689
+ await rebuildSsrForRouteChanges(state, config, routeChanges.changes);
39690
+ await routeChanges.publish(["react", "svelte", "vue"]);
39203
39691
  const fastPaths = [
39204
39692
  {
39205
39693
  directory: config.angularDirectory,
@@ -39233,6 +39721,9 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, clearDevSs
39233
39721
  await fastPath.handler(state, config, files, startTime, onRebuildComplete);
39234
39722
  markHandledFiles(files, fastPath.framework, state.resolvedPaths, handled);
39235
39723
  });
39724
+ if (routeChanges.changes.some((change) => change.framework === "angular"))
39725
+ await flushAngularBundleRebuild(state);
39726
+ await routeChanges.publish();
39236
39727
  for (const file of files) {
39237
39728
  if (!handled.has(file) && detectFramework(file, state.resolvedPaths) === "unknown" && !state.lastUserEditedFiles?.has(resolvePath(file)))
39238
39729
  handled.add(file);
@@ -43013,6 +43504,7 @@ var assetUnchecked = (source, name) => {
43013
43504
  return assetPath;
43014
43505
  };
43015
43506
  // src/core/fileRoutes.ts
43507
+ init_constants();
43016
43508
  init_resolveConvention();
43017
43509
  init_logger();
43018
43510
  init_ssrErrorPage();
@@ -43037,7 +43529,7 @@ var renderLoadError = async (route, error) => {
43037
43529
  console.error(`[file-routes] load failed for ${route.source}:`, error);
43038
43530
  const conventionResponse = await renderConventionError(route.framework, route.name, error);
43039
43531
  return conventionResponse ?? new Response(ssrErrorPage(route.framework, error), {
43040
- headers: { "Content-Type": "text/html" },
43532
+ headers: { "Content-Type": HTML_CONTENT_TYPE },
43041
43533
  status: 500
43042
43534
  });
43043
43535
  };
@@ -43097,6 +43589,7 @@ var fileRoutes2 = (routes, manifest) => (app) => {
43097
43589
  init_islands();
43098
43590
 
43099
43591
  // src/core/pageHandlers.ts
43592
+ init_constants();
43100
43593
  init_staticIslandPages();
43101
43594
  init_pageResponseCache();
43102
43595
  init_staticStreaming();
@@ -43328,7 +43821,7 @@ var handleStaticPageRequest = async (pagePath, options = {}, settings = {}) => {
43328
43821
  const transformedHtml = await transformCurrentStaticPageHtml(html, settings);
43329
43822
  const htmlWithTranslationBaseline = htmlContainsIslands(transformedHtml) ? injectBrowserTranslationBaseline(transformedHtml) : transformedHtml;
43330
43823
  return withPageCacheHeaders(await withStreamingSlots(new Response(injectIslandPageContext(htmlWithTranslationBaseline), {
43331
- headers: { "Content-Type": "text/html" }
43824
+ headers: { "Content-Type": HTML_CONTENT_TYPE }
43332
43825
  }), {
43333
43826
  ...options,
43334
43827
  streamingSlots: options.streamingSlots ?? []
@@ -43338,7 +43831,7 @@ var renderStaticPageError = async (framework, pagePath, error) => {
43338
43831
  console.error(`[SSR] ${framework.toUpperCase()} page error:`, error);
43339
43832
  const conventionResponse = await renderConventionError(framework, derivePageName(pagePath), error);
43340
43833
  return withPageCacheHeaders(conventionResponse ?? new Response(ssrErrorPage(framework, error), {
43341
- headers: { "Content-Type": "text/html" },
43834
+ headers: { "Content-Type": HTML_CONTENT_TYPE },
43342
43835
  status: 500
43343
43836
  }));
43344
43837
  };
@@ -44419,7 +44912,7 @@ var getRelativeTimeFormat = (locale, options) => cached(relativeTimeFormats, cac
44419
44912
  var SYNTAX_CHARS = new Set(["{", "}", "#", "|"]);
44420
44913
  var WHITESPACE = /\s/;
44421
44914
  var isBranchKind = (value) => value === "plural" || value === "select" || value === "selectordinal";
44422
- var skipWhitespace2 = (cursor) => {
44915
+ var skipWhitespace3 = (cursor) => {
44423
44916
  while (cursor.index < cursor.source.length && WHITESPACE.test(cursor.source.charAt(cursor.index))) {
44424
44917
  cursor.index += 1;
44425
44918
  }
@@ -44433,7 +44926,7 @@ var readToken = (cursor, stops) => {
44433
44926
  return cursor.source.slice(start, cursor.index).trim();
44434
44927
  };
44435
44928
  var expectChar = (cursor, char) => {
44436
- skipWhitespace2(cursor);
44929
+ skipWhitespace3(cursor);
44437
44930
  if (cursor.source.charAt(cursor.index) !== char)
44438
44931
  throw syntaxError(cursor, `"${char}"`);
44439
44932
  cursor.index += 1;
@@ -44462,7 +44955,7 @@ var readQuoted = (cursor, inPlural) => {
44462
44955
  cursor.index += 1;
44463
44956
  return text;
44464
44957
  };
44465
- var pushText = (nodes, value) => {
44958
+ var pushText2 = (nodes, value) => {
44466
44959
  const last = nodes[nodes.length - 1];
44467
44960
  if (last?.kind === "text") {
44468
44961
  last.value += value;
@@ -44478,7 +44971,7 @@ var parseBranchOption = (cursor, kind, branches) => {
44478
44971
  const offsetMatch = /^offset:(\d+)$/.exec(selector);
44479
44972
  if (offsetMatch && kind !== "select") {
44480
44973
  branches.offset = Number(offsetMatch[1]);
44481
- skipWhitespace2(cursor);
44974
+ skipWhitespace3(cursor);
44482
44975
  return;
44483
44976
  }
44484
44977
  if (selector === "")
@@ -44486,11 +44979,11 @@ var parseBranchOption = (cursor, kind, branches) => {
44486
44979
  expectChar(cursor, "{");
44487
44980
  branches.options[selector] = parseNodes(cursor, kind !== "select");
44488
44981
  expectChar(cursor, "}");
44489
- skipWhitespace2(cursor);
44982
+ skipWhitespace3(cursor);
44490
44983
  };
44491
44984
  var parseBranchOptions = (cursor, kind) => {
44492
44985
  const branches = { offset: 0, options: {} };
44493
- skipWhitespace2(cursor);
44986
+ skipWhitespace3(cursor);
44494
44987
  while (cursor.source.charAt(cursor.index) !== "}") {
44495
44988
  parseBranchOption(cursor, kind, branches);
44496
44989
  }
@@ -44499,7 +44992,7 @@ var parseBranchOptions = (cursor, kind) => {
44499
44992
  return branches;
44500
44993
  };
44501
44994
  var parseArgument = (cursor) => {
44502
- skipWhitespace2(cursor);
44995
+ skipWhitespace3(cursor);
44503
44996
  const name = readToken(cursor, ",}");
44504
44997
  if (name === "")
44505
44998
  throw syntaxError(cursor, "an argument name");
@@ -44536,10 +45029,10 @@ var parseNode = (cursor, inPlural, nodes) => {
44536
45029
  return;
44537
45030
  }
44538
45031
  if (char === "'") {
44539
- pushText(nodes, readQuoted(cursor, inPlural));
45032
+ pushText2(nodes, readQuoted(cursor, inPlural));
44540
45033
  return;
44541
45034
  }
44542
- pushText(nodes, char);
45035
+ pushText2(nodes, char);
44543
45036
  cursor.index += 1;
44544
45037
  };
44545
45038
  var parseNodes = (cursor, inPlural) => {
@@ -49828,6 +50321,7 @@ export {
49828
50321
  HOOK_SIGNATURE_LENGTH,
49829
50322
  HOURS_IN_DAY,
49830
50323
  HOURS_IN_HALF_DAY,
50324
+ HTML_CONTENT_TYPE,
49831
50325
  HTTP_STATUS_BAD_REQUEST,
49832
50326
  HTTP_STATUS_GONE,
49833
50327
  HTTP_STATUS_INTERNAL_SERVER_ERROR,
@@ -49999,5 +50493,5 @@ export {
49999
50493
  wrapPageHandlerWithStreamingSlots
50000
50494
  };
50001
50495
 
50002
- //# debugId=778B763A7556641B64756E2164756E21
50496
+ //# debugId=02D6FDFF9A463B1864756E2164756E21
50003
50497
  //# sourceMappingURL=index.js.map