@absolutejs/absolute 0.20.0-beta.181 → 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 (120) hide show
  1. package/CHANGELOG.md +32 -0
  2. package/changelog.json +54 -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 +344 -48
  9. package/dist/angular/index.js.map +10 -10
  10. package/dist/angular/server.js +344 -48
  11. package/dist/angular/server.js.map +10 -10
  12. package/dist/build.js +431 -78
  13. package/dist/build.js.map +15 -15
  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-ptx5a72p.js → build-p3qra1nj.js} +64 -6
  21. package/dist/cli/{buildDepVendor-qnwfct22.js → buildDepVendor-36d1aa7c.js} +2 -2
  22. package/dist/cli/{buildReactServerComponents-01s87hnk.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-5w8arh3m.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-c8rcfe5a.js → index-fy4th3n0.js} +1 -1
  50. package/dist/cli/{index-prza6tkp.js → index-gx6pjzzk.js} +3 -3
  51. package/dist/cli/{index-125cfzvn.js → index-hker5fs4.js} +2 -2
  52. package/dist/cli/{index-cgmp9d02.js → index-hqkcxa2p.js} +1 -1
  53. package/dist/cli/{index-jkg2h10c.js → index-mmm6d3k5.js} +3 -3
  54. package/dist/cli/{index-enbw9484.js → index-wpgsermq.js} +1 -1
  55. package/dist/cli/{index-0z5fgb80.js → index-wqpg377f.js} +1 -1
  56. package/dist/cli/{index-3sfcmb49.js → index-x7h6w6td.js} +1 -1
  57. package/dist/cli/{index-a6xx0p9e.js → index-ydaxsftq.js} +1 -1
  58. package/dist/cli/{index-3ewt17wm.js → index-yhkg5by0.js} +1 -1
  59. package/dist/cli/{index-aqe25w4h.js → index-zeeep92g.js} +1 -1
  60. package/dist/cli/index.js +32 -32
  61. package/dist/cli/{info-k124sh7g.js → info-5rwsbhe2.js} +4 -4
  62. package/dist/cli/{inspect-n6pcfvfw.js → inspect-nmwb0q5k.js} +5 -5
  63. package/dist/cli/{iosNativeWatcher-wdq2fvj1.js → iosNativeWatcher-7r9gnk87.js} +7 -7
  64. package/dist/cli/{iosSimulatorController-n97dpa8p.js → iosSimulatorController-w963vv9r.js} +7 -7
  65. package/dist/cli/{islands-17tfx8jf.js → islands-w9xrehpk.js} +3 -3
  66. package/dist/cli/{logs-shg23fbt.js → logs-m793x8a7.js} +3 -3
  67. package/dist/cli/{ls-0wr74w0b.js → ls-k31npd5b.js} +3 -3
  68. package/dist/cli/{mem-16sy1707.js → mem-jm6kw6gr.js} +5 -5
  69. package/dist/cli/{migrate-k91k050s.js → migrate-95bjkqkr.js} +2 -2
  70. package/dist/cli/{mobile-hpqpy61f.js → mobile-cpp8vfn7.js} +13 -13
  71. package/dist/cli/prerender-26pzynh4.js +13 -0
  72. package/dist/cli/{prettier-dh5fh786.js → prettier-0ws9pbc1.js} +1 -1
  73. package/dist/cli/{ps-pk7ncjac.js → ps-fx8mz3e3.js} +6 -6
  74. package/dist/cli/{psTui-50wf0b72.js → psTui-0e9c7an6.js} +7 -7
  75. package/dist/cli/{remoteMacProtocol-g10s408w.js → remoteMacProtocol-y7h79gr8.js} +7 -7
  76. package/dist/cli/{remove-x987pvd3.js → remove-xhvph8bz.js} +8 -8
  77. package/dist/cli/{routes-mc3ymp8t.js → routes-hq9yje5z.js} +3 -3
  78. package/dist/cli/{start-mbn2zgs2.js → start-5mjh9hh2.js} +5 -5
  79. package/dist/cli/{typecheck-ynzw2eep.js → typecheck-yjme4fv1.js} +36 -14
  80. package/dist/cli/{workspace-7sbyyc59.js → workspace-xeb6abxj.js} +5 -5
  81. package/dist/index.js +446 -90
  82. package/dist/index.js.map +17 -17
  83. package/dist/islands/index.js +312 -23
  84. package/dist/islands/index.js.map +5 -5
  85. package/dist/mobile/index.js +2 -2
  86. package/dist/mobile/index.js.map +3 -3
  87. package/dist/react/browser.js +18 -1
  88. package/dist/react/browser.js.map +6 -4
  89. package/dist/react/components/index.js +2 -2
  90. package/dist/react/components/index.js.map +3 -3
  91. package/dist/react/index.js +361 -61
  92. package/dist/react/index.js.map +13 -12
  93. package/dist/react/server.js +42 -35
  94. package/dist/react/server.js.map +9 -9
  95. package/dist/src/angular/components/constants.d.ts +1 -0
  96. package/dist/src/angular/components/defer-slot-payload.d.ts +5 -0
  97. package/dist/src/cli/scripts/manifestKeysEditorHint.d.ts +9 -0
  98. package/dist/src/constants.d.ts +1 -0
  99. package/dist/src/core/prerender.d.ts +10 -0
  100. package/dist/src/react/browser.d.ts +1 -0
  101. package/dist/src/react/index.d.ts +1 -0
  102. package/dist/src/svelte/lowerAwaitSlotSyntax.d.ts +23 -0
  103. package/dist/src/utils/pageCspNonce.d.ts +14 -0
  104. package/dist/svelte/index.js +363 -68
  105. package/dist/svelte/index.js.map +10 -10
  106. package/dist/svelte/server.js +354 -59
  107. package/dist/svelte/server.js.map +10 -10
  108. package/dist/types/manifest.d.ts +3 -2
  109. package/dist/types/svelte.d.ts +3 -0
  110. package/dist/vue/components/Image.js +2 -2
  111. package/dist/vue/components/Image.js.map +3 -3
  112. package/dist/vue/components/index.js +2 -2
  113. package/dist/vue/components/index.js.map +3 -3
  114. package/dist/vue/index.js +355 -60
  115. package/dist/vue/index.js.map +10 -10
  116. package/dist/vue/server.js +45 -39
  117. package/dist/vue/server.js.map +8 -8
  118. package/package.json +1 -1
  119. package/dist/cli/prerender-w65xp6h8.js +0 -11
  120. /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;
8669
8740
  }
8670
- literal += escapeTemplateLiteral(trimmed.slice(cursor));
8671
- return `\`${literal}\``;
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;
8828
+ }
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
  }
@@ -16822,43 +17114,91 @@ var describe = (path, root) => relative16(root, path) || path, includeError = (c
16822
17114
  include chain: ${context.chain.map((path) => describe(path, context.root)).join(" \u2192 ")}`), findTagClose = (html, start) => {
16823
17115
  const match = /^<[^>"']*(?:(?:"[^"]*"|'[^']*')[^>"']*)*>/.exec(html.slice(start));
16824
17116
  return match ? start + match[0].length : -1;
16825
- }, findElement = (html, tag, from) => {
16826
- const opening = new RegExp(`<${tag}(?=[\\s/>])`, "gi");
16827
- opening.lastIndex = from;
16828
- const first = opening.exec(html);
16829
- 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)
16830
17134
  return null;
16831
- const tagEnd = findTagClose(html, first.index);
16832
- 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)
16833
17154
  return null;
16834
- const attributes = html.slice(first.index + tag.length + 1, tagEnd - 1);
16835
- if (attributes.trimEnd().endsWith("/")) {
16836
- const selfClosing = {
16837
- attributes: attributes.trimEnd().slice(0, -1),
16838
- end: tagEnd,
17155
+ if (open.selfClosing) {
17156
+ const empty = {
17157
+ attributes: open.attributes,
17158
+ end: open.end,
16839
17159
  inner: "",
16840
- start: first.index
17160
+ start: open.start
16841
17161
  };
16842
- return selfClosing;
17162
+ return empty;
16843
17163
  }
16844
- const tokens = new RegExp(`<${tag}(?=[\\s/>])|</${tag}\\s*>`, "gi");
16845
- tokens.lastIndex = tagEnd;
16846
17164
  let depth = 1;
16847
- let token = tokens.exec(html);
16848
- while (token && depth > 0) {
16849
- depth += token[0].startsWith("</") ? -1 : 1;
16850
- if (depth > 0)
16851
- 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);
16852
17171
  }
16853
- if (!token)
17172
+ if (!token || token.end === -1)
16854
17173
  return null;
16855
17174
  const element = {
16856
- attributes,
16857
- end: token.index + token[0].length,
16858
- inner: html.slice(tagEnd, token.index),
16859
- start: first.index
17175
+ attributes: open.attributes,
17176
+ end: token.end,
17177
+ inner: html.slice(open.end, token.start),
17178
+ start: open.start
16860
17179
  };
16861
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);
16862
17202
  }, readAttribute = (attributes, name) => new RegExp(`(?:^|\\s)${name}\\s*=\\s*(?:"([^"]*)"|'([^']*)')`, "i").exec(attributes)?.slice(1).find((value) => value !== undefined), replaceElements = (html, tag, replace) => {
16863
17203
  let output = "";
16864
17204
  let cursor = 0;
@@ -16900,6 +17240,7 @@ var describe = (path, root) => relative16(root, path) || path, includeError = (c
16900
17240
  throw includeError({ ...context, chain }, `<abs-include src="${src}"> in ${describe(file, context.root)}: file not found (${target})`);
16901
17241
  }
16902
17242
  context.dependencies.add(target);
17243
+ assertIncludeTagsBalanced(source, target, { ...context, chain });
16903
17244
  const values = new Map([...collectSlotValues(element.inner)].map(([name, value]) => [
16904
17245
  name,
16905
17246
  expandWithin(value, file, context)
@@ -16924,10 +17265,13 @@ var describe = (path, root) => relative16(root, path) || path, includeError = (c
16924
17265
  readFile: options.readFile ?? readUtf8,
16925
17266
  root: options.root ?? process.cwd()
16926
17267
  };
17268
+ assertIncludeTagsBalanced(html, file, context);
16927
17269
  const expanded = expandWithin(html, file, context);
16928
17270
  return { dependencies: [...context.dependencies], html: expanded };
16929
17271
  };
16930
- var init_htmlIncludes = () => {};
17272
+ var init_htmlIncludes = __esm(() => {
17273
+ INCLUDE_TAGS = ["abs-include", "abs-slot"];
17274
+ });
16931
17275
 
16932
17276
  // src/build/spaSideManifests.ts
16933
17277
  import { writeFile as writeFile7 } from "fs/promises";
@@ -24361,6 +24705,7 @@ var withResolvedSources = (map, sourceFile) => {
24361
24705
  };
24362
24706
  const generate = (mode) => {
24363
24707
  const transpiled = mode === "server" ? transpiledServer : transpiledClient;
24708
+ const scopeClass = createAwaitScopeClassCapture();
24364
24709
  const compiled = isModule ? compileModule(transpiled, {
24365
24710
  dev: mode === "client" && dev,
24366
24711
  experimental: {
@@ -24369,6 +24714,7 @@ var withResolvedSources = (map, sourceFile) => {
24369
24714
  filename: src
24370
24715
  }) : compile(transpiled, {
24371
24716
  css: externalCss && mode === "client" ? "external" : "injected",
24717
+ cssHash: scopeClass.cssHash,
24372
24718
  dev: mode === "client" && dev,
24373
24719
  experimental: {
24374
24720
  async: transformedByLowering
@@ -24378,7 +24724,7 @@ var withResolvedSources = (map, sourceFile) => {
24378
24724
  hmr: isDev
24379
24725
  });
24380
24726
  const compiledJs = compiled.js;
24381
- 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");
24382
24728
  if (mode === "client" && isDev) {
24383
24729
  const moduleKey = `/@src/${relative24(process.cwd(), src).replace(/\\/g, "/")}`;
24384
24730
  code = code.replace(/if\s*\(import\.meta\.hot\)\s*\{/, `if (typeof window !== "undefined") {
@@ -26648,10 +26994,10 @@ var isInterpolatedExpressionStart = (value, index) => value[index] === "{" && va
26648
26994
  }
26649
26995
  return {
26650
26996
  content: parsedBlock.content.trim(),
26651
- nextIndex: input.keyword === "@placeholder" ? skipWhitespace(input.template, parsedBlock.nextIndex) : parsedBlock.nextIndex
26997
+ nextIndex: input.keyword === "@placeholder" ? skipWhitespace2(input.template, parsedBlock.nextIndex) : parsedBlock.nextIndex
26652
26998
  };
26653
26999
  }, resolveDeferSlotStart = (template, deferIndex, markerCursor) => {
26654
- const nextMarkerCursor = skipWhitespace(template, markerCursor);
27000
+ const nextMarkerCursor = skipWhitespace2(template, markerCursor);
26655
27001
  if (template[nextMarkerCursor] === "{") {
26656
27002
  return {
26657
27003
  changed: false,
@@ -26876,7 +27222,7 @@ var isInterpolatedExpressionStart = (value, index) => value[index] === "{" && va
26876
27222
  template: resolvedBlockState.template
26877
27223
  };
26878
27224
  }
26879
- const blockContent = parsePlaceholderAndErrorBlocks(template, skipWhitespace(template, resolvedBlock.nextIndex));
27225
+ const blockContent = parsePlaceholderAndErrorBlocks(template, skipWhitespace2(template, resolvedBlock.nextIndex));
26880
27226
  const builtSlot = buildDeferredSlot({
26881
27227
  cursorAfterResolved: blockContent.cursorAfterResolved,
26882
27228
  errorHtml: blockContent.errorHtml,
@@ -26906,14 +27252,14 @@ var isInterpolatedExpressionStart = (value, index) => value[index] === "{" && va
26906
27252
  ({ cursor, depth } = consumed);
26907
27253
  }
26908
27254
  return { content: value.slice(start + 1), nextIndex: value.length };
26909
- }, skipWhitespace = (value, index) => {
27255
+ }, skipWhitespace2 = (value, index) => {
26910
27256
  let cursor = index;
26911
27257
  while (cursor < value.length && /\s/.test(value[cursor] ?? "")) {
26912
27258
  cursor += 1;
26913
27259
  }
26914
27260
  return cursor;
26915
27261
  }, parseOptionalParenthesizedBlock = (value, index) => {
26916
- let cursor = skipWhitespace(value, index);
27262
+ let cursor = skipWhitespace2(value, index);
26917
27263
  if (value[cursor] !== "(") {
26918
27264
  return null;
26919
27265
  }
@@ -26977,7 +27323,7 @@ var isInterpolatedExpressionStart = (value, index) => value[index] === "{" && va
26977
27323
  return null;
26978
27324
  }
26979
27325
  const blockKeywordCursor = cursorAfterResolved + keyword.length;
26980
- const blockStart = skipWhitespace(template, blockKeywordCursor);
27326
+ const blockStart = skipWhitespace2(template, blockKeywordCursor);
26981
27327
  if (template[blockStart] !== "{") {
26982
27328
  return null;
26983
27329
  }
@@ -27639,7 +27985,7 @@ ${importLine}${source.slice(insertAt)}`;
27639
27985
  const rawExpression = value.slice(interpolationStart + 2, nextCursor - 2).trim();
27640
27986
  const expression = rawExpression.length === 0 ? "''" : rawExpression;
27641
27987
  const expressionLiteral = JSON.stringify(expression);
27642
- parts.push(`\${this.__absoluteDeferResolveTemplateExpression(${expressionLiteral})}`);
27988
+ parts.push(`\${this.__absoluteDeferEscapeHtml(this.__absoluteDeferResolveTemplateExpression(${expressionLiteral}))}`);
27643
27989
  cursor = nextCursor;
27644
27990
  }
27645
27991
  return parts.join("");
@@ -27670,6 +28016,10 @@ ${importLine}${source.slice(insertAt)}`;
27670
28016
  ` + ` return value;
27671
28017
  ` + ` }
27672
28018
 
28019
+ ` + ` __absoluteDeferEscapeHtml(value: string) {
28020
+ ` + ` return value.replace(/[&<>"']/g, (char) => char === '&' ? '&amp;' : char === '<' ? '&lt;' : char === '>' ? '&gt;' : char === '"' ? '&quot;' : '&#39;');
28021
+ ` + ` }
28022
+
27673
28023
  `, buildDeferSlotFields = (slots) => [
27674
28024
  buildDeferSlotTemplateResolver(),
27675
28025
  ...slots.map((slot, index) => {
@@ -33302,7 +33652,7 @@ var init_assetStore = __esm(() => {
33302
33652
  ".css": "text/css",
33303
33653
  ".eot": "application/vnd.ms-fontobject",
33304
33654
  ".gif": "image/gif",
33305
- ".html": "text/html",
33655
+ ".html": "text/html; charset=utf-8",
33306
33656
  ".ico": "image/x-icon",
33307
33657
  ".jpeg": "image/jpeg",
33308
33658
  ".jpg": "image/jpeg",
@@ -34688,8 +35038,10 @@ ${code}`;
34688
35038
  }).js.code;
34689
35039
  }, compileSvelteComponent = (raw, filePath, projectRoot, enableAsync = false) => {
34690
35040
  const compiler = getLoadedSvelteCompiler();
35041
+ const scopeClass = createAwaitScopeClassCapture();
34691
35042
  const compiled = compiler.compile(raw, {
34692
35043
  css: "external",
35044
+ cssHash: scopeClass.cssHash,
34693
35045
  dev: true,
34694
35046
  experimental: {
34695
35047
  async: enableAsync
@@ -34698,7 +35050,7 @@ ${code}`;
34698
35050
  generate: "client",
34699
35051
  hmr: true
34700
35052
  });
34701
- let { code } = compiled.js;
35053
+ let code = scopeClass.apply(compiled.js.code);
34702
35054
  if (compiled.css?.code) {
34703
35055
  const cssPath = `${filePath}.css`;
34704
35056
  svelteExternalCss.set(cssPath, compiled.css.code);
@@ -35451,6 +35803,7 @@ var emberCacheBuster = 0, invalidateEmberSsrCache = () => {
35451
35803
  emberCacheBuster = Date.now();
35452
35804
  };
35453
35805
  var init_pageHandler = __esm(() => {
35806
+ init_constants();
35454
35807
  init_escapeScriptContent();
35455
35808
  init_cspNonceRef();
35456
35809
  init_pageResponseCache();
@@ -36432,7 +36785,7 @@ var records, recordFor = (path) => {
36432
36785
  for (const update of updates)
36433
36786
  update(value);
36434
36787
  }
36435
- }, managedModulePaths = () => [...records.keys()], moduleRecord = (path) => records.get(path), nextTag = (path) => {
36788
+ }, managedModulePaths = () => [...records.keys()], moduleRecord = (path) => records.get(path), nextTag2 = (path) => {
36436
36789
  const record = recordFor(path);
36437
36790
  record.tag += 1;
36438
36791
  return record.tag;
@@ -36567,7 +36920,7 @@ var MAX_PROPAGATION_STEPS = 500, realPath4 = (path) => {
36567
36920
  return call === 1 || meta[name]?.kind !== "function";
36568
36921
  }));
36569
36922
  }, importNextVersion = async (path) => {
36570
- const namespace = await import(`${path}?absolute-hot=${nextTag(path)}`);
36923
+ const namespace = await import(`${path}?absolute-hot=${nextTag2(path)}`);
36571
36924
  if (typeof namespace !== "object" || namespace === null)
36572
36925
  throw new Error(`${path} did not evaluate to a module`);
36573
36926
  return Object.fromEntries(Object.entries(namespace));
@@ -43151,6 +43504,7 @@ var assetUnchecked = (source, name) => {
43151
43504
  return assetPath;
43152
43505
  };
43153
43506
  // src/core/fileRoutes.ts
43507
+ init_constants();
43154
43508
  init_resolveConvention();
43155
43509
  init_logger();
43156
43510
  init_ssrErrorPage();
@@ -43175,7 +43529,7 @@ var renderLoadError = async (route, error) => {
43175
43529
  console.error(`[file-routes] load failed for ${route.source}:`, error);
43176
43530
  const conventionResponse = await renderConventionError(route.framework, route.name, error);
43177
43531
  return conventionResponse ?? new Response(ssrErrorPage(route.framework, error), {
43178
- headers: { "Content-Type": "text/html" },
43532
+ headers: { "Content-Type": HTML_CONTENT_TYPE },
43179
43533
  status: 500
43180
43534
  });
43181
43535
  };
@@ -43235,6 +43589,7 @@ var fileRoutes2 = (routes, manifest) => (app) => {
43235
43589
  init_islands();
43236
43590
 
43237
43591
  // src/core/pageHandlers.ts
43592
+ init_constants();
43238
43593
  init_staticIslandPages();
43239
43594
  init_pageResponseCache();
43240
43595
  init_staticStreaming();
@@ -43466,7 +43821,7 @@ var handleStaticPageRequest = async (pagePath, options = {}, settings = {}) => {
43466
43821
  const transformedHtml = await transformCurrentStaticPageHtml(html, settings);
43467
43822
  const htmlWithTranslationBaseline = htmlContainsIslands(transformedHtml) ? injectBrowserTranslationBaseline(transformedHtml) : transformedHtml;
43468
43823
  return withPageCacheHeaders(await withStreamingSlots(new Response(injectIslandPageContext(htmlWithTranslationBaseline), {
43469
- headers: { "Content-Type": "text/html" }
43824
+ headers: { "Content-Type": HTML_CONTENT_TYPE }
43470
43825
  }), {
43471
43826
  ...options,
43472
43827
  streamingSlots: options.streamingSlots ?? []
@@ -43476,7 +43831,7 @@ var renderStaticPageError = async (framework, pagePath, error) => {
43476
43831
  console.error(`[SSR] ${framework.toUpperCase()} page error:`, error);
43477
43832
  const conventionResponse = await renderConventionError(framework, derivePageName(pagePath), error);
43478
43833
  return withPageCacheHeaders(conventionResponse ?? new Response(ssrErrorPage(framework, error), {
43479
- headers: { "Content-Type": "text/html" },
43834
+ headers: { "Content-Type": HTML_CONTENT_TYPE },
43480
43835
  status: 500
43481
43836
  }));
43482
43837
  };
@@ -44557,7 +44912,7 @@ var getRelativeTimeFormat = (locale, options) => cached(relativeTimeFormats, cac
44557
44912
  var SYNTAX_CHARS = new Set(["{", "}", "#", "|"]);
44558
44913
  var WHITESPACE = /\s/;
44559
44914
  var isBranchKind = (value) => value === "plural" || value === "select" || value === "selectordinal";
44560
- var skipWhitespace2 = (cursor) => {
44915
+ var skipWhitespace3 = (cursor) => {
44561
44916
  while (cursor.index < cursor.source.length && WHITESPACE.test(cursor.source.charAt(cursor.index))) {
44562
44917
  cursor.index += 1;
44563
44918
  }
@@ -44571,7 +44926,7 @@ var readToken = (cursor, stops) => {
44571
44926
  return cursor.source.slice(start, cursor.index).trim();
44572
44927
  };
44573
44928
  var expectChar = (cursor, char) => {
44574
- skipWhitespace2(cursor);
44929
+ skipWhitespace3(cursor);
44575
44930
  if (cursor.source.charAt(cursor.index) !== char)
44576
44931
  throw syntaxError(cursor, `"${char}"`);
44577
44932
  cursor.index += 1;
@@ -44600,7 +44955,7 @@ var readQuoted = (cursor, inPlural) => {
44600
44955
  cursor.index += 1;
44601
44956
  return text;
44602
44957
  };
44603
- var pushText = (nodes, value) => {
44958
+ var pushText2 = (nodes, value) => {
44604
44959
  const last = nodes[nodes.length - 1];
44605
44960
  if (last?.kind === "text") {
44606
44961
  last.value += value;
@@ -44616,7 +44971,7 @@ var parseBranchOption = (cursor, kind, branches) => {
44616
44971
  const offsetMatch = /^offset:(\d+)$/.exec(selector);
44617
44972
  if (offsetMatch && kind !== "select") {
44618
44973
  branches.offset = Number(offsetMatch[1]);
44619
- skipWhitespace2(cursor);
44974
+ skipWhitespace3(cursor);
44620
44975
  return;
44621
44976
  }
44622
44977
  if (selector === "")
@@ -44624,11 +44979,11 @@ var parseBranchOption = (cursor, kind, branches) => {
44624
44979
  expectChar(cursor, "{");
44625
44980
  branches.options[selector] = parseNodes(cursor, kind !== "select");
44626
44981
  expectChar(cursor, "}");
44627
- skipWhitespace2(cursor);
44982
+ skipWhitespace3(cursor);
44628
44983
  };
44629
44984
  var parseBranchOptions = (cursor, kind) => {
44630
44985
  const branches = { offset: 0, options: {} };
44631
- skipWhitespace2(cursor);
44986
+ skipWhitespace3(cursor);
44632
44987
  while (cursor.source.charAt(cursor.index) !== "}") {
44633
44988
  parseBranchOption(cursor, kind, branches);
44634
44989
  }
@@ -44637,7 +44992,7 @@ var parseBranchOptions = (cursor, kind) => {
44637
44992
  return branches;
44638
44993
  };
44639
44994
  var parseArgument = (cursor) => {
44640
- skipWhitespace2(cursor);
44995
+ skipWhitespace3(cursor);
44641
44996
  const name = readToken(cursor, ",}");
44642
44997
  if (name === "")
44643
44998
  throw syntaxError(cursor, "an argument name");
@@ -44674,10 +45029,10 @@ var parseNode = (cursor, inPlural, nodes) => {
44674
45029
  return;
44675
45030
  }
44676
45031
  if (char === "'") {
44677
- pushText(nodes, readQuoted(cursor, inPlural));
45032
+ pushText2(nodes, readQuoted(cursor, inPlural));
44678
45033
  return;
44679
45034
  }
44680
- pushText(nodes, char);
45035
+ pushText2(nodes, char);
44681
45036
  cursor.index += 1;
44682
45037
  };
44683
45038
  var parseNodes = (cursor, inPlural) => {
@@ -49966,6 +50321,7 @@ export {
49966
50321
  HOOK_SIGNATURE_LENGTH,
49967
50322
  HOURS_IN_DAY,
49968
50323
  HOURS_IN_HALF_DAY,
50324
+ HTML_CONTENT_TYPE,
49969
50325
  HTTP_STATUS_BAD_REQUEST,
49970
50326
  HTTP_STATUS_GONE,
49971
50327
  HTTP_STATUS_INTERNAL_SERVER_ERROR,
@@ -50137,5 +50493,5 @@ export {
50137
50493
  wrapPageHandlerWithStreamingSlots
50138
50494
  };
50139
50495
 
50140
- //# debugId=87831CE3E620F8A864756E2164756E21
50496
+ //# debugId=02D6FDFF9A463B1864756E2164756E21
50141
50497
  //# sourceMappingURL=index.js.map