konoha-mcp 2.1.4 → 2.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.agents/skills/anbu-skill/references/anthropic-cybersecurity-skills-assets/skills/abusing-shadow-credentials-for-privesc/SKILL.md +97 -135
- package/.agents/skills/anbu-skill/references/anthropic-cybersecurity-skills-assets/skills/abusing-shadow-credentials-for-privesc/references/api-reference.md +30 -47
- package/.agents/skills/anbu-skill/references/anthropic-cybersecurity-skills-assets/skills/abusing-shadow-credentials-for-privesc/references/standards.md +7 -6
- package/.agents/skills/anbu-skill/references/anthropic-cybersecurity-skills-assets/skills/abusing-shadow-credentials-for-privesc/scripts/agent.py +65 -57
- package/.agents/skills/anbu-skill/references/anthropic-cybersecurity-skills-assets/skills/exploiting-active-directory-certificate-services-esc1/scripts/agent.py +36 -17
- package/.agents/skills/anbu-skill/references/anthropic-cybersecurity-skills-assets/skills/exploiting-active-directory-certificate-services-esc1/scripts/process.py +25 -13
- package/.agents/skills/anbu-skill/references/anthropic-cybersecurity-skills-assets/skills/exploiting-adcs-with-certipy/scripts/agent.py +35 -19
- package/.agents/skills/anbu-skill/references/anthropic-cybersecurity-skills-assets/skills/exploiting-constrained-delegation-abuse/scripts/agent.py +30 -8
- package/.agents/skills.fingerprint +1 -1
- package/README.md +4 -4
- package/apps/web/build/adapter-node.js +1 -1
- package/apps/web/build/client/_app/immutable/entry/{app.DwlgEXmV.js → app.DLayTcYu.js} +2 -2
- package/apps/web/build/client/_app/immutable/entry/app.DLayTcYu.js.br +0 -0
- package/apps/web/build/client/_app/immutable/entry/app.DLayTcYu.js.gz +0 -0
- package/apps/web/build/client/_app/immutable/nodes/{9.CVBlvZqX.js → 9.CGMmeMVC.js} +1 -1
- package/apps/web/build/client/_app/immutable/nodes/9.CGMmeMVC.js.br +0 -0
- package/apps/web/build/client/_app/immutable/nodes/9.CGMmeMVC.js.gz +0 -0
- package/apps/web/build/client/_app/version.json +1 -1
- package/apps/web/build/client/_app/version.json.br +0 -0
- package/apps/web/build/client/_app/version.json.gz +0 -0
- package/apps/web/build/server/.vite/manifest.json +15 -15
- package/apps/web/build/server/adapter-index.js +1 -1
- package/apps/web/build/server/adapter-index.js.map +1 -1
- package/apps/web/build/server/adapter-node-env.js +1 -1
- package/apps/web/build/server/adapter-node-env.js.map +1 -1
- package/apps/web/build/server/adapter-node-handler.js +4 -4
- package/apps/web/build/server/adapter-node-handler.js.map +1 -1
- package/apps/web/build/server/chunks/exports.js +9 -9
- package/apps/web/build/server/chunks/exports.js.map +1 -1
- package/apps/web/build/server/chunks/functions.js +1 -1
- package/apps/web/build/server/chunks/functions.js.map +1 -1
- package/apps/web/build/server/chunks/instance.js +33 -33
- package/apps/web/build/server/chunks/instance.js.map +1 -1
- package/apps/web/build/server/chunks/internal.js +19 -19
- package/apps/web/build/server/chunks/internal.js.map +1 -1
- package/apps/web/build/server/chunks/server-errors.js +2 -2
- package/apps/web/build/server/chunks/server-errors.js.map +1 -1
- package/apps/web/build/server/chunks/server.js.map +1 -1
- package/apps/web/build/server/chunks/shared.js +1 -1
- package/apps/web/build/server/chunks/shared.js.map +1 -1
- package/apps/web/build/server/chunks/state.js +1 -1
- package/apps/web/build/server/chunks/state.js.map +1 -1
- package/apps/web/build/server/chunks/sweetAlert.svelte.js.map +1 -1
- package/apps/web/build/server/chunks/uiState.svelte.js.map +1 -1
- package/apps/web/build/server/entries/fallbacks/error.svelte.js +1 -1
- package/apps/web/build/server/entries/fallbacks/error.svelte.js.map +1 -1
- package/apps/web/build/server/entries/pages/_layout.svelte.js.map +1 -1
- package/apps/web/build/server/entries/pages/bridges/_page.svelte.js.map +1 -1
- package/apps/web/build/server/entries/pages/clients/_page.svelte.js.map +1 -1
- package/apps/web/build/server/entries/pages/detector/_page.svelte.js.map +1 -1
- package/apps/web/build/server/entries/pages/docs/_page.svelte.js +1 -1
- package/apps/web/build/server/entries/pages/docs/_page.svelte.js.map +1 -1
- package/apps/web/build/server/entries/pages/persona/_page.svelte.js.map +1 -1
- package/apps/web/build/server/entries/pages/search/_page.svelte.js.map +1 -1
- package/apps/web/build/server/entries/pages/semble/_page.svelte.js.map +1 -1
- package/apps/web/build/server/entries/pages/skills/_page.svelte.js.map +1 -1
- package/apps/web/build/server/entries/pages/tasks/_page.svelte.js.map +1 -1
- package/apps/web/build/server/index.js +1 -1
- package/apps/web/build/server/index.js.map +1 -1
- package/apps/web/build/server/manifest-full.js +1 -1
- package/apps/web/build/server/manifest.js +1 -1
- package/apps/web/build/server/nodes/9.js +1 -1
- package/apps/web/build/server/remote-entry.js +7 -7
- package/apps/web/build/server/remote-entry.js.map +1 -1
- package/apps/web/build/server/server.js +1 -1
- package/apps/web/package.json +2 -2
- package/bin/cli.js +6 -6
- package/bin/lib/ui_commands.js +4 -3
- package/docs/SecurityCompliance/qa_report_2.1.5_2026-10-07.md +65 -0
- package/docs/SecurityCompliance/security_compliance_report_google_policy_2.1.5_2026-10-07.md +74 -0
- package/docs/SecurityCompliance/security_compliance_report_google_policy_2.1.6_2026-10-07.md +78 -0
- package/docs/SecurityCompliance/socket_baseline_2026-10-07.md +60 -0
- package/docs/SecurityCompliance/socket_burndown_2.1.5_2026-10-07.md +73 -0
- package/docs/SecurityCompliance/socket_report_2.1.5_2026-10-07.md +54 -0
- package/docs/architecture/TOKEN-BASELINE.md +1 -1
- package/package.json +3 -17
- package/src/antigravity_manager.js +81 -15
- package/src/db.js +2 -2
- package/src/db_agents.js +1 -1
- package/src/db_bridges.js +1 -1
- package/src/db_savings.js +1 -1
- package/src/db_stats.js +1 -1
- package/src/deploy_utils.js +4 -5
- package/src/doctor.js +10 -0
- package/src/migrate.js +1 -1
- package/src/persona_memory.js +1 -1
- package/src/sqlite_driver.js +211 -0
- package/src/templates/skills/anbu-skill/references/anthropic-cybersecurity-skills-assets/skills/abusing-shadow-credentials-for-privesc/SKILL.md +97 -135
- package/src/templates/skills/anbu-skill/references/anthropic-cybersecurity-skills-assets/skills/abusing-shadow-credentials-for-privesc/references/api-reference.md +30 -47
- package/src/templates/skills/anbu-skill/references/anthropic-cybersecurity-skills-assets/skills/abusing-shadow-credentials-for-privesc/references/standards.md +7 -6
- package/src/templates/skills/anbu-skill/references/anthropic-cybersecurity-skills-assets/skills/abusing-shadow-credentials-for-privesc/scripts/agent.py +65 -57
- package/src/templates/skills/anbu-skill/references/anthropic-cybersecurity-skills-assets/skills/exploiting-active-directory-certificate-services-esc1/scripts/agent.py +36 -17
- package/src/templates/skills/anbu-skill/references/anthropic-cybersecurity-skills-assets/skills/exploiting-active-directory-certificate-services-esc1/scripts/process.py +25 -13
- package/src/templates/skills/anbu-skill/references/anthropic-cybersecurity-skills-assets/skills/exploiting-adcs-with-certipy/scripts/agent.py +35 -19
- package/src/templates/skills/anbu-skill/references/anthropic-cybersecurity-skills-assets/skills/exploiting-constrained-delegation-abuse/scripts/agent.py +30 -8
- package/src/vector_search.js +1 -1
- package/apps/web/build/client/_app/immutable/entry/app.DwlgEXmV.js.br +0 -0
- package/apps/web/build/client/_app/immutable/entry/app.DwlgEXmV.js.gz +0 -0
- package/apps/web/build/client/_app/immutable/nodes/9.CVBlvZqX.js.br +0 -0
- package/apps/web/build/client/_app/immutable/nodes/9.CVBlvZqX.js.gz +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal.js","names":["is_plain_object","parse","stringify","devalue.parse","devalue.uneval","devalue.stringify","devalue.parse","devalue.stringify","devalue.parse","e.handle_error_hook_failed","e.action_throw_fail"],"sources":["../../../../../node_modules/.pnpm/@sveltejs+kit@3.0.1_@sveltejs+vite-plugin-svelte@7.3.1_svelte@5.57.2_vite@8.3.3_@types+_19c5fda78ee95b615548cf969a6c62fc/node_modules/@sveltejs/kit/src/runtime/app/paths/internal/server.js","../../../../../node_modules/.pnpm/@sveltejs+kit@3.0.1_@sveltejs+vite-plugin-svelte@7.3.1_svelte@5.57.2_vite@8.3.3_@types+_19c5fda78ee95b615548cf969a6c62fc/node_modules/@sveltejs/kit/src/runtime/server/dev.js","../../../../../node_modules/.pnpm/@sveltejs+kit@3.0.1_@sveltejs+vite-plugin-svelte@7.3.1_svelte@5.57.2_vite@8.3.3_@types+_19c5fda78ee95b615548cf969a6c62fc/node_modules/@sveltejs/kit/src/runtime/utils.js","../../../../../node_modules/.pnpm/@sveltejs+kit@3.0.1_@sveltejs+vite-plugin-svelte@7.3.1_svelte@5.57.2_vite@8.3.3_@types+_19c5fda78ee95b615548cf969a6c62fc/node_modules/@sveltejs/kit/src/pathname.js","../../../../../node_modules/.pnpm/@sveltejs+kit@3.0.1_@sveltejs+vite-plugin-svelte@7.3.1_svelte@5.57.2_vite@8.3.3_@types+_19c5fda78ee95b615548cf969a6c62fc/node_modules/@sveltejs/kit/src/telemetry.js","../../../../../node_modules/.pnpm/@sveltejs+kit@3.0.1_@sveltejs+vite-plugin-svelte@7.3.1_svelte@5.57.2_vite@8.3.3_@types+_19c5fda78ee95b615548cf969a6c62fc/node_modules/@sveltejs/kit/src/exports/internal/server/telemetry.js","../../../../../node_modules/.pnpm/@sveltejs+kit@3.0.1_@sveltejs+vite-plugin-svelte@7.3.1_svelte@5.57.2_vite@8.3.3_@types+_19c5fda78ee95b615548cf969a6c62fc/node_modules/@sveltejs/kit/src/utils/routing.js","../../../../../node_modules/.pnpm/devalue@6.0.2/node_modules/devalue/src/base64.js","../../../../../node_modules/.pnpm/devalue@6.0.2/node_modules/devalue/src/operations.js","../../../../../node_modules/.pnpm/devalue@6.0.2/node_modules/devalue/src/parse.js","../../../../../node_modules/.pnpm/devalue@6.0.2/node_modules/devalue/src/stringify.js","../../../../../node_modules/.pnpm/@sveltejs+kit@3.0.1_@sveltejs+vite-plugin-svelte@7.3.1_svelte@5.57.2_vite@8.3.3_@types+_19c5fda78ee95b615548cf969a6c62fc/node_modules/@sveltejs/kit/src/runtime/form-utils.js","../../../../../node_modules/.pnpm/@sveltejs+kit@3.0.1_@sveltejs+vite-plugin-svelte@7.3.1_svelte@5.57.2_vite@8.3.3_@types+_19c5fda78ee95b615548cf969a6c62fc/node_modules/@sveltejs/kit/src/utils/http.js","../../../../../node_modules/.pnpm/@sveltejs+kit@3.0.1_@sveltejs+vite-plugin-svelte@7.3.1_svelte@5.57.2_vite@8.3.3_@types+_19c5fda78ee95b615548cf969a6c62fc/node_modules/@sveltejs/kit/src/runtime/app/internal/transport.js","../../../../../node_modules/.pnpm/@sveltejs+kit@3.0.1_@sveltejs+vite-plugin-svelte@7.3.1_svelte@5.57.2_vite@8.3.3_@types+_19c5fda78ee95b615548cf969a6c62fc/node_modules/@sveltejs/kit/src/runtime/shared.js","../../../../../node_modules/.pnpm/@sveltejs+kit@3.0.1_@sveltejs+vite-plugin-svelte@7.3.1_svelte@5.57.2_vite@8.3.3_@types+_19c5fda78ee95b615548cf969a6c62fc/node_modules/@sveltejs/kit/src/utils/error.js","../../../../../node_modules/.pnpm/@sveltejs+kit@3.0.1_@sveltejs+vite-plugin-svelte@7.3.1_svelte@5.57.2_vite@8.3.3_@types+_19c5fda78ee95b615548cf969a6c62fc/node_modules/@sveltejs/kit/src/messages/server-warnings.js","../../../../../node_modules/.pnpm/@sveltejs+kit@3.0.1_@sveltejs+vite-plugin-svelte@7.3.1_svelte@5.57.2_vite@8.3.3_@types+_19c5fda78ee95b615548cf969a6c62fc/node_modules/@sveltejs/kit/src/runtime/server/errors.js","../../../../../node_modules/.pnpm/@sveltejs+kit@3.0.1_@sveltejs+vite-plugin-svelte@7.3.1_svelte@5.57.2_vite@8.3.3_@types+_19c5fda78ee95b615548cf969a6c62fc/node_modules/@sveltejs/kit/src/runtime/server/utils.js","../../../../../node_modules/.pnpm/@sveltejs+kit@3.0.1_@sveltejs+vite-plugin-svelte@7.3.1_svelte@5.57.2_vite@8.3.3_@types+_19c5fda78ee95b615548cf969a6c62fc/node_modules/@sveltejs/kit/src/runtime/server/page/actions.js","../../../../../node_modules/.pnpm/@sveltejs+kit@3.0.1_@sveltejs+vite-plugin-svelte@7.3.1_svelte@5.57.2_vite@8.3.3_@types+_19c5fda78ee95b615548cf969a6c62fc/node_modules/@sveltejs/kit/src/runtime/server/remote-functions.js","../../../../../node_modules/.pnpm/@sveltejs+kit@3.0.1_@sveltejs+vite-plugin-svelte@7.3.1_svelte@5.57.2_vite@8.3.3_@types+_19c5fda78ee95b615548cf969a6c62fc/node_modules/@sveltejs/kit/src/runtime/server/sourcemaps.js","../../../../../node_modules/.pnpm/@sveltejs+kit@3.0.1_@sveltejs+vite-plugin-svelte@7.3.1_svelte@5.57.2_vite@8.3.3_@types+_19c5fda78ee95b615548cf969a6c62fc/node_modules/@sveltejs/kit/src/runtime/server/internal.js"],"sourcesContent":["// TODO get rid of this module — merge the contents into `../server.js`, and expose it to the\n// rest of the codebase as `#app/paths/server`, with an export condition that errors if\n// it is imported on the client\n\nexport const base = __SVELTEKIT_PATHS_BASE__;\nexport let assets = __SVELTEKIT_PATHS_ASSETS__ || base;\nexport const app_dir = __SVELTEKIT_APP_DIR__;\nexport const relative = __SVELTEKIT_PATHS_RELATIVE__;\n\n/** @param {string} path */\nexport function set_assets(path) {\n\tassets = path;\n}\n","const symbol = Symbol.for('sveltekit.global_state');\nconst state = /** @type {Record<symbol, any>} */ (\n\t/** @type {Record<symbol, unknown>} */ (/** @type {unknown} */ (globalThis))[symbol] ??= {}\n);\n\n/**\n * Persist a value across dev server reloads, in case a freshly-invalidated module\n * reads global state that is not set until a request is handled\n * @param {symbol} key\n * @param {any} value\n */\nexport function save(key, value) {\n\tstate[key] = value;\n}\n\n/**\n * Restore a value after a dev server reload\n * @param {symbol} key\n */\nexport function restore(key) {\n\treturn state[key];\n}\n","import { BROWSER } from 'esm-env';\n\nexport const text_encoder = new TextEncoder();\n\n/**\n * `ReadableStream.from`, for runtimes that don't support it (as of writing, every Bun release)\n * @template T\n * @param {AsyncIterable<T>} iterable\n * @returns {ReadableStream<T>}\n */\nexport function stream_from_iterable(iterable) {\n\t// TODO remove the casts once TypeScript's lib includes `ReadableStream.from`\n\tif (/** @type {any} */ (ReadableStream).from) {\n\t\treturn /** @type {any} */ (ReadableStream).from(iterable);\n\t}\n\n\tconst iterator = iterable[Symbol.asyncIterator]();\n\treturn new ReadableStream({\n\t\tasync pull(controller) {\n\t\t\tconst { value, done } = await iterator.next();\n\t\t\tif (done) controller.close();\n\t\t\telse controller.enqueue(value);\n\t\t},\n\t\tasync cancel(reason) {\n\t\t\tawait iterator.return?.(reason);\n\t\t}\n\t});\n}\n\n/**\n * @param {string} head\n * @param {AsyncIterable<string>} chunks\n * @returns {ReadableStream<Uint8Array>} `head` followed by each non-empty chunk, encoded\n */\nexport function stream_text(head, chunks) {\n\treturn stream_from_iterable(\n\t\t(async function* () {\n\t\t\tyield text_encoder.encode(head);\n\t\t\tfor await (const chunk of chunks) {\n\t\t\t\tif (chunk) yield text_encoder.encode(chunk);\n\t\t\t}\n\t\t})()\n\t);\n}\nexport const text_decoder = new TextDecoder();\n\n/**\n * @param {Uint8Array} bytes\n * @returns {string}\n */\nexport function base64_encode(bytes) {\n\t// TODO replace with `bytes.toBase64()` when we require Node >= 25\n\t// Using `Buffer` is faster than iterating\n\tif (!BROWSER && globalThis.Buffer) {\n\t\treturn globalThis.Buffer.from(bytes).toString('base64');\n\t}\n\n\tlet binary = '';\n\n\tfor (let i = 0; i < bytes.length; i++) {\n\t\tbinary += String.fromCharCode(bytes[i]);\n\t}\n\n\treturn btoa(binary);\n}\n\n/**\n * @param {string} encoded\n * @returns {Uint8Array}\n */\nexport function base64_decode(encoded) {\n\t// TODO replace with `Uint8Array.fromBase64(encoded)` when we require Node >= 25\n\t// Using `Buffer` is faster than iterating\n\tif (!BROWSER && globalThis.Buffer) {\n\t\tconst buffer = globalThis.Buffer.from(encoded, 'base64');\n\t\treturn new Uint8Array(buffer);\n\t}\n\n\tconst binary = atob(encoded);\n\tconst bytes = new Uint8Array(binary.length);\n\n\tfor (let i = 0; i < binary.length; i++) {\n\t\tbytes[i] = binary.charCodeAt(i);\n\t}\n\n\treturn bytes;\n}\n","const DATA_SUFFIX = '/__data.json';\nconst HTML_DATA_SUFFIX = '.html__data.json';\n\n/** @param {string} pathname */\nexport function has_data_suffix(pathname) {\n\treturn pathname.endsWith(DATA_SUFFIX) || pathname.endsWith(HTML_DATA_SUFFIX);\n}\n\n/** @param {string} pathname */\nexport function add_data_suffix(pathname) {\n\tif (pathname.endsWith('.html')) return pathname.replace(/\\.html$/, HTML_DATA_SUFFIX);\n\treturn pathname.replace(/\\/$/, '') + DATA_SUFFIX;\n}\n\n/** @param {string} pathname */\nexport function strip_data_suffix(pathname) {\n\tif (pathname.endsWith(HTML_DATA_SUFFIX)) {\n\t\treturn pathname.slice(0, -HTML_DATA_SUFFIX.length) + '.html';\n\t}\n\n\treturn pathname.slice(0, -DATA_SUFFIX.length);\n}\n\nconst ROUTE_SUFFIX = '/__route.js';\nconst HTML_ROUTE_SUFFIX = '.html__route.js';\n\n/**\n * @param {string} pathname\n * @returns {boolean}\n */\nexport function has_resolution_suffix(pathname) {\n\treturn pathname.endsWith(ROUTE_SUFFIX) || pathname.endsWith(HTML_ROUTE_SUFFIX);\n}\n\n/**\n * Convert a regular URL to a route to send to SvelteKit's server-side route resolution endpoint\n * @param {string} pathname\n * @returns {string}\n */\nexport function add_resolution_suffix(pathname) {\n\tif (pathname.endsWith('.html')) return pathname.replace(/\\.html$/, HTML_ROUTE_SUFFIX);\n\treturn pathname.replace(/\\/$/, '') + ROUTE_SUFFIX;\n}\n\n/**\n * @param {string} pathname\n * @returns {string}\n */\nexport function strip_resolution_suffix(pathname) {\n\tif (pathname.endsWith(HTML_ROUTE_SUFFIX)) {\n\t\treturn pathname.slice(0, -HTML_ROUTE_SUFFIX.length) + '.html';\n\t}\n\n\treturn pathname.slice(0, -ROUTE_SUFFIX.length);\n}\n","/** @import { Span, SpanContext } from '@opentelemetry/api' */\n\n/**\n * @type {Span}\n */\nexport const noop_span = {\n\tspanContext() {\n\t\treturn noop_span_context;\n\t},\n\tsetAttribute() {\n\t\treturn this;\n\t},\n\tsetAttributes() {\n\t\treturn this;\n\t},\n\taddEvent() {\n\t\treturn this;\n\t},\n\tsetStatus() {\n\t\treturn this;\n\t},\n\tupdateName() {\n\t\treturn this;\n\t},\n\tend() {\n\t\treturn this;\n\t},\n\tisRecording() {\n\t\treturn false;\n\t},\n\trecordException() {\n\t\treturn this;\n\t},\n\taddLink() {\n\t\treturn this;\n\t},\n\taddLinks() {\n\t\treturn this;\n\t}\n};\n\n/**\n * @type {SpanContext}\n */\nconst noop_span_context = {\n\ttraceId: '',\n\tspanId: '',\n\ttraceFlags: 0\n};\n","/** @import { Tracer, SpanStatusCode, PropagationAPI, ContextAPI } from '@opentelemetry/api' */\n/** @import { RecordSpan } from 'types' */\nimport { HttpError, Redirect } from '../shared.js';\nimport { noop_span } from '../../../telemetry.js';\nimport * as e from '../../../messages/server-errors.js';\n\n// Import this module by its bare specifier so bundled and external code share its state.\n\n/** @type {Promise<{ tracer: Tracer, SpanStatusCode: typeof SpanStatusCode, propagation: PropagationAPI, context: ContextAPI }> | null} */\nexport let otel = null;\n\n/**\n * The caller passes in `import('@opentelemetry/api')` so the import lives behind\n * `__SVELTEKIT_SERVER_TRACING_ENABLED__` in the bundled runtime and is eliminated\n * from builds with tracing disabled, where the package may not be installed.\n * @param {Promise<typeof import('@opentelemetry/api')>} api\n * @returns {void}\n */\nexport function init_tracing(api) {\n\totel ??= api\n\t\t.then((module) => {\n\t\t\treturn {\n\t\t\t\ttracer: module.trace.getTracer('sveltekit'),\n\t\t\t\tpropagation: module.propagation,\n\t\t\t\tcontext: module.context,\n\t\t\t\tSpanStatusCode: module.SpanStatusCode\n\t\t\t};\n\t\t})\n\t\t.catch(() => e.tracing_api_missing());\n}\n\n/** @type {RecordSpan} */\nexport async function record_span({ name, attributes, fn }) {\n\tif (otel === null) {\n\t\treturn fn(noop_span);\n\t}\n\n\tconst { SpanStatusCode, tracer } = await otel;\n\n\treturn tracer.startActiveSpan(name, { attributes }, async (span) => {\n\t\ttry {\n\t\t\treturn await fn(span);\n\t\t} catch (error) {\n\t\t\tif (error instanceof HttpError) {\n\t\t\t\tspan.setAttributes({\n\t\t\t\t\t[`${name}.result.type`]: 'known_error',\n\t\t\t\t\t[`${name}.result.status`]: error.status,\n\t\t\t\t\t[`${name}.result.message`]: error.body.message\n\t\t\t\t});\n\t\t\t\tif (error.status >= 500) {\n\t\t\t\t\tspan.recordException({\n\t\t\t\t\t\tname: 'HttpError',\n\t\t\t\t\t\tmessage: error.body.message\n\t\t\t\t\t});\n\t\t\t\t\tspan.setStatus({\n\t\t\t\t\t\tcode: SpanStatusCode.ERROR,\n\t\t\t\t\t\tmessage: error.body.message\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t} else if (error instanceof Redirect) {\n\t\t\t\tspan.setAttributes({\n\t\t\t\t\t[`${name}.result.type`]: 'redirect',\n\t\t\t\t\t[`${name}.result.status`]: error.status,\n\t\t\t\t\t[`${name}.result.location`]: error.location\n\t\t\t\t});\n\t\t\t} else if (error instanceof Error) {\n\t\t\t\tspan.setAttributes({\n\t\t\t\t\t[`${name}.result.type`]: 'unknown_error'\n\t\t\t\t});\n\t\t\t\tspan.recordException({\n\t\t\t\t\tname: error.name,\n\t\t\t\t\tmessage: error.message,\n\t\t\t\t\t// conditional so this compiles under consumers' `exactOptionalPropertyTypes`\n\t\t\t\t\t...(error.stack !== undefined && { stack: error.stack })\n\t\t\t\t});\n\t\t\t\tspan.setStatus({\n\t\t\t\t\tcode: SpanStatusCode.ERROR,\n\t\t\t\t\tmessage: error.message\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tspan.setAttributes({\n\t\t\t\t\t[`${name}.result.type`]: 'unknown_error'\n\t\t\t\t});\n\t\t\t\tspan.setStatus({ code: SpanStatusCode.ERROR });\n\t\t\t}\n\n\t\t\tthrow error;\n\t\t} finally {\n\t\t\tspan.end();\n\t\t}\n\t});\n}\n","/** @import { ParamMatcher, ParamValue } from '@sveltejs/kit/params' */\nimport * as e from '../messages/shared-errors.js';\nimport { escape_for_regexp } from './regex.js';\n\nconst param_pattern = /^(\\[)?(\\.\\.\\.)?([\\w-]+)(?:=([\\w-]+))?(\\])?$/;\n\nconst root_group_pattern = /^\\/\\((?:[^)]+)\\)$/;\n\nconst escape_sequence_pattern = /\\[([ux])\\+([^\\]]+)\\]/;\n\n/**\n * Decodes the codepoints of an `[x+nn]` or `[u+nnnn]` escape sequence\n * @param {string} code the sequence without its `[x+`/`[u+` prefix or `]` suffix\n */\nexport function decode_escape_sequence(code) {\n\treturn String.fromCodePoint(...code.split('-').map((codepoint) => parseInt(codepoint, 16)));\n}\n\n/**\n * Encodes the characters that `decode_pathname` leaves untouched, so that a decoded\n * escape sequence still matches the pattern `parse_route_id` builds for it\n * @param {string} str\n */\nexport function encode_pathname_chars(str) {\n\treturn str.replace(\n\t\t/[%/?#]/g,\n\t\t(char) => '%' + char.charCodeAt(0).toString(16).toUpperCase().padStart(2, '0')\n\t);\n}\n\n/**\n * Creates the regex pattern, extracts parameter names, and generates types for a route\n * @param {string} id\n */\nexport function parse_route_id(id) {\n\t/** @type {import('types').RouteParam[]} */\n\tconst params = [];\n\n\tconst pattern =\n\t\tid === '/' || root_group_pattern.test(id)\n\t\t\t? /^\\/$/\n\t\t\t: new RegExp(\n\t\t\t\t\t`^${get_route_segments(id)\n\t\t\t\t\t\t.map((segment) => {\n\t\t\t\t\t\t\t// special case — /[...rest]/ could contain zero segments\n\t\t\t\t\t\t\tconst rest_match = /^\\[\\.\\.\\.([\\w-]+)(?:=([\\w-]+))?\\]$/.exec(segment);\n\t\t\t\t\t\t\tif (rest_match) {\n\t\t\t\t\t\t\t\tparams.push({\n\t\t\t\t\t\t\t\t\tname: rest_match[1],\n\t\t\t\t\t\t\t\t\tmatcher: rest_match[2],\n\t\t\t\t\t\t\t\t\toptional: false,\n\t\t\t\t\t\t\t\t\trest: true,\n\t\t\t\t\t\t\t\t\tchained: true\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\treturn '(?:/([^]*))?';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t// special case — /[[optional]]/ could contain zero segments\n\t\t\t\t\t\t\tconst optional_match = /^\\[\\[([\\w-]+)(?:=([\\w-]+))?\\]\\]$/.exec(segment);\n\t\t\t\t\t\t\tif (optional_match) {\n\t\t\t\t\t\t\t\tparams.push({\n\t\t\t\t\t\t\t\t\tname: optional_match[1],\n\t\t\t\t\t\t\t\t\tmatcher: optional_match[2],\n\t\t\t\t\t\t\t\t\toptional: true,\n\t\t\t\t\t\t\t\t\trest: false,\n\t\t\t\t\t\t\t\t\tchained: true\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\treturn '(?:/([^/]+))?';\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif (!segment) {\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tconst parts = segment.split(/\\[(.+?)\\](?!\\])/);\n\t\t\t\t\t\t\tconst result = parts\n\t\t\t\t\t\t\t\t.map((content, i) => {\n\t\t\t\t\t\t\t\t\tif (i % 2) {\n\t\t\t\t\t\t\t\t\t\tif (content.startsWith('x+') || content.startsWith('u+')) {\n\t\t\t\t\t\t\t\t\t\t\treturn escape(decode_escape_sequence(content.slice(2)));\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t// We know the match cannot be null because manifest generation checks\n\t\t\t\t\t\t\t\t\t\t// each route ID with `validate_route_id_params` first\n\t\t\t\t\t\t\t\t\t\tconst match = /** @type {RegExpExecArray} */ (param_pattern.exec(content));\n\n\t\t\t\t\t\t\t\t\t\tconst [, is_optional, is_rest, name, matcher] = match;\n\t\t\t\t\t\t\t\t\t\t// It's assumed that the following invalid route id cases are already checked\n\t\t\t\t\t\t\t\t\t\t// - unbalanced brackets\n\t\t\t\t\t\t\t\t\t\t// - optional param following rest param\n\n\t\t\t\t\t\t\t\t\t\tparams.push({\n\t\t\t\t\t\t\t\t\t\t\tname,\n\t\t\t\t\t\t\t\t\t\t\tmatcher,\n\t\t\t\t\t\t\t\t\t\t\toptional: !!is_optional,\n\t\t\t\t\t\t\t\t\t\t\trest: !!is_rest,\n\t\t\t\t\t\t\t\t\t\t\tchained: is_rest ? i === 1 && parts[0] === '' : false\n\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\treturn is_rest ? '([^]*?)' : is_optional ? '([^/]*)?' : '([^/]+?)';\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\treturn escape(content);\n\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t.join('');\n\n\t\t\t\t\t\t\treturn '/' + result;\n\t\t\t\t\t\t})\n\t\t\t\t\t\t.join('')}/?$`\n\t\t\t\t);\n\n\treturn { pattern, params };\n}\n\n/**\n * Returns the first param in a route ID whose name or matcher contains characters other than\n * underscores, hyphens and alphanumeric characters, mirroring the segments `parse_route_id` parses\n * @param {string} id\n * @returns {string | undefined}\n */\nexport function validate_route_id_params(id) {\n\tif (id === '/' || root_group_pattern.test(id)) return;\n\n\tfor (const segment of get_route_segments(id)) {\n\t\tif (/^\\[\\.\\.\\.([\\w-]+)(?:=([\\w-]+))?\\]$/.test(segment)) continue;\n\t\tif (/^\\[\\[([\\w-]+)(?:=([\\w-]+))?\\]\\]$/.test(segment)) continue;\n\t\tif (!segment) continue;\n\n\t\tconst parts = segment.split(/\\[(.+?)\\](?!\\])/);\n\t\tfor (let i = 1; i < parts.length; i += 2) {\n\t\t\tconst content = parts[i];\n\t\t\tif (content.startsWith('x+') || content.startsWith('u+')) continue;\n\t\t\tif (!param_pattern.test(content)) return content;\n\t\t}\n\t}\n}\n\n/**\n * Returns `false` for `(group)` segments\n * @param {string} segment\n */\nfunction affects_path(segment) {\n\treturn segment !== '' && !/^\\([^)]+\\)$/.test(segment);\n}\n\n/**\n * Splits a route id into its segments, removing segments that\n * don't affect the path (i.e. groups). The root route is represented by `/`\n * and will be returned as `['']`.\n * @param {string} route\n * @returns string[]\n */\nexport function get_route_segments(route) {\n\treturn route.slice(1).split('/').filter(affects_path);\n}\n\n/**\n * @param {ParamMatcher} matcher\n * @param {string} value\n * @returns {{ success: true, value: any } | { success: false }}\n */\nfunction run_matcher(matcher, value) {\n\tconst result = matcher['~standard'].validate(value);\n\n\tif (result instanceof Promise) {\n\t\te.param_matcher_async();\n\t}\n\n\tif (result.issues) {\n\t\treturn { success: false };\n\t}\n\n\tconst parsed = result.value;\n\n\tif (\n\t\ttypeof parsed !== 'string' &&\n\t\ttypeof parsed !== 'number' &&\n\t\ttypeof parsed !== 'boolean' &&\n\t\ttypeof parsed !== 'bigint'\n\t) {\n\t\te.param_matcher_result_invalid();\n\t}\n\n\treturn { success: true, value: parsed };\n}\n\n/**\n * @param {RegExpMatchArray} match\n * @param {import('types').RouteParam[]} params\n * @param {Record<string, ParamMatcher>} matchers\n */\nexport function exec(match, params, matchers) {\n\t/** @type {Record<string, any>} */\n\tconst result = {};\n\n\tconst values = match.slice(1);\n\tconst values_needing_match = values.filter((value) => value !== undefined);\n\n\tlet buffered = 0;\n\n\tfor (let i = 0; i < params.length; i += 1) {\n\t\tconst param = params[i];\n\t\tlet value = values[i - buffered];\n\n\t\t// in the `[[a=b]]/.../[...rest]` case, if one or more optional parameters\n\t\t// weren't matched, roll the skipped values into the rest\n\t\tif (param.chained && param.rest && buffered) {\n\t\t\tvalue = values\n\t\t\t\t.slice(i - buffered, i + 1)\n\t\t\t\t.filter((s) => s)\n\t\t\t\t.join('/');\n\n\t\t\tbuffered = 0;\n\t\t}\n\n\t\t// if `value` is undefined, it means this is an optional or rest parameter\n\t\tif (value === undefined) {\n\t\t\tif (param.rest) {\n\t\t\t\t// We need to allow the matcher to run so that it can decide if this optional rest param should be allowed to match\n\t\t\t\tvalue = '';\n\t\t\t} else {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\n\t\tconst decoded = decodeURIComponent(value);\n\n\t\tif (param.matcher) {\n\t\t\tconst outcome = run_matcher(matchers[param.matcher], decoded);\n\n\t\t\tif (!outcome.success) {\n\t\t\t\t// in the `/[[a=b]]/...` case, if the value didn't satisfy the matcher,\n\t\t\t\t// keep track of the number of skipped optional parameters and continue\n\t\t\t\tif (param.optional && param.chained) {\n\t\t\t\t\tbuffered++;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t// otherwise, if the matcher returns `false`, the route did not match\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tresult[param.name] = outcome.value;\n\t\t} else {\n\t\t\tresult[param.name] = decoded;\n\t\t}\n\n\t\t// Now that the params match, reset the buffer if the next param isn't the [...rest]\n\t\t// and the next value is defined, otherwise the buffer will cause us to skip values\n\t\tconst next_param = params[i + 1];\n\t\tconst next_value = values[i + 1];\n\t\tif (next_param && !next_param.rest && next_param.optional && next_value && param.chained) {\n\t\t\tbuffered = 0;\n\t\t}\n\n\t\t// There are no more params and no more values, but all non-empty values have been matched\n\t\tif (!next_param && !next_value && Object.keys(result).length === values_needing_match.length) {\n\t\t\tbuffered = 0;\n\t\t}\n\t\tcontinue;\n\t}\n\n\tif (buffered) return;\n\treturn result;\n}\n\n/**\n * `decode_pathname` leaves these characters untouched, so routes have to match their encoded forms\n * @type {Record<string, string>}\n */\nconst encoded = {\n\t'%': '%25',\n\t'/': '%2[Ff]',\n\t'?': '%3[Ff]',\n\t'#': '%23'\n};\n\n/** @param {string} str */\nfunction escape(str) {\n\t// the replacements in `encoded` are regex source themselves, so they must not be escaped again\n\treturn str\n\t\t.normalize()\n\t\t.split(/([%/?#])/)\n\t\t.map((part, i) => (i % 2 ? encoded[part] : escape_for_regexp(part)))\n\t\t.join('');\n}\n\nconst basic_param_pattern = /\\[(\\[)?(\\.\\.\\.)?([\\w-]+?)(?:=([\\w-]+))?\\]\\]?/g;\n\n// escape sequences are expanded in the same pass as the params, so that a param\n// value containing `[x+2f]` is not itself expanded\nexport const segment_pattern = new RegExp(\n\t`${escape_sequence_pattern.source}|${basic_param_pattern.source}`,\n\t'g'\n);\n\n/**\n * Populate a route ID with params to resolve a pathname.\n * @example\n * ```js\n * resolveRoute(\n * `/blog/[slug]/[...somethingElse]`,\n * {\n * slug: 'hello-world',\n * somethingElse: 'something/else'\n * }\n * ); // `/blog/hello-world/something/else`\n * ```\n * @param {string} id\n * @param {Record<string, ParamValue | undefined>} params\n * @returns {string}\n */\nexport function resolve_route(id, params) {\n\tconst segments = get_route_segments(id);\n\tconst has_id_trailing_slash = id != '/' && id.endsWith('/');\n\n\treturn (\n\t\t'/' +\n\t\tsegments\n\t\t\t.map((segment) =>\n\t\t\t\tsegment.replace(segment_pattern, (_, escape_type, escape_code, optional, rest, name) => {\n\t\t\t\t\tif (escape_type) return encode_pathname_chars(decode_escape_sequence(escape_code));\n\n\t\t\t\t\tconst value = params[name];\n\n\t\t\t\t\tif (value === undefined || value === '') {\n\t\t\t\t\t\tif (optional) return '';\n\t\t\t\t\t\tif (rest && value !== undefined) return '';\n\t\t\t\t\t\te.route_param_missing({ name, id });\n\t\t\t\t\t}\n\n\t\t\t\t\tif (typeof value === 'string') {\n\t\t\t\t\t\tif (value.startsWith('/') || value.endsWith('/')) {\n\t\t\t\t\t\t\te.route_param_slash({ name, id });\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\treturn value;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (\n\t\t\t\t\t\ttypeof value === 'number' ||\n\t\t\t\t\t\ttypeof value === 'boolean' ||\n\t\t\t\t\t\ttypeof value === 'bigint'\n\t\t\t\t\t) {\n\t\t\t\t\t\treturn String(value);\n\t\t\t\t\t}\n\n\t\t\t\t\te.route_param_value_invalid({ name, id });\n\t\t\t\t})\n\t\t\t)\n\t\t\t.filter(Boolean)\n\t\t\t.join('/') +\n\t\t(has_id_trailing_slash ? '/' : '')\n\t);\n}\n\n/**\n * @param {import('types').SSRNode} node\n * @returns {boolean}\n */\nexport function has_server_load(node) {\n\treturn node.server?.load !== undefined || node.server?.trailingSlash !== undefined;\n}\n\n/**\n * Find the first route that matches the given path\n * @template {{pattern: RegExp, params: import('types').RouteParam[]}} Route\n * @param {string} path - The decoded pathname to match\n * @param {Route[]} routes\n * @param {Record<string, ParamMatcher>} matchers\n * @returns {{ route: Route, params: Record<string, any> } | null}\n */\nexport function find_route(path, routes, matchers) {\n\tfor (const route of routes) {\n\t\tconst match = route.pattern.exec(path);\n\t\tif (!match) continue;\n\n\t\tconst matched = exec(match, route.params, matchers);\n\t\tif (matched) {\n\t\t\treturn {\n\t\t\t\troute,\n\t\t\t\tparams: matched\n\t\t\t};\n\t\t}\n\t}\n\treturn null;\n}\n","/* Baseline 2025 runtimes */\n\n/**\t@type {(array_buffer: ArrayBuffer) => string} */\nexport function encode_native(array_buffer) {\n\treturn new Uint8Array(array_buffer).toBase64();\n}\n\n/**\t@type {(base64: string) => ArrayBuffer} */\nexport function decode_native(base64) {\n\treturn Uint8Array.fromBase64(base64).buffer;\n}\n\n/* Node-compatible runtimes */\n\n/** @type {(array_buffer: ArrayBuffer) => string} */\nexport function encode_buffer(array_buffer) {\n\treturn Buffer.from(array_buffer).toString('base64');\n}\n\n/**\t@type {(base64: string) => ArrayBuffer} */\nexport function decode_buffer(base64) {\n\treturn Uint8Array.from(Buffer.from(base64, 'base64')).buffer;\n}\n\n/* Legacy runtimes */\n\n/** @type {(array_buffer: ArrayBuffer) => string} */\nexport function encode_legacy(array_buffer) {\n\tconst array = new Uint8Array(array_buffer);\n\tlet binary = '';\n\n\t// the maximum number of arguments to String.fromCharCode.apply\n\t// should be around 0xFFFF in modern engines\n\tconst chunk_size = 0x8000;\n\tfor (let i = 0; i < array.length; i += chunk_size) {\n\t\tconst chunk = array.subarray(i, i + chunk_size);\n\t\t// `apply` accepts any array-like at runtime; lib types only admit `number[]`.\n\t\tbinary += String.fromCharCode.apply(\n\t\t\tnull,\n\t\t\t/** @type {number[]} */ (/** @type {unknown} */ (chunk))\n\t\t);\n\t}\n\n\treturn btoa(binary);\n}\n\n/**\t@type {(base64: string) => ArrayBuffer} */\nexport function decode_legacy(base64) {\n\tconst binary_string = atob(base64);\n\tconst len = binary_string.length;\n\tconst array = new Uint8Array(len);\n\n\tfor (let i = 0; i < len; i++) {\n\t\tarray[i] = binary_string.charCodeAt(i);\n\t}\n\n\treturn array.buffer;\n}\n\nconst native = typeof Uint8Array.fromBase64 === 'function';\nconst buffer = typeof process === 'object' && process.versions?.node !== undefined;\n\nexport const encode64 = native ? encode_native : buffer ? encode_buffer : encode_legacy;\nexport const decode64 = native ? decode_native : buffer ? decode_buffer : decode_legacy;\n","import { MAX_ARRAY_INDEX } from './constants.js';\nimport {\n\tenumerable_symbols,\n\tget_type,\n\tis_buffer,\n\tis_plain_object,\n\tvalid_array_indices\n} from './utils.js';\n\n/**\n * Merges caller-provided operation overrides over the defaults. Iterating the\n * default keys (rather than the override's own keys) means nullish members\n * fall back to the default, and inherited members — e.g. from a class\n * instance — are picked up.\n *\n * @template {Record<string, any>} T\n * @param {T} defaults\n * @param {Partial<T> | undefined} overrides\n * @returns {T}\n */\nexport function merge_operations(defaults, overrides) {\n\tif (!overrides) return defaults;\n\n\tconst merged = /** @type {T} */ ({});\n\n\tfor (const key of /** @type {(keyof T)[]} */ (Object.keys(defaults))) {\n\t\tmerged[key] = overrides[key] ?? defaults[key];\n\t}\n\n\treturn merged;\n}\n\n/** @type {{ kind: 'not-plain' }} */\nconst NOT_PLAIN = /* @__PURE__ */ Object.freeze({ kind: 'not-plain' });\n\n/** @type {{ kind: 'symbol-keys' }} */\nconst SYMBOL_KEYS = /* @__PURE__ */ Object.freeze({ kind: 'symbol-keys' });\n\n/**\n * The default implementations of every introspection/extraction operation\n * `stringify` performs on the value being serialized. Each one uses native\n * JavaScript semantics (property access, iteration, prototype methods, etc).\n *\n * Pass overrides via the `operations` option of `stringify`/`stringifyAsync`\n * to customize how values are inspected — e.g. to serialize values without\n * triggering getters, proxy traps, or patched prototype methods, or to\n * serialize values that live in a different JavaScript runtime (a `node:vm`\n * context, a WASM-hosted engine, a remote process) through handle objects.\n *\n * The object is frozen — it is shared by every `stringify` call that does\n * not override a given operation.\n *\n */\n/** @type {import('./types.js').DefaultStringifyOperations} */\nconst stringify_operations = {\n\tidentify: (value) => value,\n\n\ttypeOf: (value) => (value === null ? 'null' : typeof value),\n\n\ttoPrimitive: (value) => value,\n\n\ttagOf: (value) => get_type(value),\n\n\tisThenable: (value) => typeof value.then === 'function',\n\n\ttoPromise: (thenable) => Promise.resolve(thenable),\n\n\tunbox: (boxed) => boxed.valueOf(),\n\n\ttoISOString: (date) => (isNaN(date.getDate()) ? '' : date.toISOString()),\n\n\ttoStringValue: (value) => value.toString(),\n\n\tregExpInfo: (regexp) => ({ source: regexp.source, flags: regexp.flags }),\n\n\tvaluesOf: (set) => set,\n\n\tentriesOf: (map) => map,\n\n\tviewInfo: (view) => {\n\t\t// Node Buffers may share a pool containing unrelated, sensitive data.\n\t\t// Copy only the visible bytes, without using Buffer's pooling or slice.\n\t\tif (is_buffer(view)) view = new Uint8Array(view);\n\n\t\treturn {\n\t\t\tbuffer: view.buffer,\n\t\t\tbyteOffset: view.byteOffset,\n\t\t\tbyteLength: view.byteLength,\n\t\t\tlength: view.length,\n\t\t\tbufferByteLength: view.buffer.byteLength\n\t\t};\n\t},\n\n\ttoArrayBuffer: (buffer) => buffer,\n\n\tlengthOf: (array) => array.length,\n\n\thasOwn: (value, key) => Object.hasOwn(value, key),\n\n\tindicesOf: (array) => valid_array_indices(array),\n\n\tshapeOf: (value) => {\n\t\tif (!is_plain_object(value)) return NOT_PLAIN;\n\t\tif (enumerable_symbols(value).length > 0) return SYMBOL_KEYS;\n\n\t\treturn {\n\t\t\tkind: Object.getPrototypeOf(value) === null ? 'null-proto' : 'plain',\n\t\t\tkeys: Object.keys(value)\n\t\t};\n\t},\n\n\tget: (value, key) => value[key]\n};\n\nexport const default_stringify_operations = /* @__PURE__ */ Object.freeze(stringify_operations);\n\nconst array_buffer_byte_length = /** @type {() => number} */ (\n\tObject.getOwnPropertyDescriptor(ArrayBuffer.prototype, 'byteLength')?.get\n);\n\nconst shared_array_buffer_byte_length =\n\ttypeof SharedArrayBuffer === 'undefined'\n\t\t? undefined\n\t\t: Object.getOwnPropertyDescriptor(SharedArrayBuffer.prototype, 'byteLength')?.get;\n\n/**\n * The default implementations of every construction operation `parse` and\n * `unflatten` perform while reviving a value. Each one uses native\n * JavaScript semantics (built-in constructors, property assignment, etc).\n *\n * Pass overrides via the `operations` option of `parse`/`unflatten` to\n * customize how values are built — e.g. to construct them from the\n * intrinsics of a different realm (a `node:vm` context), or to build up\n * values inside another JavaScript runtime (a WASM-hosted engine, a remote\n * process) through handle objects.\n *\n * The object is frozen — it is shared by every `parse` call that does not\n * override a given operation.\n *\n */\n/** @type {import('./types.js').DefaultParseOperations} */\nconst parse_operations = {\n\tfromPrimitive: (primitive) => primitive,\n\n\tfromISOString: (iso) => new Date(iso),\n\n\tfromStringValue: (tag, text) => {\n\t\tif (tag === 'URL') return new URL(text);\n\t\tif (tag === 'URLSearchParams') return new URLSearchParams(text);\n\t\t// 'Temporal.Instant', 'Temporal.PlainDate', ...\n\t\t// @ts-expect-error TS doesn't know about Temporal yet\n\t\treturn Temporal[tag.slice(9)].from(text);\n\t},\n\n\tfromArrayBuffer: (buffer) => buffer,\n\n\tfromRegExpInfo: (source, flags) => new RegExp(source, flags),\n\n\tfromViewInfo: (tag, buffer, byteOffset, length) => {\n\t\t// A reviver can replace an ArrayBuffer with a length or array-like value,\n\t\t// which a typed array constructor would use to allocate a new buffer.\n\t\t// The native getters check internal slots, so they work across realms\n\t\t// and cannot be fooled by a forged prototype or Symbol.toStringTag.\n\t\ttry {\n\t\t\tarray_buffer_byte_length.call(buffer);\n\t\t} catch (error) {\n\t\t\tif (!shared_array_buffer_byte_length) throw error;\n\t\t\tshared_array_buffer_byte_length.call(buffer);\n\t\t}\n\n\t\tconst Constructor = /** @type {any} */ (globalThis)[tag];\n\t\treturn byteOffset !== undefined\n\t\t\t? new Constructor(buffer, byteOffset, length)\n\t\t\t: new Constructor(buffer);\n\t},\n\n\tbox: (value) => Object(value),\n\n\tcreateArray: (length) => new Array(length),\n\n\tcreateSparseArray: (length) => {\n\t\t/** @type {any[]} */\n\t\tconst array = [];\n\n\t\t// Setting `array.length = length` (or equivalently calling\n\t\t// `new Array(length)`) on an untrusted length is a DoS vector: V8\n\t\t// eagerly allocates a contiguous backing store for array lengths below\n\t\t// ~10^8, so a small payload with a huge declared length can force\n\t\t// arbitrary memory allocation. Touching the largest-possible index\n\t\t// first forces V8 into dictionary-elements mode, where `length` is\n\t\t// just a number and no contiguous allocation occurs.\n\t\tarray[MAX_ARRAY_INDEX] = undefined;\n\t\tdelete array[MAX_ARRAY_INDEX];\n\t\tarray.length = length;\n\n\t\treturn array;\n\t},\n\n\tcreateObject: () => ({}),\n\n\tcreateNullPrototypeObject: () => Object.create(null),\n\n\tcreateSet: () => new Set(),\n\n\tcreateMap: () => new Map(),\n\n\tset: (target, key, value) => {\n\t\ttarget[key] = value;\n\t},\n\n\taddValue: (set, value) => {\n\t\tset.add(value);\n\t},\n\n\taddEntry: (map, key, value) => {\n\t\tmap.set(key, value);\n\t}\n};\n\nexport const default_parse_operations = /* @__PURE__ */ Object.freeze(parse_operations);\n","import { decode64 } from './base64.js';\nimport {\n\tHOLE,\n\tNAN,\n\tNEGATIVE_INFINITY,\n\tNEGATIVE_ZERO,\n\tPOSITIVE_INFINITY,\n\tSPARSE,\n\tUNDEFINED\n} from './constants.js';\nimport { default_parse_operations, merge_operations } from './operations.js';\nimport { is_valid_array_index, is_valid_array_len } from './utils.js';\n\nfunction invalid() {\n\tthrow new Error('Invalid input');\n}\n\n/**\n * Revive a value serialized with `devalue.stringify`\n * @param {string} serialized\n * @param {Record<string, (value: any) => any>} [revivers]\n * @param {import('./types.js').ParseOptions} [options]\n */\nexport function parse(serialized, revivers, options) {\n\treturn unflatten(JSON.parse(serialized), revivers, options);\n}\n\n/**\n * Revive a value flattened with `devalue.stringify`\n * @param {number | any[]} parsed\n * @param {Record<string, (value: any) => any>} [revivers]\n * @param {import('./types.js').ParseOptions} [options]\n */\nexport function unflatten(parsed, revivers, options) {\n\t/** @type {import('./types.js').ParseOperations} */\n\tconst ops = merge_operations(default_parse_operations, options?.operations);\n\n\tif (typeof parsed === 'number') return hydrate(parsed, true);\n\n\tif (!Array.isArray(parsed) || parsed.length === 0) {\n\t\tinvalid();\n\t}\n\n\tconst values = /** @type {any[]} */ (parsed);\n\n\tconst hydrated = Array(values.length);\n\n\t/**\n\t * A set of values currently being hydrated with custom revivers,\n\t * used to detect invalid cyclical dependencies\n\t * @type {Set<number> | null}\n\t */\n\tlet hydrating = null;\n\n\t/**\n\t * @param {number} index\n\t * @returns {any}\n\t */\n\tfunction get_raw(index) {\n\t\tif (!is_valid_array_index(index) || index >= values.length) {\n\t\t\tinvalid();\n\t\t}\n\n\t\treturn values[index];\n\t}\n\n\t/**\n\t * @param {number} index\n\t * @returns {any}\n\t */\n\tfunction hydrate(index, standalone = false) {\n\t\tif (index === UNDEFINED) return ops.fromPrimitive(undefined);\n\t\tif (index === NAN) return ops.fromPrimitive(NaN);\n\t\tif (index === POSITIVE_INFINITY) return ops.fromPrimitive(Infinity);\n\t\tif (index === NEGATIVE_INFINITY) return ops.fromPrimitive(-Infinity);\n\t\tif (index === NEGATIVE_ZERO) return ops.fromPrimitive(-0);\n\n\t\tif (standalone || typeof index !== 'number') {\n\t\t\tinvalid();\n\t\t}\n\n\t\tif (index in hydrated) return hydrated[index];\n\n\t\tif (index >= values.length) {\n\t\t\tinvalid();\n\t\t}\n\n\t\tconst value = values[index];\n\n\t\tif (!value || typeof value !== 'object') {\n\t\t\thydrated[index] = ops.fromPrimitive(value);\n\t\t} else if (Array.isArray(value)) {\n\t\t\tif (typeof value[0] === 'string') {\n\t\t\t\tconst type = value[0];\n\n\t\t\t\tconst reviver = revivers && Object.hasOwn(revivers, type) ? revivers[type] : undefined;\n\n\t\t\t\tif (reviver) {\n\t\t\t\t\tlet i = value[1];\n\t\t\t\t\tif (typeof i !== 'number') {\n\t\t\t\t\t\t// if it's not a number, it was serialized by a builtin reviver\n\t\t\t\t\t\t// so we need to munge it into the format expected by a custom reviver\n\t\t\t\t\t\ti = values.push(value[1]) - 1;\n\t\t\t\t\t}\n\n\t\t\t\t\t// If the payload is already hydrated, its recursion has already\n\t\t\t\t\t// terminated (e.g. a self-referential object cached itself before\n\t\t\t\t\t// following its own back-reference), so revive it directly. Falling\n\t\t\t\t\t// through to the `hydrating` guard here would wrongly reject a valid\n\t\t\t\t\t// cycle. An actually infinite payload (e.g. `[[\"Custom\", 0]]`) is never\n\t\t\t\t\t// cached, so it still hits the guard below.\n\t\t\t\t\tif (Object.hasOwn(hydrated, i)) {\n\t\t\t\t\t\treturn (hydrated[index] = reviver(hydrated[i]));\n\t\t\t\t\t}\n\n\t\t\t\t\thydrating ??= new Set();\n\n\t\t\t\t\tif (hydrating.has(i)) {\n\t\t\t\t\t\tthrow new Error('Invalid circular reference');\n\t\t\t\t\t}\n\n\t\t\t\t\thydrating.add(i);\n\t\t\t\t\thydrated[index] = reviver(hydrate(i));\n\t\t\t\t\thydrating.delete(i);\n\n\t\t\t\t\treturn hydrated[index];\n\t\t\t\t}\n\n\t\t\t\tswitch (type) {\n\t\t\t\t\tcase 'Date':\n\t\t\t\t\t\thydrated[index] = ops.fromISOString(value[1]);\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'Set':\n\t\t\t\t\t\tconst set = ops.createSet();\n\t\t\t\t\t\thydrated[index] = set;\n\t\t\t\t\t\tfor (let i = 1; i < value.length; i += 1) {\n\t\t\t\t\t\t\tops.addValue(set, hydrate(value[i]));\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'Map':\n\t\t\t\t\t\tconst map = ops.createMap();\n\t\t\t\t\t\thydrated[index] = map;\n\t\t\t\t\t\tfor (let i = 1; i < value.length; i += 2) {\n\t\t\t\t\t\t\tops.addEntry(map, hydrate(value[i]), hydrate(value[i + 1]));\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'RegExp':\n\t\t\t\t\t\thydrated[index] = ops.fromRegExpInfo(value[1], value[2]);\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'Object': {\n\t\t\t\t\t\tconst wrapped_index = value[1];\n\n\t\t\t\t\t\t// Only a primitive can be boxed. The negative sentinels below are the\n\t\t\t\t\t\t// ones `stringify` emits for boxed numbers; every other sentinel\n\t\t\t\t\t\t// (`UNDEFINED`, `HOLE`, `SPARSE`) would box `undefined` into a plain\n\t\t\t\t\t\t// `{}`, which is not a value `stringify` can produce.\n\t\t\t\t\t\tconst is_boxable_sentinel =\n\t\t\t\t\t\t\twrapped_index === NAN ||\n\t\t\t\t\t\t\twrapped_index === POSITIVE_INFINITY ||\n\t\t\t\t\t\t\twrapped_index === NEGATIVE_INFINITY ||\n\t\t\t\t\t\t\twrapped_index === NEGATIVE_ZERO;\n\n\t\t\t\t\t\tif (!is_boxable_sentinel) {\n\t\t\t\t\t\t\tconst wrapped = get_raw(wrapped_index);\n\n\t\t\t\t\t\t\tconst is_bigint = Array.isArray(wrapped) && wrapped[0] === 'BigInt';\n\n\t\t\t\t\t\t\tif ((wrapped === undefined || typeof wrapped === 'object') && !is_bigint) {\n\t\t\t\t\t\t\t\t// avoid infinite recusion in case of malformed input\n\t\t\t\t\t\t\t\tinvalid();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\thydrated[index] = ops.box(hydrate(wrapped_index));\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tcase 'BigInt':\n\t\t\t\t\t\thydrated[index] = ops.fromPrimitive(BigInt(value[1]));\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'null':\n\t\t\t\t\t\tconst obj = ops.createNullPrototypeObject();\n\t\t\t\t\t\thydrated[index] = obj;\n\t\t\t\t\t\tfor (let i = 1; i < value.length; i += 2) {\n\t\t\t\t\t\t\tconst key = value[i];\n\t\t\t\t\t\t\tif (typeof key !== 'string') {\n\t\t\t\t\t\t\t\tthrow new Error('Cannot parse an object with a non-string key');\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif (key === '__proto__') {\n\t\t\t\t\t\t\t\tthrow new Error('Cannot parse an object with a `__proto__` property');\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tops.set(obj, key, hydrate(value[i + 1]));\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'Int8Array':\n\t\t\t\t\tcase 'Uint8Array':\n\t\t\t\t\tcase 'Uint8ClampedArray':\n\t\t\t\t\tcase 'Int16Array':\n\t\t\t\t\tcase 'Uint16Array':\n\t\t\t\t\tcase 'Float16Array':\n\t\t\t\t\tcase 'Int32Array':\n\t\t\t\t\tcase 'Uint32Array':\n\t\t\t\t\tcase 'Float32Array':\n\t\t\t\t\tcase 'Float64Array':\n\t\t\t\t\tcase 'BigInt64Array':\n\t\t\t\t\tcase 'BigUint64Array':\n\t\t\t\t\tcase 'DataView': {\n\t\t\t\t\t\tconst buffer_index = value[1];\n\n\t\t\t\t\t\tconst raw = get_raw(buffer_index);\n\n\t\t\t\t\t\tif (!Array.isArray(raw) || raw[0] !== 'ArrayBuffer') {\n\t\t\t\t\t\t\t// without this, if we receive malformed input we could\n\t\t\t\t\t\t\t// end up trying to hydrate in a circle or allocate\n\t\t\t\t\t\t\t// huge amounts of memory when we call `new TypedArrayConstructor(buffer)`\n\t\t\t\t\t\t\tinvalid();\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tconst buffer = hydrate(buffer_index);\n\n\t\t\t\t\t\thydrated[index] = ops.fromViewInfo(type, buffer, value[2], value[3]);\n\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tcase 'ArrayBuffer': {\n\t\t\t\t\t\tconst base64 = value[1];\n\t\t\t\t\t\tif (typeof base64 !== 'string') {\n\t\t\t\t\t\t\tthrow new Error('Invalid ArrayBuffer encoding');\n\t\t\t\t\t\t}\n\t\t\t\t\t\thydrated[index] = ops.fromArrayBuffer(decode64(base64));\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tcase 'URL':\n\t\t\t\t\tcase 'URLSearchParams':\n\t\t\t\t\tcase 'Temporal.Duration':\n\t\t\t\t\tcase 'Temporal.Instant':\n\t\t\t\t\tcase 'Temporal.PlainDate':\n\t\t\t\t\tcase 'Temporal.PlainTime':\n\t\t\t\t\tcase 'Temporal.PlainDateTime':\n\t\t\t\t\tcase 'Temporal.PlainMonthDay':\n\t\t\t\t\tcase 'Temporal.PlainYearMonth':\n\t\t\t\t\tcase 'Temporal.ZonedDateTime': {\n\t\t\t\t\t\t// the same tags `toStringValue` serializes on the stringify side\n\t\t\t\t\t\thydrated[index] = ops.fromStringValue(type, value[1]);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tthrow new Error(`Unknown type ${type}`);\n\t\t\t\t}\n\t\t\t} else if (value[0] === SPARSE) {\n\t\t\t\t// Sparse array encoding: [SPARSE, length, idx, val, idx, val, ...]\n\t\t\t\tconst len = value[1];\n\n\t\t\t\tif (!is_valid_array_len(len)) {\n\t\t\t\t\tinvalid();\n\t\t\t\t}\n\n\t\t\t\t// `len` comes from the input rather than being bounded by it, so\n\t\t\t\t// `createSparseArray` is responsible for not allocating storage\n\t\t\t\t// proportional to it.\n\t\t\t\tconst array = ops.createSparseArray(len);\n\t\t\t\thydrated[index] = array;\n\n\t\t\t\tfor (let i = 2; i < value.length; i += 2) {\n\t\t\t\t\tconst idx = value[i];\n\n\t\t\t\t\tif (!is_valid_array_index(idx) || idx >= len) {\n\t\t\t\t\t\tinvalid();\n\t\t\t\t\t}\n\n\t\t\t\t\tops.set(array, idx, hydrate(value[i + 1]));\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tconst array = ops.createArray(value.length);\n\t\t\t\thydrated[index] = array;\n\n\t\t\t\tfor (let i = 0; i < value.length; i += 1) {\n\t\t\t\t\tconst n = value[i];\n\t\t\t\t\tif (n === HOLE) continue;\n\n\t\t\t\t\tops.set(array, i, hydrate(n));\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tconst object = ops.createObject();\n\t\t\thydrated[index] = object;\n\n\t\t\tfor (const key of Object.keys(value)) {\n\t\t\t\tif (key === '__proto__') {\n\t\t\t\t\tthrow new Error('Cannot parse an object with a `__proto__` property');\n\t\t\t\t}\n\n\t\t\t\tops.set(object, key, hydrate(value[key]));\n\t\t\t}\n\t\t}\n\n\t\treturn hydrated[index];\n\t}\n\n\treturn hydrate(0);\n}\n","import { DevalueError, MAP_KEY, format_path, quote_key, stringify_string } from './utils.js';\nimport {\n\tHOLE,\n\tNAN,\n\tNEGATIVE_INFINITY,\n\tNEGATIVE_ZERO,\n\tPOSITIVE_INFINITY,\n\tSPARSE,\n\tUNDEFINED\n} from './constants.js';\nimport { encode64 } from './base64.js';\nimport { default_stringify_operations, merge_operations } from './operations.js';\n\n/**\n * Turn a value into a JSON string that can be parsed with `devalue.parse`\n * @param {any} value\n * @param {Record<string, (value: any) => any>} [reducers]\n * @param {import('./types.js').StringifyOptions} [options]\n */\nexport function stringify(value, reducers, options) {\n\tconst stringified = run(false, value, reducers, options);\n\treturn typeof stringified === 'string' ? stringified : `[${stringified.join(',')}]`;\n}\n\n/**\n * Turn a value into a JSON string that can be parsed with `devalue.parse`\n * @param {any} value\n * @param {Record<string, (value: any) => any>} [reducers]\n * @param {import('./types.js').StringifyOptions} [options]\n */\nexport async function stringifyAsync(value, reducers, options) {\n\tconst stringified = run(true, value, reducers, options);\n\n\tif (typeof stringified === 'string') {\n\t\treturn stringified;\n\t}\n\n\tlet out = '[';\n\n\tfor (let i = 0; i < stringified.length; i += 1) {\n\t\tlet value = stringified[i];\n\n\t\tif (typeof value !== 'string') {\n\t\t\tawait value;\n\t\t\tvalue = stringified[i];\n\n\t\t\tif (i === 0 && value < 0) {\n\t\t\t\treturn `${value}`;\n\t\t\t}\n\t\t}\n\n\t\tout += value;\n\n\t\tif (i < stringified.length - 1) {\n\t\t\tout += ',';\n\t\t}\n\t}\n\n\tout += ']';\n\n\treturn out;\n}\n\n/**\n * @param {boolean} async\n * @param {any} value\n * @param {Record<string, (value: any) => any>} [reducers]\n * @param {import('./types.js').StringifyOptions} [options]\n */\nfunction run(async, value, reducers, options) {\n\tconst ops = merge_operations(default_stringify_operations, options?.operations);\n\n\t/** @type {any[]} */\n\tconst stringified = [];\n\n\t/** @type {Map<any, number>} */\n\tconst indexes = new Map();\n\n\t/** @type {Array<{ key: string, fn: (value: any) => any }>} */\n\tconst custom = [];\n\tif (reducers) {\n\t\tfor (const key of Object.getOwnPropertyNames(reducers)) {\n\t\t\tcustom.push({ key, fn: reducers[key] });\n\t\t}\n\t}\n\n\t// the path to the value being serialized, recorded as-is and only\n\t// formatted by `error` — see `format_path`\n\t/** @type {any[]} */\n\tlet keys = [];\n\n\tlet p = 0;\n\n\t/**\n\t * @param {string} message\n\t * @param {any} thing\n\t * @returns {never}\n\t */\n\tfunction error(message, thing) {\n\t\tconst path = format_path(keys, (key) => {\n\t\t\tconst key_type = ops.typeOf(key);\n\t\t\tconst key_is_primitive =\n\t\t\t\tkey_type !== 'object' && key_type !== 'function' && key_type !== 'symbol';\n\t\t\treturn key_is_primitive ? stringify_primitive(ops.toPrimitive(key)) : '...';\n\t\t});\n\n\t\tthrow new DevalueError(message, path, thing, value);\n\t}\n\n\t/**\n\t * @param {any} thing\n\t * @param {number} [index]\n\t */\n\tfunction flatten(thing, index) {\n\t\tconst type = ops.typeOf(thing);\n\n\t\tif (type === 'undefined') return UNDEFINED;\n\n\t\t/** @type {number | undefined} */\n\t\tlet number;\n\n\t\t// `ops.toPrimitive` is the boundary between the value being serialized and\n\t\t// plain host JavaScript: everything below operates on the extracted host\n\t\t// primitive, so native comparisons and arithmetic are correct there.\n\t\tif (type === 'number') {\n\t\t\tnumber = /** @type {number} */ (ops.toPrimitive(thing));\n\t\t\tif (Number.isNaN(number)) return NAN;\n\t\t\tif (number === Infinity) return POSITIVE_INFINITY;\n\t\t\tif (number === -Infinity) return NEGATIVE_INFINITY;\n\t\t\tif (number === 0 && 1 / number < 0) return NEGATIVE_ZERO;\n\t\t}\n\n\t\tconst id = ops.identify(thing);\n\n\t\tif (indexes.has(id)) return /** @type {number} */ (indexes.get(id));\n\n\t\tindex ??= p++;\n\t\tindexes.set(id, index);\n\n\t\tfor (const { key, fn } of custom) {\n\t\t\tconst value = fn(thing);\n\t\t\tif (value) {\n\t\t\t\tstringified[index] = `[\"${key}\",${flatten(value)}]`;\n\t\t\t\treturn index;\n\t\t\t}\n\t\t}\n\n\t\tif (type === 'function') {\n\t\t\terror(`Cannot stringify a function`, thing);\n\t\t} else if (type === 'symbol') {\n\t\t\terror(`Cannot stringify a Symbol primitive`, thing);\n\t\t}\n\n\t\t/** @type {string | Promise<any>} */\n\t\tlet str = '';\n\n\t\tif (type !== 'object') {\n\t\t\tstr = stringify_primitive(type === 'number' ? number : ops.toPrimitive(thing));\n\t\t} else if (ops.isThenable(thing)) {\n\t\t\tif (!async) {\n\t\t\t\terror(`Cannot stringify a Promise or thenable — use stringifyAsync instead`, thing);\n\t\t\t}\n\n\t\t\t// the callback runs after the synchronous walk has unwound `keys`,\n\t\t\t// so the path to the thenable has to be captured and reinstated\n\t\t\tconst prev_keys = keys.slice();\n\n\t\t\tstr = ops.toPromise(thing).then((value) => {\n\t\t\t\tkeys = prev_keys;\n\n\t\t\t\tconst i = flatten(value, index);\n\t\t\t\tif (i < 0) stringified[index] = i;\n\t\t\t});\n\n\t\t\t// Promises are awaited sequentially, and traversal may throw before\n\t\t\t// reaching them. Handle rejections immediately, but keep the original\n\t\t\t// promise so awaiting it still propagates the error to the caller.\n\t\t\tstr.catch(() => {});\n\t\t} else {\n\t\t\tconst tag = ops.tagOf(thing);\n\n\t\t\tswitch (tag) {\n\t\t\t\tcase 'Number':\n\t\t\t\tcase 'String':\n\t\t\t\tcase 'Boolean':\n\t\t\t\tcase 'BigInt':\n\t\t\t\t\tstr = `[\"Object\",${flatten(ops.unbox(thing))}]`;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'Date':\n\t\t\t\t\tstr = `[\"Date\",\"${ops.toISOString(thing)}\"]`;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'URL':\n\t\t\t\t\tstr = `[\"URL\",${stringify_string(ops.toStringValue(thing))}]`;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'URLSearchParams':\n\t\t\t\t\tstr = `[\"URLSearchParams\",${stringify_string(ops.toStringValue(thing))}]`;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'RegExp':\n\t\t\t\t\tconst { source, flags } = ops.regExpInfo(thing);\n\t\t\t\t\tstr = flags\n\t\t\t\t\t\t? `[\"RegExp\",${stringify_string(source)},\"${flags}\"]`\n\t\t\t\t\t\t: `[\"RegExp\",${stringify_string(source)}]`;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'Array': {\n\t\t\t\t\t// For dense arrays (no holes), we iterate normally.\n\t\t\t\t\t// When we encounter the first hole, we call Object.keys\n\t\t\t\t\t// to determine the sparseness, then decide between:\n\t\t\t\t\t// - HOLE encoding: [-2, val, -2, ...] (default)\n\t\t\t\t\t// - Sparse encoding: [-7, length, idx, val, ...] (for very sparse arrays)\n\t\t\t\t\t// Only the sparse path avoids iterating every slot, which\n\t\t\t\t\t// is what protects against the DoS of e.g. `arr[1000000] = 1`.\n\t\t\t\t\tlet mostly_dense = false;\n\n\t\t\t\t\tconst length = ops.lengthOf(thing);\n\n\t\t\t\t\tstr = '[';\n\n\t\t\t\t\tfor (let i = 0; i < length; i += 1) {\n\t\t\t\t\t\tif (i > 0) str += ',';\n\n\t\t\t\t\t\tif (ops.hasOwn(thing, i)) {\n\t\t\t\t\t\t\tkeys.push(i);\n\t\t\t\t\t\t\tstr += flatten(ops.get(thing, i));\n\t\t\t\t\t\t\tkeys.pop();\n\t\t\t\t\t\t} else if (mostly_dense) {\n\t\t\t\t\t\t\t// Use dense encoding. The heuristic guarantees the\n\t\t\t\t\t\t\t// array is only mildly sparse, so iterating over every\n\t\t\t\t\t\t\t// slot is fine.\n\t\t\t\t\t\t\tstr += HOLE;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// Decide between HOLE encoding and sparse encoding.\n\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t// HOLE encoding: each hole is serialized as the HOLE\n\t\t\t\t\t\t\t// sentinel (-2). For example, [, \"a\", ,] becomes\n\t\t\t\t\t\t\t// [-2, 0, -2]. Each hole costs 3 chars (\"-2\" + comma).\n\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t// Sparse encoding: lists only populated indices.\n\t\t\t\t\t\t\t// For example, [, \"a\", ,] becomes [-7, 3, 1, 0] — the\n\t\t\t\t\t\t\t// -7 sentinel, the array length (3), then index-value\n\t\t\t\t\t\t\t// pairs. This avoids paying per-hole, but each element\n\t\t\t\t\t\t\t// costs extra chars to write its index.\n\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t// The values are the same size either way, so the\n\t\t\t\t\t\t\t// choice comes down to structural overhead:\n\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t// HOLE overhead:\n\t\t\t\t\t\t\t// 3 chars per hole (\"-2\" + comma)\n\t\t\t\t\t\t\t// = (L - P) * 3\n\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t// Sparse overhead:\n\t\t\t\t\t\t\t// \"-7,\" — 3 chars (sparse sentinel + comma)\n\t\t\t\t\t\t\t// + length + \",\" — (d + 1) chars (array length + comma)\n\t\t\t\t\t\t\t// + per element: index + \",\" — (d + 1) chars\n\t\t\t\t\t\t\t// = (4 + d) + P * (d + 1)\n\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t// where L is the array length, P is the number of\n\t\t\t\t\t\t\t// populated elements, and d is the number of digits\n\t\t\t\t\t\t\t// in L (an upper bound on the digits in any index).\n\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t// Sparse encoding is cheaper when:\n\t\t\t\t\t\t\t// (4 + d) + P * (d + 1) < (L - P) * 3\n\t\t\t\t\t\t\tconst populated_keys = ops.indicesOf(thing);\n\t\t\t\t\t\t\tconst population = populated_keys.length;\n\t\t\t\t\t\t\tconst d = String(length).length;\n\n\t\t\t\t\t\t\tconst hole_cost = (length - population) * 3;\n\t\t\t\t\t\t\tconst sparse_cost = 4 + d + population * (d + 1);\n\n\t\t\t\t\t\t\tif (hole_cost > sparse_cost) {\n\t\t\t\t\t\t\t\tstr = '[' + SPARSE + ',' + length;\n\t\t\t\t\t\t\t\tfor (let j = 0; j < populated_keys.length; j++) {\n\t\t\t\t\t\t\t\t\tconst key = populated_keys[j];\n\t\t\t\t\t\t\t\t\tkeys.push(+key);\n\t\t\t\t\t\t\t\t\tstr += ',' + key + ',' + flatten(ops.get(thing, key));\n\t\t\t\t\t\t\t\t\tkeys.pop();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tmostly_dense = true;\n\t\t\t\t\t\t\t\tstr += HOLE;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tstr += ']';\n\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tcase 'Set':\n\t\t\t\t\tstr = '[\"Set\"';\n\n\t\t\t\t\tfor (const value of ops.valuesOf(thing)) {\n\t\t\t\t\t\tstr += `,${flatten(value)}`;\n\t\t\t\t\t}\n\n\t\t\t\t\tstr += ']';\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'Map':\n\t\t\t\t\tstr = '[\"Map\"';\n\n\t\t\t\t\tfor (const [key, value] of ops.entriesOf(thing)) {\n\t\t\t\t\t\tkeys.push(MAP_KEY, key);\n\t\t\t\t\t\tstr += `,${flatten(key)},${flatten(value)}`;\n\t\t\t\t\t\tkeys.pop();\n\t\t\t\t\t\tkeys.pop();\n\t\t\t\t\t}\n\n\t\t\t\t\tstr += ']';\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'Int8Array':\n\t\t\t\tcase 'Uint8Array':\n\t\t\t\tcase 'Uint8ClampedArray':\n\t\t\t\tcase 'Int16Array':\n\t\t\t\tcase 'Uint16Array':\n\t\t\t\tcase 'Float16Array':\n\t\t\t\tcase 'Int32Array':\n\t\t\t\tcase 'Uint32Array':\n\t\t\t\tcase 'Float32Array':\n\t\t\t\tcase 'Float64Array':\n\t\t\t\tcase 'BigInt64Array':\n\t\t\t\tcase 'BigUint64Array': {\n\t\t\t\t\tconst info = ops.viewInfo(thing);\n\t\t\t\t\tstr = '[\"' + tag + '\",' + flatten(info.buffer);\n\n\t\t\t\t\t// handle subarrays\n\t\t\t\t\tif (info.byteLength !== info.bufferByteLength) {\n\t\t\t\t\t\tstr += `,${info.byteOffset},${info.length}`;\n\t\t\t\t\t}\n\n\t\t\t\t\tstr += ']';\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tcase 'DataView': {\n\t\t\t\t\tconst info = ops.viewInfo(thing);\n\t\t\t\t\tstr = '[\"' + tag + '\",' + flatten(info.buffer);\n\n\t\t\t\t\tif (info.byteLength !== info.bufferByteLength) {\n\t\t\t\t\t\tstr += `,${info.byteOffset},${info.byteLength}`;\n\t\t\t\t\t}\n\n\t\t\t\t\tstr += ']';\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tcase 'ArrayBuffer': {\n\t\t\t\t\tconst base64 = encode64(ops.toArrayBuffer(thing));\n\n\t\t\t\t\tstr = `[\"ArrayBuffer\",\"${base64}\"]`;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tcase 'Temporal.Duration':\n\t\t\t\tcase 'Temporal.Instant':\n\t\t\t\tcase 'Temporal.PlainDate':\n\t\t\t\tcase 'Temporal.PlainTime':\n\t\t\t\tcase 'Temporal.PlainDateTime':\n\t\t\t\tcase 'Temporal.PlainMonthDay':\n\t\t\t\tcase 'Temporal.PlainYearMonth':\n\t\t\t\tcase 'Temporal.ZonedDateTime':\n\t\t\t\t\tstr = `[\"${tag}\",${stringify_string(ops.toStringValue(thing))}]`;\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault: {\n\t\t\t\t\tconst shape = ops.shapeOf(thing);\n\n\t\t\t\t\tif (shape.kind === 'not-plain') {\n\t\t\t\t\t\terror(`Cannot stringify arbitrary non-POJOs`, thing);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (shape.kind === 'symbol-keys') {\n\t\t\t\t\t\terror(`Cannot stringify POJOs with symbolic keys`, thing);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (shape.kind === 'null-proto') {\n\t\t\t\t\t\tstr = '[\"null\"';\n\t\t\t\t\t\tfor (const key of shape.keys) {\n\t\t\t\t\t\t\tif (key === '__proto__') {\n\t\t\t\t\t\t\t\terror(`Cannot stringify objects with __proto__ keys`, thing);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tkeys.push(key);\n\t\t\t\t\t\t\tstr += `,${quote_key(key)},${flatten(ops.get(thing, key))}`;\n\t\t\t\t\t\t\tkeys.pop();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tstr += ']';\n\t\t\t\t\t} else {\n\t\t\t\t\t\tstr = '{';\n\t\t\t\t\t\tlet started = false;\n\t\t\t\t\t\tfor (const key of shape.keys) {\n\t\t\t\t\t\t\tif (key === '__proto__') {\n\t\t\t\t\t\t\t\terror(`Cannot stringify objects with __proto__ keys`, thing);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif (started) str += ',';\n\t\t\t\t\t\t\tstarted = true;\n\t\t\t\t\t\t\tkeys.push(key);\n\t\t\t\t\t\t\tstr += `${quote_key(key)}:${flatten(ops.get(thing, key))}`;\n\t\t\t\t\t\t\tkeys.pop();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tstr += '}';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tstringified[index] = str;\n\t\treturn index;\n\t}\n\n\tconst index = flatten(value);\n\n\t// special case — value is represented as a negative index\n\tif (index < 0) return `${index}`;\n\n\treturn stringified;\n}\n\n/**\n * @param {any} thing\n * @returns {string}\n */\nfunction stringify_primitive(thing) {\n\tconst type = typeof thing;\n\tif (type === 'string') return stringify_string(thing);\n\tif (thing === void 0) return UNDEFINED.toString();\n\tif (thing === 0 && 1 / thing < 0) return NEGATIVE_ZERO.toString();\n\tif (type === 'bigint') return `[\"BigInt\",\"${thing}\"]`;\n\treturn String(thing);\n}\n","/** @import { BinaryFormMeta, InternalRemoteFormIssue } from 'types' */\n/** @import { StandardSchemaV1 } from '@standard-schema/spec' */\n\nimport { DEV } from 'esm-env';\nimport * as devalue from 'devalue';\nimport { stream_from_iterable, text_decoder, text_encoder } from './utils.js';\nimport { noop } from '../utils/functions.js';\nimport { SvelteKitError } from '@sveltejs/kit/internal';\nimport * as e from '../messages/shared-errors.js';\nimport * as w from '../messages/shared-warnings.js';\n\n/**\n * Sets a parsed form field value in a nested object, mutating the original object.\n * @param {Record<string, any>} object\n * @param {{ name: string; type: 'number' | 'boolean' | null }} field\n * @param {any} value\n */\nexport function set_nested_value(object, field, value) {\n\tdeep_set(object, split_path(field.name), value);\n}\n\n/**\n * Separates a form field's path from the metadata encoded in its name.\n * @param {string} form_id\n * @param {string} key\n * @returns {{ name: string; type: 'number' | 'boolean' | null; is_array: boolean }}\n */\nexport function parse_form_key(form_id, key) {\n\tconst suffix = '/' + form_id;\n\tlet name = key;\n\tlet image_coordinate = '';\n\n\tif (name.startsWith('i:') && (name.endsWith(suffix + '.x') || name.endsWith(suffix + '.y'))) {\n\t\timage_coordinate = name[name.length - 1];\n\t\tname = name.slice(0, -2);\n\t}\n\n\tif (!name.endsWith(suffix)) {\n\t\te.form_field_unbound({ name });\n\t}\n\n\tname = name.slice(0, -suffix.length);\n\n\t/** @type {'number' | 'boolean' | null} */\n\tlet type = null;\n\n\tif (name.startsWith('n:')) {\n\t\tname = name.slice(2);\n\t\ttype = 'number';\n\t} else if (name.startsWith('b:')) {\n\t\tname = name.slice(2);\n\t\ttype = 'boolean';\n\t} else if (name.startsWith('i:')) {\n\t\tname = name.slice(2);\n\t\ttype = 'number';\n\t}\n\n\tconst is_array = name.endsWith('[]');\n\tif (is_array) name = name.slice(0, -2);\n\tif (image_coordinate) name += '.' + image_coordinate;\n\n\treturn { name, type, is_array };\n}\n\n/**\n * @param {'number' | 'boolean' | null} type\n * @param {any} value\n * @returns {any}\n */\nexport function coerce_form_value(type, value) {\n\tif (Array.isArray(value)) return value.map((value) => coerce_form_value(type, value));\n\tif (type === 'number') return value === '' ? undefined : parseFloat(value);\n\tif (type === 'boolean') return value === 'on';\n\treturn value;\n}\n\n/** Pass this to set_nested_value to delete the last part of the given path */\nexport const DELETE_KEY = {};\n\n/**\n * Convert `FormData` into a POJO\n * @param {string} form_id\n * @param {FormData} data\n */\nexport function convert_formdata(form_id, data) {\n\t/** @type {Record<string, any>} */\n\tconst result = {};\n\n\tfor (const field_name of data.keys()) {\n\t\t/** @type {any[]} */\n\t\tconst values = data.getAll(field_name);\n\n\t\tconst field = parse_form_key(form_id, field_name);\n\n\t\t// an empty `<input type=\"file\">` will submit a non-existent file, bizarrely\n\t\tconst entries = values.filter(\n\t\t\t(entry) => typeof entry === 'string' || entry.name !== '' || entry.size > 0\n\t\t);\n\t\tif (entries.length === 0 && !field.is_array) continue;\n\n\t\tif (entries.length > 1 && !field.is_array) {\n\t\t\te.form_field_duplicate({ name: field.name, count: String(entries.length) });\n\t\t}\n\n\t\tset_nested_value(\n\t\t\tresult,\n\t\t\tfield,\n\t\t\tcoerce_form_value(field.type, field.is_array ? entries : entries[0])\n\t\t);\n\t}\n\n\treturn result;\n}\n\nexport const BINARY_FORM_CONTENT_TYPE = 'application/x-sveltekit-formdata';\nconst BINARY_FORM_VERSION = 0;\nconst HEADER_BYTES = 1 + 4 + 2;\n/**\n * The binary format is as follows:\n * - 1 byte: Format version\n * - 4 bytes: Length of the header (u32)\n * - 2 bytes: Length of the file offset table (u16)\n * - header: devalue.stringify([data, meta])\n * - file offset table: JSON.stringify([offset1, offset2, ...]) (empty if no files) (offsets start from the end of the table)\n * - file1, file2, ...\n * @param {Record<string, any>} data\n * @param {BinaryFormMeta} meta\n */\nexport function serialize_binary_form(data, meta) {\n\t/** @type {Array<BlobPart>} */\n\tconst blob_parts = [new Uint8Array([BINARY_FORM_VERSION])];\n\n\t/** @type {Array<[file: File, index: number]>} */\n\tconst files = [];\n\n\tconst encoded_header = devalue.stringify([data, meta], {\n\t\tFile: (file) => {\n\t\t\tif (!(file instanceof File)) return;\n\n\t\t\tfiles.push([file, files.length]);\n\t\t\treturn [file.name, file.type, file.size, file.lastModified, files.length - 1];\n\t\t}\n\t});\n\n\tconst encoded_header_buffer = text_encoder.encode(encoded_header);\n\n\tlet encoded_file_offsets = '';\n\tif (files.length) {\n\t\t// Sort small files to the front\n\t\tfiles.sort(([a], [b]) => a.size - b.size);\n\n\t\t/** @type {Array<number>} */\n\t\tconst file_offsets = new Array(files.length);\n\t\tlet start = 0;\n\t\tfor (const [file, index] of files) {\n\t\t\tfile_offsets[index] = start;\n\t\t\tstart += file.size;\n\t\t}\n\t\tencoded_file_offsets = JSON.stringify(file_offsets);\n\t}\n\n\tconst length_buffer = new Uint8Array(4);\n\tconst length_view = new DataView(length_buffer.buffer);\n\n\tlength_view.setUint32(0, encoded_header_buffer.byteLength, true);\n\tblob_parts.push(length_buffer.slice());\n\n\tlength_view.setUint16(0, encoded_file_offsets.length, true);\n\tblob_parts.push(length_buffer.slice(0, 2));\n\n\tblob_parts.push(encoded_header_buffer);\n\tblob_parts.push(encoded_file_offsets);\n\n\tfor (const [file] of files) {\n\t\tblob_parts.push(file);\n\t}\n\n\treturn {\n\t\tblob: new Blob(blob_parts)\n\t};\n}\n\n/**\n * @param {Request} request\n * @param {string} form_id\n * @returns {Promise<{ data: Record<string, any>; meta: BinaryFormMeta; form_data: FormData | null }>}\n */\nexport async function deserialize_binary_form(request, form_id) {\n\tif (request.headers.get('content-type') !== BINARY_FORM_CONTENT_TYPE) {\n\t\tconst form_data = await request.formData();\n\t\treturn { data: convert_formdata(form_id, form_data), meta: {}, form_data };\n\t}\n\tif (!request.body) {\n\t\tthrow deserialize_error('no body');\n\t}\n\n\tconst reader = request.body.getReader();\n\n\t/** @type {Array<Promise<Uint8Array<ArrayBuffer> | undefined>>} */\n\tconst chunks = [];\n\n\t/**\n\t * @param {number} index\n\t * @returns {Promise<Uint8Array<ArrayBuffer> | undefined>}\n\t */\n\tfunction get_chunk(index) {\n\t\tif (index in chunks) return chunks[index];\n\n\t\tlet i = chunks.length;\n\t\twhile (i <= index) {\n\t\t\t// chain reads so only one is ever pending — workerd forbids concurrent reads\n\t\t\tconst previous = chunks[i - 1] ?? Promise.resolve(undefined);\n\t\t\tchunks[i] = previous.then(() => reader.read()).then((chunk) => chunk.value);\n\t\t\ti++;\n\t\t}\n\t\treturn chunks[index];\n\t}\n\n\t/**\n\t * @param {number} offset\n\t * @param {number} length\n\t * @returns {Promise<Uint8Array | null>}\n\t */\n\tasync function get_buffer(offset, length) {\n\t\t/** @type {Uint8Array<ArrayBuffer>[]} */\n\t\tconst parts = [];\n\t\tlet total = 0;\n\t\tfor await (const part of read_range(get_chunk, offset, length)) {\n\t\t\tparts.push(part);\n\t\t\ttotal += part.byteLength;\n\t\t}\n\t\tif (total < length || parts.length === 0) return null;\n\t\t// If the buffer is completely contained in one chunk, return the subarray as-is\n\t\tif (parts.length === 1) return parts[0];\n\n\t\tconst buffer = new Uint8Array(length);\n\t\tlet cursor = 0;\n\t\tfor (const part of parts) {\n\t\t\tbuffer.set(part, cursor);\n\t\t\tcursor += part.byteLength;\n\t\t}\n\t\treturn buffer;\n\t}\n\n\tconst header = await get_buffer(0, HEADER_BYTES);\n\tif (!header) throw deserialize_error('too short');\n\n\tif (header[0] !== BINARY_FORM_VERSION) {\n\t\tthrow deserialize_error(`got version ${header[0]}, expected version ${BINARY_FORM_VERSION}`);\n\t}\n\tconst header_view = new DataView(header.buffer, header.byteOffset, header.byteLength);\n\tconst data_length = header_view.getUint32(1, true);\n\tconst file_offsets_length = header_view.getUint16(5, true);\n\n\t// Validation uses embedded binary header fields (data_length, file_offsets_length)\n\t// rather than Content-Length, which proxies/middleboxes may strip or corrupt.\n\t// See: https://github.com/sveltejs/kit/issues/15299\n\n\t// Read the form data\n\tconst data_buffer = await get_buffer(HEADER_BYTES, data_length);\n\tif (!data_buffer) throw deserialize_error('data too short');\n\n\t/** @type {Array<number | undefined>} */\n\tlet file_offsets;\n\t/** @type {number} */\n\tlet files_start_offset;\n\tif (file_offsets_length > 0) {\n\t\t// Read the file offset table\n\t\tconst file_offsets_buffer = await get_buffer(HEADER_BYTES + data_length, file_offsets_length);\n\t\tif (!file_offsets_buffer) throw deserialize_error('file offset table too short');\n\n\t\tconst parsed_offsets = JSON.parse(text_decoder.decode(file_offsets_buffer));\n\n\t\tif (\n\t\t\t!Array.isArray(parsed_offsets) ||\n\t\t\tparsed_offsets.some((n) => typeof n !== 'number' || !Number.isInteger(n) || n < 0)\n\t\t) {\n\t\t\tthrow deserialize_error('invalid file offset table');\n\t\t}\n\n\t\tfile_offsets = /** @type {Array<number>} */ (parsed_offsets);\n\t\tfiles_start_offset = HEADER_BYTES + data_length + file_offsets_length;\n\t}\n\n\t/** @type {Array<{ offset: number, size: number }>} */\n\tconst file_spans = [];\n\tconst [data, meta] = devalue.parse(text_decoder.decode(data_buffer), {\n\t\tFile: ([name, type, size, last_modified, index]) => {\n\t\t\tif (\n\t\t\t\ttypeof name !== 'string' ||\n\t\t\t\ttypeof type !== 'string' ||\n\t\t\t\t!Number.isSafeInteger(size) ||\n\t\t\t\tsize < 0 ||\n\t\t\t\t!Number.isSafeInteger(last_modified) ||\n\t\t\t\t!Number.isSafeInteger(index) ||\n\t\t\t\tindex < 0\n\t\t\t) {\n\t\t\t\tthrow deserialize_error('invalid file metadata');\n\t\t\t}\n\n\t\t\tlet offset = file_offsets[index];\n\n\t\t\t// Check that the file offset table entry has not been already\n\t\t\t// used. If not, immediately mark it as used.\n\t\t\tif (offset === undefined) {\n\t\t\t\tthrow deserialize_error('duplicate file offset table index');\n\t\t\t}\n\t\t\tfile_offsets[index] = undefined;\n\n\t\t\toffset += files_start_offset;\n\n\t\t\tfile_spans.push({ offset, size });\n\n\t\t\treturn new Proxy(new LazyFile(name, type, size, last_modified, get_chunk, offset), {\n\t\t\t\tgetPrototypeOf() {\n\t\t\t\t\t// Trick validators into thinking this is a normal File\n\t\t\t\t\treturn File.prototype;\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t});\n\n\t// Sort file spans in increasing order primarily by offset\n\t// and secondarily by size (to allow 0-length files).\n\tfile_spans.sort((a, b) => a.offset - b.offset || a.size - b.size);\n\n\t// Check that file spans do not overlap and there are no gaps between them.\n\tfor (let i = 1; i < file_spans.length; i++) {\n\t\tconst previous = file_spans[i - 1];\n\t\tconst current = file_spans[i];\n\n\t\tconst previous_end = previous.offset + previous.size;\n\t\tif (previous_end < current.offset) {\n\t\t\tthrow deserialize_error('gaps in file data');\n\t\t}\n\t\tif (previous_end > current.offset) {\n\t\t\tthrow deserialize_error('overlapping file data');\n\t\t}\n\t}\n\n\t// Read the request body asynchronously so it doesn't stall\n\tvoid (async () => {\n\t\tlet has_more = true;\n\t\twhile (has_more) {\n\t\t\tconst chunk = await get_chunk(chunks.length);\n\t\t\thas_more = !!chunk;\n\t\t}\n\t})().catch(noop); // prevent unhandled rejection potentially crashing the process\n\n\treturn { data, meta, form_data: null };\n}\n/**\n * @param {string} message\n */\nfunction deserialize_error(message) {\n\treturn new SvelteKitError(400, 'Bad Request', `Could not deserialize binary form: ${message}`);\n}\n\n/**\n * Yields the chunks that make up the byte range `[offset, offset + length)`,\n * trimmed to its boundaries. Ends early if the underlying data runs out.\n * @param {(index: number) => Promise<Uint8Array<ArrayBuffer> | undefined>} get_chunk\n * @param {number} offset\n * @param {number} length\n * @returns {AsyncGenerator<Uint8Array<ArrayBuffer>, void, void>}\n */\nasync function* read_range(get_chunk, offset, length) {\n\tlet chunk_start = 0;\n\tfor (let index = 0; ; index++) {\n\t\tconst chunk = await get_chunk(index);\n\t\tif (!chunk) return;\n\n\t\tconst chunk_end = chunk_start + chunk.byteLength;\n\t\tif (chunk_end > offset) {\n\t\t\tyield chunk.subarray(\n\t\t\t\tMath.max(0, offset - chunk_start),\n\t\t\t\tMath.min(chunk.byteLength, offset + length - chunk_start)\n\t\t\t);\n\t\t\tif (offset + length <= chunk_end) return;\n\t\t}\n\t\tchunk_start = chunk_end;\n\t}\n}\n\n/** @implements {File} */\nclass LazyFile {\n\t/** @type {(index: number) => Promise<Uint8Array<ArrayBuffer> | undefined>} */\n\t#get_chunk;\n\t/** @type {number} */\n\t#offset;\n\t/**\n\t * @param {string} name\n\t * @param {string} type\n\t * @param {number} size\n\t * @param {number} last_modified\n\t * @param {(index: number) => Promise<Uint8Array<ArrayBuffer> | undefined>} get_chunk\n\t * @param {number} offset\n\t */\n\tconstructor(name, type, size, last_modified, get_chunk, offset) {\n\t\tthis.name = name;\n\t\tthis.type = type;\n\t\tthis.size = size;\n\t\tthis.lastModified = last_modified;\n\t\tthis.webkitRelativePath = '';\n\t\tthis.#get_chunk = get_chunk;\n\t\tthis.#offset = offset;\n\n\t\t// TODO - hacky, required for private members to be accessed on proxy\n\t\tthis.arrayBuffer = this.arrayBuffer.bind(this);\n\t\tthis.bytes = this.bytes.bind(this);\n\t\tthis.slice = this.slice.bind(this);\n\t\tthis.stream = this.stream.bind(this);\n\t\tthis.text = this.text.bind(this);\n\t}\n\t/** @type {ArrayBuffer | undefined} */\n\t#buffer;\n\tasync arrayBuffer() {\n\t\tthis.#buffer ??= await new Response(this.stream()).arrayBuffer();\n\t\treturn this.#buffer;\n\t}\n\tasync bytes() {\n\t\treturn new Uint8Array(await this.arrayBuffer());\n\t}\n\t/**\n\t * @param {number=} start\n\t * @param {number=} end\n\t * @param {string=} contentType\n\t */\n\tslice(start = 0, end = this.size, contentType = this.type) {\n\t\t// https://github.com/nodejs/node/blob/a5f3cd8cb5ba9e7911d93c5fd3ebc6d781220dd8/lib/internal/blob.js#L240\n\t\tif (start < 0) {\n\t\t\tstart = Math.max(this.size + start, 0);\n\t\t} else {\n\t\t\tstart = Math.min(start, this.size);\n\t\t}\n\n\t\tif (end < 0) {\n\t\t\tend = Math.max(this.size + end, 0);\n\t\t} else {\n\t\t\tend = Math.min(end, this.size);\n\t\t}\n\t\tconst size = Math.max(end - start, 0);\n\t\tconst file = new LazyFile(\n\t\t\tthis.name,\n\t\t\tcontentType,\n\t\t\tsize,\n\t\t\tthis.lastModified,\n\t\t\tthis.#get_chunk,\n\t\t\tthis.#offset + start\n\t\t);\n\n\t\treturn file;\n\t}\n\tstream() {\n\t\tconst range = read_range(this.#get_chunk, this.#offset, this.size);\n\t\tconst size = this.size;\n\t\treturn stream_from_iterable(\n\t\t\t(async function* () {\n\t\t\t\tlet cursor = 0;\n\t\t\t\tfor await (const chunk of range) {\n\t\t\t\t\tcursor += chunk.byteLength;\n\t\t\t\t\tyield chunk;\n\t\t\t\t}\n\t\t\t\tif (cursor < size) throw new Error('incomplete file data');\n\t\t\t})()\n\t\t);\n\t}\n\tasync text() {\n\t\treturn text_decoder.decode(await this.arrayBuffer());\n\t}\n}\n\nconst path_regex = /^[a-zA-Z_$]\\w*(\\.[a-zA-Z_$]\\w*|\\[\\d+\\])*$/;\n\n/**\n * @param {string} path\n */\nexport function split_path(path) {\n\tif (!path_regex.test(path)) {\n\t\te.form_field_invalid_name({ name: path });\n\t}\n\n\treturn path.split(/\\.|\\[|\\]/).filter(Boolean);\n}\n\n/**\n * Check if a property key is dangerous and could lead to prototype pollution\n * @param {string} key\n */\nfunction check_prototype_pollution(key) {\n\tif (key === '__proto__' || key === 'constructor' || key === 'prototype') {\n\t\te.form_field_forbidden_key({ key });\n\t}\n}\n\n/**\n * Sets a value in a nested object using an array of keys, mutating the original object.\n * @param {Record<string, any>} object\n * @param {string[]} keys\n * @param {any} value\n */\nexport function deep_set(object, keys, value) {\n\tlet current = object;\n\n\tfor (let i = 0; i < keys.length - 1; i += 1) {\n\t\tconst key = keys[i];\n\n\t\tcheck_prototype_pollution(key);\n\n\t\tconst is_array = /^\\d+$/.test(keys[i + 1]);\n\t\tconst inner = Object.hasOwn(current, key) ? current[key] : undefined;\n\t\tconst exists = inner != null;\n\n\t\tif (exists && is_array !== Array.isArray(inner)) {\n\t\t\te.form_field_array_conflict({ key: keys[i + 1] });\n\t\t}\n\n\t\tif (!exists) {\n\t\t\tif (value === DELETE_KEY) {\n\t\t\t\t// don't create the nested structure if we want to delete the key anyway\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tcurrent[key] = is_array ? [] : {};\n\t\t}\n\n\t\tcurrent = current[key];\n\t}\n\n\tconst final_key = keys[keys.length - 1];\n\tcheck_prototype_pollution(final_key);\n\n\tif (value === DELETE_KEY) {\n\t\tdelete current[final_key];\n\t} else {\n\t\tcurrent[final_key] = value;\n\t}\n}\n\n/**\n * @param {StandardSchemaV1.Issue} issue\n * @param {boolean} server Whether this issue came from server validation\n */\nexport function normalize_issue(issue, server = false) {\n\t/** @type {InternalRemoteFormIssue} */\n\tconst normalized = { name: '', path: [], message: issue.message, server };\n\n\tif (issue.path !== undefined) {\n\t\tlet name = '';\n\n\t\tfor (const segment of issue.path) {\n\t\t\tconst key = /** @type {string | number} */ (\n\t\t\t\ttypeof segment === 'object' ? segment.key : segment\n\t\t\t);\n\n\t\t\tnormalized.path.push(key);\n\n\t\t\tif (typeof key === 'number') {\n\t\t\t\tname += `[${key}]`;\n\t\t\t} else if (typeof key === 'string') {\n\t\t\t\tname += name === '' ? key : '.' + key;\n\t\t\t}\n\t\t}\n\n\t\tnormalized.name = name;\n\t}\n\n\treturn normalized;\n}\n\n/**\n * @param {InternalRemoteFormIssue[]} issues\n */\nexport function flatten_issues(issues) {\n\t/** @type {Record<string, InternalRemoteFormIssue[]>} */\n\tconst result = Object.create(null);\n\n\tfor (const issue of issues) {\n\t\t(result.$ ??= []).push(issue);\n\n\t\tlet name = '';\n\n\t\tif (issue.path !== undefined) {\n\t\t\tfor (const key of issue.path) {\n\t\t\t\tif (typeof key === 'number') {\n\t\t\t\t\tname += `[${key}]`;\n\t\t\t\t} else if (typeof key === 'string') {\n\t\t\t\t\tname += name === '' ? key : '.' + key;\n\t\t\t\t}\n\n\t\t\t\t(result[name] ??= []).push(issue);\n\t\t\t}\n\t\t}\n\t}\n\n\treturn result;\n}\n\n/**\n * Gets a nested value from an object using a path array\n * @param {Record<string, any>} object\n * @param {(string | number)[]} path\n * @returns {any}\n */\nexport function deep_get(object, path) {\n\tlet current = object;\n\tfor (const key of path) {\n\t\tif (current === null || typeof current !== 'object' || !Object.hasOwn(current, key)) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tcurrent = current[key];\n\t}\n\treturn current;\n}\n\n/** name prefixes that tell the server which type to coerce a submitted string to */\nconst type_prefixes = /** @type {Record<string, string | undefined>} */ ({\n\tnumber: 'n:',\n\tboolean: 'b:'\n});\n\n/**\n * adds props; a function becomes a getter that is computed each time it is read\n * @param {Record<string, any>} base_props\n * @param {Record<string, unknown>} props\n */\nfunction add_props(base_props, props) {\n\tfor (const prop in props) {\n\t\tconst value = props[prop];\n\t\tif (typeof value === 'function') {\n\t\t\tObject.defineProperty(base_props, prop, {\n\t\t\t\tenumerable: true,\n\t\t\t\tget: /** @type {() => unknown} */ (value)\n\t\t\t});\n\t\t} else {\n\t\t\tbase_props[prop] = value;\n\t\t}\n\t}\n\treturn base_props;\n}\n\n/**\n * @param {string} type\n * @param {boolean} is_array\n * @param {unknown} input_value\n */\nfunction get_type_prefix(type, is_array, input_value) {\n\tif (type === 'number' || type === 'range') return 'n:';\n\tif (type === 'image') return 'i:';\n\tif (type === 'checkbox' && !is_array) return 'b:';\n\tif (type === 'hidden' || type === 'submit') return type_prefixes[typeof input_value] ?? '';\n\treturn '';\n}\n\n/**\n * A deep-clone implementation specifically for form data, where\n * we don't need to worry about cycles and whatnot\n * @param {any} value\n * @returns {any}\n */\nfunction deep_clone(value) {\n\tif (value !== null && typeof value === 'object') {\n\t\tif (value instanceof Date) {\n\t\t\treturn new Date(value.getTime());\n\t\t}\n\n\t\tif (value instanceof File) {\n\t\t\treturn value;\n\t\t}\n\n\t\tif (Array.isArray(value)) {\n\t\t\treturn value.map(deep_clone);\n\t\t}\n\n\t\t/** @type {Record<string, any>} */\n\t\tconst clone = {};\n\t\tfor (const key of Object.keys(value)) {\n\t\t\tclone[key] = deep_clone(value[key]);\n\t\t}\n\n\t\treturn clone;\n\t}\n\n\treturn value;\n}\n\nconst warned_sites = new Set();\n\n// keyed by the stack, so every place that enumerates warns once with its call site\nconst warn_no_keys = () => {\n\t// Capture the original call site, not a generated diagnostic or factory's frames.\n\tconst error = new Error();\n\tif (warned_sites.has(error.stack)) return;\n\twarned_sites.add(error.stack);\n\tw.form_fields_enumerated();\n};\n\n// fields are created as they are accessed, so there is nothing to enumerate\n/** @type {ProxyHandler<object> | null} */\nconst dev_traps = DEV\n\t? {\n\t\t\thas(target, prop) {\n\t\t\t\tif (typeof prop !== 'symbol') warn_no_keys();\n\t\t\t\treturn prop in target;\n\t\t\t},\n\t\t\townKeys(target) {\n\t\t\t\twarn_no_keys();\n\t\t\t\treturn Reflect.ownKeys(target);\n\t\t\t}\n\t\t}\n\t: null;\n\n/** @param {InternalRemoteFormIssue} issue */\nconst public_issue = (issue) => ({ path: issue.path, message: issue.message });\n\n/** @typedef {{\n * \tform_id: string,\n * \tget: () => Record<string, any>,\n * \tset: (path: (string | number)[], value: any) => void,\n * \tget_issues: (path?: (string | number)[], all?: boolean) => Record<string, InternalRemoteFormIssue[]>,\n * \tget_touched: () => Record<string, boolean>,\n * \tget_dirty: () => Record<string, boolean>\n * }} FieldContext */\n\n/**\n * @param {FieldContext} context\n * @param {(string | number)[]} path\n * @param {string} prop\n * @returns {any} a method of the field at `path`, or undefined for a nested field\n */\nfunction create_field_method(context, path, prop) {\n\tswitch (prop) {\n\t\tcase 'set':\n\t\t\treturn (/** @type {any} */ value) => {\n\t\t\t\tcontext.set(path, value);\n\t\t\t\treturn value;\n\t\t\t};\n\t\tcase 'value':\n\t\t\treturn () => deep_clone(deep_get(context.get(), path));\n\t\tcase 'issues':\n\t\tcase 'allIssues': {\n\t\t\tconst key = build_path_string(path);\n\t\t\tconst all = prop === 'allIssues';\n\n\t\t\treturn () => {\n\t\t\t\tconst issues = context.get_issues(path, all)[key === '' ? '$' : key];\n\t\t\t\tif (all) return issues?.map(public_issue);\n\t\t\t\tconst own = issues?.filter((issue) => issue.name === key).map(public_issue);\n\t\t\t\treturn own?.length ? own : undefined;\n\t\t\t};\n\t\t}\n\t\tcase 'touched':\n\t\tcase 'dirty': {\n\t\t\tconst key = build_path_string(path);\n\n\t\t\treturn () => {\n\t\t\t\tconst object = prop === 'dirty' ? context.get_dirty() : context.get_touched();\n\t\t\t\tif (Object.hasOwn(object, key)) return true;\n\t\t\t\tfor (const candidate in object) {\n\t\t\t\t\tif (!Object.hasOwn(object, candidate)) continue;\n\t\t\t\t\tif (key === '') return true;\n\t\t\t\t\tif (!candidate.startsWith(key)) continue;\n\t\t\t\t\tconst next = candidate[key.length];\n\t\t\t\t\tif (next === '.' || next === '[') return true;\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t};\n\t\t}\n\t\tcase 'as': {\n\t\t\tconst key = build_path_string(path);\n\n\t\t\t/**\n\t\t\t * the field's value, or `fallback` until the field has been edited\n\t\t\t * (without a fallback there is nothing to suppress, so `dirty` is not read)\n\t\t\t * @param {unknown} [fallback]\n\t\t\t */\n\t\t\tconst read = (fallback) =>\n\t\t\t\tdeep_get(context.get(), path) ??\n\t\t\t\t(fallback !== undefined && Object.hasOwn(context.get_dirty(), key) ? undefined : fallback);\n\n\t\t\t/**\n\t\t\t * @param {string} type\n\t\t\t * @param {unknown} [input_value]\n\t\t\t * @param {boolean} [checked]\n\t\t\t */\n\t\t\treturn (type, input_value, checked) => {\n\t\t\t\tconst is_array =\n\t\t\t\t\ttype === 'file multiple' ||\n\t\t\t\t\ttype === 'select multiple' ||\n\t\t\t\t\t(type === 'checkbox' && typeof input_value === 'string');\n\n\t\t\t\tconst type_prefix = get_type_prefix(type, is_array, input_value);\n\n\t\t\t\t// Base properties for all input types\n\t\t\t\t/** @type {Record<string, any>} */\n\t\t\t\tconst base_props = {\n\t\t\t\t\tname: type_prefix + key + (is_array ? '[]' : '') + '/' + context.form_id,\n\t\t\t\t\tget 'aria-invalid'() {\n\t\t\t\t\t\tconst issues = context.get_issues();\n\t\t\t\t\t\treturn key in issues ? 'true' : undefined;\n\t\t\t\t\t}\n\t\t\t\t};\n\n\t\t\t\t// Add type attribute only for non-text inputs and non-select elements\n\t\t\t\tif (type !== 'text' && type !== 'select' && type !== 'select multiple') {\n\t\t\t\t\tbase_props.type = type === 'file multiple' ? 'file' : type;\n\t\t\t\t}\n\n\t\t\t\t// Handle submit and hidden inputs\n\t\t\t\tif (type === 'submit' || type === 'hidden') {\n\t\t\t\t\tif (DEV) {\n\t\t\t\t\t\tif (input_value === null || input_value === undefined) {\n\t\t\t\t\t\t\te.form_input_missing_value({ type: `\\`${type}\\`` });\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\treturn add_props(base_props, {\n\t\t\t\t\t\tvalue: typeof input_value === 'boolean' ? (input_value ? 'on' : 'off') : input_value\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\t// Handle select inputs\n\t\t\t\tif (type === 'select' || type === 'select multiple') {\n\t\t\t\t\treturn add_props(base_props, {\n\t\t\t\t\t\tmultiple: is_array,\n\t\t\t\t\t\tvalue: () => {\n\t\t\t\t\t\t\tconst value = read(input_value);\n\t\t\t\t\t\t\t// copied, so the state array can't be edited through the props\n\t\t\t\t\t\t\treturn Array.isArray(value) ? [...value] : value;\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\t// Handle checkbox inputs\n\t\t\t\tif (type === 'checkbox' || type === 'radio') {\n\t\t\t\t\t// radio and checkbox array inputs take their option as the second argument\n\t\t\t\t\t// and whether it is checked as the third, a single checkbox only the latter\n\t\t\t\t\tconst has_option = type === 'radio' || is_array;\n\n\t\t\t\t\tif (DEV && has_option && !input_value) {\n\t\t\t\t\t\te.form_input_missing_value({ type: type === 'radio' ? 'Radio' : 'Checkbox array' });\n\t\t\t\t\t}\n\n\t\t\t\t\tif (has_option) {\n\t\t\t\t\t\tbase_props.value = input_value ?? 'on';\n\t\t\t\t\t} else {\n\t\t\t\t\t\tchecked = /** @type {boolean | undefined} */ (input_value);\n\t\t\t\t\t}\n\n\t\t\t\t\treturn add_props(base_props, {\n\t\t\t\t\t\tdefaultChecked: checked,\n\t\t\t\t\t\tchecked: () => {\n\t\t\t\t\t\t\tconst value = read();\n\t\t\t\t\t\t\tif (value == null) return read(checked);\n\t\t\t\t\t\t\tif (type === 'radio') return value === input_value;\n\t\t\t\t\t\t\tif (is_array) return /** @type {unknown[]} */ (value).includes(input_value);\n\t\t\t\t\t\t\treturn value;\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\t// Handle file inputs\n\t\t\t\tif (type === 'file' || type === 'file multiple') {\n\t\t\t\t\treturn add_props(base_props, {\n\t\t\t\t\t\tmultiple: is_array,\n\t\t\t\t\t\tfiles: () => {\n\t\t\t\t\t\t\tconst value = read();\n\t\t\t\t\t\t\tconst files = value instanceof File ? [value] : value;\n\t\t\t\t\t\t\tif (!Array.isArray(files) || !files.every((f) => f instanceof File)) return null;\n\n\t\t\t\t\t\t\t// a FileList-like object where DataTransfer does not exist\n\t\t\t\t\t\t\tif (typeof DataTransfer === 'undefined') {\n\t\t\t\t\t\t\t\treturn Object.assign({ length: files.length }, files);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tconst transfer = new DataTransfer();\n\t\t\t\t\t\t\tfor (const file of files) transfer.items.add(file);\n\t\t\t\t\t\t\treturn transfer.files;\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\tif (type === 'image') return base_props;\n\n\t\t\t\t// Handle all other input types (text, number, etc.)\n\t\t\t\treturn add_props(base_props, {\n\t\t\t\t\tdefaultValue: input_value,\n\t\t\t\t\tvalue: () => String(read(input_value) ?? '')\n\t\t\t\t});\n\t\t\t};\n\t\t}\n\t}\n}\n\n/**\n * Creates a proxy-based field accessor for form data\n * @param {FieldContext} context\n * @param {any} target - Function or empty POJO\n * @param {(string | number)[]} path - Current access path\n * @returns {any} Proxy object with name(), value(), and issues() methods\n */\nexport function create_field_proxy(context, target = {}, path = []) {\n\treturn new Proxy(target, {\n\t\t...dev_traps,\n\t\tget(target, prop) {\n\t\t\tif (typeof prop === 'symbol') return target[prop];\n\n\t\t\t// array access like jobs[0]\n\t\t\tconst next = [...path, /^\\d+$/.test(prop) ? parseInt(prop, 10) : prop];\n\n\t\t\treturn create_field_proxy(context, create_field_method(context, path, prop), next);\n\t\t}\n\t});\n}\n\n/**\n * Builds a path string from an array of path segments\n * @param {(string | number)[]} path\n * @returns {string}\n */\nexport function build_path_string(path) {\n\tlet result = '';\n\n\tfor (const segment of path) {\n\t\tif (typeof segment === 'number') {\n\t\t\tresult += `[${segment}]`;\n\t\t} else {\n\t\t\tresult += result === '' ? segment : '.' + segment;\n\t\t}\n\t}\n\n\treturn result;\n}\n","import { BINARY_FORM_CONTENT_TYPE } from '../runtime/form-utils.js';\n\n/**\n * Given an Accept header and a list of possible content types, pick\n * the most suitable one to respond with\n * @param {string} accept\n * @param {string[]} types\n */\nexport function negotiate(accept, types) {\n\t/** @type {Array<{ type: string, subtype: string, q: number, i: number }>} */\n\tconst parts = [];\n\n\taccept.split(',').forEach((str, i) => {\n\t\tconst match = /^[ \\t]*([^/ \\t]+)\\/([^; \\t]+)[ \\t]*(?:;[ \\t]*q=([0-9.]+))?/.exec(str);\n\n\t\t// no match equals invalid header — ignore\n\t\tif (match) {\n\t\t\tconst [, type, subtype, q = '1'] = match;\n\t\t\tparts.push({ type, subtype, q: +q, i });\n\t\t}\n\t});\n\n\tparts.sort((a, b) => {\n\t\tif (a.q !== b.q) {\n\t\t\treturn b.q - a.q;\n\t\t}\n\n\t\tif ((a.subtype === '*') !== (b.subtype === '*')) {\n\t\t\treturn a.subtype === '*' ? 1 : -1;\n\t\t}\n\n\t\tif ((a.type === '*') !== (b.type === '*')) {\n\t\t\treturn a.type === '*' ? 1 : -1;\n\t\t}\n\n\t\treturn a.i - b.i;\n\t});\n\n\tlet accepted;\n\tlet min_priority = Infinity;\n\n\tfor (const mimetype of types) {\n\t\tconst [type, subtype] = mimetype.split('/');\n\t\tconst priority = parts.findIndex(\n\t\t\t(part) =>\n\t\t\t\t(part.type === type || part.type === '*') &&\n\t\t\t\t(part.subtype === subtype || part.subtype === '*')\n\t\t);\n\n\t\tif (priority !== -1 && priority < min_priority) {\n\t\t\taccepted = mimetype;\n\t\t\tmin_priority = priority;\n\t\t}\n\t}\n\n\treturn accepted;\n}\n\n/**\n * Returns `true` if a `content-type` header value is one of the given types, ignoring\n * parameters such as `charset` and comparing case-insensitively\n * @param {string | null | undefined} header\n * @param {...string} types\n */\nexport function matches_content_type(header, ...types) {\n\tconst type = header?.split(';', 1)[0].trim() ?? '';\n\treturn types.includes(type.toLowerCase());\n}\n\n/**\n * @param {Request} request\n */\nexport function is_form_content_type(request) {\n\t// These content types must be protected against CSRF\n\t// https://developer.mozilla.org/en-US/docs/Web/API/HTMLFormElement/enctype\n\treturn matches_content_type(\n\t\trequest.headers.get('content-type'),\n\t\t'application/x-www-form-urlencoded',\n\t\t'multipart/form-data',\n\t\t'text/plain',\n\t\tBINARY_FORM_CONTENT_TYPE\n\t);\n}\n","/** @import { Transport } from '@sveltejs/kit/hooks' */\nimport * as devalue from 'devalue';\nimport { DEV } from 'esm-env';\n\n/** @type {(thing: any) => string} */\nexport let uneval = () => {\n\tthrow new Error(DEV ? 'called uneval before init_transport' : '');\n};\n\n/** @type {(data: any) => string} */\nexport let stringify = () => {\n\tthrow new Error(DEV ? 'called stringify before init_transport' : '');\n};\n\n/** @type {(data: string) => any} */\nexport let parse = () => {\n\tthrow new Error(DEV ? 'called parse before init_transport' : '');\n};\n\n/** @type {Record<string, (data: any) => any>} */\nexport let encoders = {};\n\n/** @type {Record<string, (data: any) => any>} */\nexport let decoders = {};\n\nexport let has_custom_transporters = false;\n\n/**\n *\n * @param {Transport} transport\n */\nexport function init_transport(transport) {\n\tconst transporters = Object.entries(transport);\n\n\thas_custom_transporters = transporters.length > 0;\n\n\t/** @param {unknown} thing */\n\tconst replacer = (thing) => {\n\t\tfor (const key of Object.keys(transport)) {\n\t\t\tconst encoded = transport[key].encode(thing);\n\t\t\tif (encoded) {\n\t\t\t\treturn `app.decode('${key}', ${devalue.uneval(encoded, replacer)})`;\n\t\t\t}\n\t\t}\n\t};\n\n\tencoders = Object.fromEntries(transporters.map(([k, v]) => [k, v.encode]));\n\tdecoders = Object.fromEntries(transporters.map(([k, v]) => [k, v.decode]));\n\n\tuneval = (data) => devalue.uneval(data, replacer);\n\tstringify = (data) => devalue.stringify(data, encoders);\n\tparse = (data) => devalue.parse(data, decoders);\n}\n","import * as devalue from 'devalue';\nimport { base64_decode, base64_encode, text_decoder, text_encoder } from './utils.js';\nimport { decoders, encoders } from '#app/internal/transport';\nimport * as e from '../messages/shared-errors.js';\nimport * as w from '../messages/shared-warnings.js';\n\n/**\n * @param {string} route_id\n * @param {string} dep\n */\nexport function validate_depends(route_id, dep) {\n\tconst match = /^(moz-icon|view-source|jar):/.exec(dep);\n\tif (match) {\n\t\tw.depends_special_scheme({ route: route_id, dependency: dep, scheme: match[1] });\n\t}\n}\n\n/**\n * Same-origin urls are keyed by path, so prerendered pages can be served from any origin\n * @param {URL} url\n * @param {{ origin: string }} page\n */\nexport function fetch_cache_url(url, page) {\n\treturn url.origin === page.origin ? url.href.slice(page.origin.length) : url.href;\n}\n\nexport const INVALIDATED_PARAM = 'x-sveltekit-invalidated';\n\nexport const TRAILING_SLASH_PARAM = 'x-sveltekit-trailing-slash';\n\n/**\n * @param {any} data\n * @param {string} [location_description]\n */\nexport function validate_load_response(data, location_description) {\n\tif (data != null && Object.getPrototypeOf(data) !== Object.prototype) {\n\t\te.load_invalid_response({\n\t\t\tlocation: String(location_description),\n\t\t\ttype:\n\t\t\t\ttypeof data !== 'object'\n\t\t\t\t\t? `a ${typeof data}`\n\t\t\t\t\t: data instanceof Response\n\t\t\t\t\t\t? 'a Response object'\n\t\t\t\t\t\t: Array.isArray(data)\n\t\t\t\t\t\t\t? 'an array'\n\t\t\t\t\t\t\t: 'a non-plain object'\n\t\t});\n\t}\n}\n\nconst object_proto_names = /* @__PURE__ */ Object.getOwnPropertyNames(Object.prototype)\n\t.sort()\n\t.join('\\0');\n\n/**\n * @param {unknown} thing\n * @returns {thing is Record<PropertyKey, unknown>}\n */\nfunction is_plain_object(thing) {\n\tif (typeof thing !== 'object' || thing === null) return false;\n\tconst proto = Object.getPrototypeOf(thing);\n\n\treturn (\n\t\tproto === Object.prototype ||\n\t\tproto === null ||\n\t\tObject.getPrototypeOf(proto) === null ||\n\t\tObject.getOwnPropertyNames(proto).sort().join('\\0') === object_proto_names\n\t);\n}\n\n/**\n * @param {Record<string, any>} value\n * @param {Map<object, any>} clones\n */\nfunction to_sorted(value, clones) {\n\tconst clone = Object.getPrototypeOf(value) === null ? Object.create(null) : {};\n\tclones.set(value, clone);\n\tObject.defineProperty(clone, remote_arg_marker, { value: true });\n\n\tfor (const key of Object.keys(value).sort()) {\n\t\tconst property = value[key];\n\t\tObject.defineProperty(clone, key, {\n\t\t\tvalue: clones.get(property) ?? property,\n\t\t\tenumerable: true,\n\t\t\tconfigurable: true,\n\t\t\twritable: true\n\t\t});\n\t}\n\n\treturn clone;\n}\n\n// \"sveltekit remote arg\"\nconst remote_object = '__skrao';\nconst remote_map = '__skram';\nconst remote_set = '__skras';\nconst remote_file = '__skraf';\nconst remote_promise_guard = '__skrap';\nconst remote_regex_guard = '__skrag';\nconst remote_arg_marker = Symbol(remote_object);\n\n/**\n * @param {boolean} sort\n */\nfunction create_remote_arg_reducers(sort) {\n\t/** @type {Record<string, (value: unknown) => unknown>} */\n\tconst remote_fns_reducers = {\n\t\t/** @param {unknown} value */\n\t\t[remote_regex_guard]: (value) => {\n\t\t\tif (value instanceof RegExp) {\n\t\t\t\te.remote_argument_unsupported({ type: 'Regular expressions' });\n\t\t\t}\n\t\t}\n\t};\n\n\tif (sort) {\n\t\tconst clones = new Map();\n\n\t\t/** @type {(value: unknown) => Array<[unknown, unknown]> | undefined} */\n\t\tremote_fns_reducers[remote_map] = (value) => {\n\t\t\tif (!(value instanceof Map)) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t/** @type {Array<[string, string]>} */\n\t\t\tconst entries = [];\n\n\t\t\tfor (const [key, val] of value) {\n\t\t\t\tentries.push([stringify(key), stringify(val)]);\n\t\t\t}\n\n\t\t\treturn entries.sort(([a1, a2], [b1, b2]) => {\n\t\t\t\tif (a1 < b1) return -1;\n\t\t\t\tif (a1 > b1) return 1;\n\t\t\t\tif (a2 < b2) return -1;\n\t\t\t\tif (a2 > b2) return 1;\n\t\t\t\treturn 0;\n\t\t\t});\n\t\t};\n\n\t\t/** @type {(value: unknown) => unknown[] | undefined} */\n\t\tremote_fns_reducers[remote_set] = (value) => {\n\t\t\tif (!(value instanceof Set)) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t/** @type {string[]} */\n\t\t\tconst items = [];\n\n\t\t\tfor (const item of value) {\n\t\t\t\titems.push(stringify(item));\n\t\t\t}\n\n\t\t\titems.sort();\n\t\t\treturn items;\n\t\t};\n\n\t\t/** @type {(value: unknown) => Record<PropertyKey, unknown> | undefined} */\n\t\tremote_fns_reducers[remote_object] = (value) => {\n\t\t\tif (!is_plain_object(value)) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (Object.hasOwn(value, remote_arg_marker)) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (clones.has(value)) {\n\t\t\t\treturn clones.get(value);\n\t\t\t}\n\n\t\t\treturn to_sorted(value, clones);\n\t\t};\n\t}\n\n\tconst all_reducers = { ...encoders, ...remote_fns_reducers };\n\n\t/** @type {(value: unknown) => string} */\n\tconst stringify = (value) => devalue.stringify(value, all_reducers);\n\n\treturn all_reducers;\n}\n\nfunction create_remote_arg_revivers() {\n\tconst remote_fns_revivers = {\n\t\t/** @type {(value: unknown) => unknown} */\n\t\t[remote_object]: (value) => value,\n\t\t/** @type {(value: unknown) => Map<unknown, unknown>} */\n\t\t[remote_map]: (value) => {\n\t\t\tif (!Array.isArray(value)) {\n\t\t\t\tthrow new Error('Invalid data for Map reviver');\n\t\t\t}\n\n\t\t\tconst map = new Map();\n\n\t\t\tfor (const item of value) {\n\t\t\t\tif (\n\t\t\t\t\t!Array.isArray(item) ||\n\t\t\t\t\titem.length !== 2 ||\n\t\t\t\t\ttypeof item[0] !== 'string' ||\n\t\t\t\t\ttypeof item[1] !== 'string'\n\t\t\t\t) {\n\t\t\t\t\tthrow new Error('Invalid data for Map reviver');\n\t\t\t\t}\n\t\t\t\tconst [key, val] = item;\n\t\t\t\tmap.set(parse(key), parse(val));\n\t\t\t}\n\n\t\t\treturn map;\n\t\t},\n\t\t/** @type {(value: unknown) => Set<unknown>} */\n\t\t[remote_set]: (value) => {\n\t\t\tif (!Array.isArray(value)) {\n\t\t\t\tthrow new Error('Invalid data for Set reviver');\n\t\t\t}\n\n\t\t\tconst set = new Set();\n\n\t\t\tfor (const item of value) {\n\t\t\t\tif (typeof item !== 'string') {\n\t\t\t\t\tthrow new Error('Invalid data for Set reviver');\n\t\t\t\t}\n\t\t\t\tset.add(parse(item));\n\t\t\t}\n\n\t\t\treturn set;\n\t\t},\n\t\t/** @type {(value: any) => File} */\n\t\t[remote_file]: (value) => {\n\t\t\tif (\n\t\t\t\t!value ||\n\t\t\t\ttypeof value !== 'object' ||\n\t\t\t\ttypeof value.name !== 'string' ||\n\t\t\t\ttypeof value.type !== 'string' ||\n\t\t\t\ttypeof value.size !== 'number' ||\n\t\t\t\ttypeof value.lastModified !== 'number' ||\n\t\t\t\t!(value.data instanceof ArrayBuffer)\n\t\t\t) {\n\t\t\t\tthrow new Error('Invalid data for File reviver');\n\t\t\t}\n\n\t\t\tconst { data, name, ...meta } = value;\n\n\t\t\treturn new File([data], name, meta);\n\t\t}\n\t};\n\n\tconst all_revivers = { ...decoders, ...remote_fns_revivers };\n\n\t/** @type {(data: string) => unknown} */\n\tconst parse = (data) => devalue.parse(data, all_revivers);\n\n\treturn all_revivers;\n}\n\n/**\n * Stringifies the argument (if any) for a remote function in such a way that\n * it is both a valid URL and a valid file name (necessary for prerendering).\n * @param {any} value\n */\nexport function stringify_remote_arg(value) {\n\tif (value === undefined) return '';\n\n\t// If people hit file/url size limits, we can look into using something like compress_and_encode_text from svelte.dev beyond a certain size\n\tconst json = devalue.stringify(value, create_remote_arg_reducers(true));\n\n\treturn url_friendly_base64_encode(json);\n}\n\n/**\n * Stringifies command arguments, including `File` objects.\n * @param {any} value\n */\nexport async function stringify_command_arg(value) {\n\tif (value === undefined) return '';\n\n\tconst reducers = create_remote_arg_reducers(false);\n\n\t/** @type {Set<Promise<any>>} */\n\tconst allowed_promises = new Set();\n\n\t/** @param {any} value */\n\treducers[remote_file] = (value) => {\n\t\tif (value instanceof File) {\n\t\t\tconst promise = value.arrayBuffer().then((data) => ({\n\t\t\t\tdata,\n\t\t\t\tlastModified: value.lastModified,\n\t\t\t\tname: value.name,\n\t\t\t\tsize: value.size,\n\t\t\t\ttype: value.type\n\t\t\t}));\n\n\t\t\tallowed_promises.add(promise);\n\n\t\t\treturn promise;\n\t\t}\n\t};\n\n\t// we don't want to allow arbitrary promises, because they won't\n\t// show up as promises on the other side. this is something\n\t// we could potentially change in future. stringifyAsync\n\t// will await them, so we need to explicitly deny them\n\t/** @param {unknown} value */\n\treducers[remote_promise_guard] = (value) => {\n\t\tif (value instanceof Promise && !allowed_promises.has(value)) {\n\t\t\te.remote_argument_unsupported({ type: 'Promises' });\n\t\t}\n\t};\n\n\tconst json = await devalue.stringifyAsync(value, reducers);\n\n\treturn url_friendly_base64_encode(json);\n}\n\n/**\n * Base64-encodes `string` in such a way that the result is safe to use\n * as both a URI component and a filename\n * @param {string} string\n */\nfunction url_friendly_base64_encode(string) {\n\tconst bytes = text_encoder.encode(string);\n\t// TODO replace with `bytes.toBase64({ alphabet: 'base64url', omitPadding: true })` when we require Node >= 25\n\treturn base64_encode(bytes).replaceAll('=', '').replaceAll('+', '-').replaceAll('/', '_');\n}\n\n/**\n * Parses the argument (if any) for a remote function\n * @param {string} string\n */\nexport function parse_remote_arg(string) {\n\tif (!string) return undefined;\n\n\tconst json_string = text_decoder.decode(\n\t\t// TODO replace with `Uint8Array.fromBase64(string, { alphabet: 'base64url' })` when we require Node >= 25\n\t\t// no need to add back `=` characters, atob can handle it\n\t\tbase64_decode(string.replaceAll('-', '+').replaceAll('_', '/'))\n\t);\n\n\treturn devalue.parse(json_string, create_remote_arg_revivers());\n}\n\n/**\n * @param {string} id\n * @param {string} payload\n */\nexport function create_remote_key(id, payload) {\n\treturn id + '/' + payload;\n}\n\n/**\n * @param {string} key\n * @returns {{ id: string; payload: string }}\n */\nexport function split_remote_key(key) {\n\tconst i = key.lastIndexOf('/');\n\n\tif (i === -1) {\n\t\tthrow new Error(`Invalid remote key: ${key}`);\n\t}\n\n\treturn {\n\t\tid: key.slice(0, i),\n\t\tpayload: key.slice(i + 1)\n\t};\n}\n","import { HttpError, SvelteKitError } from '@sveltejs/kit/internal';\nimport * as w from '../messages/shared-warnings.js';\n\n/**\n * For times when you need to throw an error, but without\n * displaying a useless stack trace (since the developer\n * can't do anything useful with it)\n * @param {string} message\n */\nexport function stackless(message) {\n\tconst error = new Error(message);\n\terror.stack = '';\n\treturn error;\n}\n\n/**\n * @param {Error} error\n * @param {string} stack\n * @returns {string | undefined}\n */\nexport function set_error_stack(error, stack) {\n\ttry {\n\t\t// Unlike assignment in strict mode, Reflect.set returns false for a read-only property\n\t\tReflect.set(error, 'stack', stack);\n\t} catch {\n\t\t// A custom setter or proxy trap may still throw\n\t}\n\n\treturn error.stack;\n}\n\n/**\n * @param {unknown} err\n * @return {Error}\n */\nexport function coalesce_to_error(err) {\n\treturn err instanceof Error ||\n\t\t(err && /** @type {any} */ (err).name && /** @type {any} */ (err).message)\n\t\t? /** @type {Error} */ (err)\n\t\t: new Error(JSON.stringify(err));\n}\n\n/**\n * This is an identity function that exists to make TypeScript less\n * paranoid about people throwing things that aren't errors, which\n * frankly is not something we should care about\n * @param {unknown} error\n */\nexport function normalize_error(error) {\n\treturn /** @type {import('../exports/internal/shared.js').Redirect | HttpError | SvelteKitError | Error} */ (\n\t\terror\n\t);\n}\n\n/**\n * @param {unknown} error\n */\nexport function get_status(error) {\n\treturn error instanceof HttpError || error instanceof SvelteKitError ? error.status : 500;\n}\n\n/**\n * Adds development-only compatibility accessors for the former top-level `status` and `message`\n * properties of the `handleError` hook input.\n * @template {object} T\n * @param {T} input\n * @param {{ status: number; message: string }} fallback\n * @returns {T}\n */\nexport function add_deprecated_handle_error_properties(input, fallback) {\n\tObject.defineProperties(input, {\n\t\tstatus: {\n\t\t\tget() {\n\t\t\t\tw.handle_error_status_deprecated();\n\t\t\t\treturn fallback.status;\n\t\t\t}\n\t\t},\n\t\tmessage: {\n\t\t\tget() {\n\t\t\t\tw.handle_error_message_deprecated();\n\t\t\t\treturn fallback.message;\n\t\t\t}\n\t\t}\n\t});\n\n\treturn input;\n}\n","/* This file is generated by scripts/process-messages/index.js. Do not edit! */\n\nimport { DEV } from 'esm-env';\nimport { bold, normal } from './internal/shared.js';\n\n/**\n * `cache-control` header contains empty directives. (While parsing `%value%`.)\n * @param {{ \"value\": string }} _values\n */\nexport function cache_control_empty_directive(_values) {\n\tif (DEV) {\n\t\tconsole.warn(\n\t\t\t`%c[sveltekit] ${'cache_control_empty_directive'}\\n%c${`\\`cache-control\\` header contains empty directives. (While parsing \\`${_values.value}\\`.)`}\\nhttps://svelte.dev/e/kit/${'cache_control_empty_directive'}`,\n\t\t\tbold,\n\t\t\tnormal\n\t\t);\n\t} else {\n\t\tconsole.warn('https://svelte.dev/e/kit/cache_control_empty_directive');\n\t}\n}\n\n/**\n * Invalid `cache-control` directive `%directive%`. Did you mean one of: %directives%? (While parsing `%value%`.)\n * @param {{ \"directive\": string; \"directives\": string; \"value\": string }} _values\n */\nexport function cache_control_invalid_directive(_values) {\n\tif (DEV) {\n\t\tconsole.warn(\n\t\t\t`%c[sveltekit] ${'cache_control_invalid_directive'}\\n%c${`Invalid \\`cache-control\\` directive \\`${_values.directive}\\`. Did you mean one of: ${_values.directives}? (While parsing \\`${_values.value}\\`.)`}\\nhttps://svelte.dev/e/kit/${'cache_control_invalid_directive'}`,\n\t\t\tbold,\n\t\t\tnormal\n\t\t);\n\t} else {\n\t\tconsole.warn('https://svelte.dev/e/kit/cache_control_invalid_directive');\n\t}\n}\n\n/**\n * Invalid `content-type` value `%type%`. (While parsing `%value%`.)\n * @param {{ \"type\": string; \"value\": string }} _values\n */\nexport function content_type_invalid(_values) {\n\tif (DEV) {\n\t\tconsole.warn(\n\t\t\t`%c[sveltekit] ${'content_type_invalid'}\\n%c${`Invalid \\`content-type\\` value \\`${_values.type}\\`. (While parsing \\`${_values.value}\\`.)`}\\nhttps://svelte.dev/e/kit/${'content_type_invalid'}`,\n\t\t\tbold,\n\t\t\tnormal\n\t\t);\n\t} else {\n\t\tconsole.warn('https://svelte.dev/e/kit/content_type_invalid');\n\t}\n}\n\n/**\n * `%name%` cookie does not exist for `%pathname%`, but was previously set at %paths%. Did you mean to set its `path` to `'/'` instead?\n * @param {{ \"name\": string; \"pathname\": string; \"paths\": string }} _values\n */\nexport function cookie_path_mismatch(_values) {\n\tif (DEV) {\n\t\tconsole.warn(\n\t\t\t`%c[sveltekit] ${'cookie_path_mismatch'}\\n%c${`\\`${_values.name}\\` cookie does not exist for \\`${_values.pathname}\\`, but was previously set at ${_values.paths}. Did you mean to set its \\`path\\` to \\`'/'\\` instead?`}\\nhttps://svelte.dev/e/kit/${'cookie_path_mismatch'}`,\n\t\t\tbold,\n\t\t\tnormal\n\t\t);\n\t} else {\n\t\tconsole.warn('https://svelte.dev/e/kit/cookie_path_mismatch');\n\t}\n}\n\n/**\n * The form action returned a value, but it isn't available in `page.form`, because SSR is off. To handle the returned value in CSR, enhance your form with `use:enhance`. See https://svelte.dev/docs/kit/form-actions#Progressive-enhancement-use:enhance\n * @param {void} _values\n */\nexport function form_action_data_without_ssr(_values) {\n\tif (DEV) {\n\t\tconsole.warn(\n\t\t\t`%c[sveltekit] ${'form_action_data_without_ssr'}\\n%c${`The form action returned a value, but it isn't available in \\`page.form\\`, because SSR is off. To handle the returned value in CSR, enhance your form with \\`use:enhance\\`. See https://svelte.dev/docs/kit/form-actions#Progressive-enhancement-use:enhance`}\\nhttps://svelte.dev/e/kit/${'form_action_data_without_ssr'}`,\n\t\t\tbold,\n\t\t\tnormal\n\t\t);\n\t} else {\n\t\tconsole.warn('https://svelte.dev/e/kit/form_action_data_without_ssr');\n\t}\n}\n\n/**\n * The form action returned an error, but `+error.svelte` wasn't rendered because SSR is off. To get the error page with CSR, enhance your form with `use:enhance`. See https://svelte.dev/docs/kit/form-actions#Progressive-enhancement-use:enhance\n * @param {void} _values\n */\nexport function form_action_error_without_ssr(_values) {\n\tif (DEV) {\n\t\tconsole.warn(\n\t\t\t`%c[sveltekit] ${'form_action_error_without_ssr'}\\n%c${`The form action returned an error, but \\`+error.svelte\\` wasn't rendered because SSR is off. To get the error page with CSR, enhance your form with \\`use:enhance\\`. See https://svelte.dev/docs/kit/form-actions#Progressive-enhancement-use:enhance`}\\nhttps://svelte.dev/e/kit/${'form_action_error_without_ssr'}`,\n\t\t\tbold,\n\t\t\tnormal\n\t\t);\n\t} else {\n\t\tconsole.warn('https://svelte.dev/e/kit/form_action_error_without_ssr');\n\t}\n}\n\n/**\n * To use an async `handleError` hook to handle errors that occur during rendering, you must enable `compilerOptions.experimental.async` in the SvelteKit plugin of your Vite config. The returned error has been replaced with a generic object\n * @param {void} _values\n */\nexport function handle_error_async_without_async_svelte(_values) {\n\tif (DEV) {\n\t\tconsole.warn(\n\t\t\t`%c[sveltekit] ${'handle_error_async_without_async_svelte'}\\n%c${`To use an async \\`handleError\\` hook to handle errors that occur during rendering, you must enable \\`compilerOptions.experimental.async\\` in the SvelteKit plugin of your Vite config. The returned error has been replaced with a generic object`}\\nhttps://svelte.dev/e/kit/${'handle_error_async_without_async_svelte'}`,\n\t\t\tbold,\n\t\t\tnormal\n\t\t);\n\t} else {\n\t\tconsole.warn('https://svelte.dev/e/kit/handle_error_async_without_async_svelte');\n\t}\n}\n\n/**\n * `%id%`: %usage% in a promise handler after `load(...)` has returned will not cause the function to re-run when %change%\n * @param {{ \"id\": string; \"usage\": string; \"change\": string }} _values\n */\nexport function load_tracking_after_return(_values) {\n\tif (DEV) {\n\t\tconsole.warn(\n\t\t\t`%c[sveltekit] ${'load_tracking_after_return'}\\n%c${`\\`${_values.id}\\`: ${_values.usage} in a promise handler after \\`load(...)\\` has returned will not cause the function to re-run when ${_values.change}`}\\nhttps://svelte.dev/e/kit/${'load_tracking_after_return'}`,\n\t\t\tbold,\n\t\t\tnormal\n\t\t);\n\t} else {\n\t\tconsole.warn('https://svelte.dev/e/kit/load_tracking_after_return');\n\t}\n}\n\n/**\n * Avoid calling `fetch` eagerly during server-side rendering — put your `fetch` calls inside `onMount` or a `load` function instead\n * @param {void} _values\n */\nexport function ssr_fetch_eager(_values) {\n\tif (DEV) {\n\t\tconsole.warn(\n\t\t\t`%c[sveltekit] ${'ssr_fetch_eager'}\\n%c${`Avoid calling \\`fetch\\` eagerly during server-side rendering — put your \\`fetch\\` calls inside \\`onMount\\` or a \\`load\\` function instead`}\\nhttps://svelte.dev/e/kit/${'ssr_fetch_eager'}`,\n\t\t\tbold,\n\t\t\tnormal\n\t\t);\n\t} else {\n\t\tconsole.warn('https://svelte.dev/e/kit/ssr_fetch_eager');\n\t}\n}\n\n/**\n * Returning promises from server `load` functions will only work if `csr === true`\n * @param {void} _values\n */\nexport function streaming_without_csr(_values) {\n\tif (DEV) {\n\t\tconsole.warn(\n\t\t\t`%c[sveltekit] ${'streaming_without_csr'}\\n%c${`Returning promises from server \\`load\\` functions will only work if \\`csr === true\\``}\\nhttps://svelte.dev/e/kit/${'streaming_without_csr'}`,\n\t\t\tbold,\n\t\t\tnormal\n\t\t);\n\t} else {\n\t\tconsole.warn('https://svelte.dev/e/kit/streaming_without_csr');\n\t}\n}\n\n/**\n * Removing comments in `transformPageChunk` can break Svelte's hydration\n * @param {void} _values\n */\nexport function transform_page_chunk_comments(_values) {\n\tif (DEV) {\n\t\tconsole.warn(\n\t\t\t`%c[sveltekit] ${'transform_page_chunk_comments'}\\n%c${`Removing comments in \\`transformPageChunk\\` can break Svelte's hydration`}\\nhttps://svelte.dev/e/kit/${'transform_page_chunk_comments'}`,\n\t\t\tbold,\n\t\t\tnormal\n\t\t);\n\t} else {\n\t\tconsole.warn('https://svelte.dev/e/kit/transform_page_chunk_comments');\n\t}\n}\n","import {\n\tHandledHttpError,\n\tHttpError,\n\tSvelteKitError,\n\tValidationError\n} from '@sveltejs/kit/internal';\nimport { with_request_store } from '@sveltejs/kit/internal/server';\nimport { add_deprecated_handle_error_properties, coalesce_to_error } from '../../utils/error.js';\n// `$app/server` reaches this module, so it must not import anything generated\nimport { fix_stack_trace, hooks } from './internal.js';\nimport { capture_error } from '../../messages/internal/server.js';\nimport * as e from '../../messages/server-errors.js';\nimport * as w from '../../messages/server-warnings.js';\n\n/**\n * @param {import('@sveltejs/kit').RequestEvent} event\n * @param {import('types').RequestState} state\n * @param {any} error\n * @returns {App.Error | Promise<App.Error>}\n */\nexport function handle_error_and_jsonify(event, state, error) {\n\tif (error instanceof HandledHttpError) {\n\t\treturn error.body;\n\t}\n\n\t/** @type {import('@sveltejs/kit/hooks').CaughtError} */\n\tlet caught;\n\n\tif (error instanceof HttpError) {\n\t\tcaught = { kind: 'app', error: error.body };\n\t} else if (error instanceof SvelteKitError) {\n\t\tcaught = { kind: 'framework', error: { status: error.status, message: error.text } };\n\t} else if (error instanceof ValidationError) {\n\t\tcaught = {\n\t\t\tkind: 'validation',\n\t\t\terror: { status: 400, message: 'Bad Request' },\n\t\t\tissues: error.issues\n\t\t};\n\t} else {\n\t\tcaught = { kind: 'unknown', error };\n\n\t\tlet e = error;\n\t\twhile (e instanceof Error) {\n\t\t\tfix_stack_trace(e);\n\t\t\te = e.cause;\n\t\t}\n\t}\n\n\tconst fallback =\n\t\tcaught.kind === 'unknown' ? { status: 500, message: 'Internal Error' } : caught.error;\n\n\t/**\n\t * The hook returns only the properties it wants to override; anything it omits\n\t * (including by returning nothing at all) is inherited from the caught error.\n\t * @param {Awaited<ReturnType<import('@sveltejs/kit/hooks').HandleServerError>>} body\n\t * @returns {App.Error}\n\t */\n\tfunction merge(body) {\n\t\treturn { ...fallback, ...body };\n\t}\n\n\t// TODO 4.0 await this, rather than handling the non-Promise case\n\tlet result;\n\ttry {\n\t\tconst input = { ...caught, event };\n\t\tif (__SVELTEKIT_DEV__) add_deprecated_handle_error_properties(input, fallback);\n\n\t\tresult = with_request_store({ event, state }, () => hooks.handleError(input));\n\t} catch (hook_error) {\n\t\tlog_handle_error_hook_failure(error, hook_error);\n\t\treturn { status: fallback.status, message: 'Internal Error' };\n\t}\n\n\tif (result instanceof Promise) {\n\t\tif (!__SVELTEKIT_SUPPORTS_ASYNC__ && state.is_in_render) {\n\t\t\tw.handle_error_async_without_async_svelte();\n\n\t\t\t// we're discarding the result, but we still need to prevent an unhandled\n\t\t\t// rejection if the user's async `handleError` hook rejects\n\t\t\tresult.catch((hook_error) => log_handle_error_hook_failure(error, hook_error));\n\n\t\t\treturn {\n\t\t\t\tstatus: fallback.status,\n\t\t\t\tmessage: 'Internal Error'\n\t\t\t};\n\t\t}\n\n\t\treturn result.then(merge, (hook_error) => {\n\t\t\tlog_handle_error_hook_failure(error, hook_error);\n\t\t\treturn { status: fallback.status, message: 'Internal Error' };\n\t\t});\n\t}\n\n\treturn merge(result);\n}\n\n/**\n * @param {unknown} error\n * @param {unknown} hook_error\n */\nfunction log_handle_error_hook_failure(error, hook_error) {\n\tconst failure = capture_error(() =>\n\t\te.handle_error_hook_failed(undefined, { cause: coalesce_to_error(hook_error) })\n\t);\n\t// only show the diagnostic and the cause, not a stack trace of SvelteKit's internals\n\tfailure.stack = `${failure.name}: ${failure.message}`;\n\tconsole.error(failure);\n\tif (error instanceof SvelteKitError) {\n\t\tconsole.error(`Original error: ${error.status} ${error.text}: ${error.message}`);\n\t} else {\n\t\tconsole.error('Original error:', error);\n\t}\n}\n","import { text } from '@sveltejs/kit';\nimport { ENDPOINT_METHODS } from '../../constants.js';\nimport { manifest } from './internal.js';\nimport * as e from '../../messages/server-errors.js';\n\n/**\n * @param {Partial<Record<import('types').HttpMethod, any>>} mod\n * @param {import('types').HttpMethod} method\n */\nexport function method_not_allowed(mod, method) {\n\treturn text(`${method} method not allowed`, {\n\t\tstatus: 405,\n\t\theaders: {\n\t\t\t// https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/405\n\t\t\t// \"The server must generate an Allow header field in a 405 status code response\"\n\t\t\tallow: allowed_methods(mod).join(', ')\n\t\t}\n\t});\n}\n\n/** @param {Partial<Record<import('types').HttpMethod, any>>} mod */\nexport function allowed_methods(mod) {\n\tconst allowed = ENDPOINT_METHODS.filter((method) => method in mod);\n\n\t// if there's no HEAD handler, but we have a GET handler, we respond to\n\t// HEAD requests using the GET handler and omit the response body.\n\tif ('GET' in mod && !('HEAD' in mod)) {\n\t\tallowed.push('HEAD');\n\t}\n\n\treturn allowed;\n}\n\n/**\n * @param {number} status\n * @param {string} location\n */\nexport function redirect_response(status, location) {\n\tconst response = new Response(undefined, {\n\t\tstatus,\n\t\theaders: { location }\n\t});\n\treturn response;\n}\n\n/**\n * @param {Response} response\n */\nexport function with_version_header(response) {\n\tif (__SVELTEKIT_APP_VERSION_CHECKS_ENABLED__) {\n\t\tresponse.headers.set('x-sveltekit-version', __SVELTEKIT_APP_VERSION__);\n\t}\n\treturn response;\n}\n\n/**\n * Throws an error explaining why data returned from `load` couldn't be serialized by devalue,\n * whose error becomes the cause\n * @param {import('@sveltejs/kit').RequestEvent} event\n * @param {Error & { path: string }} error\n * @returns {never}\n */\nexport function throw_devalue_error(event, error) {\n\tconst id = /** @type {string} */ (event.route.id);\n\n\tif (error.path) {\n\t\te.load_not_serializable({ id, message: error.message, path: error.path }, { cause: error });\n\t}\n\n\tif (error.path === '') {\n\t\te.load_not_plain_object({ id }, { cause: error });\n\t}\n\n\t// belt and braces — this should never happen\n\tthrow new Error(error.message, { cause: error });\n}\n\n/**\n * @param {import('types').ServerDataNode} node\n */\nexport function serialize_uses(node) {\n\tconst uses = {};\n\n\tif (node.uses && node.uses.dependencies.size > 0) {\n\t\tuses.dependencies = Array.from(node.uses.dependencies);\n\t}\n\n\tif (node.uses && node.uses.search_params.size > 0) {\n\t\tuses.search_params = Array.from(node.uses.search_params);\n\t}\n\n\tif (node.uses && node.uses.params.size > 0) {\n\t\tuses.params = Array.from(node.uses.params);\n\t}\n\n\tif (node.uses?.parent) uses.parent = 1;\n\tif (node.uses?.route) uses.route = 1;\n\tif (node.uses?.url) uses.url = 1;\n\n\treturn uses;\n}\n\n/**\n * Returns `true` if the given path was prerendered\n * @param {string} pathname Should include the base and be decoded\n */\nexport function has_prerendered_path(pathname) {\n\treturn (\n\t\tmanifest.prerendered_routes.has(pathname) ||\n\t\t(pathname.at(-1) === '/' && manifest.prerendered_routes.has(pathname.slice(0, -1)))\n\t);\n}\n\n/**\n * Returns the filename without the extension. e.g., `+page.server`, `+page`, etc.\n * @param {string | undefined} node_id\n * @returns {string}\n */\nexport function get_node_type(node_id) {\n\tconst parts = node_id?.split('/');\n\tconst filename = parts?.at(-1);\n\tif (!filename) return 'unknown';\n\tconst dot_parts = filename.split('.');\n\treturn dot_parts.slice(0, -1).join('.');\n}\n\n/**\n * Counts HTML comments that are not SSI directives (which start with `<!--#`).\n * Used to detect when `transformPageChunk` removes comments that Svelte needs for hydration.\n * @param {string} str\n * @returns {number}\n */\nexport function count_non_ssi_comments(str) {\n\treturn (str.match(/<!--(?!#)/g) ?? []).length;\n}\n","/** @import { RequestEvent, Actions } from '@sveltejs/kit' */\n/** @import { ActionResult } from '$app/forms' */\n/** @import { SSRNode, ServerNode, ServerActionResult } from 'types' */\nimport { DEV } from 'esm-env';\nimport { HttpError, Redirect, ActionFailure, SvelteKitError } from '@sveltejs/kit/internal';\nimport { with_request_store, merge_tracing, record_span } from '@sveltejs/kit/internal/server';\nimport { normalize_error } from '../../../utils/error.js';\nimport { is_form_content_type, negotiate } from '../../../utils/http.js';\nimport { with_version_header } from '../utils.js';\nimport { handle_error_and_jsonify } from '../errors.js';\nimport { stringify, uneval } from '#app/internal/transport';\nimport { capture_error } from '../../../messages/internal/server.js';\nimport * as e from '../../../messages/server-errors.js';\n\n/** @param {RequestEvent} event */\nexport function is_action_json_request(event) {\n\tconst accept = negotiate(event.request.headers.get('accept') ?? '*/*', [\n\t\t'application/json',\n\t\t'text/html'\n\t]);\n\n\treturn accept === 'application/json' && event.request.method === 'POST';\n}\n\n/**\n * @param {RequestEvent} event\n * @param {import('types').RequestState} state\n * @param {SSRNode['server'] | undefined} server\n */\nexport async function handle_action_json_request(event, state, server) {\n\tconst result = await handle_action_request(event, state, server);\n\treturn action_result_json(event, state, result);\n}\n\n/**\n * @param {RequestEvent} event\n * @param {import('types').RequestState} state\n * @param {ServerActionResult} result\n * @returns {Promise<Response>}\n */\nasync function action_result_json(event, state, result) {\n\tif (result.type === 'redirect') {\n\t\treturn action_json(result);\n\t}\n\n\tif (result.type === 'error') {\n\t\tconst error = await handle_error_and_jsonify(event, state, result.error);\n\t\treturn action_json({ ...result, error }, { status: error.status });\n\t}\n\n\tif (result.type === 'success' && !result.data) {\n\t\treturn action_json({ ...result, status: 204, data: undefined });\n\t}\n\n\ttry {\n\t\treturn action_json(\n\t\t\t{\n\t\t\t\t...result,\n\t\t\t\t// @ts-expect-error we assign a string to what is supposed to be an object. That's ok\n\t\t\t\t// because we don't use the object outside, and this way we have better code navigation\n\t\t\t\t// through knowing where the related interface is used.\n\t\t\t\tdata: try_serialize(result.data, stringify, /** @type {string} */ (event.route.id))\n\t\t\t},\n\t\t\t{ status: result.status }\n\t\t);\n\t} catch (error) {\n\t\treturn action_result_json(event, state, action_error_result(error, result.location));\n\t}\n}\n\n/**\n * @param {URL} url\n */\nexport function get_action_location(url) {\n\tconst location = new URL(url);\n\n\tfor (const key of location.searchParams.keys()) {\n\t\tif (key.startsWith('/')) {\n\t\t\tlocation.searchParams.delete(key);\n\t\t\tbreak;\n\t\t}\n\t}\n\n\t// Preserve leading double slashes without producing a protocol-relative URL.\n\tconst pathname = location.pathname.startsWith('//')\n\t\t? '/.' + location.pathname\n\t\t: location.pathname;\n\treturn pathname + location.search;\n}\n\n/**\n * @param {RequestEvent} event\n * @param {string} location\n * @returns {Extract<ServerActionResult, { type: 'error' }>}\n */\nexport function method_not_allowed_result(event, location) {\n\tevent.setHeaders({\n\t\t// https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/405\n\t\t// \"The server must generate an Allow header field in a 405 status code response\"\n\t\tallow: 'GET'\n\t});\n\treturn {\n\t\ttype: 'error',\n\t\tlocation,\n\t\terror: new SvelteKitError(\n\t\t\t405,\n\t\t\t'Method Not Allowed',\n\t\t\t`POST method not allowed. No form actions exist for ${DEV ? `the page at ${event.route.id}` : 'this page'}`\n\t\t)\n\t};\n}\n\n/**\n * @param {unknown} error\n * @param {string} location\n * @returns {Extract<ServerActionResult, { type: 'redirect' | 'error' }>}\n */\nexport function action_error_result(error, location) {\n\tconst err = normalize_error(error);\n\n\tif (err instanceof Redirect) {\n\t\treturn {\n\t\t\ttype: 'redirect',\n\t\t\tstatus: err.status,\n\t\t\tlocation: err.location\n\t\t};\n\t}\n\n\treturn {\n\t\ttype: 'error',\n\t\tlocation,\n\t\terror: err\n\t};\n}\n\n/**\n * @param {Redirect} redirect\n */\nexport function action_json_redirect(redirect) {\n\treturn action_json({\n\t\ttype: 'redirect',\n\t\tstatus: redirect.status,\n\t\tlocation: redirect.location\n\t});\n}\n\n/**\n * @param {ActionResult} data\n * @param {ResponseInit} [init]\n */\nfunction action_json(data, init) {\n\treturn with_version_header(Response.json(data, init));\n}\n\n/**\n * @param {RequestEvent} event\n */\nexport function is_action_request(event) {\n\treturn event.request.method === 'POST';\n}\n\n/**\n * @param {RequestEvent} event\n * @param {import('types').RequestState} state\n * @param {SSRNode['server'] | undefined} server\n * @returns {Promise<ServerActionResult>}\n */\nexport async function handle_action_request(event, state, server) {\n\tconst actions = server?.actions;\n\tconst location = get_action_location(event.url);\n\n\tif (!actions) {\n\t\t// TODO should this be a different error altogether?\n\t\treturn method_not_allowed_result(event, location);\n\t}\n\n\tcheck_named_default_separate(actions);\n\n\ttry {\n\t\tconst data = await call_action(event, state, actions);\n\n\t\tif (DEV) {\n\t\t\tvalidate_action_return(data);\n\t\t}\n\n\t\tif (data instanceof ActionFailure) {\n\t\t\treturn {\n\t\t\t\ttype: 'failure',\n\t\t\t\tstatus: data.status,\n\t\t\t\tlocation,\n\t\t\t\tdata: data.data\n\t\t\t};\n\t\t} else {\n\t\t\treturn {\n\t\t\t\ttype: 'success',\n\t\t\t\tstatus: 200,\n\t\t\t\tlocation,\n\t\t\t\t// @ts-expect-error this will be removed upon serialization, so `undefined` is the same as omission\n\t\t\t\tdata\n\t\t\t};\n\t\t}\n\t} catch (error) {\n\t\treturn action_error_result(\n\t\t\terror instanceof ActionFailure ? capture_error(() => e.action_throw_fail()) : error,\n\t\t\tlocation\n\t\t);\n\t}\n}\n\n/**\n * @param {Actions} actions\n */\nfunction check_named_default_separate(actions) {\n\tif (actions.default && Object.keys(actions).length > 1) {\n\t\te.action_default_with_named();\n\t}\n}\n\n/**\n * @param {RequestEvent} event\n * @param {import('types').RequestState} state\n * @param {NonNullable<ServerNode['actions']>} actions\n * @throws {Redirect | HttpError | SvelteKitError | Error}\n */\nasync function call_action(event, state, actions) {\n\tconst url = new URL(event.request.url);\n\n\tlet name = 'default';\n\tfor (const param of url.searchParams) {\n\t\tif (param[0].startsWith('/')) {\n\t\t\tname = param[0].slice(1);\n\t\t\tif (name === 'default') {\n\t\t\t\te.action_name_reserved();\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\t}\n\n\tif (!Object.hasOwn(actions, name)) {\n\t\tthrow new SvelteKitError(404, 'Not Found', `No action with name '${name}' found`);\n\t}\n\n\tconst action = actions[name];\n\n\tif (!is_form_content_type(event.request)) {\n\t\tthrow new SvelteKitError(\n\t\t\t415,\n\t\t\t'Unsupported Media Type',\n\t\t\t`Form actions expect form-encoded data — received ${event.request.headers.get(\n\t\t\t\t'content-type'\n\t\t\t)}`\n\t\t);\n\t}\n\n\treturn record_span({\n\t\tname: 'sveltekit.form_action',\n\t\tattributes: {\n\t\t\t'sveltekit.form_action.name': name,\n\t\t\t'http.route': event.route.id || 'unknown'\n\t\t},\n\t\tfn: async (current) => {\n\t\t\tconst traced_event = merge_tracing(event, current);\n\n\t\t\tconst result = await with_request_store({ event: traced_event, state }, () =>\n\t\t\t\taction(traced_event)\n\t\t\t);\n\n\t\t\tif (result instanceof ActionFailure) {\n\t\t\t\tcurrent.setAttributes({\n\t\t\t\t\t'sveltekit.form_action.result.type': 'failure',\n\t\t\t\t\t'sveltekit.form_action.result.status': result.status\n\t\t\t\t});\n\t\t\t}\n\n\t\t\treturn result;\n\t\t}\n\t});\n}\n\n/** @param {any} data */\nfunction validate_action_return(data) {\n\tif (data instanceof Redirect) {\n\t\te.action_return_redirect();\n\t}\n\n\tif (data instanceof HttpError) {\n\t\te.action_return_error();\n\t}\n}\n\n/**\n * Try to `devalue.uneval` the data object, and if it fails, return a proper Error with context\n * @param {any} data\n * @param {string} route_id\n */\nexport function uneval_action_response(data, route_id) {\n\treturn try_serialize(data, uneval, route_id);\n}\n\n/**\n * @param {any} data\n * @param {(data: any) => string} fn\n * @param {string} route_id\n */\nfunction try_serialize(data, fn, route_id) {\n\ttry {\n\t\treturn fn(data);\n\t} catch (/** @type {any} */ error) {\n\t\t// If we're here, the data could not be serialized with devalue\n\n\t\t// if someone tries to use `json()` in their action\n\t\tif (data instanceof Response) {\n\t\t\te.action_response_not_serializable({ id: route_id }, { cause: error });\n\t\t}\n\n\t\t// if devalue could not serialize a property on the object, etc.\n\t\tif ('path' in error) {\n\t\t\tconst values = { id: route_id, message: error.message };\n\t\t\te.action_data_not_serializable(\n\t\t\t\terror.path === '' ? values : { ...values, path: `data${error.path}` },\n\t\t\t\t{ cause: error }\n\t\t\t);\n\t\t}\n\n\t\tthrow error;\n\t}\n}\n","/** @import { RequestEvent } from '@sveltejs/kit' */\n/** @import { RemoteForm } from '$app/server' */\n/** @import { RemoteFormInternals, RemoteFunctionData, RemoteFunctionResponse, RemoteInternals, RequestState, ServerActionResult } from 'types' */\n\nimport { error } from '@sveltejs/kit';\nimport { Redirect, SvelteKitError } from '@sveltejs/kit/internal';\nimport { with_request_store, merge_tracing, record_span } from '@sveltejs/kit/internal/server';\nimport { app_dir, base } from '#app/paths';\nimport { is_form_content_type } from '../../utils/http.js';\nimport { create_remote_key, parse_remote_arg, split_remote_key } from '../shared.js';\nimport { stringify } from '#app/internal/transport';\nimport { handle_error_and_jsonify } from './errors.js';\nimport {\n\taction_error_result,\n\tget_action_location,\n\tmethod_not_allowed_result\n} from './page/actions.js';\nimport { deserialize_binary_form } from '../form-utils.js';\nimport { text_encoder } from '../utils.js';\nimport { with_version_header } from './utils.js';\nimport { manifest } from './internal.js';\n\n/**\n * How long (in milliseconds) to wait after the last message was sent before\n * sending a `: keep-alive` SSE comment, to prevent proxies/load balancers with\n * an idle timeout from closing an otherwise-quiet `query.live` connection.\n */\nconst KEEP_ALIVE_INTERVAL = 30_000;\n\n/**\n * @param {RequestEvent} event\n * @param {RequestState} state\n * @param {import('types').RemoteQueryLiveInternals} internals\n * @param {any} arg\n */\nexport function create_live_query_response(event, state, internals, arg) {\n\tconst cancellation = new AbortController();\n\tconst live_event = {\n\t\t...event,\n\t\trequest: new Request(event.request, {\n\t\t\tsignal: AbortSignal.any([event.request.signal, cancellation.signal])\n\t\t})\n\t};\n\n\tconst generator = internals.run(live_event, state, arg);\n\n\tlet open = true;\n\tlet pulling = false;\n\t/** @type {ReadableStreamDefaultController<Uint8Array>} */\n\tlet stream_controller;\n\t/** @type {ReturnType<typeof setTimeout> | undefined} */\n\tlet keep_alive;\n\t/** @type {string | undefined} */\n\tlet result;\n\n\tfunction schedule_keep_alive() {\n\t\tclearTimeout(keep_alive);\n\t\tkeep_alive = setTimeout(() => {\n\t\t\tif (!open) return;\n\t\t\tif ((stream_controller.desiredSize ?? 0) > 0) {\n\t\t\t\tstream_controller.enqueue(text_encoder.encode(': keep-alive\\n\\n'));\n\t\t\t}\n\t\t\tschedule_keep_alive();\n\t\t}, KEEP_ALIVE_INTERVAL);\n\t}\n\n\t/** @param {any} data */\n\tfunction send(data) {\n\t\tif (!open) return;\n\t\tstream_controller.enqueue(text_encoder.encode('data: ' + JSON.stringify(data) + '\\n\\n'));\n\t\tschedule_keep_alive();\n\t}\n\n\t/** @param {boolean} cancelled */\n\tfunction teardown(cancelled) {\n\t\tif (!open) return;\n\t\topen = false;\n\t\tclearTimeout(keep_alive);\n\t\tcancellation.abort();\n\t\tif (!cancelled) stream_controller.close();\n\t\t// AsyncGenerator.return() cannot interrupt a pending next(). Cleanup is\n\t\t// cooperative via request.signal, so stream cancellation must not await it.\n\t\tvoid generator.return(undefined).catch(() => {});\n\t}\n\n\tevent.request.signal.addEventListener('abort', () => teardown(true), { once: true });\n\n\treturn new Response(\n\t\tnew ReadableStream({\n\t\t\tstart(controller) {\n\t\t\t\tstream_controller = controller;\n\t\t\t\tschedule_keep_alive();\n\t\t\t},\n\t\t\tasync pull() {\n\t\t\t\tif (!open || pulling) return;\n\t\t\t\tpulling = true;\n\n\t\t\t\ttry {\n\t\t\t\t\twhile (open) {\n\t\t\t\t\t\tconst { value, done } = await generator.next();\n\n\t\t\t\t\t\tif (!open) return;\n\n\t\t\t\t\t\tif (done) {\n\t\t\t\t\t\t\tteardown(false);\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (result !== (result = stringify(value))) {\n\t\t\t\t\t\t\tsend({ type: 'result', result });\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} catch (error) {\n\t\t\t\t\tif (!open) return;\n\n\t\t\t\t\tif (error instanceof Redirect) {\n\t\t\t\t\t\tsend({ type: 'redirect', location: error.location });\n\t\t\t\t\t} else {\n\t\t\t\t\t\tconst transformed = await handle_error_and_jsonify(event, state, error);\n\n\t\t\t\t\t\tsend({ type: 'error', error: transformed });\n\t\t\t\t\t}\n\n\t\t\t\t\tteardown(false);\n\t\t\t\t} finally {\n\t\t\t\t\tpulling = false;\n\t\t\t\t}\n\t\t\t},\n\t\t\tcancel() {\n\t\t\t\tteardown(true);\n\t\t\t}\n\t\t}),\n\t\t{\n\t\t\theaders: {\n\t\t\t\t'cache-control': 'private, no-store',\n\t\t\t\t'content-type': 'text/event-stream'\n\t\t\t}\n\t\t}\n\t);\n}\n\n/** @type {typeof handle_remote_call_internal} */\nexport async function handle_remote_call(event, state, id) {\n\treturn record_span({\n\t\tname: 'sveltekit.remote.call',\n\t\tattributes: {\n\t\t\t'sveltekit.remote.call.id': id\n\t\t},\n\t\tfn: async (current) => {\n\t\t\tconst traced_event = merge_tracing(event, current);\n\t\t\tconst response = await with_request_store({ event: traced_event, state }, () =>\n\t\t\t\thandle_remote_call_internal(traced_event, state, id)\n\t\t\t);\n\t\t\treturn with_version_header(response);\n\t\t}\n\t});\n}\n\n/**\n * @param {RequestEvent} event\n * @param {RequestState} state\n * @param {string} id\n */\nasync function handle_remote_call_internal(event, state, id) {\n\tconst [hash, name, additional_args] = id.split('/');\n\tconst remotes = manifest.remotes;\n\n\tif (!Object.hasOwn(remotes, hash)) error(404);\n\n\tconst module = await remotes[hash]();\n\tconst fn = Object.hasOwn(module.default, name) ? module.default[name] : undefined;\n\n\tif (!fn) error(404);\n\n\t/** @type {RemoteInternals} */\n\tconst internals = fn.__;\n\n\tevent.tracing.current.setAttributes({\n\t\t'sveltekit.remote.call.type': internals.type,\n\t\t'sveltekit.remote.call.name': internals.name\n\t});\n\n\t/** @type {HeadersInit | undefined} */\n\tconst headers = state.prerendering ? undefined : { 'cache-control': 'private, no-store' };\n\n\ttry {\n\t\t/** @type {RemoteFunctionData} */\n\t\tconst data = {};\n\n\t\tswitch (internals.type) {\n\t\t\tcase 'query_live': {\n\t\t\t\tif (event.request.method !== 'GET') {\n\t\t\t\t\tthrow new SvelteKitError(\n\t\t\t\t\t\t405,\n\t\t\t\t\t\t'Method Not Allowed',\n\t\t\t\t\t\t`\\`query.live\\` functions must be invoked via GET request, not ${event.request.method}`\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\tconst payload = /** @type {string} */ (\n\t\t\t\t\tnew URL(event.request.url).searchParams.get('payload')\n\t\t\t\t);\n\n\t\t\t\treturn create_live_query_response(event, state, internals, parse_remote_arg(payload));\n\t\t\t}\n\n\t\t\tcase 'query_batch': {\n\t\t\t\tif (event.request.method !== 'POST') {\n\t\t\t\t\tthrow new SvelteKitError(\n\t\t\t\t\t\t405,\n\t\t\t\t\t\t'Method Not Allowed',\n\t\t\t\t\t\t`\\`query.batch\\` functions must be invoked via POST request, not ${event.request.method}`\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\t/** @type {{ payloads: string[] }} */\n\t\t\t\tconst { payloads } = await event.request.json();\n\n\t\t\t\tconst args = await Promise.all(payloads.map((payload) => parse_remote_arg(payload)));\n\n\t\t\t\tdata._ = await with_request_store({ event, state }, () => internals.run(args));\n\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcase 'form': {\n\t\t\t\tif (event.request.method !== 'POST') {\n\t\t\t\t\tthrow new SvelteKitError(\n\t\t\t\t\t\t405,\n\t\t\t\t\t\t'Method Not Allowed',\n\t\t\t\t\t\t`\\`form\\` functions must be invoked via POST request, not ${event.request.method}`\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\tif (!is_form_content_type(event.request)) {\n\t\t\t\t\tthrow new SvelteKitError(\n\t\t\t\t\t\t415,\n\t\t\t\t\t\t'Unsupported Media Type',\n\t\t\t\t\t\t`\\`form\\` functions expect form-encoded data — received ${event.request.headers.get(\n\t\t\t\t\t\t\t'content-type'\n\t\t\t\t\t\t)}`\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\tconst {\n\t\t\t\t\tdata: input,\n\t\t\t\t\tmeta,\n\t\t\t\t\tform_data\n\t\t\t\t} = await deserialize_binary_form(event.request, internals.id);\n\t\t\t\tstate.remote.requested = create_requested_map(meta.remote_refreshes);\n\n\t\t\t\t// If this is a keyed form instance (created via form.for(key)), add the key to the form data (unless already set)\n\t\t\t\t// Note that additional_args will only be set if the form is not enhanced, as enhanced forms transfer the key inside `data`.\n\t\t\t\tif (additional_args && !('id' in input)) {\n\t\t\t\t\tinput.id = JSON.parse(decodeURIComponent(additional_args));\n\t\t\t\t}\n\n\t\t\t\tconst fn = internals.fn;\n\t\t\t\tdata._ = await with_request_store(\n\t\t\t\t\t{ event, state: { ...state, is_in_remote_form_or_command: true } },\n\t\t\t\t\t() => fn(input, meta, form_data)\n\t\t\t\t);\n\n\t\t\t\tif (data._.issues) {\n\t\t\t\t\t// special case — don't serialize refreshes/reconnects\n\t\t\t\t\treturn Response.json(\n\t\t\t\t\t\t/** @type {RemoteFunctionResponse} */ ({\n\t\t\t\t\t\t\ttype: 'result',\n\t\t\t\t\t\t\tdata: stringify(data)\n\t\t\t\t\t\t}),\n\t\t\t\t\t\t{ headers }\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcase 'command': {\n\t\t\t\t/** @type {{ payload: string, refreshes?: string[] }} */\n\t\t\t\tconst { payload, refreshes } = await event.request.json();\n\t\t\t\tstate.remote.requested = create_requested_map(refreshes);\n\t\t\t\tconst arg = parse_remote_arg(payload);\n\n\t\t\t\tdata._ = await with_request_store(\n\t\t\t\t\t{ event, state: { ...state, is_in_remote_form_or_command: true } },\n\t\t\t\t\t() => fn(arg)\n\t\t\t\t);\n\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcase 'prerender': {\n\t\t\t\tdata._ = await with_request_store({ event, state }, () =>\n\t\t\t\t\tfn(parse_remote_arg(additional_args))\n\t\t\t\t);\n\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcase 'query': {\n\t\t\t\tconst payload = /** @type {string} */ (\n\t\t\t\t\t// new URL(...) necessary because we're hiding the URL from the user in the event object\n\t\t\t\t\tnew URL(event.request.url).searchParams.get('payload')\n\t\t\t\t);\n\n\t\t\t\tdata._ = await with_request_store({ event, state }, () => fn(parse_remote_arg(payload)));\n\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tawait collect_remote_data(data, event, state);\n\t\tif (state.remote.ignored?.size) data.i = Array.from(state.remote.ignored);\n\n\t\treturn Response.json(\n\t\t\t/** @type {RemoteFunctionResponse} */ ({\n\t\t\t\ttype: 'result',\n\t\t\t\tdata: stringify(data)\n\t\t\t}),\n\t\t\t{ headers }\n\t\t);\n\t} catch (error) {\n\t\tif (error instanceof Redirect) {\n\t\t\tconst data = await collect_remote_data({ redirect: error.location }, event, state);\n\n\t\t\treturn Response.json(\n\t\t\t\t/** @type {RemoteFunctionResponse} */ ({\n\t\t\t\t\ttype: 'result',\n\t\t\t\t\tdata: stringify(data)\n\t\t\t\t}),\n\t\t\t\t{ headers }\n\t\t\t);\n\t\t}\n\n\t\tconst transformed = await handle_error_and_jsonify(event, state, error);\n\n\t\treturn Response.json(\n\t\t\t/** @type {RemoteFunctionResponse} */ ({\n\t\t\t\ttype: 'error',\n\t\t\t\terror: transformed\n\t\t\t}),\n\t\t\t{\n\t\t\t\t// By setting a non-200 during prerendering we fail the prerender process (unless handleHttpError handles it).\n\t\t\t\t// Errors at runtime will be passed to the client and are handled there\n\t\t\t\tstatus: state.prerendering ? transformed.status : undefined,\n\t\t\t\theaders: {\n\t\t\t\t\t'cache-control': 'private, no-store'\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\t}\n}\n\n/**\n * Collects all the query/prerender data that was retrieved\n * during the request and adds it to `data`\n * @param {RemoteFunctionData} data\n * @param {RequestEvent} event\n * @param {RequestState} state\n */\nexport async function collect_remote_data(data, event, state) {\n\t/**\n\t *\n\t * @param {unknown} error\n\t * @returns {Promise<App.Error>}\n\t */\n\tfunction convert_error(error) {\n\t\t// TODO 4.0 remove the `Promise.resolve(...)`\n\t\treturn Promise.resolve(handle_error_and_jsonify(event, state, error));\n\t}\n\n\t/** @type {Promise<any>[]} */\n\tconst promises = [];\n\n\t// Keys the explicit pass has serialized. Invoking a query's `fn` there can, as a\n\t// side effect, register the same query in `state.remote.implicit` (via\n\t// `get_response`), so we skip those keys in the implicit pass below to avoid\n\t// processing them twice.\n\t/** @type {Set<string>} */\n\tconst processed = new Set();\n\n\tif (state.remote.explicit) {\n\t\tconst { explicit } = state.remote;\n\n\t\t/** @type {Promise<void>[]} */\n\t\tconst inflight = [];\n\n\t\tconst drain = () => {\n\t\t\tfor (const [remote_key, { internals, fn }] of explicit) {\n\t\t\t\texplicit.delete(remote_key);\n\t\t\t\tif (processed.has(remote_key)) continue;\n\t\t\t\tprocessed.add(remote_key);\n\n\t\t\t\t// there were explicit refreshes/reconnects (via `refresh()`/`set()`/`reconnect()`),\n\t\t\t\t// so the client should apply these single-flight updates instead of calling `invalidateAll()`\n\t\t\t\tdata.r = true;\n\n\t\t\t\tconst type = /** @type {'p' | 'q' | 'l'} */ (\n\t\t\t\t\tinternals.type === 'query_live' ? 'l' : internals.type[0]\n\t\t\t\t);\n\n\t\t\t\t// `fn` is deferred until now so the query runs after any state mutations\n\t\t\t\t// in the command/form body. If the query was re-awaited in the meantime,\n\t\t\t\t// `fn` returns the existing (fresh) cache entry rather than re-running.\n\t\t\t\tinflight.push(\n\t\t\t\t\tfn().then(\n\t\t\t\t\t\t(v) => {\n\t\t\t\t\t\t\t// a fresh value replaces the node entirely, so a re-run can't leave\n\t\t\t\t\t\t\t// a stale error from a previous run alongside the new value\n\t\t\t\t\t\t\t(data[type] ??= {})[remote_key] = { v };\n\t\t\t\t\t\t\tdrain();\n\t\t\t\t\t\t},\n\t\t\t\t\t\tasync (e) => {\n\t\t\t\t\t\t\tif (!(e instanceof Redirect)) {\n\t\t\t\t\t\t\t\t// (a Redirect is already handled elsewhere)\n\t\t\t\t\t\t\t\t(data[type] ??= {})[remote_key] = { e: await convert_error(e) };\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tdrain();\n\t\t\t\t\t\t}\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t}\n\t\t};\n\n\t\tdrain();\n\n\t\t// `inflight` grows as settles drain newly-refreshed queries\n\t\tfor (const promise of inflight) {\n\t\t\tawait promise;\n\t\t}\n\t}\n\n\tif (state.remote.implicit) {\n\t\tfor (const [internals, record] of state.remote.implicit) {\n\t\t\t// Private (non-exported) remote functions have no `id` and must never be\n\t\t\t// serialized into the response — otherwise their (potentially private) result\n\t\t\t// would be shipped to the client under a malformed `undefined/...` key.\n\t\t\tif (!internals.id) continue;\n\n\t\t\tfor (const key in record) {\n\t\t\t\t// form outputs are registered under the client-side action id directly\n\t\t\t\tconst remote_key = internals.type === 'form' ? key : create_remote_key(internals.id, key);\n\n\t\t\t\t// already serialized by the explicit pass (which always awaits and wins),\n\t\t\t\t// so don't reprocess it here with the implicit \"still loading\" heuristic\n\t\t\t\tif (processed.has(remote_key)) continue;\n\n\t\t\t\tconst type = /** @type {'p' | 'q' | 'l' | 'f'} */ (\n\t\t\t\t\tinternals.type === 'query_live' ? 'l' : internals.type[0]\n\t\t\t\t);\n\n\t\t\t\tconst promise = state.remote.data?.get(internals)?.[key] ?? record[key]();\n\n\t\t\t\t// If the promise is still pending (e.g. the query was rendered in its loading\n\t\t\t\t// state during SSR), omit it from the payload entirely so that the client\n\t\t\t\t// fetches it itself — an entry without `v`/`e` would hydrate as `undefined`.\n\t\t\t\tlet resolved = true;\n\n\t\t\t\tawait Promise.race([\n\t\t\t\t\tPromise.resolve(promise).then(\n\t\t\t\t\t\t(v) => {\n\t\t\t\t\t\t\tif (resolved) {\n\t\t\t\t\t\t\t\t((data[type] ??= {})[remote_key] ??= {}).v = v;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\t\t\t\t\t(e) => {\n\t\t\t\t\t\t\tif (e instanceof Redirect) {\n\t\t\t\t\t\t\t\t// already handled elsewhere\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif (resolved) {\n\t\t\t\t\t\t\t\tpromises.push(\n\t\t\t\t\t\t\t\t\tconvert_error(e).then((e) => {\n\t\t\t\t\t\t\t\t\t\t((data[type] ??= {})[remote_key] ??= {}).e = e;\n\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t),\n\t\t\t\t\tPromise.resolve().then(() => (resolved = false))\n\t\t\t\t]);\n\t\t\t}\n\t\t}\n\t}\n\n\tawait Promise.all(promises);\n\n\treturn data;\n}\n\n/**\n * @param {string[] | undefined} refreshes\n */\nfunction create_requested_map(refreshes) {\n\t/** @type {Map<string, Set<string>>} */\n\tconst requested = new Map();\n\n\tfor (const key of refreshes ?? []) {\n\t\tconst parts = split_remote_key(key);\n\n\t\tconst existing = requested.get(parts.id);\n\n\t\tif (existing) {\n\t\t\texisting.add(parts.payload);\n\t\t} else {\n\t\t\trequested.set(parts.id, new Set([parts.payload]));\n\t\t}\n\t}\n\n\treturn requested;\n}\n\n/** @type {typeof handle_remote_form_post_internal} */\nexport async function handle_remote_form_post(event, state, id) {\n\treturn record_span({\n\t\tname: 'sveltekit.remote.form.post',\n\t\tattributes: {\n\t\t\t'sveltekit.remote.form.post.id': id\n\t\t},\n\t\tfn: (current) => {\n\t\t\tconst traced_event = merge_tracing(event, current);\n\t\t\treturn with_request_store({ event: traced_event, state }, () =>\n\t\t\t\thandle_remote_form_post_internal(traced_event, state, id)\n\t\t\t);\n\t\t}\n\t});\n}\n\n/**\n * @param {RequestEvent} event\n * @param {RequestState} state\n * @param {string} id\n * @returns {Promise<ServerActionResult>}\n */\nasync function handle_remote_form_post_internal(event, state, id) {\n\tconst location = get_action_location(event.url);\n\t// `hash` and `name` can never contain a `/`, but the JSON-stringified key of a\n\t// keyed (`form.for(key)`) instance can — rejoin the remaining segments\n\tconst [hash, name, ...rest] = id.split('/');\n\tconst action_id = rest.join('/');\n\tconst remotes = manifest.remotes;\n\tconst module = Object.hasOwn(remotes, hash) ? await remotes[hash]() : undefined;\n\n\tlet form = /** @type {RemoteForm<any, any>} */ (\n\t\tmodule && Object.hasOwn(module.default, name) ? module.default[name] : undefined\n\t);\n\n\tif (!form) {\n\t\treturn method_not_allowed_result(event, location);\n\t}\n\n\tif (action_id) {\n\t\t// @ts-expect-error\n\t\tform = with_request_store({ event, state }, () => form.for(JSON.parse(action_id)));\n\t}\n\n\ttry {\n\t\tconst __ = /** @type {RemoteFormInternals} */ (/** @type {any} */ (form).__);\n\n\t\tconst { data, meta, form_data } = await deserialize_binary_form(event.request, __.id);\n\n\t\tif (action_id && !('id' in data)) {\n\t\t\tdata.id = JSON.parse(decodeURIComponent(action_id));\n\t\t}\n\n\t\tawait with_request_store(\n\t\t\t{ event, state: { ...state, is_in_remote_form_or_command: true } },\n\t\t\t() => __.fn(data, meta, form_data)\n\t\t);\n\n\t\t// We don't want the data to appear on `let { form } = $props()`, which is why we're not returning it.\n\t\t// It is instead available on `myForm.result`, setting of which happens within the remote `form` function.\n\t\treturn {\n\t\t\ttype: 'success',\n\t\t\tstatus: 200,\n\t\t\tlocation\n\t\t};\n\t} catch (e) {\n\t\treturn action_error_result(e, location);\n\t}\n}\n\n/**\n * @param {URL} url\n */\nexport function has_remote_prefix(url) {\n\treturn url.pathname.startsWith(`${base}/${app_dir}/remote/`);\n}\n\n/**\n * @param {URL} url\n */\nexport function strip_remote_prefix(url) {\n\treturn url.pathname.replace(`${base}/${app_dir}/remote/`, '');\n}\n\n/**\n * @param {URL} url\n */\nexport function get_remote_id(url) {\n\treturn has_remote_prefix(url) && strip_remote_prefix(url);\n}\n\n/**\n * @param {URL} url\n */\nexport function get_remote_action(url) {\n\treturn url.searchParams.get('/remote');\n}\n","/* eslint-disable n/prefer-global/process */\n\nimport { set_error_stack } from '../../utils/error.js';\n\n// using `getBuiltinModule` rather than `import` makes this safe to run in non-Node-compatible environments\nconst fs = globalThis.process?.getBuiltinModule?.('node:fs');\nconst url = globalThis.process?.getBuiltinModule?.('node:url');\nconst path = globalThis.process?.getBuiltinModule?.('node:path');\nconst module = globalThis.process?.getBuiltinModule?.('node:module');\n\nconst cwd = globalThis.process?.cwd?.();\n\n/** @type {(file: string) => string} */\nconst relative = cwd ? (file) => path.relative(cwd, file) : (file) => file;\n\n/**\n * Applies sourcemaps, makes paths relative to the cwd, and truncates\n * non-user code from the bottom of the stack\n * @param {Error} error\n * @returns void\n */\nexport let fix_stack_trace = (error) => {\n\tif (!error.stack || !fs) return;\n\n\tlet end = 0;\n\n\tconst stack = error.stack\n\t\t.split('\\n')\n\t\t.map((line, i) => {\n\t\t\tconst match = line.match(/^ {4}at.+(file:\\/\\/\\/.*):(\\d+):(\\d+)(\\)?)$/);\n\n\t\t\tif (!match) {\n\t\t\t\tif (!line.includes('node:internal/')) {\n\t\t\t\t\tend = i + 1;\n\t\t\t\t}\n\n\t\t\t\treturn line;\n\t\t\t}\n\n\t\t\tconst file = url.fileURLToPath(match[1]);\n\t\t\tconst traced = trace(file, Number(match[2]) - 1, Number(match[3]) - 1);\n\n\t\t\t// truncate non-user code from the bottom of the stack (but leave it in otherwise)\n\t\t\tif (!/[\\\\/]node_modules[\\\\/]/.test(traced?.file ?? file)) {\n\t\t\t\tend = i + 1;\n\t\t\t}\n\n\t\t\tif (traced?.line) {\n\t\t\t\tconst location = `${match[1]}:${match[2]}:${match[3]}`;\n\t\t\t\tconst original = `${relative(traced.file)}:${traced.line}:${traced.column}`;\n\n\t\t\t\treturn line.replace(location, original);\n\t\t\t}\n\n\t\t\tif (traced) {\n\t\t\t\treturn `${line.replace(match[1], relative(file))} [${traced.file}]`;\n\t\t\t}\n\n\t\t\treturn line;\n\t\t})\n\t\t.slice(0, end)\n\t\t.join('\\n');\n\n\tset_error_stack(error, stack);\n};\n\n/**\n * Override the implementation of fix_stack_trace (for using during dev)\n * @param {(error: Error) => void} fn\n */\nexport function set_fix_stack_trace(fn) {\n\tfix_stack_trace = fn;\n}\n\n/** @type {Map<string, { map: import('node:module').SourceMap; directory: string } | null>} */\nconst source_maps = new Map();\n\n/** @type {Map<string, Array<string | undefined>>} */\nconst source_regions = new Map();\n\n/** @param {string} file */\nfunction get_source_map(file) {\n\tif (source_maps.has(file)) {\n\t\treturn source_maps.get(file);\n\t}\n\n\ttry {\n\t\tlet source;\n\t\tlet directory = path.dirname(file);\n\n\t\tconst code = fs.readFileSync(file, 'utf8');\n\t\tconst matches = Array.from(code.matchAll(/\\/\\/[#@]\\s*sourceMappingURL=(\\S+)/g));\n\t\tconst url = matches.at(-1)?.[1];\n\n\t\tif (url?.startsWith('data:')) {\n\t\t\tconst comma = url.indexOf(',');\n\t\t\tconst metadata = url.slice(5, comma);\n\t\t\tconst data = url.slice(comma + 1);\n\t\t\tsource = metadata.endsWith(';base64')\n\t\t\t\t? Buffer.from(data, 'base64').toString()\n\t\t\t\t: decodeURIComponent(data);\n\t\t} else {\n\t\t\tconst map_file = url\n\t\t\t\t? path.resolve(path.dirname(file), decodeURIComponent(url))\n\t\t\t\t: `${file}.map`;\n\t\t\tif (fs.existsSync(map_file)) {\n\t\t\t\tdirectory = path.dirname(map_file);\n\t\t\t\tsource = fs.readFileSync(map_file, 'utf8');\n\t\t\t}\n\t\t}\n\n\t\tif (source) {\n\t\t\tconst source_map = { map: new module.SourceMap(JSON.parse(source)), directory };\n\t\t\tsource_maps.set(file, source_map);\n\n\t\t\treturn source_map;\n\t\t}\n\t} catch {\n\t\t// failure could be for any reason and this is best-effort, ignore\n\t}\n\n\tsource_maps.set(file, null);\n\treturn null;\n}\n\n/**\n *\n * @param {string} file\n * @param {number} line\n * @param {number} column\n * @returns {null | { file: string, line?: number, column?: number }}\n */\nfunction trace(file, line, column) {\n\tconst source_map = get_source_map(file);\n\tif (!source_map) return null;\n\n\tconst entry = source_map.map.findEntry(line, column);\n\n\tif (\n\t\tentry &&\n\t\t'originalSource' in entry &&\n\t\tentry.originalSource &&\n\t\ttypeof entry.originalLine === 'number' &&\n\t\ttypeof entry.originalColumn === 'number'\n\t) {\n\t\tconst source = entry.originalSource.startsWith('file:')\n\t\t\t? url.fileURLToPath(entry.originalSource)\n\t\t\t: path.resolve(source_map.directory, entry.originalSource);\n\n\t\tconst traced = {\n\t\t\tfile: source,\n\t\t\tline: entry.originalLine + 1,\n\t\t\tcolumn: entry.originalColumn + 1\n\t\t};\n\n\t\t// keep going, in case we are running code that was bundled a second time by an adapter\n\t\treturn trace(traced.file, traced.line - 1, traced.column - 1) ?? traced;\n\t}\n\n\tlet regions = source_regions.get(file);\n\tif (!regions) {\n\t\t/** @type {string | undefined} */\n\t\tlet source;\n\t\tregions = fs\n\t\t\t.readFileSync(file, 'utf8')\n\t\t\t.split('\\n')\n\t\t\t.map((line) => {\n\t\t\t\t// Vite will merge multiple files into one but add region markers\n\t\t\t\t// with the original file names, which we try to extract here.\n\t\t\t\tconst start = line.match(/^\\/\\/#region (.+)$/);\n\t\t\t\tif (start) source = start[1];\n\t\t\t\tif (line === '//#endregion') source = undefined;\n\t\t\t\treturn source;\n\t\t\t});\n\t\tsource_regions.set(file, regions);\n\t}\n\n\tconst source = regions[line];\n\n\tif (source) {\n\t\treturn {\n\t\t\tfile: source\n\t\t};\n\t}\n\n\treturn null;\n}\n","/** @import { ServerHooks, SSRManifest } from 'types'; */\nimport { restore, save } from './dev.js';\nimport { stream_from_iterable } from '../utils.js';\nimport {\n\thas_data_suffix,\n\thas_resolution_suffix,\n\tstrip_data_suffix,\n\tstrip_resolution_suffix\n} from '../../pathname.js';\nimport { has_remote_prefix, strip_remote_prefix } from '../../runtime/server/remote-functions.js';\n\n// using `getBuiltinModule` rather than `import` makes this safe to run in non-Node-compatible environments\nconst styleText =\n\t// eslint-disable-next-line n/prefer-global/process\n\tglobalThis.process?.getBuiltinModule?.('node:util')?.styleText ??\n\t/** @type {(format: unknown, text: string) => string} */ ((_format, text) => text);\n\nconst read_implementation_key = Symbol.for('sveltekit.read_implementation');\nconst manifest_key = Symbol.for('sveltekit.manifest');\nconst hooks_key = Symbol.for('sveltekit.hooks');\n\nexport let read_implementation = /** @type {((path: string) => ReadableStream<any>) | null} */ (\n\t(__SVELTEKIT_DEV__ && restore(read_implementation_key)) ?? null\n);\n\nexport let manifest = /** @type {SSRManifest} */ (\n\t(__SVELTEKIT_DEV__ && restore(manifest_key)) ?? null\n);\n\nexport let hooks = /** @type {ServerHooks} */ ((__SVELTEKIT_DEV__ && restore(hooks_key)) ?? null);\n\n/**\n * The public `read` may return a promise, the runtime expects a stream\n * @param {NonNullable<import('@sveltejs/kit').ServerInitOptions['read']>} read\n */\nexport function set_read_implementation(read) {\n\tread_implementation = (file) => {\n\t\tconst result = read(file);\n\t\tif (result instanceof ReadableStream) return result;\n\n\t\treturn stream_from_iterable(\n\t\t\t(async function* () {\n\t\t\t\tconst stream = await result;\n\t\t\t\tif (stream) yield* stream;\n\t\t\t})()\n\t\t);\n\t};\n\tif (__SVELTEKIT_DEV__) save(read_implementation_key, read_implementation);\n}\n\n/**\n *\n * @param {SSRManifest} value\n */\nexport function set_manifest(value) {\n\tmanifest = value;\n\tif (__SVELTEKIT_DEV__) save(manifest_key, value);\n}\n\n/**\n * @param {ServerHooks} value\n */\nexport function set_hooks(value) {\n\thooks = value;\n\tif (__SVELTEKIT_DEV__) save(hooks_key, value);\n}\n\n/**\n * @param {number} status\n * @param {Request} request\n * @returns {string}\n */\nexport function format_response(status, request) {\n\tconst url = new URL(request.url);\n\tconst requested = url.href.replace(url.origin, '');\n\n\tlet log = `${styleText(status < 400 ? ['cyan'] : ['bold', 'red'], `${status}`)} ${request.method} `;\n\n\tif (has_data_suffix(url.pathname)) {\n\t\tconst pathname = strip_data_suffix(url.pathname) || '/';\n\t\tlog += pathname + styleText('dim', requested.slice(pathname.length));\n\t} else if (has_resolution_suffix(url.pathname)) {\n\t\tconst pathname = strip_resolution_suffix(url.pathname) || '/';\n\t\tlog += pathname + styleText('dim', requested.slice(pathname.length));\n\t} else if (has_remote_prefix(url)) {\n\t\tconst id = /** @type {string} */ (strip_remote_prefix(url));\n\t\tconst [file_hash, name, arg_hash] = id.split('/');\n\n\t\tlog += styleText('dim', `${url.pathname.slice(0, -id.length)}${file_hash}/`) + name;\n\t\tif (arg_hash) log += styleText('dim', `/${arg_hash}`);\n\t\tif (url.search) log += styleText('dim', url.search);\n\t} else {\n\t\tlog += requested;\n\t}\n\n\treturn log;\n}\n\nexport { fix_stack_trace, set_fix_stack_trace } from './sourcemaps.js';\n"],"ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22],"mappings":";;;;;AAKA,IAAW,SAAA;AACX,IAAa,UAAA;;AAIb,SAAgB,WAAW,MAAM;CAChC,SAAS;AACV;;;ACZA,IAAM,SAAS,OAAO,IAAI,wBAAwB;AAEV,WAAsC,YAAY,CAAC;;;ACA3F,IAAa,eAAe,IAAI,YAAY;;;;;;;AAQ5C,SAAgB,qBAAqB,UAAU;CAE9C,IAAwB,eAAgB,MACvC,OAA2B,eAAgB,KAAK,QAAQ;CAGzD,MAAM,WAAW,SAAS,OAAO,cAAc,CAAC;CAChD,OAAO,IAAI,eAAe;EACzB,MAAM,KAAK,YAAY;GACtB,MAAM,EAAE,OAAO,SA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AwB,IAAI,QAAQ,KAAK;EAC1D,OAAO,WAAW,UAAU,OAAO,UAAU,MAAM,SAAS,MAAM,CAAC;CACpE,OAAO,IAAI,kBAAkB,GAAG,GAAG;EAClC,MAAM,KAA4B,oBAAoB,GAAG;EACzD,MAAM,CAAC,WAAW,MAAM,YAAY,GAAG,MAAM,GAAG;EAEhD,OAAO,UAAU,OAAO,GAAG,IAAI,SAAS,MAAM,GAAG,CAAC,GAAG,MAAM,IAAI,UAAU,EAAE,IAAI;EAC/E,IAAI,UAAU,OAAO,UAAU,OAAO,IAAI,UAAU;EACpD,IAAI,IAAI,QAAQ,OAAO,UAAU,OAAO,IAAI,MAAM;CACnD,OACC,OAAO;CAGR,OAAO;AACR"}
|
|
1
|
+
{"version":3,"file":"internal.js","names":["is_plain_object","parse","stringify","devalue.parse","devalue.uneval","devalue.stringify","devalue.parse","devalue.stringify","devalue.parse","e.handle_error_hook_failed","e.action_throw_fail"],"sources":["../../../../../node_modules/.pnpm/@sveltejs+kit@3.0.1_@sveltejs+vite-plugin-svelte@7.3.1_svelte@5.57.2_vite@8.3.3_jiti@2._2180d2dbf687eed18f260b26dab65894/node_modules/@sveltejs/kit/src/runtime/app/paths/internal/server.js","../../../../../node_modules/.pnpm/@sveltejs+kit@3.0.1_@sveltejs+vite-plugin-svelte@7.3.1_svelte@5.57.2_vite@8.3.3_jiti@2._2180d2dbf687eed18f260b26dab65894/node_modules/@sveltejs/kit/src/runtime/server/dev.js","../../../../../node_modules/.pnpm/@sveltejs+kit@3.0.1_@sveltejs+vite-plugin-svelte@7.3.1_svelte@5.57.2_vite@8.3.3_jiti@2._2180d2dbf687eed18f260b26dab65894/node_modules/@sveltejs/kit/src/runtime/utils.js","../../../../../node_modules/.pnpm/@sveltejs+kit@3.0.1_@sveltejs+vite-plugin-svelte@7.3.1_svelte@5.57.2_vite@8.3.3_jiti@2._2180d2dbf687eed18f260b26dab65894/node_modules/@sveltejs/kit/src/pathname.js","../../../../../node_modules/.pnpm/@sveltejs+kit@3.0.1_@sveltejs+vite-plugin-svelte@7.3.1_svelte@5.57.2_vite@8.3.3_jiti@2._2180d2dbf687eed18f260b26dab65894/node_modules/@sveltejs/kit/src/telemetry.js","../../../../../node_modules/.pnpm/@sveltejs+kit@3.0.1_@sveltejs+vite-plugin-svelte@7.3.1_svelte@5.57.2_vite@8.3.3_jiti@2._2180d2dbf687eed18f260b26dab65894/node_modules/@sveltejs/kit/src/exports/internal/server/telemetry.js","../../../../../node_modules/.pnpm/@sveltejs+kit@3.0.1_@sveltejs+vite-plugin-svelte@7.3.1_svelte@5.57.2_vite@8.3.3_jiti@2._2180d2dbf687eed18f260b26dab65894/node_modules/@sveltejs/kit/src/utils/routing.js","../../../../../node_modules/.pnpm/devalue@6.0.2/node_modules/devalue/src/base64.js","../../../../../node_modules/.pnpm/devalue@6.0.2/node_modules/devalue/src/operations.js","../../../../../node_modules/.pnpm/devalue@6.0.2/node_modules/devalue/src/parse.js","../../../../../node_modules/.pnpm/devalue@6.0.2/node_modules/devalue/src/stringify.js","../../../../../node_modules/.pnpm/@sveltejs+kit@3.0.1_@sveltejs+vite-plugin-svelte@7.3.1_svelte@5.57.2_vite@8.3.3_jiti@2._2180d2dbf687eed18f260b26dab65894/node_modules/@sveltejs/kit/src/runtime/form-utils.js","../../../../../node_modules/.pnpm/@sveltejs+kit@3.0.1_@sveltejs+vite-plugin-svelte@7.3.1_svelte@5.57.2_vite@8.3.3_jiti@2._2180d2dbf687eed18f260b26dab65894/node_modules/@sveltejs/kit/src/utils/http.js","../../../../../node_modules/.pnpm/@sveltejs+kit@3.0.1_@sveltejs+vite-plugin-svelte@7.3.1_svelte@5.57.2_vite@8.3.3_jiti@2._2180d2dbf687eed18f260b26dab65894/node_modules/@sveltejs/kit/src/runtime/app/internal/transport.js","../../../../../node_modules/.pnpm/@sveltejs+kit@3.0.1_@sveltejs+vite-plugin-svelte@7.3.1_svelte@5.57.2_vite@8.3.3_jiti@2._2180d2dbf687eed18f260b26dab65894/node_modules/@sveltejs/kit/src/runtime/shared.js","../../../../../node_modules/.pnpm/@sveltejs+kit@3.0.1_@sveltejs+vite-plugin-svelte@7.3.1_svelte@5.57.2_vite@8.3.3_jiti@2._2180d2dbf687eed18f260b26dab65894/node_modules/@sveltejs/kit/src/utils/error.js","../../../../../node_modules/.pnpm/@sveltejs+kit@3.0.1_@sveltejs+vite-plugin-svelte@7.3.1_svelte@5.57.2_vite@8.3.3_jiti@2._2180d2dbf687eed18f260b26dab65894/node_modules/@sveltejs/kit/src/messages/server-warnings.js","../../../../../node_modules/.pnpm/@sveltejs+kit@3.0.1_@sveltejs+vite-plugin-svelte@7.3.1_svelte@5.57.2_vite@8.3.3_jiti@2._2180d2dbf687eed18f260b26dab65894/node_modules/@sveltejs/kit/src/runtime/server/errors.js","../../../../../node_modules/.pnpm/@sveltejs+kit@3.0.1_@sveltejs+vite-plugin-svelte@7.3.1_svelte@5.57.2_vite@8.3.3_jiti@2._2180d2dbf687eed18f260b26dab65894/node_modules/@sveltejs/kit/src/runtime/server/utils.js","../../../../../node_modules/.pnpm/@sveltejs+kit@3.0.1_@sveltejs+vite-plugin-svelte@7.3.1_svelte@5.57.2_vite@8.3.3_jiti@2._2180d2dbf687eed18f260b26dab65894/node_modules/@sveltejs/kit/src/runtime/server/page/actions.js","../../../../../node_modules/.pnpm/@sveltejs+kit@3.0.1_@sveltejs+vite-plugin-svelte@7.3.1_svelte@5.57.2_vite@8.3.3_jiti@2._2180d2dbf687eed18f260b26dab65894/node_modules/@sveltejs/kit/src/runtime/server/remote-functions.js","../../../../../node_modules/.pnpm/@sveltejs+kit@3.0.1_@sveltejs+vite-plugin-svelte@7.3.1_svelte@5.57.2_vite@8.3.3_jiti@2._2180d2dbf687eed18f260b26dab65894/node_modules/@sveltejs/kit/src/runtime/server/sourcemaps.js","../../../../../node_modules/.pnpm/@sveltejs+kit@3.0.1_@sveltejs+vite-plugin-svelte@7.3.1_svelte@5.57.2_vite@8.3.3_jiti@2._2180d2dbf687eed18f260b26dab65894/node_modules/@sveltejs/kit/src/runtime/server/internal.js"],"sourcesContent":["// TODO get rid of this module — merge the contents into `../server.js`, and expose it to the\n// rest of the codebase as `#app/paths/server`, with an export condition that errors if\n// it is imported on the client\n\nexport const base = __SVELTEKIT_PATHS_BASE__;\nexport let assets = __SVELTEKIT_PATHS_ASSETS__ || base;\nexport const app_dir = __SVELTEKIT_APP_DIR__;\nexport const relative = __SVELTEKIT_PATHS_RELATIVE__;\n\n/** @param {string} path */\nexport function set_assets(path) {\n\tassets = path;\n}\n","const symbol = Symbol.for('sveltekit.global_state');\nconst state = /** @type {Record<symbol, any>} */ (\n\t/** @type {Record<symbol, unknown>} */ (/** @type {unknown} */ (globalThis))[symbol] ??= {}\n);\n\n/**\n * Persist a value across dev server reloads, in case a freshly-invalidated module\n * reads global state that is not set until a request is handled\n * @param {symbol} key\n * @param {any} value\n */\nexport function save(key, value) {\n\tstate[key] = value;\n}\n\n/**\n * Restore a value after a dev server reload\n * @param {symbol} key\n */\nexport function restore(key) {\n\treturn state[key];\n}\n","import { BROWSER } from 'esm-env';\n\nexport const text_encoder = new TextEncoder();\n\n/**\n * `ReadableStream.from`, for runtimes that don't support it (as of writing, every Bun release)\n * @template T\n * @param {AsyncIterable<T>} iterable\n * @returns {ReadableStream<T>}\n */\nexport function stream_from_iterable(iterable) {\n\t// TODO remove the casts once TypeScript's lib includes `ReadableStream.from`\n\tif (/** @type {any} */ (ReadableStream).from) {\n\t\treturn /** @type {any} */ (ReadableStream).from(iterable);\n\t}\n\n\tconst iterator = iterable[Symbol.asyncIterator]();\n\treturn new ReadableStream({\n\t\tasync pull(controller) {\n\t\t\tconst { value, done } = await iterator.next();\n\t\t\tif (done) controller.close();\n\t\t\telse controller.enqueue(value);\n\t\t},\n\t\tasync cancel(reason) {\n\t\t\tawait iterator.return?.(reason);\n\t\t}\n\t});\n}\n\n/**\n * @param {string} head\n * @param {AsyncIterable<string>} chunks\n * @returns {ReadableStream<Uint8Array>} `head` followed by each non-empty chunk, encoded\n */\nexport function stream_text(head, chunks) {\n\treturn stream_from_iterable(\n\t\t(async function* () {\n\t\t\tyield text_encoder.encode(head);\n\t\t\tfor await (const chunk of chunks) {\n\t\t\t\tif (chunk) yield text_encoder.encode(chunk);\n\t\t\t}\n\t\t})()\n\t);\n}\nexport const text_decoder = new TextDecoder();\n\n/**\n * @param {Uint8Array} bytes\n * @returns {string}\n */\nexport function base64_encode(bytes) {\n\t// TODO replace with `bytes.toBase64()` when we require Node >= 25\n\t// Using `Buffer` is faster than iterating\n\tif (!BROWSER && globalThis.Buffer) {\n\t\treturn globalThis.Buffer.from(bytes).toString('base64');\n\t}\n\n\tlet binary = '';\n\n\tfor (let i = 0; i < bytes.length; i++) {\n\t\tbinary += String.fromCharCode(bytes[i]);\n\t}\n\n\treturn btoa(binary);\n}\n\n/**\n * @param {string} encoded\n * @returns {Uint8Array}\n */\nexport function base64_decode(encoded) {\n\t// TODO replace with `Uint8Array.fromBase64(encoded)` when we require Node >= 25\n\t// Using `Buffer` is faster than iterating\n\tif (!BROWSER && globalThis.Buffer) {\n\t\tconst buffer = globalThis.Buffer.from(encoded, 'base64');\n\t\treturn new Uint8Array(buffer);\n\t}\n\n\tconst binary = atob(encoded);\n\tconst bytes = new Uint8Array(binary.length);\n\n\tfor (let i = 0; i < binary.length; i++) {\n\t\tbytes[i] = binary.charCodeAt(i);\n\t}\n\n\treturn bytes;\n}\n","const DATA_SUFFIX = '/__data.json';\nconst HTML_DATA_SUFFIX = '.html__data.json';\n\n/** @param {string} pathname */\nexport function has_data_suffix(pathname) {\n\treturn pathname.endsWith(DATA_SUFFIX) || pathname.endsWith(HTML_DATA_SUFFIX);\n}\n\n/** @param {string} pathname */\nexport function add_data_suffix(pathname) {\n\tif (pathname.endsWith('.html')) return pathname.replace(/\\.html$/, HTML_DATA_SUFFIX);\n\treturn pathname.replace(/\\/$/, '') + DATA_SUFFIX;\n}\n\n/** @param {string} pathname */\nexport function strip_data_suffix(pathname) {\n\tif (pathname.endsWith(HTML_DATA_SUFFIX)) {\n\t\treturn pathname.slice(0, -HTML_DATA_SUFFIX.length) + '.html';\n\t}\n\n\treturn pathname.slice(0, -DATA_SUFFIX.length);\n}\n\nconst ROUTE_SUFFIX = '/__route.js';\nconst HTML_ROUTE_SUFFIX = '.html__route.js';\n\n/**\n * @param {string} pathname\n * @returns {boolean}\n */\nexport function has_resolution_suffix(pathname) {\n\treturn pathname.endsWith(ROUTE_SUFFIX) || pathname.endsWith(HTML_ROUTE_SUFFIX);\n}\n\n/**\n * Convert a regular URL to a route to send to SvelteKit's server-side route resolution endpoint\n * @param {string} pathname\n * @returns {string}\n */\nexport function add_resolution_suffix(pathname) {\n\tif (pathname.endsWith('.html')) return pathname.replace(/\\.html$/, HTML_ROUTE_SUFFIX);\n\treturn pathname.replace(/\\/$/, '') + ROUTE_SUFFIX;\n}\n\n/**\n * @param {string} pathname\n * @returns {string}\n */\nexport function strip_resolution_suffix(pathname) {\n\tif (pathname.endsWith(HTML_ROUTE_SUFFIX)) {\n\t\treturn pathname.slice(0, -HTML_ROUTE_SUFFIX.length) + '.html';\n\t}\n\n\treturn pathname.slice(0, -ROUTE_SUFFIX.length);\n}\n","/** @import { Span, SpanContext } from '@opentelemetry/api' */\n\n/**\n * @type {Span}\n */\nexport const noop_span = {\n\tspanContext() {\n\t\treturn noop_span_context;\n\t},\n\tsetAttribute() {\n\t\treturn this;\n\t},\n\tsetAttributes() {\n\t\treturn this;\n\t},\n\taddEvent() {\n\t\treturn this;\n\t},\n\tsetStatus() {\n\t\treturn this;\n\t},\n\tupdateName() {\n\t\treturn this;\n\t},\n\tend() {\n\t\treturn this;\n\t},\n\tisRecording() {\n\t\treturn false;\n\t},\n\trecordException() {\n\t\treturn this;\n\t},\n\taddLink() {\n\t\treturn this;\n\t},\n\taddLinks() {\n\t\treturn this;\n\t}\n};\n\n/**\n * @type {SpanContext}\n */\nconst noop_span_context = {\n\ttraceId: '',\n\tspanId: '',\n\ttraceFlags: 0\n};\n","/** @import { Tracer, SpanStatusCode, PropagationAPI, ContextAPI } from '@opentelemetry/api' */\n/** @import { RecordSpan } from 'types' */\nimport { HttpError, Redirect } from '../shared.js';\nimport { noop_span } from '../../../telemetry.js';\nimport * as e from '../../../messages/server-errors.js';\n\n// Import this module by its bare specifier so bundled and external code share its state.\n\n/** @type {Promise<{ tracer: Tracer, SpanStatusCode: typeof SpanStatusCode, propagation: PropagationAPI, context: ContextAPI }> | null} */\nexport let otel = null;\n\n/**\n * The caller passes in `import('@opentelemetry/api')` so the import lives behind\n * `__SVELTEKIT_SERVER_TRACING_ENABLED__` in the bundled runtime and is eliminated\n * from builds with tracing disabled, where the package may not be installed.\n * @param {Promise<typeof import('@opentelemetry/api')>} api\n * @returns {void}\n */\nexport function init_tracing(api) {\n\totel ??= api\n\t\t.then((module) => {\n\t\t\treturn {\n\t\t\t\ttracer: module.trace.getTracer('sveltekit'),\n\t\t\t\tpropagation: module.propagation,\n\t\t\t\tcontext: module.context,\n\t\t\t\tSpanStatusCode: module.SpanStatusCode\n\t\t\t};\n\t\t})\n\t\t.catch(() => e.tracing_api_missing());\n}\n\n/** @type {RecordSpan} */\nexport async function record_span({ name, attributes, fn }) {\n\tif (otel === null) {\n\t\treturn fn(noop_span);\n\t}\n\n\tconst { SpanStatusCode, tracer } = await otel;\n\n\treturn tracer.startActiveSpan(name, { attributes }, async (span) => {\n\t\ttry {\n\t\t\treturn await fn(span);\n\t\t} catch (error) {\n\t\t\tif (error instanceof HttpError) {\n\t\t\t\tspan.setAttributes({\n\t\t\t\t\t[`${name}.result.type`]: 'known_error',\n\t\t\t\t\t[`${name}.result.status`]: error.status,\n\t\t\t\t\t[`${name}.result.message`]: error.body.message\n\t\t\t\t});\n\t\t\t\tif (error.status >= 500) {\n\t\t\t\t\tspan.recordException({\n\t\t\t\t\t\tname: 'HttpError',\n\t\t\t\t\t\tmessage: error.body.message\n\t\t\t\t\t});\n\t\t\t\t\tspan.setStatus({\n\t\t\t\t\t\tcode: SpanStatusCode.ERROR,\n\t\t\t\t\t\tmessage: error.body.message\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t} else if (error instanceof Redirect) {\n\t\t\t\tspan.setAttributes({\n\t\t\t\t\t[`${name}.result.type`]: 'redirect',\n\t\t\t\t\t[`${name}.result.status`]: error.status,\n\t\t\t\t\t[`${name}.result.location`]: error.location\n\t\t\t\t});\n\t\t\t} else if (error instanceof Error) {\n\t\t\t\tspan.setAttributes({\n\t\t\t\t\t[`${name}.result.type`]: 'unknown_error'\n\t\t\t\t});\n\t\t\t\tspan.recordException({\n\t\t\t\t\tname: error.name,\n\t\t\t\t\tmessage: error.message,\n\t\t\t\t\t// conditional so this compiles under consumers' `exactOptionalPropertyTypes`\n\t\t\t\t\t...(error.stack !== undefined && { stack: error.stack })\n\t\t\t\t});\n\t\t\t\tspan.setStatus({\n\t\t\t\t\tcode: SpanStatusCode.ERROR,\n\t\t\t\t\tmessage: error.message\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tspan.setAttributes({\n\t\t\t\t\t[`${name}.result.type`]: 'unknown_error'\n\t\t\t\t});\n\t\t\t\tspan.setStatus({ code: SpanStatusCode.ERROR });\n\t\t\t}\n\n\t\t\tthrow error;\n\t\t} finally {\n\t\t\tspan.end();\n\t\t}\n\t});\n}\n","/** @import { ParamMatcher, ParamValue } from '@sveltejs/kit/params' */\nimport * as e from '../messages/shared-errors.js';\nimport { escape_for_regexp } from './regex.js';\n\nconst param_pattern = /^(\\[)?(\\.\\.\\.)?([\\w-]+)(?:=([\\w-]+))?(\\])?$/;\n\nconst root_group_pattern = /^\\/\\((?:[^)]+)\\)$/;\n\nconst escape_sequence_pattern = /\\[([ux])\\+([^\\]]+)\\]/;\n\n/**\n * Decodes the codepoints of an `[x+nn]` or `[u+nnnn]` escape sequence\n * @param {string} code the sequence without its `[x+`/`[u+` prefix or `]` suffix\n */\nexport function decode_escape_sequence(code) {\n\treturn String.fromCodePoint(...code.split('-').map((codepoint) => parseInt(codepoint, 16)));\n}\n\n/**\n * Encodes the characters that `decode_pathname` leaves untouched, so that a decoded\n * escape sequence still matches the pattern `parse_route_id` builds for it\n * @param {string} str\n */\nexport function encode_pathname_chars(str) {\n\treturn str.replace(\n\t\t/[%/?#]/g,\n\t\t(char) => '%' + char.charCodeAt(0).toString(16).toUpperCase().padStart(2, '0')\n\t);\n}\n\n/**\n * Creates the regex pattern, extracts parameter names, and generates types for a route\n * @param {string} id\n */\nexport function parse_route_id(id) {\n\t/** @type {import('types').RouteParam[]} */\n\tconst params = [];\n\n\tconst pattern =\n\t\tid === '/' || root_group_pattern.test(id)\n\t\t\t? /^\\/$/\n\t\t\t: new RegExp(\n\t\t\t\t\t`^${get_route_segments(id)\n\t\t\t\t\t\t.map((segment) => {\n\t\t\t\t\t\t\t// special case — /[...rest]/ could contain zero segments\n\t\t\t\t\t\t\tconst rest_match = /^\\[\\.\\.\\.([\\w-]+)(?:=([\\w-]+))?\\]$/.exec(segment);\n\t\t\t\t\t\t\tif (rest_match) {\n\t\t\t\t\t\t\t\tparams.push({\n\t\t\t\t\t\t\t\t\tname: rest_match[1],\n\t\t\t\t\t\t\t\t\tmatcher: rest_match[2],\n\t\t\t\t\t\t\t\t\toptional: false,\n\t\t\t\t\t\t\t\t\trest: true,\n\t\t\t\t\t\t\t\t\tchained: true\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\treturn '(?:/([^]*))?';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t// special case — /[[optional]]/ could contain zero segments\n\t\t\t\t\t\t\tconst optional_match = /^\\[\\[([\\w-]+)(?:=([\\w-]+))?\\]\\]$/.exec(segment);\n\t\t\t\t\t\t\tif (optional_match) {\n\t\t\t\t\t\t\t\tparams.push({\n\t\t\t\t\t\t\t\t\tname: optional_match[1],\n\t\t\t\t\t\t\t\t\tmatcher: optional_match[2],\n\t\t\t\t\t\t\t\t\toptional: true,\n\t\t\t\t\t\t\t\t\trest: false,\n\t\t\t\t\t\t\t\t\tchained: true\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\treturn '(?:/([^/]+))?';\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif (!segment) {\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tconst parts = segment.split(/\\[(.+?)\\](?!\\])/);\n\t\t\t\t\t\t\tconst result = parts\n\t\t\t\t\t\t\t\t.map((content, i) => {\n\t\t\t\t\t\t\t\t\tif (i % 2) {\n\t\t\t\t\t\t\t\t\t\tif (content.startsWith('x+') || content.startsWith('u+')) {\n\t\t\t\t\t\t\t\t\t\t\treturn escape(decode_escape_sequence(content.slice(2)));\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t// We know the match cannot be null because manifest generation checks\n\t\t\t\t\t\t\t\t\t\t// each route ID with `validate_route_id_params` first\n\t\t\t\t\t\t\t\t\t\tconst match = /** @type {RegExpExecArray} */ (param_pattern.exec(content));\n\n\t\t\t\t\t\t\t\t\t\tconst [, is_optional, is_rest, name, matcher] = match;\n\t\t\t\t\t\t\t\t\t\t// It's assumed that the following invalid route id cases are already checked\n\t\t\t\t\t\t\t\t\t\t// - unbalanced brackets\n\t\t\t\t\t\t\t\t\t\t// - optional param following rest param\n\n\t\t\t\t\t\t\t\t\t\tparams.push({\n\t\t\t\t\t\t\t\t\t\t\tname,\n\t\t\t\t\t\t\t\t\t\t\tmatcher,\n\t\t\t\t\t\t\t\t\t\t\toptional: !!is_optional,\n\t\t\t\t\t\t\t\t\t\t\trest: !!is_rest,\n\t\t\t\t\t\t\t\t\t\t\tchained: is_rest ? i === 1 && parts[0] === '' : false\n\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\treturn is_rest ? '([^]*?)' : is_optional ? '([^/]*)?' : '([^/]+?)';\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\treturn escape(content);\n\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t.join('');\n\n\t\t\t\t\t\t\treturn '/' + result;\n\t\t\t\t\t\t})\n\t\t\t\t\t\t.join('')}/?$`\n\t\t\t\t);\n\n\treturn { pattern, params };\n}\n\n/**\n * Returns the first param in a route ID whose name or matcher contains characters other than\n * underscores, hyphens and alphanumeric characters, mirroring the segments `parse_route_id` parses\n * @param {string} id\n * @returns {string | undefined}\n */\nexport function validate_route_id_params(id) {\n\tif (id === '/' || root_group_pattern.test(id)) return;\n\n\tfor (const segment of get_route_segments(id)) {\n\t\tif (/^\\[\\.\\.\\.([\\w-]+)(?:=([\\w-]+))?\\]$/.test(segment)) continue;\n\t\tif (/^\\[\\[([\\w-]+)(?:=([\\w-]+))?\\]\\]$/.test(segment)) continue;\n\t\tif (!segment) continue;\n\n\t\tconst parts = segment.split(/\\[(.+?)\\](?!\\])/);\n\t\tfor (let i = 1; i < parts.length; i += 2) {\n\t\t\tconst content = parts[i];\n\t\t\tif (content.startsWith('x+') || content.startsWith('u+')) continue;\n\t\t\tif (!param_pattern.test(content)) return content;\n\t\t}\n\t}\n}\n\n/**\n * Returns `false` for `(group)` segments\n * @param {string} segment\n */\nfunction affects_path(segment) {\n\treturn segment !== '' && !/^\\([^)]+\\)$/.test(segment);\n}\n\n/**\n * Splits a route id into its segments, removing segments that\n * don't affect the path (i.e. groups). The root route is represented by `/`\n * and will be returned as `['']`.\n * @param {string} route\n * @returns string[]\n */\nexport function get_route_segments(route) {\n\treturn route.slice(1).split('/').filter(affects_path);\n}\n\n/**\n * @param {ParamMatcher} matcher\n * @param {string} value\n * @returns {{ success: true, value: any } | { success: false }}\n */\nfunction run_matcher(matcher, value) {\n\tconst result = matcher['~standard'].validate(value);\n\n\tif (result instanceof Promise) {\n\t\te.param_matcher_async();\n\t}\n\n\tif (result.issues) {\n\t\treturn { success: false };\n\t}\n\n\tconst parsed = result.value;\n\n\tif (\n\t\ttypeof parsed !== 'string' &&\n\t\ttypeof parsed !== 'number' &&\n\t\ttypeof parsed !== 'boolean' &&\n\t\ttypeof parsed !== 'bigint'\n\t) {\n\t\te.param_matcher_result_invalid();\n\t}\n\n\treturn { success: true, value: parsed };\n}\n\n/**\n * @param {RegExpMatchArray} match\n * @param {import('types').RouteParam[]} params\n * @param {Record<string, ParamMatcher>} matchers\n */\nexport function exec(match, params, matchers) {\n\t/** @type {Record<string, any>} */\n\tconst result = {};\n\n\tconst values = match.slice(1);\n\tconst values_needing_match = values.filter((value) => value !== undefined);\n\n\tlet buffered = 0;\n\n\tfor (let i = 0; i < params.length; i += 1) {\n\t\tconst param = params[i];\n\t\tlet value = values[i - buffered];\n\n\t\t// in the `[[a=b]]/.../[...rest]` case, if one or more optional parameters\n\t\t// weren't matched, roll the skipped values into the rest\n\t\tif (param.chained && param.rest && buffered) {\n\t\t\tvalue = values\n\t\t\t\t.slice(i - buffered, i + 1)\n\t\t\t\t.filter((s) => s)\n\t\t\t\t.join('/');\n\n\t\t\tbuffered = 0;\n\t\t}\n\n\t\t// if `value` is undefined, it means this is an optional or rest parameter\n\t\tif (value === undefined) {\n\t\t\tif (param.rest) {\n\t\t\t\t// We need to allow the matcher to run so that it can decide if this optional rest param should be allowed to match\n\t\t\t\tvalue = '';\n\t\t\t} else {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\n\t\tconst decoded = decodeURIComponent(value);\n\n\t\tif (param.matcher) {\n\t\t\tconst outcome = run_matcher(matchers[param.matcher], decoded);\n\n\t\t\tif (!outcome.success) {\n\t\t\t\t// in the `/[[a=b]]/...` case, if the value didn't satisfy the matcher,\n\t\t\t\t// keep track of the number of skipped optional parameters and continue\n\t\t\t\tif (param.optional && param.chained) {\n\t\t\t\t\tbuffered++;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t// otherwise, if the matcher returns `false`, the route did not match\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tresult[param.name] = outcome.value;\n\t\t} else {\n\t\t\tresult[param.name] = decoded;\n\t\t}\n\n\t\t// Now that the params match, reset the buffer if the next param isn't the [...rest]\n\t\t// and the next value is defined, otherwise the buffer will cause us to skip values\n\t\tconst next_param = params[i + 1];\n\t\tconst next_value = values[i + 1];\n\t\tif (next_param && !next_param.rest && next_param.optional && next_value && param.chained) {\n\t\t\tbuffered = 0;\n\t\t}\n\n\t\t// There are no more params and no more values, but all non-empty values have been matched\n\t\tif (!next_param && !next_value && Object.keys(result).length === values_needing_match.length) {\n\t\t\tbuffered = 0;\n\t\t}\n\t\tcontinue;\n\t}\n\n\tif (buffered) return;\n\treturn result;\n}\n\n/**\n * `decode_pathname` leaves these characters untouched, so routes have to match their encoded forms\n * @type {Record<string, string>}\n */\nconst encoded = {\n\t'%': '%25',\n\t'/': '%2[Ff]',\n\t'?': '%3[Ff]',\n\t'#': '%23'\n};\n\n/** @param {string} str */\nfunction escape(str) {\n\t// the replacements in `encoded` are regex source themselves, so they must not be escaped again\n\treturn str\n\t\t.normalize()\n\t\t.split(/([%/?#])/)\n\t\t.map((part, i) => (i % 2 ? encoded[part] : escape_for_regexp(part)))\n\t\t.join('');\n}\n\nconst basic_param_pattern = /\\[(\\[)?(\\.\\.\\.)?([\\w-]+?)(?:=([\\w-]+))?\\]\\]?/g;\n\n// escape sequences are expanded in the same pass as the params, so that a param\n// value containing `[x+2f]` is not itself expanded\nexport const segment_pattern = new RegExp(\n\t`${escape_sequence_pattern.source}|${basic_param_pattern.source}`,\n\t'g'\n);\n\n/**\n * Populate a route ID with params to resolve a pathname.\n * @example\n * ```js\n * resolveRoute(\n * `/blog/[slug]/[...somethingElse]`,\n * {\n * slug: 'hello-world',\n * somethingElse: 'something/else'\n * }\n * ); // `/blog/hello-world/something/else`\n * ```\n * @param {string} id\n * @param {Record<string, ParamValue | undefined>} params\n * @returns {string}\n */\nexport function resolve_route(id, params) {\n\tconst segments = get_route_segments(id);\n\tconst has_id_trailing_slash = id != '/' && id.endsWith('/');\n\n\treturn (\n\t\t'/' +\n\t\tsegments\n\t\t\t.map((segment) =>\n\t\t\t\tsegment.replace(segment_pattern, (_, escape_type, escape_code, optional, rest, name) => {\n\t\t\t\t\tif (escape_type) return encode_pathname_chars(decode_escape_sequence(escape_code));\n\n\t\t\t\t\tconst value = params[name];\n\n\t\t\t\t\tif (value === undefined || value === '') {\n\t\t\t\t\t\tif (optional) return '';\n\t\t\t\t\t\tif (rest && value !== undefined) return '';\n\t\t\t\t\t\te.route_param_missing({ name, id });\n\t\t\t\t\t}\n\n\t\t\t\t\tif (typeof value === 'string') {\n\t\t\t\t\t\tif (value.startsWith('/') || value.endsWith('/')) {\n\t\t\t\t\t\t\te.route_param_slash({ name, id });\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\treturn value;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (\n\t\t\t\t\t\ttypeof value === 'number' ||\n\t\t\t\t\t\ttypeof value === 'boolean' ||\n\t\t\t\t\t\ttypeof value === 'bigint'\n\t\t\t\t\t) {\n\t\t\t\t\t\treturn String(value);\n\t\t\t\t\t}\n\n\t\t\t\t\te.route_param_value_invalid({ name, id });\n\t\t\t\t})\n\t\t\t)\n\t\t\t.filter(Boolean)\n\t\t\t.join('/') +\n\t\t(has_id_trailing_slash ? '/' : '')\n\t);\n}\n\n/**\n * @param {import('types').SSRNode} node\n * @returns {boolean}\n */\nexport function has_server_load(node) {\n\treturn node.server?.load !== undefined || node.server?.trailingSlash !== undefined;\n}\n\n/**\n * Find the first route that matches the given path\n * @template {{pattern: RegExp, params: import('types').RouteParam[]}} Route\n * @param {string} path - The decoded pathname to match\n * @param {Route[]} routes\n * @param {Record<string, ParamMatcher>} matchers\n * @returns {{ route: Route, params: Record<string, any> } | null}\n */\nexport function find_route(path, routes, matchers) {\n\tfor (const route of routes) {\n\t\tconst match = route.pattern.exec(path);\n\t\tif (!match) continue;\n\n\t\tconst matched = exec(match, route.params, matchers);\n\t\tif (matched) {\n\t\t\treturn {\n\t\t\t\troute,\n\t\t\t\tparams: matched\n\t\t\t};\n\t\t}\n\t}\n\treturn null;\n}\n","/* Baseline 2025 runtimes */\n\n/**\t@type {(array_buffer: ArrayBuffer) => string} */\nexport function encode_native(array_buffer) {\n\treturn new Uint8Array(array_buffer).toBase64();\n}\n\n/**\t@type {(base64: string) => ArrayBuffer} */\nexport function decode_native(base64) {\n\treturn Uint8Array.fromBase64(base64).buffer;\n}\n\n/* Node-compatible runtimes */\n\n/** @type {(array_buffer: ArrayBuffer) => string} */\nexport function encode_buffer(array_buffer) {\n\treturn Buffer.from(array_buffer).toString('base64');\n}\n\n/**\t@type {(base64: string) => ArrayBuffer} */\nexport function decode_buffer(base64) {\n\treturn Uint8Array.from(Buffer.from(base64, 'base64')).buffer;\n}\n\n/* Legacy runtimes */\n\n/** @type {(array_buffer: ArrayBuffer) => string} */\nexport function encode_legacy(array_buffer) {\n\tconst array = new Uint8Array(array_buffer);\n\tlet binary = '';\n\n\t// the maximum number of arguments to String.fromCharCode.apply\n\t// should be around 0xFFFF in modern engines\n\tconst chunk_size = 0x8000;\n\tfor (let i = 0; i < array.length; i += chunk_size) {\n\t\tconst chunk = array.subarray(i, i + chunk_size);\n\t\t// `apply` accepts any array-like at runtime; lib types only admit `number[]`.\n\t\tbinary += String.fromCharCode.apply(\n\t\t\tnull,\n\t\t\t/** @type {number[]} */ (/** @type {unknown} */ (chunk))\n\t\t);\n\t}\n\n\treturn btoa(binary);\n}\n\n/**\t@type {(base64: string) => ArrayBuffer} */\nexport function decode_legacy(base64) {\n\tconst binary_string = atob(base64);\n\tconst len = binary_string.length;\n\tconst array = new Uint8Array(len);\n\n\tfor (let i = 0; i < len; i++) {\n\t\tarray[i] = binary_string.charCodeAt(i);\n\t}\n\n\treturn array.buffer;\n}\n\nconst native = typeof Uint8Array.fromBase64 === 'function';\nconst buffer = typeof process === 'object' && process.versions?.node !== undefined;\n\nexport const encode64 = native ? encode_native : buffer ? encode_buffer : encode_legacy;\nexport const decode64 = native ? decode_native : buffer ? decode_buffer : decode_legacy;\n","import { MAX_ARRAY_INDEX } from './constants.js';\nimport {\n\tenumerable_symbols,\n\tget_type,\n\tis_buffer,\n\tis_plain_object,\n\tvalid_array_indices\n} from './utils.js';\n\n/**\n * Merges caller-provided operation overrides over the defaults. Iterating the\n * default keys (rather than the override's own keys) means nullish members\n * fall back to the default, and inherited members — e.g. from a class\n * instance — are picked up.\n *\n * @template {Record<string, any>} T\n * @param {T} defaults\n * @param {Partial<T> | undefined} overrides\n * @returns {T}\n */\nexport function merge_operations(defaults, overrides) {\n\tif (!overrides) return defaults;\n\n\tconst merged = /** @type {T} */ ({});\n\n\tfor (const key of /** @type {(keyof T)[]} */ (Object.keys(defaults))) {\n\t\tmerged[key] = overrides[key] ?? defaults[key];\n\t}\n\n\treturn merged;\n}\n\n/** @type {{ kind: 'not-plain' }} */\nconst NOT_PLAIN = /* @__PURE__ */ Object.freeze({ kind: 'not-plain' });\n\n/** @type {{ kind: 'symbol-keys' }} */\nconst SYMBOL_KEYS = /* @__PURE__ */ Object.freeze({ kind: 'symbol-keys' });\n\n/**\n * The default implementations of every introspection/extraction operation\n * `stringify` performs on the value being serialized. Each one uses native\n * JavaScript semantics (property access, iteration, prototype methods, etc).\n *\n * Pass overrides via the `operations` option of `stringify`/`stringifyAsync`\n * to customize how values are inspected — e.g. to serialize values without\n * triggering getters, proxy traps, or patched prototype methods, or to\n * serialize values that live in a different JavaScript runtime (a `node:vm`\n * context, a WASM-hosted engine, a remote process) through handle objects.\n *\n * The object is frozen — it is shared by every `stringify` call that does\n * not override a given operation.\n *\n */\n/** @type {import('./types.js').DefaultStringifyOperations} */\nconst stringify_operations = {\n\tidentify: (value) => value,\n\n\ttypeOf: (value) => (value === null ? 'null' : typeof value),\n\n\ttoPrimitive: (value) => value,\n\n\ttagOf: (value) => get_type(value),\n\n\tisThenable: (value) => typeof value.then === 'function',\n\n\ttoPromise: (thenable) => Promise.resolve(thenable),\n\n\tunbox: (boxed) => boxed.valueOf(),\n\n\ttoISOString: (date) => (isNaN(date.getDate()) ? '' : date.toISOString()),\n\n\ttoStringValue: (value) => value.toString(),\n\n\tregExpInfo: (regexp) => ({ source: regexp.source, flags: regexp.flags }),\n\n\tvaluesOf: (set) => set,\n\n\tentriesOf: (map) => map,\n\n\tviewInfo: (view) => {\n\t\t// Node Buffers may share a pool containing unrelated, sensitive data.\n\t\t// Copy only the visible bytes, without using Buffer's pooling or slice.\n\t\tif (is_buffer(view)) view = new Uint8Array(view);\n\n\t\treturn {\n\t\t\tbuffer: view.buffer,\n\t\t\tbyteOffset: view.byteOffset,\n\t\t\tbyteLength: view.byteLength,\n\t\t\tlength: view.length,\n\t\t\tbufferByteLength: view.buffer.byteLength\n\t\t};\n\t},\n\n\ttoArrayBuffer: (buffer) => buffer,\n\n\tlengthOf: (array) => array.length,\n\n\thasOwn: (value, key) => Object.hasOwn(value, key),\n\n\tindicesOf: (array) => valid_array_indices(array),\n\n\tshapeOf: (value) => {\n\t\tif (!is_plain_object(value)) return NOT_PLAIN;\n\t\tif (enumerable_symbols(value).length > 0) return SYMBOL_KEYS;\n\n\t\treturn {\n\t\t\tkind: Object.getPrototypeOf(value) === null ? 'null-proto' : 'plain',\n\t\t\tkeys: Object.keys(value)\n\t\t};\n\t},\n\n\tget: (value, key) => value[key]\n};\n\nexport const default_stringify_operations = /* @__PURE__ */ Object.freeze(stringify_operations);\n\nconst array_buffer_byte_length = /** @type {() => number} */ (\n\tObject.getOwnPropertyDescriptor(ArrayBuffer.prototype, 'byteLength')?.get\n);\n\nconst shared_array_buffer_byte_length =\n\ttypeof SharedArrayBuffer === 'undefined'\n\t\t? undefined\n\t\t: Object.getOwnPropertyDescriptor(SharedArrayBuffer.prototype, 'byteLength')?.get;\n\n/**\n * The default implementations of every construction operation `parse` and\n * `unflatten` perform while reviving a value. Each one uses native\n * JavaScript semantics (built-in constructors, property assignment, etc).\n *\n * Pass overrides via the `operations` option of `parse`/`unflatten` to\n * customize how values are built — e.g. to construct them from the\n * intrinsics of a different realm (a `node:vm` context), or to build up\n * values inside another JavaScript runtime (a WASM-hosted engine, a remote\n * process) through handle objects.\n *\n * The object is frozen — it is shared by every `parse` call that does not\n * override a given operation.\n *\n */\n/** @type {import('./types.js').DefaultParseOperations} */\nconst parse_operations = {\n\tfromPrimitive: (primitive) => primitive,\n\n\tfromISOString: (iso) => new Date(iso),\n\n\tfromStringValue: (tag, text) => {\n\t\tif (tag === 'URL') return new URL(text);\n\t\tif (tag === 'URLSearchParams') return new URLSearchParams(text);\n\t\t// 'Temporal.Instant', 'Temporal.PlainDate', ...\n\t\t// @ts-expect-error TS doesn't know about Temporal yet\n\t\treturn Temporal[tag.slice(9)].from(text);\n\t},\n\n\tfromArrayBuffer: (buffer) => buffer,\n\n\tfromRegExpInfo: (source, flags) => new RegExp(source, flags),\n\n\tfromViewInfo: (tag, buffer, byteOffset, length) => {\n\t\t// A reviver can replace an ArrayBuffer with a length or array-like value,\n\t\t// which a typed array constructor would use to allocate a new buffer.\n\t\t// The native getters check internal slots, so they work across realms\n\t\t// and cannot be fooled by a forged prototype or Symbol.toStringTag.\n\t\ttry {\n\t\t\tarray_buffer_byte_length.call(buffer);\n\t\t} catch (error) {\n\t\t\tif (!shared_array_buffer_byte_length) throw error;\n\t\t\tshared_array_buffer_byte_length.call(buffer);\n\t\t}\n\n\t\tconst Constructor = /** @type {any} */ (globalThis)[tag];\n\t\treturn byteOffset !== undefined\n\t\t\t? new Constructor(buffer, byteOffset, length)\n\t\t\t: new Constructor(buffer);\n\t},\n\n\tbox: (value) => Object(value),\n\n\tcreateArray: (length) => new Array(length),\n\n\tcreateSparseArray: (length) => {\n\t\t/** @type {any[]} */\n\t\tconst array = [];\n\n\t\t// Setting `array.length = length` (or equivalently calling\n\t\t// `new Array(length)`) on an untrusted length is a DoS vector: V8\n\t\t// eagerly allocates a contiguous backing store for array lengths below\n\t\t// ~10^8, so a small payload with a huge declared length can force\n\t\t// arbitrary memory allocation. Touching the largest-possible index\n\t\t// first forces V8 into dictionary-elements mode, where `length` is\n\t\t// just a number and no contiguous allocation occurs.\n\t\tarray[MAX_ARRAY_INDEX] = undefined;\n\t\tdelete array[MAX_ARRAY_INDEX];\n\t\tarray.length = length;\n\n\t\treturn array;\n\t},\n\n\tcreateObject: () => ({}),\n\n\tcreateNullPrototypeObject: () => Object.create(null),\n\n\tcreateSet: () => new Set(),\n\n\tcreateMap: () => new Map(),\n\n\tset: (target, key, value) => {\n\t\ttarget[key] = value;\n\t},\n\n\taddValue: (set, value) => {\n\t\tset.add(value);\n\t},\n\n\taddEntry: (map, key, value) => {\n\t\tmap.set(key, value);\n\t}\n};\n\nexport const default_parse_operations = /* @__PURE__ */ Object.freeze(parse_operations);\n","import { decode64 } from './base64.js';\nimport {\n\tHOLE,\n\tNAN,\n\tNEGATIVE_INFINITY,\n\tNEGATIVE_ZERO,\n\tPOSITIVE_INFINITY,\n\tSPARSE,\n\tUNDEFINED\n} from './constants.js';\nimport { default_parse_operations, merge_operations } from './operations.js';\nimport { is_valid_array_index, is_valid_array_len } from './utils.js';\n\nfunction invalid() {\n\tthrow new Error('Invalid input');\n}\n\n/**\n * Revive a value serialized with `devalue.stringify`\n * @param {string} serialized\n * @param {Record<string, (value: any) => any>} [revivers]\n * @param {import('./types.js').ParseOptions} [options]\n */\nexport function parse(serialized, revivers, options) {\n\treturn unflatten(JSON.parse(serialized), revivers, options);\n}\n\n/**\n * Revive a value flattened with `devalue.stringify`\n * @param {number | any[]} parsed\n * @param {Record<string, (value: any) => any>} [revivers]\n * @param {import('./types.js').ParseOptions} [options]\n */\nexport function unflatten(parsed, revivers, options) {\n\t/** @type {import('./types.js').ParseOperations} */\n\tconst ops = merge_operations(default_parse_operations, options?.operations);\n\n\tif (typeof parsed === 'number') return hydrate(parsed, true);\n\n\tif (!Array.isArray(parsed) || parsed.length === 0) {\n\t\tinvalid();\n\t}\n\n\tconst values = /** @type {any[]} */ (parsed);\n\n\tconst hydrated = Array(values.length);\n\n\t/**\n\t * A set of values currently being hydrated with custom revivers,\n\t * used to detect invalid cyclical dependencies\n\t * @type {Set<number> | null}\n\t */\n\tlet hydrating = null;\n\n\t/**\n\t * @param {number} index\n\t * @returns {any}\n\t */\n\tfunction get_raw(index) {\n\t\tif (!is_valid_array_index(index) || index >= values.length) {\n\t\t\tinvalid();\n\t\t}\n\n\t\treturn values[index];\n\t}\n\n\t/**\n\t * @param {number} index\n\t * @returns {any}\n\t */\n\tfunction hydrate(index, standalone = false) {\n\t\tif (index === UNDEFINED) return ops.fromPrimitive(undefined);\n\t\tif (index === NAN) return ops.fromPrimitive(NaN);\n\t\tif (index === POSITIVE_INFINITY) return ops.fromPrimitive(Infinity);\n\t\tif (index === NEGATIVE_INFINITY) return ops.fromPrimitive(-Infinity);\n\t\tif (index === NEGATIVE_ZERO) return ops.fromPrimitive(-0);\n\n\t\tif (standalone || typeof index !== 'number') {\n\t\t\tinvalid();\n\t\t}\n\n\t\tif (index in hydrated) return hydrated[index];\n\n\t\tif (index >= values.length) {\n\t\t\tinvalid();\n\t\t}\n\n\t\tconst value = values[index];\n\n\t\tif (!value || typeof value !== 'object') {\n\t\t\thydrated[index] = ops.fromPrimitive(value);\n\t\t} else if (Array.isArray(value)) {\n\t\t\tif (typeof value[0] === 'string') {\n\t\t\t\tconst type = value[0];\n\n\t\t\t\tconst reviver = revivers && Object.hasOwn(revivers, type) ? revivers[type] : undefined;\n\n\t\t\t\tif (reviver) {\n\t\t\t\t\tlet i = value[1];\n\t\t\t\t\tif (typeof i !== 'number') {\n\t\t\t\t\t\t// if it's not a number, it was serialized by a builtin reviver\n\t\t\t\t\t\t// so we need to munge it into the format expected by a custom reviver\n\t\t\t\t\t\ti = values.push(value[1]) - 1;\n\t\t\t\t\t}\n\n\t\t\t\t\t// If the payload is already hydrated, its recursion has already\n\t\t\t\t\t// terminated (e.g. a self-referential object cached itself before\n\t\t\t\t\t// following its own back-reference), so revive it directly. Falling\n\t\t\t\t\t// through to the `hydrating` guard here would wrongly reject a valid\n\t\t\t\t\t// cycle. An actually infinite payload (e.g. `[[\"Custom\", 0]]`) is never\n\t\t\t\t\t// cached, so it still hits the guard below.\n\t\t\t\t\tif (Object.hasOwn(hydrated, i)) {\n\t\t\t\t\t\treturn (hydrated[index] = reviver(hydrated[i]));\n\t\t\t\t\t}\n\n\t\t\t\t\thydrating ??= new Set();\n\n\t\t\t\t\tif (hydrating.has(i)) {\n\t\t\t\t\t\tthrow new Error('Invalid circular reference');\n\t\t\t\t\t}\n\n\t\t\t\t\thydrating.add(i);\n\t\t\t\t\thydrated[index] = reviver(hydrate(i));\n\t\t\t\t\thydrating.delete(i);\n\n\t\t\t\t\treturn hydrated[index];\n\t\t\t\t}\n\n\t\t\t\tswitch (type) {\n\t\t\t\t\tcase 'Date':\n\t\t\t\t\t\thydrated[index] = ops.fromISOString(value[1]);\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'Set':\n\t\t\t\t\t\tconst set = ops.createSet();\n\t\t\t\t\t\thydrated[index] = set;\n\t\t\t\t\t\tfor (let i = 1; i < value.length; i += 1) {\n\t\t\t\t\t\t\tops.addValue(set, hydrate(value[i]));\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'Map':\n\t\t\t\t\t\tconst map = ops.createMap();\n\t\t\t\t\t\thydrated[index] = map;\n\t\t\t\t\t\tfor (let i = 1; i < value.length; i += 2) {\n\t\t\t\t\t\t\tops.addEntry(map, hydrate(value[i]), hydrate(value[i + 1]));\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'RegExp':\n\t\t\t\t\t\thydrated[index] = ops.fromRegExpInfo(value[1], value[2]);\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'Object': {\n\t\t\t\t\t\tconst wrapped_index = value[1];\n\n\t\t\t\t\t\t// Only a primitive can be boxed. The negative sentinels below are the\n\t\t\t\t\t\t// ones `stringify` emits for boxed numbers; every other sentinel\n\t\t\t\t\t\t// (`UNDEFINED`, `HOLE`, `SPARSE`) would box `undefined` into a plain\n\t\t\t\t\t\t// `{}`, which is not a value `stringify` can produce.\n\t\t\t\t\t\tconst is_boxable_sentinel =\n\t\t\t\t\t\t\twrapped_index === NAN ||\n\t\t\t\t\t\t\twrapped_index === POSITIVE_INFINITY ||\n\t\t\t\t\t\t\twrapped_index === NEGATIVE_INFINITY ||\n\t\t\t\t\t\t\twrapped_index === NEGATIVE_ZERO;\n\n\t\t\t\t\t\tif (!is_boxable_sentinel) {\n\t\t\t\t\t\t\tconst wrapped = get_raw(wrapped_index);\n\n\t\t\t\t\t\t\tconst is_bigint = Array.isArray(wrapped) && wrapped[0] === 'BigInt';\n\n\t\t\t\t\t\t\tif ((wrapped === undefined || typeof wrapped === 'object') && !is_bigint) {\n\t\t\t\t\t\t\t\t// avoid infinite recusion in case of malformed input\n\t\t\t\t\t\t\t\tinvalid();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\thydrated[index] = ops.box(hydrate(wrapped_index));\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tcase 'BigInt':\n\t\t\t\t\t\thydrated[index] = ops.fromPrimitive(BigInt(value[1]));\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'null':\n\t\t\t\t\t\tconst obj = ops.createNullPrototypeObject();\n\t\t\t\t\t\thydrated[index] = obj;\n\t\t\t\t\t\tfor (let i = 1; i < value.length; i += 2) {\n\t\t\t\t\t\t\tconst key = value[i];\n\t\t\t\t\t\t\tif (typeof key !== 'string') {\n\t\t\t\t\t\t\t\tthrow new Error('Cannot parse an object with a non-string key');\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif (key === '__proto__') {\n\t\t\t\t\t\t\t\tthrow new Error('Cannot parse an object with a `__proto__` property');\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tops.set(obj, key, hydrate(value[i + 1]));\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'Int8Array':\n\t\t\t\t\tcase 'Uint8Array':\n\t\t\t\t\tcase 'Uint8ClampedArray':\n\t\t\t\t\tcase 'Int16Array':\n\t\t\t\t\tcase 'Uint16Array':\n\t\t\t\t\tcase 'Float16Array':\n\t\t\t\t\tcase 'Int32Array':\n\t\t\t\t\tcase 'Uint32Array':\n\t\t\t\t\tcase 'Float32Array':\n\t\t\t\t\tcase 'Float64Array':\n\t\t\t\t\tcase 'BigInt64Array':\n\t\t\t\t\tcase 'BigUint64Array':\n\t\t\t\t\tcase 'DataView': {\n\t\t\t\t\t\tconst buffer_index = value[1];\n\n\t\t\t\t\t\tconst raw = get_raw(buffer_index);\n\n\t\t\t\t\t\tif (!Array.isArray(raw) || raw[0] !== 'ArrayBuffer') {\n\t\t\t\t\t\t\t// without this, if we receive malformed input we could\n\t\t\t\t\t\t\t// end up trying to hydrate in a circle or allocate\n\t\t\t\t\t\t\t// huge amounts of memory when we call `new TypedArrayConstructor(buffer)`\n\t\t\t\t\t\t\tinvalid();\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tconst buffer = hydrate(buffer_index);\n\n\t\t\t\t\t\thydrated[index] = ops.fromViewInfo(type, buffer, value[2], value[3]);\n\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tcase 'ArrayBuffer': {\n\t\t\t\t\t\tconst base64 = value[1];\n\t\t\t\t\t\tif (typeof base64 !== 'string') {\n\t\t\t\t\t\t\tthrow new Error('Invalid ArrayBuffer encoding');\n\t\t\t\t\t\t}\n\t\t\t\t\t\thydrated[index] = ops.fromArrayBuffer(decode64(base64));\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tcase 'URL':\n\t\t\t\t\tcase 'URLSearchParams':\n\t\t\t\t\tcase 'Temporal.Duration':\n\t\t\t\t\tcase 'Temporal.Instant':\n\t\t\t\t\tcase 'Temporal.PlainDate':\n\t\t\t\t\tcase 'Temporal.PlainTime':\n\t\t\t\t\tcase 'Temporal.PlainDateTime':\n\t\t\t\t\tcase 'Temporal.PlainMonthDay':\n\t\t\t\t\tcase 'Temporal.PlainYearMonth':\n\t\t\t\t\tcase 'Temporal.ZonedDateTime': {\n\t\t\t\t\t\t// the same tags `toStringValue` serializes on the stringify side\n\t\t\t\t\t\thydrated[index] = ops.fromStringValue(type, value[1]);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tthrow new Error(`Unknown type ${type}`);\n\t\t\t\t}\n\t\t\t} else if (value[0] === SPARSE) {\n\t\t\t\t// Sparse array encoding: [SPARSE, length, idx, val, idx, val, ...]\n\t\t\t\tconst len = value[1];\n\n\t\t\t\tif (!is_valid_array_len(len)) {\n\t\t\t\t\tinvalid();\n\t\t\t\t}\n\n\t\t\t\t// `len` comes from the input rather than being bounded by it, so\n\t\t\t\t// `createSparseArray` is responsible for not allocating storage\n\t\t\t\t// proportional to it.\n\t\t\t\tconst array = ops.createSparseArray(len);\n\t\t\t\thydrated[index] = array;\n\n\t\t\t\tfor (let i = 2; i < value.length; i += 2) {\n\t\t\t\t\tconst idx = value[i];\n\n\t\t\t\t\tif (!is_valid_array_index(idx) || idx >= len) {\n\t\t\t\t\t\tinvalid();\n\t\t\t\t\t}\n\n\t\t\t\t\tops.set(array, idx, hydrate(value[i + 1]));\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tconst array = ops.createArray(value.length);\n\t\t\t\thydrated[index] = array;\n\n\t\t\t\tfor (let i = 0; i < value.length; i += 1) {\n\t\t\t\t\tconst n = value[i];\n\t\t\t\t\tif (n === HOLE) continue;\n\n\t\t\t\t\tops.set(array, i, hydrate(n));\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tconst object = ops.createObject();\n\t\t\thydrated[index] = object;\n\n\t\t\tfor (const key of Object.keys(value)) {\n\t\t\t\tif (key === '__proto__') {\n\t\t\t\t\tthrow new Error('Cannot parse an object with a `__proto__` property');\n\t\t\t\t}\n\n\t\t\t\tops.set(object, key, hydrate(value[key]));\n\t\t\t}\n\t\t}\n\n\t\treturn hydrated[index];\n\t}\n\n\treturn hydrate(0);\n}\n","import { DevalueError, MAP_KEY, format_path, quote_key, stringify_string } from './utils.js';\nimport {\n\tHOLE,\n\tNAN,\n\tNEGATIVE_INFINITY,\n\tNEGATIVE_ZERO,\n\tPOSITIVE_INFINITY,\n\tSPARSE,\n\tUNDEFINED\n} from './constants.js';\nimport { encode64 } from './base64.js';\nimport { default_stringify_operations, merge_operations } from './operations.js';\n\n/**\n * Turn a value into a JSON string that can be parsed with `devalue.parse`\n * @param {any} value\n * @param {Record<string, (value: any) => any>} [reducers]\n * @param {import('./types.js').StringifyOptions} [options]\n */\nexport function stringify(value, reducers, options) {\n\tconst stringified = run(false, value, reducers, options);\n\treturn typeof stringified === 'string' ? stringified : `[${stringified.join(',')}]`;\n}\n\n/**\n * Turn a value into a JSON string that can be parsed with `devalue.parse`\n * @param {any} value\n * @param {Record<string, (value: any) => any>} [reducers]\n * @param {import('./types.js').StringifyOptions} [options]\n */\nexport async function stringifyAsync(value, reducers, options) {\n\tconst stringified = run(true, value, reducers, options);\n\n\tif (typeof stringified === 'string') {\n\t\treturn stringified;\n\t}\n\n\tlet out = '[';\n\n\tfor (let i = 0; i < stringified.length; i += 1) {\n\t\tlet value = stringified[i];\n\n\t\tif (typeof value !== 'string') {\n\t\t\tawait value;\n\t\t\tvalue = stringified[i];\n\n\t\t\tif (i === 0 && value < 0) {\n\t\t\t\treturn `${value}`;\n\t\t\t}\n\t\t}\n\n\t\tout += value;\n\n\t\tif (i < stringified.length - 1) {\n\t\t\tout += ',';\n\t\t}\n\t}\n\n\tout += ']';\n\n\treturn out;\n}\n\n/**\n * @param {boolean} async\n * @param {any} value\n * @param {Record<string, (value: any) => any>} [reducers]\n * @param {import('./types.js').StringifyOptions} [options]\n */\nfunction run(async, value, reducers, options) {\n\tconst ops = merge_operations(default_stringify_operations, options?.operations);\n\n\t/** @type {any[]} */\n\tconst stringified = [];\n\n\t/** @type {Map<any, number>} */\n\tconst indexes = new Map();\n\n\t/** @type {Array<{ key: string, fn: (value: any) => any }>} */\n\tconst custom = [];\n\tif (reducers) {\n\t\tfor (const key of Object.getOwnPropertyNames(reducers)) {\n\t\t\tcustom.push({ key, fn: reducers[key] });\n\t\t}\n\t}\n\n\t// the path to the value being serialized, recorded as-is and only\n\t// formatted by `error` — see `format_path`\n\t/** @type {any[]} */\n\tlet keys = [];\n\n\tlet p = 0;\n\n\t/**\n\t * @param {string} message\n\t * @param {any} thing\n\t * @returns {never}\n\t */\n\tfunction error(message, thing) {\n\t\tconst path = format_path(keys, (key) => {\n\t\t\tconst key_type = ops.typeOf(key);\n\t\t\tconst key_is_primitive =\n\t\t\t\tkey_type !== 'object' && key_type !== 'function' && key_type !== 'symbol';\n\t\t\treturn key_is_primitive ? stringify_primitive(ops.toPrimitive(key)) : '...';\n\t\t});\n\n\t\tthrow new DevalueError(message, path, thing, value);\n\t}\n\n\t/**\n\t * @param {any} thing\n\t * @param {number} [index]\n\t */\n\tfunction flatten(thing, index) {\n\t\tconst type = ops.typeOf(thing);\n\n\t\tif (type === 'undefined') return UNDEFINED;\n\n\t\t/** @type {number | undefined} */\n\t\tlet number;\n\n\t\t// `ops.toPrimitive` is the boundary between the value being serialized and\n\t\t// plain host JavaScript: everything below operates on the extracted host\n\t\t// primitive, so native comparisons and arithmetic are correct there.\n\t\tif (type === 'number') {\n\t\t\tnumber = /** @type {number} */ (ops.toPrimitive(thing));\n\t\t\tif (Number.isNaN(number)) return NAN;\n\t\t\tif (number === Infinity) return POSITIVE_INFINITY;\n\t\t\tif (number === -Infinity) return NEGATIVE_INFINITY;\n\t\t\tif (number === 0 && 1 / number < 0) return NEGATIVE_ZERO;\n\t\t}\n\n\t\tconst id = ops.identify(thing);\n\n\t\tif (indexes.has(id)) return /** @type {number} */ (indexes.get(id));\n\n\t\tindex ??= p++;\n\t\tindexes.set(id, index);\n\n\t\tfor (const { key, fn } of custom) {\n\t\t\tconst value = fn(thing);\n\t\t\tif (value) {\n\t\t\t\tstringified[index] = `[\"${key}\",${flatten(value)}]`;\n\t\t\t\treturn index;\n\t\t\t}\n\t\t}\n\n\t\tif (type === 'function') {\n\t\t\terror(`Cannot stringify a function`, thing);\n\t\t} else if (type === 'symbol') {\n\t\t\terror(`Cannot stringify a Symbol primitive`, thing);\n\t\t}\n\n\t\t/** @type {string | Promise<any>} */\n\t\tlet str = '';\n\n\t\tif (type !== 'object') {\n\t\t\tstr = stringify_primitive(type === 'number' ? number : ops.toPrimitive(thing));\n\t\t} else if (ops.isThenable(thing)) {\n\t\t\tif (!async) {\n\t\t\t\terror(`Cannot stringify a Promise or thenable — use stringifyAsync instead`, thing);\n\t\t\t}\n\n\t\t\t// the callback runs after the synchronous walk has unwound `keys`,\n\t\t\t// so the path to the thenable has to be captured and reinstated\n\t\t\tconst prev_keys = keys.slice();\n\n\t\t\tstr = ops.toPromise(thing).then((value) => {\n\t\t\t\tkeys = prev_keys;\n\n\t\t\t\tconst i = flatten(value, index);\n\t\t\t\tif (i < 0) stringified[index] = i;\n\t\t\t});\n\n\t\t\t// Promises are awaited sequentially, and traversal may throw before\n\t\t\t// reaching them. Handle rejections immediately, but keep the original\n\t\t\t// promise so awaiting it still propagates the error to the caller.\n\t\t\tstr.catch(() => {});\n\t\t} else {\n\t\t\tconst tag = ops.tagOf(thing);\n\n\t\t\tswitch (tag) {\n\t\t\t\tcase 'Number':\n\t\t\t\tcase 'String':\n\t\t\t\tcase 'Boolean':\n\t\t\t\tcase 'BigInt':\n\t\t\t\t\tstr = `[\"Object\",${flatten(ops.unbox(thing))}]`;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'Date':\n\t\t\t\t\tstr = `[\"Date\",\"${ops.toISOString(thing)}\"]`;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'URL':\n\t\t\t\t\tstr = `[\"URL\",${stringify_string(ops.toStringValue(thing))}]`;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'URLSearchParams':\n\t\t\t\t\tstr = `[\"URLSearchParams\",${stringify_string(ops.toStringValue(thing))}]`;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'RegExp':\n\t\t\t\t\tconst { source, flags } = ops.regExpInfo(thing);\n\t\t\t\t\tstr = flags\n\t\t\t\t\t\t? `[\"RegExp\",${stringify_string(source)},\"${flags}\"]`\n\t\t\t\t\t\t: `[\"RegExp\",${stringify_string(source)}]`;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'Array': {\n\t\t\t\t\t// For dense arrays (no holes), we iterate normally.\n\t\t\t\t\t// When we encounter the first hole, we call Object.keys\n\t\t\t\t\t// to determine the sparseness, then decide between:\n\t\t\t\t\t// - HOLE encoding: [-2, val, -2, ...] (default)\n\t\t\t\t\t// - Sparse encoding: [-7, length, idx, val, ...] (for very sparse arrays)\n\t\t\t\t\t// Only the sparse path avoids iterating every slot, which\n\t\t\t\t\t// is what protects against the DoS of e.g. `arr[1000000] = 1`.\n\t\t\t\t\tlet mostly_dense = false;\n\n\t\t\t\t\tconst length = ops.lengthOf(thing);\n\n\t\t\t\t\tstr = '[';\n\n\t\t\t\t\tfor (let i = 0; i < length; i += 1) {\n\t\t\t\t\t\tif (i > 0) str += ',';\n\n\t\t\t\t\t\tif (ops.hasOwn(thing, i)) {\n\t\t\t\t\t\t\tkeys.push(i);\n\t\t\t\t\t\t\tstr += flatten(ops.get(thing, i));\n\t\t\t\t\t\t\tkeys.pop();\n\t\t\t\t\t\t} else if (mostly_dense) {\n\t\t\t\t\t\t\t// Use dense encoding. The heuristic guarantees the\n\t\t\t\t\t\t\t// array is only mildly sparse, so iterating over every\n\t\t\t\t\t\t\t// slot is fine.\n\t\t\t\t\t\t\tstr += HOLE;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// Decide between HOLE encoding and sparse encoding.\n\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t// HOLE encoding: each hole is serialized as the HOLE\n\t\t\t\t\t\t\t// sentinel (-2). For example, [, \"a\", ,] becomes\n\t\t\t\t\t\t\t// [-2, 0, -2]. Each hole costs 3 chars (\"-2\" + comma).\n\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t// Sparse encoding: lists only populated indices.\n\t\t\t\t\t\t\t// For example, [, \"a\", ,] becomes [-7, 3, 1, 0] — the\n\t\t\t\t\t\t\t// -7 sentinel, the array length (3), then index-value\n\t\t\t\t\t\t\t// pairs. This avoids paying per-hole, but each element\n\t\t\t\t\t\t\t// costs extra chars to write its index.\n\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t// The values are the same size either way, so the\n\t\t\t\t\t\t\t// choice comes down to structural overhead:\n\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t// HOLE overhead:\n\t\t\t\t\t\t\t// 3 chars per hole (\"-2\" + comma)\n\t\t\t\t\t\t\t// = (L - P) * 3\n\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t// Sparse overhead:\n\t\t\t\t\t\t\t// \"-7,\" — 3 chars (sparse sentinel + comma)\n\t\t\t\t\t\t\t// + length + \",\" — (d + 1) chars (array length + comma)\n\t\t\t\t\t\t\t// + per element: index + \",\" — (d + 1) chars\n\t\t\t\t\t\t\t// = (4 + d) + P * (d + 1)\n\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t// where L is the array length, P is the number of\n\t\t\t\t\t\t\t// populated elements, and d is the number of digits\n\t\t\t\t\t\t\t// in L (an upper bound on the digits in any index).\n\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t// Sparse encoding is cheaper when:\n\t\t\t\t\t\t\t// (4 + d) + P * (d + 1) < (L - P) * 3\n\t\t\t\t\t\t\tconst populated_keys = ops.indicesOf(thing);\n\t\t\t\t\t\t\tconst population = populated_keys.length;\n\t\t\t\t\t\t\tconst d = String(length).length;\n\n\t\t\t\t\t\t\tconst hole_cost = (length - population) * 3;\n\t\t\t\t\t\t\tconst sparse_cost = 4 + d + population * (d + 1);\n\n\t\t\t\t\t\t\tif (hole_cost > sparse_cost) {\n\t\t\t\t\t\t\t\tstr = '[' + SPARSE + ',' + length;\n\t\t\t\t\t\t\t\tfor (let j = 0; j < populated_keys.length; j++) {\n\t\t\t\t\t\t\t\t\tconst key = populated_keys[j];\n\t\t\t\t\t\t\t\t\tkeys.push(+key);\n\t\t\t\t\t\t\t\t\tstr += ',' + key + ',' + flatten(ops.get(thing, key));\n\t\t\t\t\t\t\t\t\tkeys.pop();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tmostly_dense = true;\n\t\t\t\t\t\t\t\tstr += HOLE;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tstr += ']';\n\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tcase 'Set':\n\t\t\t\t\tstr = '[\"Set\"';\n\n\t\t\t\t\tfor (const value of ops.valuesOf(thing)) {\n\t\t\t\t\t\tstr += `,${flatten(value)}`;\n\t\t\t\t\t}\n\n\t\t\t\t\tstr += ']';\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'Map':\n\t\t\t\t\tstr = '[\"Map\"';\n\n\t\t\t\t\tfor (const [key, value] of ops.entriesOf(thing)) {\n\t\t\t\t\t\tkeys.push(MAP_KEY, key);\n\t\t\t\t\t\tstr += `,${flatten(key)},${flatten(value)}`;\n\t\t\t\t\t\tkeys.pop();\n\t\t\t\t\t\tkeys.pop();\n\t\t\t\t\t}\n\n\t\t\t\t\tstr += ']';\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'Int8Array':\n\t\t\t\tcase 'Uint8Array':\n\t\t\t\tcase 'Uint8ClampedArray':\n\t\t\t\tcase 'Int16Array':\n\t\t\t\tcase 'Uint16Array':\n\t\t\t\tcase 'Float16Array':\n\t\t\t\tcase 'Int32Array':\n\t\t\t\tcase 'Uint32Array':\n\t\t\t\tcase 'Float32Array':\n\t\t\t\tcase 'Float64Array':\n\t\t\t\tcase 'BigInt64Array':\n\t\t\t\tcase 'BigUint64Array': {\n\t\t\t\t\tconst info = ops.viewInfo(thing);\n\t\t\t\t\tstr = '[\"' + tag + '\",' + flatten(info.buffer);\n\n\t\t\t\t\t// handle subarrays\n\t\t\t\t\tif (info.byteLength !== info.bufferByteLength) {\n\t\t\t\t\t\tstr += `,${info.byteOffset},${info.length}`;\n\t\t\t\t\t}\n\n\t\t\t\t\tstr += ']';\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tcase 'DataView': {\n\t\t\t\t\tconst info = ops.viewInfo(thing);\n\t\t\t\t\tstr = '[\"' + tag + '\",' + flatten(info.buffer);\n\n\t\t\t\t\tif (info.byteLength !== info.bufferByteLength) {\n\t\t\t\t\t\tstr += `,${info.byteOffset},${info.byteLength}`;\n\t\t\t\t\t}\n\n\t\t\t\t\tstr += ']';\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tcase 'ArrayBuffer': {\n\t\t\t\t\tconst base64 = encode64(ops.toArrayBuffer(thing));\n\n\t\t\t\t\tstr = `[\"ArrayBuffer\",\"${base64}\"]`;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tcase 'Temporal.Duration':\n\t\t\t\tcase 'Temporal.Instant':\n\t\t\t\tcase 'Temporal.PlainDate':\n\t\t\t\tcase 'Temporal.PlainTime':\n\t\t\t\tcase 'Temporal.PlainDateTime':\n\t\t\t\tcase 'Temporal.PlainMonthDay':\n\t\t\t\tcase 'Temporal.PlainYearMonth':\n\t\t\t\tcase 'Temporal.ZonedDateTime':\n\t\t\t\t\tstr = `[\"${tag}\",${stringify_string(ops.toStringValue(thing))}]`;\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault: {\n\t\t\t\t\tconst shape = ops.shapeOf(thing);\n\n\t\t\t\t\tif (shape.kind === 'not-plain') {\n\t\t\t\t\t\terror(`Cannot stringify arbitrary non-POJOs`, thing);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (shape.kind === 'symbol-keys') {\n\t\t\t\t\t\terror(`Cannot stringify POJOs with symbolic keys`, thing);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (shape.kind === 'null-proto') {\n\t\t\t\t\t\tstr = '[\"null\"';\n\t\t\t\t\t\tfor (const key of shape.keys) {\n\t\t\t\t\t\t\tif (key === '__proto__') {\n\t\t\t\t\t\t\t\terror(`Cannot stringify objects with __proto__ keys`, thing);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tkeys.push(key);\n\t\t\t\t\t\t\tstr += `,${quote_key(key)},${flatten(ops.get(thing, key))}`;\n\t\t\t\t\t\t\tkeys.pop();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tstr += ']';\n\t\t\t\t\t} else {\n\t\t\t\t\t\tstr = '{';\n\t\t\t\t\t\tlet started = false;\n\t\t\t\t\t\tfor (const key of shape.keys) {\n\t\t\t\t\t\t\tif (key === '__proto__') {\n\t\t\t\t\t\t\t\terror(`Cannot stringify objects with __proto__ keys`, thing);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif (started) str += ',';\n\t\t\t\t\t\t\tstarted = true;\n\t\t\t\t\t\t\tkeys.push(key);\n\t\t\t\t\t\t\tstr += `${quote_key(key)}:${flatten(ops.get(thing, key))}`;\n\t\t\t\t\t\t\tkeys.pop();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tstr += '}';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tstringified[index] = str;\n\t\treturn index;\n\t}\n\n\tconst index = flatten(value);\n\n\t// special case — value is represented as a negative index\n\tif (index < 0) return `${index}`;\n\n\treturn stringified;\n}\n\n/**\n * @param {any} thing\n * @returns {string}\n */\nfunction stringify_primitive(thing) {\n\tconst type = typeof thing;\n\tif (type === 'string') return stringify_string(thing);\n\tif (thing === void 0) return UNDEFINED.toString();\n\tif (thing === 0 && 1 / thing < 0) return NEGATIVE_ZERO.toString();\n\tif (type === 'bigint') return `[\"BigInt\",\"${thing}\"]`;\n\treturn String(thing);\n}\n","/** @import { BinaryFormMeta, InternalRemoteFormIssue } from 'types' */\n/** @import { StandardSchemaV1 } from '@standard-schema/spec' */\n\nimport { DEV } from 'esm-env';\nimport * as devalue from 'devalue';\nimport { stream_from_iterable, text_decoder, text_encoder } from './utils.js';\nimport { noop } from '../utils/functions.js';\nimport { SvelteKitError } from '@sveltejs/kit/internal';\nimport * as e from '../messages/shared-errors.js';\nimport * as w from '../messages/shared-warnings.js';\n\n/**\n * Sets a parsed form field value in a nested object, mutating the original object.\n * @param {Record<string, any>} object\n * @param {{ name: string; type: 'number' | 'boolean' | null }} field\n * @param {any} value\n */\nexport function set_nested_value(object, field, value) {\n\tdeep_set(object, split_path(field.name), value);\n}\n\n/**\n * Separates a form field's path from the metadata encoded in its name.\n * @param {string} form_id\n * @param {string} key\n * @returns {{ name: string; type: 'number' | 'boolean' | null; is_array: boolean }}\n */\nexport function parse_form_key(form_id, key) {\n\tconst suffix = '/' + form_id;\n\tlet name = key;\n\tlet image_coordinate = '';\n\n\tif (name.startsWith('i:') && (name.endsWith(suffix + '.x') || name.endsWith(suffix + '.y'))) {\n\t\timage_coordinate = name[name.length - 1];\n\t\tname = name.slice(0, -2);\n\t}\n\n\tif (!name.endsWith(suffix)) {\n\t\te.form_field_unbound({ name });\n\t}\n\n\tname = name.slice(0, -suffix.length);\n\n\t/** @type {'number' | 'boolean' | null} */\n\tlet type = null;\n\n\tif (name.startsWith('n:')) {\n\t\tname = name.slice(2);\n\t\ttype = 'number';\n\t} else if (name.startsWith('b:')) {\n\t\tname = name.slice(2);\n\t\ttype = 'boolean';\n\t} else if (name.startsWith('i:')) {\n\t\tname = name.slice(2);\n\t\ttype = 'number';\n\t}\n\n\tconst is_array = name.endsWith('[]');\n\tif (is_array) name = name.slice(0, -2);\n\tif (image_coordinate) name += '.' + image_coordinate;\n\n\treturn { name, type, is_array };\n}\n\n/**\n * @param {'number' | 'boolean' | null} type\n * @param {any} value\n * @returns {any}\n */\nexport function coerce_form_value(type, value) {\n\tif (Array.isArray(value)) return value.map((value) => coerce_form_value(type, value));\n\tif (type === 'number') return value === '' ? undefined : parseFloat(value);\n\tif (type === 'boolean') return value === 'on';\n\treturn value;\n}\n\n/** Pass this to set_nested_value to delete the last part of the given path */\nexport const DELETE_KEY = {};\n\n/**\n * Convert `FormData` into a POJO\n * @param {string} form_id\n * @param {FormData} data\n */\nexport function convert_formdata(form_id, data) {\n\t/** @type {Record<string, any>} */\n\tconst result = {};\n\n\tfor (const field_name of data.keys()) {\n\t\t/** @type {any[]} */\n\t\tconst values = data.getAll(field_name);\n\n\t\tconst field = parse_form_key(form_id, field_name);\n\n\t\t// an empty `<input type=\"file\">` will submit a non-existent file, bizarrely\n\t\tconst entries = values.filter(\n\t\t\t(entry) => typeof entry === 'string' || entry.name !== '' || entry.size > 0\n\t\t);\n\t\tif (entries.length === 0 && !field.is_array) continue;\n\n\t\tif (entries.length > 1 && !field.is_array) {\n\t\t\te.form_field_duplicate({ name: field.name, count: String(entries.length) });\n\t\t}\n\n\t\tset_nested_value(\n\t\t\tresult,\n\t\t\tfield,\n\t\t\tcoerce_form_value(field.type, field.is_array ? entries : entries[0])\n\t\t);\n\t}\n\n\treturn result;\n}\n\nexport const BINARY_FORM_CONTENT_TYPE = 'application/x-sveltekit-formdata';\nconst BINARY_FORM_VERSION = 0;\nconst HEADER_BYTES = 1 + 4 + 2;\n/**\n * The binary format is as follows:\n * - 1 byte: Format version\n * - 4 bytes: Length of the header (u32)\n * - 2 bytes: Length of the file offset table (u16)\n * - header: devalue.stringify([data, meta])\n * - file offset table: JSON.stringify([offset1, offset2, ...]) (empty if no files) (offsets start from the end of the table)\n * - file1, file2, ...\n * @param {Record<string, any>} data\n * @param {BinaryFormMeta} meta\n */\nexport function serialize_binary_form(data, meta) {\n\t/** @type {Array<BlobPart>} */\n\tconst blob_parts = [new Uint8Array([BINARY_FORM_VERSION])];\n\n\t/** @type {Array<[file: File, index: number]>} */\n\tconst files = [];\n\n\tconst encoded_header = devalue.stringify([data, meta], {\n\t\tFile: (file) => {\n\t\t\tif (!(file instanceof File)) return;\n\n\t\t\tfiles.push([file, files.length]);\n\t\t\treturn [file.name, file.type, file.size, file.lastModified, files.length - 1];\n\t\t}\n\t});\n\n\tconst encoded_header_buffer = text_encoder.encode(encoded_header);\n\n\tlet encoded_file_offsets = '';\n\tif (files.length) {\n\t\t// Sort small files to the front\n\t\tfiles.sort(([a], [b]) => a.size - b.size);\n\n\t\t/** @type {Array<number>} */\n\t\tconst file_offsets = new Array(files.length);\n\t\tlet start = 0;\n\t\tfor (const [file, index] of files) {\n\t\t\tfile_offsets[index] = start;\n\t\t\tstart += file.size;\n\t\t}\n\t\tencoded_file_offsets = JSON.stringify(file_offsets);\n\t}\n\n\tconst length_buffer = new Uint8Array(4);\n\tconst length_view = new DataView(length_buffer.buffer);\n\n\tlength_view.setUint32(0, encoded_header_buffer.byteLength, true);\n\tblob_parts.push(length_buffer.slice());\n\n\tlength_view.setUint16(0, encoded_file_offsets.length, true);\n\tblob_parts.push(length_buffer.slice(0, 2));\n\n\tblob_parts.push(encoded_header_buffer);\n\tblob_parts.push(encoded_file_offsets);\n\n\tfor (const [file] of files) {\n\t\tblob_parts.push(file);\n\t}\n\n\treturn {\n\t\tblob: new Blob(blob_parts)\n\t};\n}\n\n/**\n * @param {Request} request\n * @param {string} form_id\n * @returns {Promise<{ data: Record<string, any>; meta: BinaryFormMeta; form_data: FormData | null }>}\n */\nexport async function deserialize_binary_form(request, form_id) {\n\tif (request.headers.get('content-type') !== BINARY_FORM_CONTENT_TYPE) {\n\t\tconst form_data = await request.formData();\n\t\treturn { data: convert_formdata(form_id, form_data), meta: {}, form_data };\n\t}\n\tif (!request.body) {\n\t\tthrow deserialize_error('no body');\n\t}\n\n\tconst reader = request.body.getReader();\n\n\t/** @type {Array<Promise<Uint8Array<ArrayBuffer> | undefined>>} */\n\tconst chunks = [];\n\n\t/**\n\t * @param {number} index\n\t * @returns {Promise<Uint8Array<ArrayBuffer> | undefined>}\n\t */\n\tfunction get_chunk(index) {\n\t\tif (index in chunks) return chunks[index];\n\n\t\tlet i = chunks.length;\n\t\twhile (i <= index) {\n\t\t\t// chain reads so only one is ever pending — workerd forbids concurrent reads\n\t\t\tconst previous = chunks[i - 1] ?? Promise.resolve(undefined);\n\t\t\tchunks[i] = previous.then(() => reader.read()).then((chunk) => chunk.value);\n\t\t\ti++;\n\t\t}\n\t\treturn chunks[index];\n\t}\n\n\t/**\n\t * @param {number} offset\n\t * @param {number} length\n\t * @returns {Promise<Uint8Array | null>}\n\t */\n\tasync function get_buffer(offset, length) {\n\t\t/** @type {Uint8Array<ArrayBuffer>[]} */\n\t\tconst parts = [];\n\t\tlet total = 0;\n\t\tfor await (const part of read_range(get_chunk, offset, length)) {\n\t\t\tparts.push(part);\n\t\t\ttotal += part.byteLength;\n\t\t}\n\t\tif (total < length || parts.length === 0) return null;\n\t\t// If the buffer is completely contained in one chunk, return the subarray as-is\n\t\tif (parts.length === 1) return parts[0];\n\n\t\tconst buffer = new Uint8Array(length);\n\t\tlet cursor = 0;\n\t\tfor (const part of parts) {\n\t\t\tbuffer.set(part, cursor);\n\t\t\tcursor += part.byteLength;\n\t\t}\n\t\treturn buffer;\n\t}\n\n\tconst header = await get_buffer(0, HEADER_BYTES);\n\tif (!header) throw deserialize_error('too short');\n\n\tif (header[0] !== BINARY_FORM_VERSION) {\n\t\tthrow deserialize_error(`got version ${header[0]}, expected version ${BINARY_FORM_VERSION}`);\n\t}\n\tconst header_view = new DataView(header.buffer, header.byteOffset, header.byteLength);\n\tconst data_length = header_view.getUint32(1, true);\n\tconst file_offsets_length = header_view.getUint16(5, true);\n\n\t// Validation uses embedded binary header fields (data_length, file_offsets_length)\n\t// rather than Content-Length, which proxies/middleboxes may strip or corrupt.\n\t// See: https://github.com/sveltejs/kit/issues/15299\n\n\t// Read the form data\n\tconst data_buffer = await get_buffer(HEADER_BYTES, data_length);\n\tif (!data_buffer) throw deserialize_error('data too short');\n\n\t/** @type {Array<number | undefined>} */\n\tlet file_offsets;\n\t/** @type {number} */\n\tlet files_start_offset;\n\tif (file_offsets_length > 0) {\n\t\t// Read the file offset table\n\t\tconst file_offsets_buffer = await get_buffer(HEADER_BYTES + data_length, file_offsets_length);\n\t\tif (!file_offsets_buffer) throw deserialize_error('file offset table too short');\n\n\t\tconst parsed_offsets = JSON.parse(text_decoder.decode(file_offsets_buffer));\n\n\t\tif (\n\t\t\t!Array.isArray(parsed_offsets) ||\n\t\t\tparsed_offsets.some((n) => typeof n !== 'number' || !Number.isInteger(n) || n < 0)\n\t\t) {\n\t\t\tthrow deserialize_error('invalid file offset table');\n\t\t}\n\n\t\tfile_offsets = /** @type {Array<number>} */ (parsed_offsets);\n\t\tfiles_start_offset = HEADER_BYTES + data_length + file_offsets_length;\n\t}\n\n\t/** @type {Array<{ offset: number, size: number }>} */\n\tconst file_spans = [];\n\tconst [data, meta] = devalue.parse(text_decoder.decode(data_buffer), {\n\t\tFile: ([name, type, size, last_modified, index]) => {\n\t\t\tif (\n\t\t\t\ttypeof name !== 'string' ||\n\t\t\t\ttypeof type !== 'string' ||\n\t\t\t\t!Number.isSafeInteger(size) ||\n\t\t\t\tsize < 0 ||\n\t\t\t\t!Number.isSafeInteger(last_modified) ||\n\t\t\t\t!Number.isSafeInteger(index) ||\n\t\t\t\tindex < 0\n\t\t\t) {\n\t\t\t\tthrow deserialize_error('invalid file metadata');\n\t\t\t}\n\n\t\t\tlet offset = file_offsets[index];\n\n\t\t\t// Check that the file offset table entry has not been already\n\t\t\t// used. If not, immediately mark it as used.\n\t\t\tif (offset === undefined) {\n\t\t\t\tthrow deserialize_error('duplicate file offset table index');\n\t\t\t}\n\t\t\tfile_offsets[index] = undefined;\n\n\t\t\toffset += files_start_offset;\n\n\t\t\tfile_spans.push({ offset, size });\n\n\t\t\treturn new Proxy(new LazyFile(name, type, size, last_modified, get_chunk, offset), {\n\t\t\t\tgetPrototypeOf() {\n\t\t\t\t\t// Trick validators into thinking this is a normal File\n\t\t\t\t\treturn File.prototype;\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t});\n\n\t// Sort file spans in increasing order primarily by offset\n\t// and secondarily by size (to allow 0-length files).\n\tfile_spans.sort((a, b) => a.offset - b.offset || a.size - b.size);\n\n\t// Check that file spans do not overlap and there are no gaps between them.\n\tfor (let i = 1; i < file_spans.length; i++) {\n\t\tconst previous = file_spans[i - 1];\n\t\tconst current = file_spans[i];\n\n\t\tconst previous_end = previous.offset + previous.size;\n\t\tif (previous_end < current.offset) {\n\t\t\tthrow deserialize_error('gaps in file data');\n\t\t}\n\t\tif (previous_end > current.offset) {\n\t\t\tthrow deserialize_error('overlapping file data');\n\t\t}\n\t}\n\n\t// Read the request body asynchronously so it doesn't stall\n\tvoid (async () => {\n\t\tlet has_more = true;\n\t\twhile (has_more) {\n\t\t\tconst chunk = await get_chunk(chunks.length);\n\t\t\thas_more = !!chunk;\n\t\t}\n\t})().catch(noop); // prevent unhandled rejection potentially crashing the process\n\n\treturn { data, meta, form_data: null };\n}\n/**\n * @param {string} message\n */\nfunction deserialize_error(message) {\n\treturn new SvelteKitError(400, 'Bad Request', `Could not deserialize binary form: ${message}`);\n}\n\n/**\n * Yields the chunks that make up the byte range `[offset, offset + length)`,\n * trimmed to its boundaries. Ends early if the underlying data runs out.\n * @param {(index: number) => Promise<Uint8Array<ArrayBuffer> | undefined>} get_chunk\n * @param {number} offset\n * @param {number} length\n * @returns {AsyncGenerator<Uint8Array<ArrayBuffer>, void, void>}\n */\nasync function* read_range(get_chunk, offset, length) {\n\tlet chunk_start = 0;\n\tfor (let index = 0; ; index++) {\n\t\tconst chunk = await get_chunk(index);\n\t\tif (!chunk) return;\n\n\t\tconst chunk_end = chunk_start + chunk.byteLength;\n\t\tif (chunk_end > offset) {\n\t\t\tyield chunk.subarray(\n\t\t\t\tMath.max(0, offset - chunk_start),\n\t\t\t\tMath.min(chunk.byteLength, offset + length - chunk_start)\n\t\t\t);\n\t\t\tif (offset + length <= chunk_end) return;\n\t\t}\n\t\tchunk_start = chunk_end;\n\t}\n}\n\n/** @implements {File} */\nclass LazyFile {\n\t/** @type {(index: number) => Promise<Uint8Array<ArrayBuffer> | undefined>} */\n\t#get_chunk;\n\t/** @type {number} */\n\t#offset;\n\t/**\n\t * @param {string} name\n\t * @param {string} type\n\t * @param {number} size\n\t * @param {number} last_modified\n\t * @param {(index: number) => Promise<Uint8Array<ArrayBuffer> | undefined>} get_chunk\n\t * @param {number} offset\n\t */\n\tconstructor(name, type, size, last_modified, get_chunk, offset) {\n\t\tthis.name = name;\n\t\tthis.type = type;\n\t\tthis.size = size;\n\t\tthis.lastModified = last_modified;\n\t\tthis.webkitRelativePath = '';\n\t\tthis.#get_chunk = get_chunk;\n\t\tthis.#offset = offset;\n\n\t\t// TODO - hacky, required for private members to be accessed on proxy\n\t\tthis.arrayBuffer = this.arrayBuffer.bind(this);\n\t\tthis.bytes = this.bytes.bind(this);\n\t\tthis.slice = this.slice.bind(this);\n\t\tthis.stream = this.stream.bind(this);\n\t\tthis.text = this.text.bind(this);\n\t}\n\t/** @type {ArrayBuffer | undefined} */\n\t#buffer;\n\tasync arrayBuffer() {\n\t\tthis.#buffer ??= await new Response(this.stream()).arrayBuffer();\n\t\treturn this.#buffer;\n\t}\n\tasync bytes() {\n\t\treturn new Uint8Array(await this.arrayBuffer());\n\t}\n\t/**\n\t * @param {number=} start\n\t * @param {number=} end\n\t * @param {string=} contentType\n\t */\n\tslice(start = 0, end = this.size, contentType = this.type) {\n\t\t// https://github.com/nodejs/node/blob/a5f3cd8cb5ba9e7911d93c5fd3ebc6d781220dd8/lib/internal/blob.js#L240\n\t\tif (start < 0) {\n\t\t\tstart = Math.max(this.size + start, 0);\n\t\t} else {\n\t\t\tstart = Math.min(start, this.size);\n\t\t}\n\n\t\tif (end < 0) {\n\t\t\tend = Math.max(this.size + end, 0);\n\t\t} else {\n\t\t\tend = Math.min(end, this.size);\n\t\t}\n\t\tconst size = Math.max(end - start, 0);\n\t\tconst file = new LazyFile(\n\t\t\tthis.name,\n\t\t\tcontentType,\n\t\t\tsize,\n\t\t\tthis.lastModified,\n\t\t\tthis.#get_chunk,\n\t\t\tthis.#offset + start\n\t\t);\n\n\t\treturn file;\n\t}\n\tstream() {\n\t\tconst range = read_range(this.#get_chunk, this.#offset, this.size);\n\t\tconst size = this.size;\n\t\treturn stream_from_iterable(\n\t\t\t(async function* () {\n\t\t\t\tlet cursor = 0;\n\t\t\t\tfor await (const chunk of range) {\n\t\t\t\t\tcursor += chunk.byteLength;\n\t\t\t\t\tyield chunk;\n\t\t\t\t}\n\t\t\t\tif (cursor < size) throw new Error('incomplete file data');\n\t\t\t})()\n\t\t);\n\t}\n\tasync text() {\n\t\treturn text_decoder.decode(await this.arrayBuffer());\n\t}\n}\n\nconst path_regex = /^[a-zA-Z_$]\\w*(\\.[a-zA-Z_$]\\w*|\\[\\d+\\])*$/;\n\n/**\n * @param {string} path\n */\nexport function split_path(path) {\n\tif (!path_regex.test(path)) {\n\t\te.form_field_invalid_name({ name: path });\n\t}\n\n\treturn path.split(/\\.|\\[|\\]/).filter(Boolean);\n}\n\n/**\n * Check if a property key is dangerous and could lead to prototype pollution\n * @param {string} key\n */\nfunction check_prototype_pollution(key) {\n\tif (key === '__proto__' || key === 'constructor' || key === 'prototype') {\n\t\te.form_field_forbidden_key({ key });\n\t}\n}\n\n/**\n * Sets a value in a nested object using an array of keys, mutating the original object.\n * @param {Record<string, any>} object\n * @param {string[]} keys\n * @param {any} value\n */\nexport function deep_set(object, keys, value) {\n\tlet current = object;\n\n\tfor (let i = 0; i < keys.length - 1; i += 1) {\n\t\tconst key = keys[i];\n\n\t\tcheck_prototype_pollution(key);\n\n\t\tconst is_array = /^\\d+$/.test(keys[i + 1]);\n\t\tconst inner = Object.hasOwn(current, key) ? current[key] : undefined;\n\t\tconst exists = inner != null;\n\n\t\tif (exists && is_array !== Array.isArray(inner)) {\n\t\t\te.form_field_array_conflict({ key: keys[i + 1] });\n\t\t}\n\n\t\tif (!exists) {\n\t\t\tif (value === DELETE_KEY) {\n\t\t\t\t// don't create the nested structure if we want to delete the key anyway\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tcurrent[key] = is_array ? [] : {};\n\t\t}\n\n\t\tcurrent = current[key];\n\t}\n\n\tconst final_key = keys[keys.length - 1];\n\tcheck_prototype_pollution(final_key);\n\n\tif (value === DELETE_KEY) {\n\t\tdelete current[final_key];\n\t} else {\n\t\tcurrent[final_key] = value;\n\t}\n}\n\n/**\n * @param {StandardSchemaV1.Issue} issue\n * @param {boolean} server Whether this issue came from server validation\n */\nexport function normalize_issue(issue, server = false) {\n\t/** @type {InternalRemoteFormIssue} */\n\tconst normalized = { name: '', path: [], message: issue.message, server };\n\n\tif (issue.path !== undefined) {\n\t\tlet name = '';\n\n\t\tfor (const segment of issue.path) {\n\t\t\tconst key = /** @type {string | number} */ (\n\t\t\t\ttypeof segment === 'object' ? segment.key : segment\n\t\t\t);\n\n\t\t\tnormalized.path.push(key);\n\n\t\t\tif (typeof key === 'number') {\n\t\t\t\tname += `[${key}]`;\n\t\t\t} else if (typeof key === 'string') {\n\t\t\t\tname += name === '' ? key : '.' + key;\n\t\t\t}\n\t\t}\n\n\t\tnormalized.name = name;\n\t}\n\n\treturn normalized;\n}\n\n/**\n * @param {InternalRemoteFormIssue[]} issues\n */\nexport function flatten_issues(issues) {\n\t/** @type {Record<string, InternalRemoteFormIssue[]>} */\n\tconst result = Object.create(null);\n\n\tfor (const issue of issues) {\n\t\t(result.$ ??= []).push(issue);\n\n\t\tlet name = '';\n\n\t\tif (issue.path !== undefined) {\n\t\t\tfor (const key of issue.path) {\n\t\t\t\tif (typeof key === 'number') {\n\t\t\t\t\tname += `[${key}]`;\n\t\t\t\t} else if (typeof key === 'string') {\n\t\t\t\t\tname += name === '' ? key : '.' + key;\n\t\t\t\t}\n\n\t\t\t\t(result[name] ??= []).push(issue);\n\t\t\t}\n\t\t}\n\t}\n\n\treturn result;\n}\n\n/**\n * Gets a nested value from an object using a path array\n * @param {Record<string, any>} object\n * @param {(string | number)[]} path\n * @returns {any}\n */\nexport function deep_get(object, path) {\n\tlet current = object;\n\tfor (const key of path) {\n\t\tif (current === null || typeof current !== 'object' || !Object.hasOwn(current, key)) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tcurrent = current[key];\n\t}\n\treturn current;\n}\n\n/** name prefixes that tell the server which type to coerce a submitted string to */\nconst type_prefixes = /** @type {Record<string, string | undefined>} */ ({\n\tnumber: 'n:',\n\tboolean: 'b:'\n});\n\n/**\n * adds props; a function becomes a getter that is computed each time it is read\n * @param {Record<string, any>} base_props\n * @param {Record<string, unknown>} props\n */\nfunction add_props(base_props, props) {\n\tfor (const prop in props) {\n\t\tconst value = props[prop];\n\t\tif (typeof value === 'function') {\n\t\t\tObject.defineProperty(base_props, prop, {\n\t\t\t\tenumerable: true,\n\t\t\t\tget: /** @type {() => unknown} */ (value)\n\t\t\t});\n\t\t} else {\n\t\t\tbase_props[prop] = value;\n\t\t}\n\t}\n\treturn base_props;\n}\n\n/**\n * @param {string} type\n * @param {boolean} is_array\n * @param {unknown} input_value\n */\nfunction get_type_prefix(type, is_array, input_value) {\n\tif (type === 'number' || type === 'range') return 'n:';\n\tif (type === 'image') return 'i:';\n\tif (type === 'checkbox' && !is_array) return 'b:';\n\tif (type === 'hidden' || type === 'submit') return type_prefixes[typeof input_value] ?? '';\n\treturn '';\n}\n\n/**\n * A deep-clone implementation specifically for form data, where\n * we don't need to worry about cycles and whatnot\n * @param {any} value\n * @returns {any}\n */\nfunction deep_clone(value) {\n\tif (value !== null && typeof value === 'object') {\n\t\tif (value instanceof Date) {\n\t\t\treturn new Date(value.getTime());\n\t\t}\n\n\t\tif (value instanceof File) {\n\t\t\treturn value;\n\t\t}\n\n\t\tif (Array.isArray(value)) {\n\t\t\treturn value.map(deep_clone);\n\t\t}\n\n\t\t/** @type {Record<string, any>} */\n\t\tconst clone = {};\n\t\tfor (const key of Object.keys(value)) {\n\t\t\tclone[key] = deep_clone(value[key]);\n\t\t}\n\n\t\treturn clone;\n\t}\n\n\treturn value;\n}\n\nconst warned_sites = new Set();\n\n// keyed by the stack, so every place that enumerates warns once with its call site\nconst warn_no_keys = () => {\n\t// Capture the original call site, not a generated diagnostic or factory's frames.\n\tconst error = new Error();\n\tif (warned_sites.has(error.stack)) return;\n\twarned_sites.add(error.stack);\n\tw.form_fields_enumerated();\n};\n\n// fields are created as they are accessed, so there is nothing to enumerate\n/** @type {ProxyHandler<object> | null} */\nconst dev_traps = DEV\n\t? {\n\t\t\thas(target, prop) {\n\t\t\t\tif (typeof prop !== 'symbol') warn_no_keys();\n\t\t\t\treturn prop in target;\n\t\t\t},\n\t\t\townKeys(target) {\n\t\t\t\twarn_no_keys();\n\t\t\t\treturn Reflect.ownKeys(target);\n\t\t\t}\n\t\t}\n\t: null;\n\n/** @param {InternalRemoteFormIssue} issue */\nconst public_issue = (issue) => ({ path: issue.path, message: issue.message });\n\n/** @typedef {{\n * \tform_id: string,\n * \tget: () => Record<string, any>,\n * \tset: (path: (string | number)[], value: any) => void,\n * \tget_issues: (path?: (string | number)[], all?: boolean) => Record<string, InternalRemoteFormIssue[]>,\n * \tget_touched: () => Record<string, boolean>,\n * \tget_dirty: () => Record<string, boolean>\n * }} FieldContext */\n\n/**\n * @param {FieldContext} context\n * @param {(string | number)[]} path\n * @param {string} prop\n * @returns {any} a method of the field at `path`, or undefined for a nested field\n */\nfunction create_field_method(context, path, prop) {\n\tswitch (prop) {\n\t\tcase 'set':\n\t\t\treturn (/** @type {any} */ value) => {\n\t\t\t\tcontext.set(path, value);\n\t\t\t\treturn value;\n\t\t\t};\n\t\tcase 'value':\n\t\t\treturn () => deep_clone(deep_get(context.get(), path));\n\t\tcase 'issues':\n\t\tcase 'allIssues': {\n\t\t\tconst key = build_path_string(path);\n\t\t\tconst all = prop === 'allIssues';\n\n\t\t\treturn () => {\n\t\t\t\tconst issues = context.get_issues(path, all)[key === '' ? '$' : key];\n\t\t\t\tif (all) return issues?.map(public_issue);\n\t\t\t\tconst own = issues?.filter((issue) => issue.name === key).map(public_issue);\n\t\t\t\treturn own?.length ? own : undefined;\n\t\t\t};\n\t\t}\n\t\tcase 'touched':\n\t\tcase 'dirty': {\n\t\t\tconst key = build_path_string(path);\n\n\t\t\treturn () => {\n\t\t\t\tconst object = prop === 'dirty' ? context.get_dirty() : context.get_touched();\n\t\t\t\tif (Object.hasOwn(object, key)) return true;\n\t\t\t\tfor (const candidate in object) {\n\t\t\t\t\tif (!Object.hasOwn(object, candidate)) continue;\n\t\t\t\t\tif (key === '') return true;\n\t\t\t\t\tif (!candidate.startsWith(key)) continue;\n\t\t\t\t\tconst next = candidate[key.length];\n\t\t\t\t\tif (next === '.' || next === '[') return true;\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t};\n\t\t}\n\t\tcase 'as': {\n\t\t\tconst key = build_path_string(path);\n\n\t\t\t/**\n\t\t\t * the field's value, or `fallback` until the field has been edited\n\t\t\t * (without a fallback there is nothing to suppress, so `dirty` is not read)\n\t\t\t * @param {unknown} [fallback]\n\t\t\t */\n\t\t\tconst read = (fallback) =>\n\t\t\t\tdeep_get(context.get(), path) ??\n\t\t\t\t(fallback !== undefined && Object.hasOwn(context.get_dirty(), key) ? undefined : fallback);\n\n\t\t\t/**\n\t\t\t * @param {string} type\n\t\t\t * @param {unknown} [input_value]\n\t\t\t * @param {boolean} [checked]\n\t\t\t */\n\t\t\treturn (type, input_value, checked) => {\n\t\t\t\tconst is_array =\n\t\t\t\t\ttype === 'file multiple' ||\n\t\t\t\t\ttype === 'select multiple' ||\n\t\t\t\t\t(type === 'checkbox' && typeof input_value === 'string');\n\n\t\t\t\tconst type_prefix = get_type_prefix(type, is_array, input_value);\n\n\t\t\t\t// Base properties for all input types\n\t\t\t\t/** @type {Record<string, any>} */\n\t\t\t\tconst base_props = {\n\t\t\t\t\tname: type_prefix + key + (is_array ? '[]' : '') + '/' + context.form_id,\n\t\t\t\t\tget 'aria-invalid'() {\n\t\t\t\t\t\tconst issues = context.get_issues();\n\t\t\t\t\t\treturn key in issues ? 'true' : undefined;\n\t\t\t\t\t}\n\t\t\t\t};\n\n\t\t\t\t// Add type attribute only for non-text inputs and non-select elements\n\t\t\t\tif (type !== 'text' && type !== 'select' && type !== 'select multiple') {\n\t\t\t\t\tbase_props.type = type === 'file multiple' ? 'file' : type;\n\t\t\t\t}\n\n\t\t\t\t// Handle submit and hidden inputs\n\t\t\t\tif (type === 'submit' || type === 'hidden') {\n\t\t\t\t\tif (DEV) {\n\t\t\t\t\t\tif (input_value === null || input_value === undefined) {\n\t\t\t\t\t\t\te.form_input_missing_value({ type: `\\`${type}\\`` });\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\treturn add_props(base_props, {\n\t\t\t\t\t\tvalue: typeof input_value === 'boolean' ? (input_value ? 'on' : 'off') : input_value\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\t// Handle select inputs\n\t\t\t\tif (type === 'select' || type === 'select multiple') {\n\t\t\t\t\treturn add_props(base_props, {\n\t\t\t\t\t\tmultiple: is_array,\n\t\t\t\t\t\tvalue: () => {\n\t\t\t\t\t\t\tconst value = read(input_value);\n\t\t\t\t\t\t\t// copied, so the state array can't be edited through the props\n\t\t\t\t\t\t\treturn Array.isArray(value) ? [...value] : value;\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\t// Handle checkbox inputs\n\t\t\t\tif (type === 'checkbox' || type === 'radio') {\n\t\t\t\t\t// radio and checkbox array inputs take their option as the second argument\n\t\t\t\t\t// and whether it is checked as the third, a single checkbox only the latter\n\t\t\t\t\tconst has_option = type === 'radio' || is_array;\n\n\t\t\t\t\tif (DEV && has_option && !input_value) {\n\t\t\t\t\t\te.form_input_missing_value({ type: type === 'radio' ? 'Radio' : 'Checkbox array' });\n\t\t\t\t\t}\n\n\t\t\t\t\tif (has_option) {\n\t\t\t\t\t\tbase_props.value = input_value ?? 'on';\n\t\t\t\t\t} else {\n\t\t\t\t\t\tchecked = /** @type {boolean | undefined} */ (input_value);\n\t\t\t\t\t}\n\n\t\t\t\t\treturn add_props(base_props, {\n\t\t\t\t\t\tdefaultChecked: checked,\n\t\t\t\t\t\tchecked: () => {\n\t\t\t\t\t\t\tconst value = read();\n\t\t\t\t\t\t\tif (value == null) return read(checked);\n\t\t\t\t\t\t\tif (type === 'radio') return value === input_value;\n\t\t\t\t\t\t\tif (is_array) return /** @type {unknown[]} */ (value).includes(input_value);\n\t\t\t\t\t\t\treturn value;\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\t// Handle file inputs\n\t\t\t\tif (type === 'file' || type === 'file multiple') {\n\t\t\t\t\treturn add_props(base_props, {\n\t\t\t\t\t\tmultiple: is_array,\n\t\t\t\t\t\tfiles: () => {\n\t\t\t\t\t\t\tconst value = read();\n\t\t\t\t\t\t\tconst files = value instanceof File ? [value] : value;\n\t\t\t\t\t\t\tif (!Array.isArray(files) || !files.every((f) => f instanceof File)) return null;\n\n\t\t\t\t\t\t\t// a FileList-like object where DataTransfer does not exist\n\t\t\t\t\t\t\tif (typeof DataTransfer === 'undefined') {\n\t\t\t\t\t\t\t\treturn Object.assign({ length: files.length }, files);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tconst transfer = new DataTransfer();\n\t\t\t\t\t\t\tfor (const file of files) transfer.items.add(file);\n\t\t\t\t\t\t\treturn transfer.files;\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\tif (type === 'image') return base_props;\n\n\t\t\t\t// Handle all other input types (text, number, etc.)\n\t\t\t\treturn add_props(base_props, {\n\t\t\t\t\tdefaultValue: input_value,\n\t\t\t\t\tvalue: () => String(read(input_value) ?? '')\n\t\t\t\t});\n\t\t\t};\n\t\t}\n\t}\n}\n\n/**\n * Creates a proxy-based field accessor for form data\n * @param {FieldContext} context\n * @param {any} target - Function or empty POJO\n * @param {(string | number)[]} path - Current access path\n * @returns {any} Proxy object with name(), value(), and issues() methods\n */\nexport function create_field_proxy(context, target = {}, path = []) {\n\treturn new Proxy(target, {\n\t\t...dev_traps,\n\t\tget(target, prop) {\n\t\t\tif (typeof prop === 'symbol') return target[prop];\n\n\t\t\t// array access like jobs[0]\n\t\t\tconst next = [...path, /^\\d+$/.test(prop) ? parseInt(prop, 10) : prop];\n\n\t\t\treturn create_field_proxy(context, create_field_method(context, path, prop), next);\n\t\t}\n\t});\n}\n\n/**\n * Builds a path string from an array of path segments\n * @param {(string | number)[]} path\n * @returns {string}\n */\nexport function build_path_string(path) {\n\tlet result = '';\n\n\tfor (const segment of path) {\n\t\tif (typeof segment === 'number') {\n\t\t\tresult += `[${segment}]`;\n\t\t} else {\n\t\t\tresult += result === '' ? segment : '.' + segment;\n\t\t}\n\t}\n\n\treturn result;\n}\n","import { BINARY_FORM_CONTENT_TYPE } from '../runtime/form-utils.js';\n\n/**\n * Given an Accept header and a list of possible content types, pick\n * the most suitable one to respond with\n * @param {string} accept\n * @param {string[]} types\n */\nexport function negotiate(accept, types) {\n\t/** @type {Array<{ type: string, subtype: string, q: number, i: number }>} */\n\tconst parts = [];\n\n\taccept.split(',').forEach((str, i) => {\n\t\tconst match = /^[ \\t]*([^/ \\t]+)\\/([^; \\t]+)[ \\t]*(?:;[ \\t]*q=([0-9.]+))?/.exec(str);\n\n\t\t// no match equals invalid header — ignore\n\t\tif (match) {\n\t\t\tconst [, type, subtype, q = '1'] = match;\n\t\t\tparts.push({ type, subtype, q: +q, i });\n\t\t}\n\t});\n\n\tparts.sort((a, b) => {\n\t\tif (a.q !== b.q) {\n\t\t\treturn b.q - a.q;\n\t\t}\n\n\t\tif ((a.subtype === '*') !== (b.subtype === '*')) {\n\t\t\treturn a.subtype === '*' ? 1 : -1;\n\t\t}\n\n\t\tif ((a.type === '*') !== (b.type === '*')) {\n\t\t\treturn a.type === '*' ? 1 : -1;\n\t\t}\n\n\t\treturn a.i - b.i;\n\t});\n\n\tlet accepted;\n\tlet min_priority = Infinity;\n\n\tfor (const mimetype of types) {\n\t\tconst [type, subtype] = mimetype.split('/');\n\t\tconst priority = parts.findIndex(\n\t\t\t(part) =>\n\t\t\t\t(part.type === type || part.type === '*') &&\n\t\t\t\t(part.subtype === subtype || part.subtype === '*')\n\t\t);\n\n\t\tif (priority !== -1 && priority < min_priority) {\n\t\t\taccepted = mimetype;\n\t\t\tmin_priority = priority;\n\t\t}\n\t}\n\n\treturn accepted;\n}\n\n/**\n * Returns `true` if a `content-type` header value is one of the given types, ignoring\n * parameters such as `charset` and comparing case-insensitively\n * @param {string | null | undefined} header\n * @param {...string} types\n */\nexport function matches_content_type(header, ...types) {\n\tconst type = header?.split(';', 1)[0].trim() ?? '';\n\treturn types.includes(type.toLowerCase());\n}\n\n/**\n * @param {Request} request\n */\nexport function is_form_content_type(request) {\n\t// These content types must be protected against CSRF\n\t// https://developer.mozilla.org/en-US/docs/Web/API/HTMLFormElement/enctype\n\treturn matches_content_type(\n\t\trequest.headers.get('content-type'),\n\t\t'application/x-www-form-urlencoded',\n\t\t'multipart/form-data',\n\t\t'text/plain',\n\t\tBINARY_FORM_CONTENT_TYPE\n\t);\n}\n","/** @import { Transport } from '@sveltejs/kit/hooks' */\nimport * as devalue from 'devalue';\nimport { DEV } from 'esm-env';\n\n/** @type {(thing: any) => string} */\nexport let uneval = () => {\n\tthrow new Error(DEV ? 'called uneval before init_transport' : '');\n};\n\n/** @type {(data: any) => string} */\nexport let stringify = () => {\n\tthrow new Error(DEV ? 'called stringify before init_transport' : '');\n};\n\n/** @type {(data: string) => any} */\nexport let parse = () => {\n\tthrow new Error(DEV ? 'called parse before init_transport' : '');\n};\n\n/** @type {Record<string, (data: any) => any>} */\nexport let encoders = {};\n\n/** @type {Record<string, (data: any) => any>} */\nexport let decoders = {};\n\nexport let has_custom_transporters = false;\n\n/**\n *\n * @param {Transport} transport\n */\nexport function init_transport(transport) {\n\tconst transporters = Object.entries(transport);\n\n\thas_custom_transporters = transporters.length > 0;\n\n\t/** @param {unknown} thing */\n\tconst replacer = (thing) => {\n\t\tfor (const key of Object.keys(transport)) {\n\t\t\tconst encoded = transport[key].encode(thing);\n\t\t\tif (encoded) {\n\t\t\t\treturn `app.decode('${key}', ${devalue.uneval(encoded, replacer)})`;\n\t\t\t}\n\t\t}\n\t};\n\n\tencoders = Object.fromEntries(transporters.map(([k, v]) => [k, v.encode]));\n\tdecoders = Object.fromEntries(transporters.map(([k, v]) => [k, v.decode]));\n\n\tuneval = (data) => devalue.uneval(data, replacer);\n\tstringify = (data) => devalue.stringify(data, encoders);\n\tparse = (data) => devalue.parse(data, decoders);\n}\n","import * as devalue from 'devalue';\nimport { base64_decode, base64_encode, text_decoder, text_encoder } from './utils.js';\nimport { decoders, encoders } from '#app/internal/transport';\nimport * as e from '../messages/shared-errors.js';\nimport * as w from '../messages/shared-warnings.js';\n\n/**\n * @param {string} route_id\n * @param {string} dep\n */\nexport function validate_depends(route_id, dep) {\n\tconst match = /^(moz-icon|view-source|jar):/.exec(dep);\n\tif (match) {\n\t\tw.depends_special_scheme({ route: route_id, dependency: dep, scheme: match[1] });\n\t}\n}\n\n/**\n * Same-origin urls are keyed by path, so prerendered pages can be served from any origin\n * @param {URL} url\n * @param {{ origin: string }} page\n */\nexport function fetch_cache_url(url, page) {\n\treturn url.origin === page.origin ? url.href.slice(page.origin.length) : url.href;\n}\n\nexport const INVALIDATED_PARAM = 'x-sveltekit-invalidated';\n\nexport const TRAILING_SLASH_PARAM = 'x-sveltekit-trailing-slash';\n\n/**\n * @param {any} data\n * @param {string} [location_description]\n */\nexport function validate_load_response(data, location_description) {\n\tif (data != null && Object.getPrototypeOf(data) !== Object.prototype) {\n\t\te.load_invalid_response({\n\t\t\tlocation: String(location_description),\n\t\t\ttype:\n\t\t\t\ttypeof data !== 'object'\n\t\t\t\t\t? `a ${typeof data}`\n\t\t\t\t\t: data instanceof Response\n\t\t\t\t\t\t? 'a Response object'\n\t\t\t\t\t\t: Array.isArray(data)\n\t\t\t\t\t\t\t? 'an array'\n\t\t\t\t\t\t\t: 'a non-plain object'\n\t\t});\n\t}\n}\n\nconst object_proto_names = /* @__PURE__ */ Object.getOwnPropertyNames(Object.prototype)\n\t.sort()\n\t.join('\\0');\n\n/**\n * @param {unknown} thing\n * @returns {thing is Record<PropertyKey, unknown>}\n */\nfunction is_plain_object(thing) {\n\tif (typeof thing !== 'object' || thing === null) return false;\n\tconst proto = Object.getPrototypeOf(thing);\n\n\treturn (\n\t\tproto === Object.prototype ||\n\t\tproto === null ||\n\t\tObject.getPrototypeOf(proto) === null ||\n\t\tObject.getOwnPropertyNames(proto).sort().join('\\0') === object_proto_names\n\t);\n}\n\n/**\n * @param {Record<string, any>} value\n * @param {Map<object, any>} clones\n */\nfunction to_sorted(value, clones) {\n\tconst clone = Object.getPrototypeOf(value) === null ? Object.create(null) : {};\n\tclones.set(value, clone);\n\tObject.defineProperty(clone, remote_arg_marker, { value: true });\n\n\tfor (const key of Object.keys(value).sort()) {\n\t\tconst property = value[key];\n\t\tObject.defineProperty(clone, key, {\n\t\t\tvalue: clones.get(property) ?? property,\n\t\t\tenumerable: true,\n\t\t\tconfigurable: true,\n\t\t\twritable: true\n\t\t});\n\t}\n\n\treturn clone;\n}\n\n// \"sveltekit remote arg\"\nconst remote_object = '__skrao';\nconst remote_map = '__skram';\nconst remote_set = '__skras';\nconst remote_file = '__skraf';\nconst remote_promise_guard = '__skrap';\nconst remote_regex_guard = '__skrag';\nconst remote_arg_marker = Symbol(remote_object);\n\n/**\n * @param {boolean} sort\n */\nfunction create_remote_arg_reducers(sort) {\n\t/** @type {Record<string, (value: unknown) => unknown>} */\n\tconst remote_fns_reducers = {\n\t\t/** @param {unknown} value */\n\t\t[remote_regex_guard]: (value) => {\n\t\t\tif (value instanceof RegExp) {\n\t\t\t\te.remote_argument_unsupported({ type: 'Regular expressions' });\n\t\t\t}\n\t\t}\n\t};\n\n\tif (sort) {\n\t\tconst clones = new Map();\n\n\t\t/** @type {(value: unknown) => Array<[unknown, unknown]> | undefined} */\n\t\tremote_fns_reducers[remote_map] = (value) => {\n\t\t\tif (!(value instanceof Map)) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t/** @type {Array<[string, string]>} */\n\t\t\tconst entries = [];\n\n\t\t\tfor (const [key, val] of value) {\n\t\t\t\tentries.push([stringify(key), stringify(val)]);\n\t\t\t}\n\n\t\t\treturn entries.sort(([a1, a2], [b1, b2]) => {\n\t\t\t\tif (a1 < b1) return -1;\n\t\t\t\tif (a1 > b1) return 1;\n\t\t\t\tif (a2 < b2) return -1;\n\t\t\t\tif (a2 > b2) return 1;\n\t\t\t\treturn 0;\n\t\t\t});\n\t\t};\n\n\t\t/** @type {(value: unknown) => unknown[] | undefined} */\n\t\tremote_fns_reducers[remote_set] = (value) => {\n\t\t\tif (!(value instanceof Set)) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t/** @type {string[]} */\n\t\t\tconst items = [];\n\n\t\t\tfor (const item of value) {\n\t\t\t\titems.push(stringify(item));\n\t\t\t}\n\n\t\t\titems.sort();\n\t\t\treturn items;\n\t\t};\n\n\t\t/** @type {(value: unknown) => Record<PropertyKey, unknown> | undefined} */\n\t\tremote_fns_reducers[remote_object] = (value) => {\n\t\t\tif (!is_plain_object(value)) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (Object.hasOwn(value, remote_arg_marker)) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (clones.has(value)) {\n\t\t\t\treturn clones.get(value);\n\t\t\t}\n\n\t\t\treturn to_sorted(value, clones);\n\t\t};\n\t}\n\n\tconst all_reducers = { ...encoders, ...remote_fns_reducers };\n\n\t/** @type {(value: unknown) => string} */\n\tconst stringify = (value) => devalue.stringify(value, all_reducers);\n\n\treturn all_reducers;\n}\n\nfunction create_remote_arg_revivers() {\n\tconst remote_fns_revivers = {\n\t\t/** @type {(value: unknown) => unknown} */\n\t\t[remote_object]: (value) => value,\n\t\t/** @type {(value: unknown) => Map<unknown, unknown>} */\n\t\t[remote_map]: (value) => {\n\t\t\tif (!Array.isArray(value)) {\n\t\t\t\tthrow new Error('Invalid data for Map reviver');\n\t\t\t}\n\n\t\t\tconst map = new Map();\n\n\t\t\tfor (const item of value) {\n\t\t\t\tif (\n\t\t\t\t\t!Array.isArray(item) ||\n\t\t\t\t\titem.length !== 2 ||\n\t\t\t\t\ttypeof item[0] !== 'string' ||\n\t\t\t\t\ttypeof item[1] !== 'string'\n\t\t\t\t) {\n\t\t\t\t\tthrow new Error('Invalid data for Map reviver');\n\t\t\t\t}\n\t\t\t\tconst [key, val] = item;\n\t\t\t\tmap.set(parse(key), parse(val));\n\t\t\t}\n\n\t\t\treturn map;\n\t\t},\n\t\t/** @type {(value: unknown) => Set<unknown>} */\n\t\t[remote_set]: (value) => {\n\t\t\tif (!Array.isArray(value)) {\n\t\t\t\tthrow new Error('Invalid data for Set reviver');\n\t\t\t}\n\n\t\t\tconst set = new Set();\n\n\t\t\tfor (const item of value) {\n\t\t\t\tif (typeof item !== 'string') {\n\t\t\t\t\tthrow new Error('Invalid data for Set reviver');\n\t\t\t\t}\n\t\t\t\tset.add(parse(item));\n\t\t\t}\n\n\t\t\treturn set;\n\t\t},\n\t\t/** @type {(value: any) => File} */\n\t\t[remote_file]: (value) => {\n\t\t\tif (\n\t\t\t\t!value ||\n\t\t\t\ttypeof value !== 'object' ||\n\t\t\t\ttypeof value.name !== 'string' ||\n\t\t\t\ttypeof value.type !== 'string' ||\n\t\t\t\ttypeof value.size !== 'number' ||\n\t\t\t\ttypeof value.lastModified !== 'number' ||\n\t\t\t\t!(value.data instanceof ArrayBuffer)\n\t\t\t) {\n\t\t\t\tthrow new Error('Invalid data for File reviver');\n\t\t\t}\n\n\t\t\tconst { data, name, ...meta } = value;\n\n\t\t\treturn new File([data], name, meta);\n\t\t}\n\t};\n\n\tconst all_revivers = { ...decoders, ...remote_fns_revivers };\n\n\t/** @type {(data: string) => unknown} */\n\tconst parse = (data) => devalue.parse(data, all_revivers);\n\n\treturn all_revivers;\n}\n\n/**\n * Stringifies the argument (if any) for a remote function in such a way that\n * it is both a valid URL and a valid file name (necessary for prerendering).\n * @param {any} value\n */\nexport function stringify_remote_arg(value) {\n\tif (value === undefined) return '';\n\n\t// If people hit file/url size limits, we can look into using something like compress_and_encode_text from svelte.dev beyond a certain size\n\tconst json = devalue.stringify(value, create_remote_arg_reducers(true));\n\n\treturn url_friendly_base64_encode(json);\n}\n\n/**\n * Stringifies command arguments, including `File` objects.\n * @param {any} value\n */\nexport async function stringify_command_arg(value) {\n\tif (value === undefined) return '';\n\n\tconst reducers = create_remote_arg_reducers(false);\n\n\t/** @type {Set<Promise<any>>} */\n\tconst allowed_promises = new Set();\n\n\t/** @param {any} value */\n\treducers[remote_file] = (value) => {\n\t\tif (value instanceof File) {\n\t\t\tconst promise = value.arrayBuffer().then((data) => ({\n\t\t\t\tdata,\n\t\t\t\tlastModified: value.lastModified,\n\t\t\t\tname: value.name,\n\t\t\t\tsize: value.size,\n\t\t\t\ttype: value.type\n\t\t\t}));\n\n\t\t\tallowed_promises.add(promise);\n\n\t\t\treturn promise;\n\t\t}\n\t};\n\n\t// we don't want to allow arbitrary promises, because they won't\n\t// show up as promises on the other side. this is something\n\t// we could potentially change in future. stringifyAsync\n\t// will await them, so we need to explicitly deny them\n\t/** @param {unknown} value */\n\treducers[remote_promise_guard] = (value) => {\n\t\tif (value instanceof Promise && !allowed_promises.has(value)) {\n\t\t\te.remote_argument_unsupported({ type: 'Promises' });\n\t\t}\n\t};\n\n\tconst json = await devalue.stringifyAsync(value, reducers);\n\n\treturn url_friendly_base64_encode(json);\n}\n\n/**\n * Base64-encodes `string` in such a way that the result is safe to use\n * as both a URI component and a filename\n * @param {string} string\n */\nfunction url_friendly_base64_encode(string) {\n\tconst bytes = text_encoder.encode(string);\n\t// TODO replace with `bytes.toBase64({ alphabet: 'base64url', omitPadding: true })` when we require Node >= 25\n\treturn base64_encode(bytes).replaceAll('=', '').replaceAll('+', '-').replaceAll('/', '_');\n}\n\n/**\n * Parses the argument (if any) for a remote function\n * @param {string} string\n */\nexport function parse_remote_arg(string) {\n\tif (!string) return undefined;\n\n\tconst json_string = text_decoder.decode(\n\t\t// TODO replace with `Uint8Array.fromBase64(string, { alphabet: 'base64url' })` when we require Node >= 25\n\t\t// no need to add back `=` characters, atob can handle it\n\t\tbase64_decode(string.replaceAll('-', '+').replaceAll('_', '/'))\n\t);\n\n\treturn devalue.parse(json_string, create_remote_arg_revivers());\n}\n\n/**\n * @param {string} id\n * @param {string} payload\n */\nexport function create_remote_key(id, payload) {\n\treturn id + '/' + payload;\n}\n\n/**\n * @param {string} key\n * @returns {{ id: string; payload: string }}\n */\nexport function split_remote_key(key) {\n\tconst i = key.lastIndexOf('/');\n\n\tif (i === -1) {\n\t\tthrow new Error(`Invalid remote key: ${key}`);\n\t}\n\n\treturn {\n\t\tid: key.slice(0, i),\n\t\tpayload: key.slice(i + 1)\n\t};\n}\n","import { HttpError, SvelteKitError } from '@sveltejs/kit/internal';\nimport * as w from '../messages/shared-warnings.js';\n\n/**\n * For times when you need to throw an error, but without\n * displaying a useless stack trace (since the developer\n * can't do anything useful with it)\n * @param {string} message\n */\nexport function stackless(message) {\n\tconst error = new Error(message);\n\terror.stack = '';\n\treturn error;\n}\n\n/**\n * @param {Error} error\n * @param {string} stack\n * @returns {string | undefined}\n */\nexport function set_error_stack(error, stack) {\n\ttry {\n\t\t// Unlike assignment in strict mode, Reflect.set returns false for a read-only property\n\t\tReflect.set(error, 'stack', stack);\n\t} catch {\n\t\t// A custom setter or proxy trap may still throw\n\t}\n\n\treturn error.stack;\n}\n\n/**\n * @param {unknown} err\n * @return {Error}\n */\nexport function coalesce_to_error(err) {\n\treturn err instanceof Error ||\n\t\t(err && /** @type {any} */ (err).name && /** @type {any} */ (err).message)\n\t\t? /** @type {Error} */ (err)\n\t\t: new Error(JSON.stringify(err));\n}\n\n/**\n * This is an identity function that exists to make TypeScript less\n * paranoid about people throwing things that aren't errors, which\n * frankly is not something we should care about\n * @param {unknown} error\n */\nexport function normalize_error(error) {\n\treturn /** @type {import('../exports/internal/shared.js').Redirect | HttpError | SvelteKitError | Error} */ (\n\t\terror\n\t);\n}\n\n/**\n * @param {unknown} error\n */\nexport function get_status(error) {\n\treturn error instanceof HttpError || error instanceof SvelteKitError ? error.status : 500;\n}\n\n/**\n * Adds development-only compatibility accessors for the former top-level `status` and `message`\n * properties of the `handleError` hook input.\n * @template {object} T\n * @param {T} input\n * @param {{ status: number; message: string }} fallback\n * @returns {T}\n */\nexport function add_deprecated_handle_error_properties(input, fallback) {\n\tObject.defineProperties(input, {\n\t\tstatus: {\n\t\t\tget() {\n\t\t\t\tw.handle_error_status_deprecated();\n\t\t\t\treturn fallback.status;\n\t\t\t}\n\t\t},\n\t\tmessage: {\n\t\t\tget() {\n\t\t\t\tw.handle_error_message_deprecated();\n\t\t\t\treturn fallback.message;\n\t\t\t}\n\t\t}\n\t});\n\n\treturn input;\n}\n","/* This file is generated by scripts/process-messages/index.js. Do not edit! */\n\nimport { DEV } from 'esm-env';\nimport { bold, normal } from './internal/shared.js';\n\n/**\n * `cache-control` header contains empty directives. (While parsing `%value%`.)\n * @param {{ \"value\": string }} _values\n */\nexport function cache_control_empty_directive(_values) {\n\tif (DEV) {\n\t\tconsole.warn(\n\t\t\t`%c[sveltekit] ${'cache_control_empty_directive'}\\n%c${`\\`cache-control\\` header contains empty directives. (While parsing \\`${_values.value}\\`.)`}\\nhttps://svelte.dev/e/kit/${'cache_control_empty_directive'}`,\n\t\t\tbold,\n\t\t\tnormal\n\t\t);\n\t} else {\n\t\tconsole.warn('https://svelte.dev/e/kit/cache_control_empty_directive');\n\t}\n}\n\n/**\n * Invalid `cache-control` directive `%directive%`. Did you mean one of: %directives%? (While parsing `%value%`.)\n * @param {{ \"directive\": string; \"directives\": string; \"value\": string }} _values\n */\nexport function cache_control_invalid_directive(_values) {\n\tif (DEV) {\n\t\tconsole.warn(\n\t\t\t`%c[sveltekit] ${'cache_control_invalid_directive'}\\n%c${`Invalid \\`cache-control\\` directive \\`${_values.directive}\\`. Did you mean one of: ${_values.directives}? (While parsing \\`${_values.value}\\`.)`}\\nhttps://svelte.dev/e/kit/${'cache_control_invalid_directive'}`,\n\t\t\tbold,\n\t\t\tnormal\n\t\t);\n\t} else {\n\t\tconsole.warn('https://svelte.dev/e/kit/cache_control_invalid_directive');\n\t}\n}\n\n/**\n * Invalid `content-type` value `%type%`. (While parsing `%value%`.)\n * @param {{ \"type\": string; \"value\": string }} _values\n */\nexport function content_type_invalid(_values) {\n\tif (DEV) {\n\t\tconsole.warn(\n\t\t\t`%c[sveltekit] ${'content_type_invalid'}\\n%c${`Invalid \\`content-type\\` value \\`${_values.type}\\`. (While parsing \\`${_values.value}\\`.)`}\\nhttps://svelte.dev/e/kit/${'content_type_invalid'}`,\n\t\t\tbold,\n\t\t\tnormal\n\t\t);\n\t} else {\n\t\tconsole.warn('https://svelte.dev/e/kit/content_type_invalid');\n\t}\n}\n\n/**\n * `%name%` cookie does not exist for `%pathname%`, but was previously set at %paths%. Did you mean to set its `path` to `'/'` instead?\n * @param {{ \"name\": string; \"pathname\": string; \"paths\": string }} _values\n */\nexport function cookie_path_mismatch(_values) {\n\tif (DEV) {\n\t\tconsole.warn(\n\t\t\t`%c[sveltekit] ${'cookie_path_mismatch'}\\n%c${`\\`${_values.name}\\` cookie does not exist for \\`${_values.pathname}\\`, but was previously set at ${_values.paths}. Did you mean to set its \\`path\\` to \\`'/'\\` instead?`}\\nhttps://svelte.dev/e/kit/${'cookie_path_mismatch'}`,\n\t\t\tbold,\n\t\t\tnormal\n\t\t);\n\t} else {\n\t\tconsole.warn('https://svelte.dev/e/kit/cookie_path_mismatch');\n\t}\n}\n\n/**\n * The form action returned a value, but it isn't available in `page.form`, because SSR is off. To handle the returned value in CSR, enhance your form with `use:enhance`. See https://svelte.dev/docs/kit/form-actions#Progressive-enhancement-use:enhance\n * @param {void} _values\n */\nexport function form_action_data_without_ssr(_values) {\n\tif (DEV) {\n\t\tconsole.warn(\n\t\t\t`%c[sveltekit] ${'form_action_data_without_ssr'}\\n%c${`The form action returned a value, but it isn't available in \\`page.form\\`, because SSR is off. To handle the returned value in CSR, enhance your form with \\`use:enhance\\`. See https://svelte.dev/docs/kit/form-actions#Progressive-enhancement-use:enhance`}\\nhttps://svelte.dev/e/kit/${'form_action_data_without_ssr'}`,\n\t\t\tbold,\n\t\t\tnormal\n\t\t);\n\t} else {\n\t\tconsole.warn('https://svelte.dev/e/kit/form_action_data_without_ssr');\n\t}\n}\n\n/**\n * The form action returned an error, but `+error.svelte` wasn't rendered because SSR is off. To get the error page with CSR, enhance your form with `use:enhance`. See https://svelte.dev/docs/kit/form-actions#Progressive-enhancement-use:enhance\n * @param {void} _values\n */\nexport function form_action_error_without_ssr(_values) {\n\tif (DEV) {\n\t\tconsole.warn(\n\t\t\t`%c[sveltekit] ${'form_action_error_without_ssr'}\\n%c${`The form action returned an error, but \\`+error.svelte\\` wasn't rendered because SSR is off. To get the error page with CSR, enhance your form with \\`use:enhance\\`. See https://svelte.dev/docs/kit/form-actions#Progressive-enhancement-use:enhance`}\\nhttps://svelte.dev/e/kit/${'form_action_error_without_ssr'}`,\n\t\t\tbold,\n\t\t\tnormal\n\t\t);\n\t} else {\n\t\tconsole.warn('https://svelte.dev/e/kit/form_action_error_without_ssr');\n\t}\n}\n\n/**\n * To use an async `handleError` hook to handle errors that occur during rendering, you must enable `compilerOptions.experimental.async` in the SvelteKit plugin of your Vite config. The returned error has been replaced with a generic object\n * @param {void} _values\n */\nexport function handle_error_async_without_async_svelte(_values) {\n\tif (DEV) {\n\t\tconsole.warn(\n\t\t\t`%c[sveltekit] ${'handle_error_async_without_async_svelte'}\\n%c${`To use an async \\`handleError\\` hook to handle errors that occur during rendering, you must enable \\`compilerOptions.experimental.async\\` in the SvelteKit plugin of your Vite config. The returned error has been replaced with a generic object`}\\nhttps://svelte.dev/e/kit/${'handle_error_async_without_async_svelte'}`,\n\t\t\tbold,\n\t\t\tnormal\n\t\t);\n\t} else {\n\t\tconsole.warn('https://svelte.dev/e/kit/handle_error_async_without_async_svelte');\n\t}\n}\n\n/**\n * `%id%`: %usage% in a promise handler after `load(...)` has returned will not cause the function to re-run when %change%\n * @param {{ \"id\": string; \"usage\": string; \"change\": string }} _values\n */\nexport function load_tracking_after_return(_values) {\n\tif (DEV) {\n\t\tconsole.warn(\n\t\t\t`%c[sveltekit] ${'load_tracking_after_return'}\\n%c${`\\`${_values.id}\\`: ${_values.usage} in a promise handler after \\`load(...)\\` has returned will not cause the function to re-run when ${_values.change}`}\\nhttps://svelte.dev/e/kit/${'load_tracking_after_return'}`,\n\t\t\tbold,\n\t\t\tnormal\n\t\t);\n\t} else {\n\t\tconsole.warn('https://svelte.dev/e/kit/load_tracking_after_return');\n\t}\n}\n\n/**\n * Avoid calling `fetch` eagerly during server-side rendering — put your `fetch` calls inside `onMount` or a `load` function instead\n * @param {void} _values\n */\nexport function ssr_fetch_eager(_values) {\n\tif (DEV) {\n\t\tconsole.warn(\n\t\t\t`%c[sveltekit] ${'ssr_fetch_eager'}\\n%c${`Avoid calling \\`fetch\\` eagerly during server-side rendering — put your \\`fetch\\` calls inside \\`onMount\\` or a \\`load\\` function instead`}\\nhttps://svelte.dev/e/kit/${'ssr_fetch_eager'}`,\n\t\t\tbold,\n\t\t\tnormal\n\t\t);\n\t} else {\n\t\tconsole.warn('https://svelte.dev/e/kit/ssr_fetch_eager');\n\t}\n}\n\n/**\n * Returning promises from server `load` functions will only work if `csr === true`\n * @param {void} _values\n */\nexport function streaming_without_csr(_values) {\n\tif (DEV) {\n\t\tconsole.warn(\n\t\t\t`%c[sveltekit] ${'streaming_without_csr'}\\n%c${`Returning promises from server \\`load\\` functions will only work if \\`csr === true\\``}\\nhttps://svelte.dev/e/kit/${'streaming_without_csr'}`,\n\t\t\tbold,\n\t\t\tnormal\n\t\t);\n\t} else {\n\t\tconsole.warn('https://svelte.dev/e/kit/streaming_without_csr');\n\t}\n}\n\n/**\n * Removing comments in `transformPageChunk` can break Svelte's hydration\n * @param {void} _values\n */\nexport function transform_page_chunk_comments(_values) {\n\tif (DEV) {\n\t\tconsole.warn(\n\t\t\t`%c[sveltekit] ${'transform_page_chunk_comments'}\\n%c${`Removing comments in \\`transformPageChunk\\` can break Svelte's hydration`}\\nhttps://svelte.dev/e/kit/${'transform_page_chunk_comments'}`,\n\t\t\tbold,\n\t\t\tnormal\n\t\t);\n\t} else {\n\t\tconsole.warn('https://svelte.dev/e/kit/transform_page_chunk_comments');\n\t}\n}\n","import {\n\tHandledHttpError,\n\tHttpError,\n\tSvelteKitError,\n\tValidationError\n} from '@sveltejs/kit/internal';\nimport { with_request_store } from '@sveltejs/kit/internal/server';\nimport { add_deprecated_handle_error_properties, coalesce_to_error } from '../../utils/error.js';\n// `$app/server` reaches this module, so it must not import anything generated\nimport { fix_stack_trace, hooks } from './internal.js';\nimport { capture_error } from '../../messages/internal/server.js';\nimport * as e from '../../messages/server-errors.js';\nimport * as w from '../../messages/server-warnings.js';\n\n/**\n * @param {import('@sveltejs/kit').RequestEvent} event\n * @param {import('types').RequestState} state\n * @param {any} error\n * @returns {App.Error | Promise<App.Error>}\n */\nexport function handle_error_and_jsonify(event, state, error) {\n\tif (error instanceof HandledHttpError) {\n\t\treturn error.body;\n\t}\n\n\t/** @type {import('@sveltejs/kit/hooks').CaughtError} */\n\tlet caught;\n\n\tif (error instanceof HttpError) {\n\t\tcaught = { kind: 'app', error: error.body };\n\t} else if (error instanceof SvelteKitError) {\n\t\tcaught = { kind: 'framework', error: { status: error.status, message: error.text } };\n\t} else if (error instanceof ValidationError) {\n\t\tcaught = {\n\t\t\tkind: 'validation',\n\t\t\terror: { status: 400, message: 'Bad Request' },\n\t\t\tissues: error.issues\n\t\t};\n\t} else {\n\t\tcaught = { kind: 'unknown', error };\n\n\t\tlet e = error;\n\t\twhile (e instanceof Error) {\n\t\t\tfix_stack_trace(e);\n\t\t\te = e.cause;\n\t\t}\n\t}\n\n\tconst fallback =\n\t\tcaught.kind === 'unknown' ? { status: 500, message: 'Internal Error' } : caught.error;\n\n\t/**\n\t * The hook returns only the properties it wants to override; anything it omits\n\t * (including by returning nothing at all) is inherited from the caught error.\n\t * @param {Awaited<ReturnType<import('@sveltejs/kit/hooks').HandleServerError>>} body\n\t * @returns {App.Error}\n\t */\n\tfunction merge(body) {\n\t\treturn { ...fallback, ...body };\n\t}\n\n\t// TODO 4.0 await this, rather than handling the non-Promise case\n\tlet result;\n\ttry {\n\t\tconst input = { ...caught, event };\n\t\tif (__SVELTEKIT_DEV__) add_deprecated_handle_error_properties(input, fallback);\n\n\t\tresult = with_request_store({ event, state }, () => hooks.handleError(input));\n\t} catch (hook_error) {\n\t\tlog_handle_error_hook_failure(error, hook_error);\n\t\treturn { status: fallback.status, message: 'Internal Error' };\n\t}\n\n\tif (result instanceof Promise) {\n\t\tif (!__SVELTEKIT_SUPPORTS_ASYNC__ && state.is_in_render) {\n\t\t\tw.handle_error_async_without_async_svelte();\n\n\t\t\t// we're discarding the result, but we still need to prevent an unhandled\n\t\t\t// rejection if the user's async `handleError` hook rejects\n\t\t\tresult.catch((hook_error) => log_handle_error_hook_failure(error, hook_error));\n\n\t\t\treturn {\n\t\t\t\tstatus: fallback.status,\n\t\t\t\tmessage: 'Internal Error'\n\t\t\t};\n\t\t}\n\n\t\treturn result.then(merge, (hook_error) => {\n\t\t\tlog_handle_error_hook_failure(error, hook_error);\n\t\t\treturn { status: fallback.status, message: 'Internal Error' };\n\t\t});\n\t}\n\n\treturn merge(result);\n}\n\n/**\n * @param {unknown} error\n * @param {unknown} hook_error\n */\nfunction log_handle_error_hook_failure(error, hook_error) {\n\tconst failure = capture_error(() =>\n\t\te.handle_error_hook_failed(undefined, { cause: coalesce_to_error(hook_error) })\n\t);\n\t// only show the diagnostic and the cause, not a stack trace of SvelteKit's internals\n\tfailure.stack = `${failure.name}: ${failure.message}`;\n\tconsole.error(failure);\n\tif (error instanceof SvelteKitError) {\n\t\tconsole.error(`Original error: ${error.status} ${error.text}: ${error.message}`);\n\t} else {\n\t\tconsole.error('Original error:', error);\n\t}\n}\n","import { text } from '@sveltejs/kit';\nimport { ENDPOINT_METHODS } from '../../constants.js';\nimport { manifest } from './internal.js';\nimport * as e from '../../messages/server-errors.js';\n\n/**\n * @param {Partial<Record<import('types').HttpMethod, any>>} mod\n * @param {import('types').HttpMethod} method\n */\nexport function method_not_allowed(mod, method) {\n\treturn text(`${method} method not allowed`, {\n\t\tstatus: 405,\n\t\theaders: {\n\t\t\t// https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/405\n\t\t\t// \"The server must generate an Allow header field in a 405 status code response\"\n\t\t\tallow: allowed_methods(mod).join(', ')\n\t\t}\n\t});\n}\n\n/** @param {Partial<Record<import('types').HttpMethod, any>>} mod */\nexport function allowed_methods(mod) {\n\tconst allowed = ENDPOINT_METHODS.filter((method) => method in mod);\n\n\t// if there's no HEAD handler, but we have a GET handler, we respond to\n\t// HEAD requests using the GET handler and omit the response body.\n\tif ('GET' in mod && !('HEAD' in mod)) {\n\t\tallowed.push('HEAD');\n\t}\n\n\treturn allowed;\n}\n\n/**\n * @param {number} status\n * @param {string} location\n */\nexport function redirect_response(status, location) {\n\tconst response = new Response(undefined, {\n\t\tstatus,\n\t\theaders: { location }\n\t});\n\treturn response;\n}\n\n/**\n * @param {Response} response\n */\nexport function with_version_header(response) {\n\tif (__SVELTEKIT_APP_VERSION_CHECKS_ENABLED__) {\n\t\tresponse.headers.set('x-sveltekit-version', __SVELTEKIT_APP_VERSION__);\n\t}\n\treturn response;\n}\n\n/**\n * Throws an error explaining why data returned from `load` couldn't be serialized by devalue,\n * whose error becomes the cause\n * @param {import('@sveltejs/kit').RequestEvent} event\n * @param {Error & { path: string }} error\n * @returns {never}\n */\nexport function throw_devalue_error(event, error) {\n\tconst id = /** @type {string} */ (event.route.id);\n\n\tif (error.path) {\n\t\te.load_not_serializable({ id, message: error.message, path: error.path }, { cause: error });\n\t}\n\n\tif (error.path === '') {\n\t\te.load_not_plain_object({ id }, { cause: error });\n\t}\n\n\t// belt and braces — this should never happen\n\tthrow new Error(error.message, { cause: error });\n}\n\n/**\n * @param {import('types').ServerDataNode} node\n */\nexport function serialize_uses(node) {\n\tconst uses = {};\n\n\tif (node.uses && node.uses.dependencies.size > 0) {\n\t\tuses.dependencies = Array.from(node.uses.dependencies);\n\t}\n\n\tif (node.uses && node.uses.search_params.size > 0) {\n\t\tuses.search_params = Array.from(node.uses.search_params);\n\t}\n\n\tif (node.uses && node.uses.params.size > 0) {\n\t\tuses.params = Array.from(node.uses.params);\n\t}\n\n\tif (node.uses?.parent) uses.parent = 1;\n\tif (node.uses?.route) uses.route = 1;\n\tif (node.uses?.url) uses.url = 1;\n\n\treturn uses;\n}\n\n/**\n * Returns `true` if the given path was prerendered\n * @param {string} pathname Should include the base and be decoded\n */\nexport function has_prerendered_path(pathname) {\n\treturn (\n\t\tmanifest.prerendered_routes.has(pathname) ||\n\t\t(pathname.at(-1) === '/' && manifest.prerendered_routes.has(pathname.slice(0, -1)))\n\t);\n}\n\n/**\n * Returns the filename without the extension. e.g., `+page.server`, `+page`, etc.\n * @param {string | undefined} node_id\n * @returns {string}\n */\nexport function get_node_type(node_id) {\n\tconst parts = node_id?.split('/');\n\tconst filename = parts?.at(-1);\n\tif (!filename) return 'unknown';\n\tconst dot_parts = filename.split('.');\n\treturn dot_parts.slice(0, -1).join('.');\n}\n\n/**\n * Counts HTML comments that are not SSI directives (which start with `<!--#`).\n * Used to detect when `transformPageChunk` removes comments that Svelte needs for hydration.\n * @param {string} str\n * @returns {number}\n */\nexport function count_non_ssi_comments(str) {\n\treturn (str.match(/<!--(?!#)/g) ?? []).length;\n}\n","/** @import { RequestEvent, Actions } from '@sveltejs/kit' */\n/** @import { ActionResult } from '$app/forms' */\n/** @import { SSRNode, ServerNode, ServerActionResult } from 'types' */\nimport { DEV } from 'esm-env';\nimport { HttpError, Redirect, ActionFailure, SvelteKitError } from '@sveltejs/kit/internal';\nimport { with_request_store, merge_tracing, record_span } from '@sveltejs/kit/internal/server';\nimport { normalize_error } from '../../../utils/error.js';\nimport { is_form_content_type, negotiate } from '../../../utils/http.js';\nimport { with_version_header } from '../utils.js';\nimport { handle_error_and_jsonify } from '../errors.js';\nimport { stringify, uneval } from '#app/internal/transport';\nimport { capture_error } from '../../../messages/internal/server.js';\nimport * as e from '../../../messages/server-errors.js';\n\n/** @param {RequestEvent} event */\nexport function is_action_json_request(event) {\n\tconst accept = negotiate(event.request.headers.get('accept') ?? '*/*', [\n\t\t'application/json',\n\t\t'text/html'\n\t]);\n\n\treturn accept === 'application/json' && event.request.method === 'POST';\n}\n\n/**\n * @param {RequestEvent} event\n * @param {import('types').RequestState} state\n * @param {SSRNode['server'] | undefined} server\n */\nexport async function handle_action_json_request(event, state, server) {\n\tconst result = await handle_action_request(event, state, server);\n\treturn action_result_json(event, state, result);\n}\n\n/**\n * @param {RequestEvent} event\n * @param {import('types').RequestState} state\n * @param {ServerActionResult} result\n * @returns {Promise<Response>}\n */\nasync function action_result_json(event, state, result) {\n\tif (result.type === 'redirect') {\n\t\treturn action_json(result);\n\t}\n\n\tif (result.type === 'error') {\n\t\tconst error = await handle_error_and_jsonify(event, state, result.error);\n\t\treturn action_json({ ...result, error }, { status: error.status });\n\t}\n\n\tif (result.type === 'success' && !result.data) {\n\t\treturn action_json({ ...result, status: 204, data: undefined });\n\t}\n\n\ttry {\n\t\treturn action_json(\n\t\t\t{\n\t\t\t\t...result,\n\t\t\t\t// @ts-expect-error we assign a string to what is supposed to be an object. That's ok\n\t\t\t\t// because we don't use the object outside, and this way we have better code navigation\n\t\t\t\t// through knowing where the related interface is used.\n\t\t\t\tdata: try_serialize(result.data, stringify, /** @type {string} */ (event.route.id))\n\t\t\t},\n\t\t\t{ status: result.status }\n\t\t);\n\t} catch (error) {\n\t\treturn action_result_json(event, state, action_error_result(error, result.location));\n\t}\n}\n\n/**\n * @param {URL} url\n */\nexport function get_action_location(url) {\n\tconst location = new URL(url);\n\n\tfor (const key of location.searchParams.keys()) {\n\t\tif (key.startsWith('/')) {\n\t\t\tlocation.searchParams.delete(key);\n\t\t\tbreak;\n\t\t}\n\t}\n\n\t// Preserve leading double slashes without producing a protocol-relative URL.\n\tconst pathname = location.pathname.startsWith('//')\n\t\t? '/.' + location.pathname\n\t\t: location.pathname;\n\treturn pathname + location.search;\n}\n\n/**\n * @param {RequestEvent} event\n * @param {string} location\n * @returns {Extract<ServerActionResult, { type: 'error' }>}\n */\nexport function method_not_allowed_result(event, location) {\n\tevent.setHeaders({\n\t\t// https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/405\n\t\t// \"The server must generate an Allow header field in a 405 status code response\"\n\t\tallow: 'GET'\n\t});\n\treturn {\n\t\ttype: 'error',\n\t\tlocation,\n\t\terror: new SvelteKitError(\n\t\t\t405,\n\t\t\t'Method Not Allowed',\n\t\t\t`POST method not allowed. No form actions exist for ${DEV ? `the page at ${event.route.id}` : 'this page'}`\n\t\t)\n\t};\n}\n\n/**\n * @param {unknown} error\n * @param {string} location\n * @returns {Extract<ServerActionResult, { type: 'redirect' | 'error' }>}\n */\nexport function action_error_result(error, location) {\n\tconst err = normalize_error(error);\n\n\tif (err instanceof Redirect) {\n\t\treturn {\n\t\t\ttype: 'redirect',\n\t\t\tstatus: err.status,\n\t\t\tlocation: err.location\n\t\t};\n\t}\n\n\treturn {\n\t\ttype: 'error',\n\t\tlocation,\n\t\terror: err\n\t};\n}\n\n/**\n * @param {Redirect} redirect\n */\nexport function action_json_redirect(redirect) {\n\treturn action_json({\n\t\ttype: 'redirect',\n\t\tstatus: redirect.status,\n\t\tlocation: redirect.location\n\t});\n}\n\n/**\n * @param {ActionResult} data\n * @param {ResponseInit} [init]\n */\nfunction action_json(data, init) {\n\treturn with_version_header(Response.json(data, init));\n}\n\n/**\n * @param {RequestEvent} event\n */\nexport function is_action_request(event) {\n\treturn event.request.method === 'POST';\n}\n\n/**\n * @param {RequestEvent} event\n * @param {import('types').RequestState} state\n * @param {SSRNode['server'] | undefined} server\n * @returns {Promise<ServerActionResult>}\n */\nexport async function handle_action_request(event, state, server) {\n\tconst actions = server?.actions;\n\tconst location = get_action_location(event.url);\n\n\tif (!actions) {\n\t\t// TODO should this be a different error altogether?\n\t\treturn method_not_allowed_result(event, location);\n\t}\n\n\tcheck_named_default_separate(actions);\n\n\ttry {\n\t\tconst data = await call_action(event, state, actions);\n\n\t\tif (DEV) {\n\t\t\tvalidate_action_return(data);\n\t\t}\n\n\t\tif (data instanceof ActionFailure) {\n\t\t\treturn {\n\t\t\t\ttype: 'failure',\n\t\t\t\tstatus: data.status,\n\t\t\t\tlocation,\n\t\t\t\tdata: data.data\n\t\t\t};\n\t\t} else {\n\t\t\treturn {\n\t\t\t\ttype: 'success',\n\t\t\t\tstatus: 200,\n\t\t\t\tlocation,\n\t\t\t\t// @ts-expect-error this will be removed upon serialization, so `undefined` is the same as omission\n\t\t\t\tdata\n\t\t\t};\n\t\t}\n\t} catch (error) {\n\t\treturn action_error_result(\n\t\t\terror instanceof ActionFailure ? capture_error(() => e.action_throw_fail()) : error,\n\t\t\tlocation\n\t\t);\n\t}\n}\n\n/**\n * @param {Actions} actions\n */\nfunction check_named_default_separate(actions) {\n\tif (actions.default && Object.keys(actions).length > 1) {\n\t\te.action_default_with_named();\n\t}\n}\n\n/**\n * @param {RequestEvent} event\n * @param {import('types').RequestState} state\n * @param {NonNullable<ServerNode['actions']>} actions\n * @throws {Redirect | HttpError | SvelteKitError | Error}\n */\nasync function call_action(event, state, actions) {\n\tconst url = new URL(event.request.url);\n\n\tlet name = 'default';\n\tfor (const param of url.searchParams) {\n\t\tif (param[0].startsWith('/')) {\n\t\t\tname = param[0].slice(1);\n\t\t\tif (name === 'default') {\n\t\t\t\te.action_name_reserved();\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\t}\n\n\tif (!Object.hasOwn(actions, name)) {\n\t\tthrow new SvelteKitError(404, 'Not Found', `No action with name '${name}' found`);\n\t}\n\n\tconst action = actions[name];\n\n\tif (!is_form_content_type(event.request)) {\n\t\tthrow new SvelteKitError(\n\t\t\t415,\n\t\t\t'Unsupported Media Type',\n\t\t\t`Form actions expect form-encoded data — received ${event.request.headers.get(\n\t\t\t\t'content-type'\n\t\t\t)}`\n\t\t);\n\t}\n\n\treturn record_span({\n\t\tname: 'sveltekit.form_action',\n\t\tattributes: {\n\t\t\t'sveltekit.form_action.name': name,\n\t\t\t'http.route': event.route.id || 'unknown'\n\t\t},\n\t\tfn: async (current) => {\n\t\t\tconst traced_event = merge_tracing(event, current);\n\n\t\t\tconst result = await with_request_store({ event: traced_event, state }, () =>\n\t\t\t\taction(traced_event)\n\t\t\t);\n\n\t\t\tif (result instanceof ActionFailure) {\n\t\t\t\tcurrent.setAttributes({\n\t\t\t\t\t'sveltekit.form_action.result.type': 'failure',\n\t\t\t\t\t'sveltekit.form_action.result.status': result.status\n\t\t\t\t});\n\t\t\t}\n\n\t\t\treturn result;\n\t\t}\n\t});\n}\n\n/** @param {any} data */\nfunction validate_action_return(data) {\n\tif (data instanceof Redirect) {\n\t\te.action_return_redirect();\n\t}\n\n\tif (data instanceof HttpError) {\n\t\te.action_return_error();\n\t}\n}\n\n/**\n * Try to `devalue.uneval` the data object, and if it fails, return a proper Error with context\n * @param {any} data\n * @param {string} route_id\n */\nexport function uneval_action_response(data, route_id) {\n\treturn try_serialize(data, uneval, route_id);\n}\n\n/**\n * @param {any} data\n * @param {(data: any) => string} fn\n * @param {string} route_id\n */\nfunction try_serialize(data, fn, route_id) {\n\ttry {\n\t\treturn fn(data);\n\t} catch (/** @type {any} */ error) {\n\t\t// If we're here, the data could not be serialized with devalue\n\n\t\t// if someone tries to use `json()` in their action\n\t\tif (data instanceof Response) {\n\t\t\te.action_response_not_serializable({ id: route_id }, { cause: error });\n\t\t}\n\n\t\t// if devalue could not serialize a property on the object, etc.\n\t\tif ('path' in error) {\n\t\t\tconst values = { id: route_id, message: error.message };\n\t\t\te.action_data_not_serializable(\n\t\t\t\terror.path === '' ? values : { ...values, path: `data${error.path}` },\n\t\t\t\t{ cause: error }\n\t\t\t);\n\t\t}\n\n\t\tthrow error;\n\t}\n}\n","/** @import { RequestEvent } from '@sveltejs/kit' */\n/** @import { RemoteForm } from '$app/server' */\n/** @import { RemoteFormInternals, RemoteFunctionData, RemoteFunctionResponse, RemoteInternals, RequestState, ServerActionResult } from 'types' */\n\nimport { error } from '@sveltejs/kit';\nimport { Redirect, SvelteKitError } from '@sveltejs/kit/internal';\nimport { with_request_store, merge_tracing, record_span } from '@sveltejs/kit/internal/server';\nimport { app_dir, base } from '#app/paths';\nimport { is_form_content_type } from '../../utils/http.js';\nimport { create_remote_key, parse_remote_arg, split_remote_key } from '../shared.js';\nimport { stringify } from '#app/internal/transport';\nimport { handle_error_and_jsonify } from './errors.js';\nimport {\n\taction_error_result,\n\tget_action_location,\n\tmethod_not_allowed_result\n} from './page/actions.js';\nimport { deserialize_binary_form } from '../form-utils.js';\nimport { text_encoder } from '../utils.js';\nimport { with_version_header } from './utils.js';\nimport { manifest } from './internal.js';\n\n/**\n * How long (in milliseconds) to wait after the last message was sent before\n * sending a `: keep-alive` SSE comment, to prevent proxies/load balancers with\n * an idle timeout from closing an otherwise-quiet `query.live` connection.\n */\nconst KEEP_ALIVE_INTERVAL = 30_000;\n\n/**\n * @param {RequestEvent} event\n * @param {RequestState} state\n * @param {import('types').RemoteQueryLiveInternals} internals\n * @param {any} arg\n */\nexport function create_live_query_response(event, state, internals, arg) {\n\tconst cancellation = new AbortController();\n\tconst live_event = {\n\t\t...event,\n\t\trequest: new Request(event.request, {\n\t\t\tsignal: AbortSignal.any([event.request.signal, cancellation.signal])\n\t\t})\n\t};\n\n\tconst generator = internals.run(live_event, state, arg);\n\n\tlet open = true;\n\tlet pulling = false;\n\t/** @type {ReadableStreamDefaultController<Uint8Array>} */\n\tlet stream_controller;\n\t/** @type {ReturnType<typeof setTimeout> | undefined} */\n\tlet keep_alive;\n\t/** @type {string | undefined} */\n\tlet result;\n\n\tfunction schedule_keep_alive() {\n\t\tclearTimeout(keep_alive);\n\t\tkeep_alive = setTimeout(() => {\n\t\t\tif (!open) return;\n\t\t\tif ((stream_controller.desiredSize ?? 0) > 0) {\n\t\t\t\tstream_controller.enqueue(text_encoder.encode(': keep-alive\\n\\n'));\n\t\t\t}\n\t\t\tschedule_keep_alive();\n\t\t}, KEEP_ALIVE_INTERVAL);\n\t}\n\n\t/** @param {any} data */\n\tfunction send(data) {\n\t\tif (!open) return;\n\t\tstream_controller.enqueue(text_encoder.encode('data: ' + JSON.stringify(data) + '\\n\\n'));\n\t\tschedule_keep_alive();\n\t}\n\n\t/** @param {boolean} cancelled */\n\tfunction teardown(cancelled) {\n\t\tif (!open) return;\n\t\topen = false;\n\t\tclearTimeout(keep_alive);\n\t\tcancellation.abort();\n\t\tif (!cancelled) stream_controller.close();\n\t\t// AsyncGenerator.return() cannot interrupt a pending next(). Cleanup is\n\t\t// cooperative via request.signal, so stream cancellation must not await it.\n\t\tvoid generator.return(undefined).catch(() => {});\n\t}\n\n\tevent.request.signal.addEventListener('abort', () => teardown(true), { once: true });\n\n\treturn new Response(\n\t\tnew ReadableStream({\n\t\t\tstart(controller) {\n\t\t\t\tstream_controller = controller;\n\t\t\t\tschedule_keep_alive();\n\t\t\t},\n\t\t\tasync pull() {\n\t\t\t\tif (!open || pulling) return;\n\t\t\t\tpulling = true;\n\n\t\t\t\ttry {\n\t\t\t\t\twhile (open) {\n\t\t\t\t\t\tconst { value, done } = await generator.next();\n\n\t\t\t\t\t\tif (!open) return;\n\n\t\t\t\t\t\tif (done) {\n\t\t\t\t\t\t\tteardown(false);\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (result !== (result = stringify(value))) {\n\t\t\t\t\t\t\tsend({ type: 'result', result });\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} catch (error) {\n\t\t\t\t\tif (!open) return;\n\n\t\t\t\t\tif (error instanceof Redirect) {\n\t\t\t\t\t\tsend({ type: 'redirect', location: error.location });\n\t\t\t\t\t} else {\n\t\t\t\t\t\tconst transformed = await handle_error_and_jsonify(event, state, error);\n\n\t\t\t\t\t\tsend({ type: 'error', error: transformed });\n\t\t\t\t\t}\n\n\t\t\t\t\tteardown(false);\n\t\t\t\t} finally {\n\t\t\t\t\tpulling = false;\n\t\t\t\t}\n\t\t\t},\n\t\t\tcancel() {\n\t\t\t\tteardown(true);\n\t\t\t}\n\t\t}),\n\t\t{\n\t\t\theaders: {\n\t\t\t\t'cache-control': 'private, no-store',\n\t\t\t\t'content-type': 'text/event-stream'\n\t\t\t}\n\t\t}\n\t);\n}\n\n/** @type {typeof handle_remote_call_internal} */\nexport async function handle_remote_call(event, state, id) {\n\treturn record_span({\n\t\tname: 'sveltekit.remote.call',\n\t\tattributes: {\n\t\t\t'sveltekit.remote.call.id': id\n\t\t},\n\t\tfn: async (current) => {\n\t\t\tconst traced_event = merge_tracing(event, current);\n\t\t\tconst response = await with_request_store({ event: traced_event, state }, () =>\n\t\t\t\thandle_remote_call_internal(traced_event, state, id)\n\t\t\t);\n\t\t\treturn with_version_header(response);\n\t\t}\n\t});\n}\n\n/**\n * @param {RequestEvent} event\n * @param {RequestState} state\n * @param {string} id\n */\nasync function handle_remote_call_internal(event, state, id) {\n\tconst [hash, name, additional_args] = id.split('/');\n\tconst remotes = manifest.remotes;\n\n\tif (!Object.hasOwn(remotes, hash)) error(404);\n\n\tconst module = await remotes[hash]();\n\tconst fn = Object.hasOwn(module.default, name) ? module.default[name] : undefined;\n\n\tif (!fn) error(404);\n\n\t/** @type {RemoteInternals} */\n\tconst internals = fn.__;\n\n\tevent.tracing.current.setAttributes({\n\t\t'sveltekit.remote.call.type': internals.type,\n\t\t'sveltekit.remote.call.name': internals.name\n\t});\n\n\t/** @type {HeadersInit | undefined} */\n\tconst headers = state.prerendering ? undefined : { 'cache-control': 'private, no-store' };\n\n\ttry {\n\t\t/** @type {RemoteFunctionData} */\n\t\tconst data = {};\n\n\t\tswitch (internals.type) {\n\t\t\tcase 'query_live': {\n\t\t\t\tif (event.request.method !== 'GET') {\n\t\t\t\t\tthrow new SvelteKitError(\n\t\t\t\t\t\t405,\n\t\t\t\t\t\t'Method Not Allowed',\n\t\t\t\t\t\t`\\`query.live\\` functions must be invoked via GET request, not ${event.request.method}`\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\tconst payload = /** @type {string} */ (\n\t\t\t\t\tnew URL(event.request.url).searchParams.get('payload')\n\t\t\t\t);\n\n\t\t\t\treturn create_live_query_response(event, state, internals, parse_remote_arg(payload));\n\t\t\t}\n\n\t\t\tcase 'query_batch': {\n\t\t\t\tif (event.request.method !== 'POST') {\n\t\t\t\t\tthrow new SvelteKitError(\n\t\t\t\t\t\t405,\n\t\t\t\t\t\t'Method Not Allowed',\n\t\t\t\t\t\t`\\`query.batch\\` functions must be invoked via POST request, not ${event.request.method}`\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\t/** @type {{ payloads: string[] }} */\n\t\t\t\tconst { payloads } = await event.request.json();\n\n\t\t\t\tconst args = await Promise.all(payloads.map((payload) => parse_remote_arg(payload)));\n\n\t\t\t\tdata._ = await with_request_store({ event, state }, () => internals.run(args));\n\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcase 'form': {\n\t\t\t\tif (event.request.method !== 'POST') {\n\t\t\t\t\tthrow new SvelteKitError(\n\t\t\t\t\t\t405,\n\t\t\t\t\t\t'Method Not Allowed',\n\t\t\t\t\t\t`\\`form\\` functions must be invoked via POST request, not ${event.request.method}`\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\tif (!is_form_content_type(event.request)) {\n\t\t\t\t\tthrow new SvelteKitError(\n\t\t\t\t\t\t415,\n\t\t\t\t\t\t'Unsupported Media Type',\n\t\t\t\t\t\t`\\`form\\` functions expect form-encoded data — received ${event.request.headers.get(\n\t\t\t\t\t\t\t'content-type'\n\t\t\t\t\t\t)}`\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\tconst {\n\t\t\t\t\tdata: input,\n\t\t\t\t\tmeta,\n\t\t\t\t\tform_data\n\t\t\t\t} = await deserialize_binary_form(event.request, internals.id);\n\t\t\t\tstate.remote.requested = create_requested_map(meta.remote_refreshes);\n\n\t\t\t\t// If this is a keyed form instance (created via form.for(key)), add the key to the form data (unless already set)\n\t\t\t\t// Note that additional_args will only be set if the form is not enhanced, as enhanced forms transfer the key inside `data`.\n\t\t\t\tif (additional_args && !('id' in input)) {\n\t\t\t\t\tinput.id = JSON.parse(decodeURIComponent(additional_args));\n\t\t\t\t}\n\n\t\t\t\tconst fn = internals.fn;\n\t\t\t\tdata._ = await with_request_store(\n\t\t\t\t\t{ event, state: { ...state, is_in_remote_form_or_command: true } },\n\t\t\t\t\t() => fn(input, meta, form_data)\n\t\t\t\t);\n\n\t\t\t\tif (data._.issues) {\n\t\t\t\t\t// special case — don't serialize refreshes/reconnects\n\t\t\t\t\treturn Response.json(\n\t\t\t\t\t\t/** @type {RemoteFunctionResponse} */ ({\n\t\t\t\t\t\t\ttype: 'result',\n\t\t\t\t\t\t\tdata: stringify(data)\n\t\t\t\t\t\t}),\n\t\t\t\t\t\t{ headers }\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcase 'command': {\n\t\t\t\t/** @type {{ payload: string, refreshes?: string[] }} */\n\t\t\t\tconst { payload, refreshes } = await event.request.json();\n\t\t\t\tstate.remote.requested = create_requested_map(refreshes);\n\t\t\t\tconst arg = parse_remote_arg(payload);\n\n\t\t\t\tdata._ = await with_request_store(\n\t\t\t\t\t{ event, state: { ...state, is_in_remote_form_or_command: true } },\n\t\t\t\t\t() => fn(arg)\n\t\t\t\t);\n\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcase 'prerender': {\n\t\t\t\tdata._ = await with_request_store({ event, state }, () =>\n\t\t\t\t\tfn(parse_remote_arg(additional_args))\n\t\t\t\t);\n\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcase 'query': {\n\t\t\t\tconst payload = /** @type {string} */ (\n\t\t\t\t\t// new URL(...) necessary because we're hiding the URL from the user in the event object\n\t\t\t\t\tnew URL(event.request.url).searchParams.get('payload')\n\t\t\t\t);\n\n\t\t\t\tdata._ = await with_request_store({ event, state }, () => fn(parse_remote_arg(payload)));\n\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tawait collect_remote_data(data, event, state);\n\t\tif (state.remote.ignored?.size) data.i = Array.from(state.remote.ignored);\n\n\t\treturn Response.json(\n\t\t\t/** @type {RemoteFunctionResponse} */ ({\n\t\t\t\ttype: 'result',\n\t\t\t\tdata: stringify(data)\n\t\t\t}),\n\t\t\t{ headers }\n\t\t);\n\t} catch (error) {\n\t\tif (error instanceof Redirect) {\n\t\t\tconst data = await collect_remote_data({ redirect: error.location }, event, state);\n\n\t\t\treturn Response.json(\n\t\t\t\t/** @type {RemoteFunctionResponse} */ ({\n\t\t\t\t\ttype: 'result',\n\t\t\t\t\tdata: stringify(data)\n\t\t\t\t}),\n\t\t\t\t{ headers }\n\t\t\t);\n\t\t}\n\n\t\tconst transformed = await handle_error_and_jsonify(event, state, error);\n\n\t\treturn Response.json(\n\t\t\t/** @type {RemoteFunctionResponse} */ ({\n\t\t\t\ttype: 'error',\n\t\t\t\terror: transformed\n\t\t\t}),\n\t\t\t{\n\t\t\t\t// By setting a non-200 during prerendering we fail the prerender process (unless handleHttpError handles it).\n\t\t\t\t// Errors at runtime will be passed to the client and are handled there\n\t\t\t\tstatus: state.prerendering ? transformed.status : undefined,\n\t\t\t\theaders: {\n\t\t\t\t\t'cache-control': 'private, no-store'\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\t}\n}\n\n/**\n * Collects all the query/prerender data that was retrieved\n * during the request and adds it to `data`\n * @param {RemoteFunctionData} data\n * @param {RequestEvent} event\n * @param {RequestState} state\n */\nexport async function collect_remote_data(data, event, state) {\n\t/**\n\t *\n\t * @param {unknown} error\n\t * @returns {Promise<App.Error>}\n\t */\n\tfunction convert_error(error) {\n\t\t// TODO 4.0 remove the `Promise.resolve(...)`\n\t\treturn Promise.resolve(handle_error_and_jsonify(event, state, error));\n\t}\n\n\t/** @type {Promise<any>[]} */\n\tconst promises = [];\n\n\t// Keys the explicit pass has serialized. Invoking a query's `fn` there can, as a\n\t// side effect, register the same query in `state.remote.implicit` (via\n\t// `get_response`), so we skip those keys in the implicit pass below to avoid\n\t// processing them twice.\n\t/** @type {Set<string>} */\n\tconst processed = new Set();\n\n\tif (state.remote.explicit) {\n\t\tconst { explicit } = state.remote;\n\n\t\t/** @type {Promise<void>[]} */\n\t\tconst inflight = [];\n\n\t\tconst drain = () => {\n\t\t\tfor (const [remote_key, { internals, fn }] of explicit) {\n\t\t\t\texplicit.delete(remote_key);\n\t\t\t\tif (processed.has(remote_key)) continue;\n\t\t\t\tprocessed.add(remote_key);\n\n\t\t\t\t// there were explicit refreshes/reconnects (via `refresh()`/`set()`/`reconnect()`),\n\t\t\t\t// so the client should apply these single-flight updates instead of calling `invalidateAll()`\n\t\t\t\tdata.r = true;\n\n\t\t\t\tconst type = /** @type {'p' | 'q' | 'l'} */ (\n\t\t\t\t\tinternals.type === 'query_live' ? 'l' : internals.type[0]\n\t\t\t\t);\n\n\t\t\t\t// `fn` is deferred until now so the query runs after any state mutations\n\t\t\t\t// in the command/form body. If the query was re-awaited in the meantime,\n\t\t\t\t// `fn` returns the existing (fresh) cache entry rather than re-running.\n\t\t\t\tinflight.push(\n\t\t\t\t\tfn().then(\n\t\t\t\t\t\t(v) => {\n\t\t\t\t\t\t\t// a fresh value replaces the node entirely, so a re-run can't leave\n\t\t\t\t\t\t\t// a stale error from a previous run alongside the new value\n\t\t\t\t\t\t\t(data[type] ??= {})[remote_key] = { v };\n\t\t\t\t\t\t\tdrain();\n\t\t\t\t\t\t},\n\t\t\t\t\t\tasync (e) => {\n\t\t\t\t\t\t\tif (!(e instanceof Redirect)) {\n\t\t\t\t\t\t\t\t// (a Redirect is already handled elsewhere)\n\t\t\t\t\t\t\t\t(data[type] ??= {})[remote_key] = { e: await convert_error(e) };\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tdrain();\n\t\t\t\t\t\t}\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t}\n\t\t};\n\n\t\tdrain();\n\n\t\t// `inflight` grows as settles drain newly-refreshed queries\n\t\tfor (const promise of inflight) {\n\t\t\tawait promise;\n\t\t}\n\t}\n\n\tif (state.remote.implicit) {\n\t\tfor (const [internals, record] of state.remote.implicit) {\n\t\t\t// Private (non-exported) remote functions have no `id` and must never be\n\t\t\t// serialized into the response — otherwise their (potentially private) result\n\t\t\t// would be shipped to the client under a malformed `undefined/...` key.\n\t\t\tif (!internals.id) continue;\n\n\t\t\tfor (const key in record) {\n\t\t\t\t// form outputs are registered under the client-side action id directly\n\t\t\t\tconst remote_key = internals.type === 'form' ? key : create_remote_key(internals.id, key);\n\n\t\t\t\t// already serialized by the explicit pass (which always awaits and wins),\n\t\t\t\t// so don't reprocess it here with the implicit \"still loading\" heuristic\n\t\t\t\tif (processed.has(remote_key)) continue;\n\n\t\t\t\tconst type = /** @type {'p' | 'q' | 'l' | 'f'} */ (\n\t\t\t\t\tinternals.type === 'query_live' ? 'l' : internals.type[0]\n\t\t\t\t);\n\n\t\t\t\tconst promise = state.remote.data?.get(internals)?.[key] ?? record[key]();\n\n\t\t\t\t// If the promise is still pending (e.g. the query was rendered in its loading\n\t\t\t\t// state during SSR), omit it from the payload entirely so that the client\n\t\t\t\t// fetches it itself — an entry without `v`/`e` would hydrate as `undefined`.\n\t\t\t\tlet resolved = true;\n\n\t\t\t\tawait Promise.race([\n\t\t\t\t\tPromise.resolve(promise).then(\n\t\t\t\t\t\t(v) => {\n\t\t\t\t\t\t\tif (resolved) {\n\t\t\t\t\t\t\t\t((data[type] ??= {})[remote_key] ??= {}).v = v;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\t\t\t\t\t(e) => {\n\t\t\t\t\t\t\tif (e instanceof Redirect) {\n\t\t\t\t\t\t\t\t// already handled elsewhere\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif (resolved) {\n\t\t\t\t\t\t\t\tpromises.push(\n\t\t\t\t\t\t\t\t\tconvert_error(e).then((e) => {\n\t\t\t\t\t\t\t\t\t\t((data[type] ??= {})[remote_key] ??= {}).e = e;\n\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t),\n\t\t\t\t\tPromise.resolve().then(() => (resolved = false))\n\t\t\t\t]);\n\t\t\t}\n\t\t}\n\t}\n\n\tawait Promise.all(promises);\n\n\treturn data;\n}\n\n/**\n * @param {string[] | undefined} refreshes\n */\nfunction create_requested_map(refreshes) {\n\t/** @type {Map<string, Set<string>>} */\n\tconst requested = new Map();\n\n\tfor (const key of refreshes ?? []) {\n\t\tconst parts = split_remote_key(key);\n\n\t\tconst existing = requested.get(parts.id);\n\n\t\tif (existing) {\n\t\t\texisting.add(parts.payload);\n\t\t} else {\n\t\t\trequested.set(parts.id, new Set([parts.payload]));\n\t\t}\n\t}\n\n\treturn requested;\n}\n\n/** @type {typeof handle_remote_form_post_internal} */\nexport async function handle_remote_form_post(event, state, id) {\n\treturn record_span({\n\t\tname: 'sveltekit.remote.form.post',\n\t\tattributes: {\n\t\t\t'sveltekit.remote.form.post.id': id\n\t\t},\n\t\tfn: (current) => {\n\t\t\tconst traced_event = merge_tracing(event, current);\n\t\t\treturn with_request_store({ event: traced_event, state }, () =>\n\t\t\t\thandle_remote_form_post_internal(traced_event, state, id)\n\t\t\t);\n\t\t}\n\t});\n}\n\n/**\n * @param {RequestEvent} event\n * @param {RequestState} state\n * @param {string} id\n * @returns {Promise<ServerActionResult>}\n */\nasync function handle_remote_form_post_internal(event, state, id) {\n\tconst location = get_action_location(event.url);\n\t// `hash` and `name` can never contain a `/`, but the JSON-stringified key of a\n\t// keyed (`form.for(key)`) instance can — rejoin the remaining segments\n\tconst [hash, name, ...rest] = id.split('/');\n\tconst action_id = rest.join('/');\n\tconst remotes = manifest.remotes;\n\tconst module = Object.hasOwn(remotes, hash) ? await remotes[hash]() : undefined;\n\n\tlet form = /** @type {RemoteForm<any, any>} */ (\n\t\tmodule && Object.hasOwn(module.default, name) ? module.default[name] : undefined\n\t);\n\n\tif (!form) {\n\t\treturn method_not_allowed_result(event, location);\n\t}\n\n\tif (action_id) {\n\t\t// @ts-expect-error\n\t\tform = with_request_store({ event, state }, () => form.for(JSON.parse(action_id)));\n\t}\n\n\ttry {\n\t\tconst __ = /** @type {RemoteFormInternals} */ (/** @type {any} */ (form).__);\n\n\t\tconst { data, meta, form_data } = await deserialize_binary_form(event.request, __.id);\n\n\t\tif (action_id && !('id' in data)) {\n\t\t\tdata.id = JSON.parse(decodeURIComponent(action_id));\n\t\t}\n\n\t\tawait with_request_store(\n\t\t\t{ event, state: { ...state, is_in_remote_form_or_command: true } },\n\t\t\t() => __.fn(data, meta, form_data)\n\t\t);\n\n\t\t// We don't want the data to appear on `let { form } = $props()`, which is why we're not returning it.\n\t\t// It is instead available on `myForm.result`, setting of which happens within the remote `form` function.\n\t\treturn {\n\t\t\ttype: 'success',\n\t\t\tstatus: 200,\n\t\t\tlocation\n\t\t};\n\t} catch (e) {\n\t\treturn action_error_result(e, location);\n\t}\n}\n\n/**\n * @param {URL} url\n */\nexport function has_remote_prefix(url) {\n\treturn url.pathname.startsWith(`${base}/${app_dir}/remote/`);\n}\n\n/**\n * @param {URL} url\n */\nexport function strip_remote_prefix(url) {\n\treturn url.pathname.replace(`${base}/${app_dir}/remote/`, '');\n}\n\n/**\n * @param {URL} url\n */\nexport function get_remote_id(url) {\n\treturn has_remote_prefix(url) && strip_remote_prefix(url);\n}\n\n/**\n * @param {URL} url\n */\nexport function get_remote_action(url) {\n\treturn url.searchParams.get('/remote');\n}\n","/* eslint-disable n/prefer-global/process */\n\nimport { set_error_stack } from '../../utils/error.js';\n\n// using `getBuiltinModule` rather than `import` makes this safe to run in non-Node-compatible environments\nconst fs = globalThis.process?.getBuiltinModule?.('node:fs');\nconst url = globalThis.process?.getBuiltinModule?.('node:url');\nconst path = globalThis.process?.getBuiltinModule?.('node:path');\nconst module = globalThis.process?.getBuiltinModule?.('node:module');\n\nconst cwd = globalThis.process?.cwd?.();\n\n/** @type {(file: string) => string} */\nconst relative = cwd ? (file) => path.relative(cwd, file) : (file) => file;\n\n/**\n * Applies sourcemaps, makes paths relative to the cwd, and truncates\n * non-user code from the bottom of the stack\n * @param {Error} error\n * @returns void\n */\nexport let fix_stack_trace = (error) => {\n\tif (!error.stack || !fs) return;\n\n\tlet end = 0;\n\n\tconst stack = error.stack\n\t\t.split('\\n')\n\t\t.map((line, i) => {\n\t\t\tconst match = line.match(/^ {4}at.+(file:\\/\\/\\/.*):(\\d+):(\\d+)(\\)?)$/);\n\n\t\t\tif (!match) {\n\t\t\t\tif (!line.includes('node:internal/')) {\n\t\t\t\t\tend = i + 1;\n\t\t\t\t}\n\n\t\t\t\treturn line;\n\t\t\t}\n\n\t\t\tconst file = url.fileURLToPath(match[1]);\n\t\t\tconst traced = trace(file, Number(match[2]) - 1, Number(match[3]) - 1);\n\n\t\t\t// truncate non-user code from the bottom of the stack (but leave it in otherwise)\n\t\t\tif (!/[\\\\/]node_modules[\\\\/]/.test(traced?.file ?? file)) {\n\t\t\t\tend = i + 1;\n\t\t\t}\n\n\t\t\tif (traced?.line) {\n\t\t\t\tconst location = `${match[1]}:${match[2]}:${match[3]}`;\n\t\t\t\tconst original = `${relative(traced.file)}:${traced.line}:${traced.column}`;\n\n\t\t\t\treturn line.replace(location, original);\n\t\t\t}\n\n\t\t\tif (traced) {\n\t\t\t\treturn `${line.replace(match[1], relative(file))} [${traced.file}]`;\n\t\t\t}\n\n\t\t\treturn line;\n\t\t})\n\t\t.slice(0, end)\n\t\t.join('\\n');\n\n\tset_error_stack(error, stack);\n};\n\n/**\n * Override the implementation of fix_stack_trace (for using during dev)\n * @param {(error: Error) => void} fn\n */\nexport function set_fix_stack_trace(fn) {\n\tfix_stack_trace = fn;\n}\n\n/** @type {Map<string, { map: import('node:module').SourceMap; directory: string } | null>} */\nconst source_maps = new Map();\n\n/** @type {Map<string, Array<string | undefined>>} */\nconst source_regions = new Map();\n\n/** @param {string} file */\nfunction get_source_map(file) {\n\tif (source_maps.has(file)) {\n\t\treturn source_maps.get(file);\n\t}\n\n\ttry {\n\t\tlet source;\n\t\tlet directory = path.dirname(file);\n\n\t\tconst code = fs.readFileSync(file, 'utf8');\n\t\tconst matches = Array.from(code.matchAll(/\\/\\/[#@]\\s*sourceMappingURL=(\\S+)/g));\n\t\tconst url = matches.at(-1)?.[1];\n\n\t\tif (url?.startsWith('data:')) {\n\t\t\tconst comma = url.indexOf(',');\n\t\t\tconst metadata = url.slice(5, comma);\n\t\t\tconst data = url.slice(comma + 1);\n\t\t\tsource = metadata.endsWith(';base64')\n\t\t\t\t? Buffer.from(data, 'base64').toString()\n\t\t\t\t: decodeURIComponent(data);\n\t\t} else {\n\t\t\tconst map_file = url\n\t\t\t\t? path.resolve(path.dirname(file), decodeURIComponent(url))\n\t\t\t\t: `${file}.map`;\n\t\t\tif (fs.existsSync(map_file)) {\n\t\t\t\tdirectory = path.dirname(map_file);\n\t\t\t\tsource = fs.readFileSync(map_file, 'utf8');\n\t\t\t}\n\t\t}\n\n\t\tif (source) {\n\t\t\tconst source_map = { map: new module.SourceMap(JSON.parse(source)), directory };\n\t\t\tsource_maps.set(file, source_map);\n\n\t\t\treturn source_map;\n\t\t}\n\t} catch {\n\t\t// failure could be for any reason and this is best-effort, ignore\n\t}\n\n\tsource_maps.set(file, null);\n\treturn null;\n}\n\n/**\n *\n * @param {string} file\n * @param {number} line\n * @param {number} column\n * @returns {null | { file: string, line?: number, column?: number }}\n */\nfunction trace(file, line, column) {\n\tconst source_map = get_source_map(file);\n\tif (!source_map) return null;\n\n\tconst entry = source_map.map.findEntry(line, column);\n\n\tif (\n\t\tentry &&\n\t\t'originalSource' in entry &&\n\t\tentry.originalSource &&\n\t\ttypeof entry.originalLine === 'number' &&\n\t\ttypeof entry.originalColumn === 'number'\n\t) {\n\t\tconst source = entry.originalSource.startsWith('file:')\n\t\t\t? url.fileURLToPath(entry.originalSource)\n\t\t\t: path.resolve(source_map.directory, entry.originalSource);\n\n\t\tconst traced = {\n\t\t\tfile: source,\n\t\t\tline: entry.originalLine + 1,\n\t\t\tcolumn: entry.originalColumn + 1\n\t\t};\n\n\t\t// keep going, in case we are running code that was bundled a second time by an adapter\n\t\treturn trace(traced.file, traced.line - 1, traced.column - 1) ?? traced;\n\t}\n\n\tlet regions = source_regions.get(file);\n\tif (!regions) {\n\t\t/** @type {string | undefined} */\n\t\tlet source;\n\t\tregions = fs\n\t\t\t.readFileSync(file, 'utf8')\n\t\t\t.split('\\n')\n\t\t\t.map((line) => {\n\t\t\t\t// Vite will merge multiple files into one but add region markers\n\t\t\t\t// with the original file names, which we try to extract here.\n\t\t\t\tconst start = line.match(/^\\/\\/#region (.+)$/);\n\t\t\t\tif (start) source = start[1];\n\t\t\t\tif (line === '//#endregion') source = undefined;\n\t\t\t\treturn source;\n\t\t\t});\n\t\tsource_regions.set(file, regions);\n\t}\n\n\tconst source = regions[line];\n\n\tif (source) {\n\t\treturn {\n\t\t\tfile: source\n\t\t};\n\t}\n\n\treturn null;\n}\n","/** @import { ServerHooks, SSRManifest } from 'types'; */\nimport { restore, save } from './dev.js';\nimport { stream_from_iterable } from '../utils.js';\nimport {\n\thas_data_suffix,\n\thas_resolution_suffix,\n\tstrip_data_suffix,\n\tstrip_resolution_suffix\n} from '../../pathname.js';\nimport { has_remote_prefix, strip_remote_prefix } from '../../runtime/server/remote-functions.js';\n\n// using `getBuiltinModule` rather than `import` makes this safe to run in non-Node-compatible environments\nconst styleText =\n\t// eslint-disable-next-line n/prefer-global/process\n\tglobalThis.process?.getBuiltinModule?.('node:util')?.styleText ??\n\t/** @type {(format: unknown, text: string) => string} */ ((_format, text) => text);\n\nconst read_implementation_key = Symbol.for('sveltekit.read_implementation');\nconst manifest_key = Symbol.for('sveltekit.manifest');\nconst hooks_key = Symbol.for('sveltekit.hooks');\n\nexport let read_implementation = /** @type {((path: string) => ReadableStream<any>) | null} */ (\n\t(__SVELTEKIT_DEV__ && restore(read_implementation_key)) ?? null\n);\n\nexport let manifest = /** @type {SSRManifest} */ (\n\t(__SVELTEKIT_DEV__ && restore(manifest_key)) ?? null\n);\n\nexport let hooks = /** @type {ServerHooks} */ ((__SVELTEKIT_DEV__ && restore(hooks_key)) ?? null);\n\n/**\n * The public `read` may return a promise, the runtime expects a stream\n * @param {NonNullable<import('@sveltejs/kit').ServerInitOptions['read']>} read\n */\nexport function set_read_implementation(read) {\n\tread_implementation = (file) => {\n\t\tconst result = read(file);\n\t\tif (result instanceof ReadableStream) return result;\n\n\t\treturn stream_from_iterable(\n\t\t\t(async function* () {\n\t\t\t\tconst stream = await result;\n\t\t\t\tif (stream) yield* stream;\n\t\t\t})()\n\t\t);\n\t};\n\tif (__SVELTEKIT_DEV__) save(read_implementation_key, read_implementation);\n}\n\n/**\n *\n * @param {SSRManifest} value\n */\nexport function set_manifest(value) {\n\tmanifest = value;\n\tif (__SVELTEKIT_DEV__) save(manifest_key, value);\n}\n\n/**\n * @param {ServerHooks} value\n */\nexport function set_hooks(value) {\n\thooks = value;\n\tif (__SVELTEKIT_DEV__) save(hooks_key, value);\n}\n\n/**\n * @param {number} status\n * @param {Request} request\n * @returns {string}\n */\nexport function format_response(status, request) {\n\tconst url = new URL(request.url);\n\tconst requested = url.href.replace(url.origin, '');\n\n\tlet log = `${styleText(status < 400 ? ['cyan'] : ['bold', 'red'], `${status}`)} ${request.method} `;\n\n\tif (has_data_suffix(url.pathname)) {\n\t\tconst pathname = strip_data_suffix(url.pathname) || '/';\n\t\tlog += pathname + styleText('dim', requested.slice(pathname.length));\n\t} else if (has_resolution_suffix(url.pathname)) {\n\t\tconst pathname = strip_resolution_suffix(url.pathname) || '/';\n\t\tlog += pathname + styleText('dim', requested.slice(pathname.length));\n\t} else if (has_remote_prefix(url)) {\n\t\tconst id = /** @type {string} */ (strip_remote_prefix(url));\n\t\tconst [file_hash, name, arg_hash] = id.split('/');\n\n\t\tlog += styleText('dim', `${url.pathname.slice(0, -id.length)}${file_hash}/`) + name;\n\t\tif (arg_hash) log += styleText('dim', `/${arg_hash}`);\n\t\tif (url.search) log += styleText('dim', url.search);\n\t} else {\n\t\tlog += requested;\n\t}\n\n\treturn log;\n}\n\nexport { fix_stack_trace, set_fix_stack_trace } from './sourcemaps.js';\n"],"ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22],"mappings":";;;;;AAKA,IAAW,SAAA;AACX,IAAa,UAAA;;AAIb,SAAgB,WAAW,MAAM;CAChC,SAAS;AACV;;;ACZA,IAAM,SAAS,OAAO,IAAI,wBAAwB;AAEV,WAAsC,YAAY,CAAC;;;ACA3F,IAAa,eAAe,IAAI,YAAY;;;;;;;AAQ5C,SAAgB,qBAAqB,UAAU;CAE9C,IAAwB,eAAgB,MACvC,OAA2B,eAAgB,KAAK,QAAQ;CAGzD,MAAM,WAAW,SAAS,OAAO,cAAc,CAAC;CAChD,OAAO,IAAI,eAAe;EACzB,MAAM,KAAK,YAAY;GACtB,MAAM,EAAE,OAAO,SAAS,MAAM,SAAS,KAAK;GAC5C,IAAI,MAAM,WAAW,MAAM;QACtB,WAAW,QAAQ,KAAK;EAC9B;EACA,MAAM,OAAO,QAAQ;GACpB,MAAM,SAAS,SAAS,MAAM;EAC/B;CACD,CAAC;AACF;;;;;;AAOA,SAAgB,YAAY,MAAM,QAAQ;CACzC,OAAO,sBACL,mBAAmB;EACnB,MAAM,aAAa,OAAO,IAAI;EAC9B,WAAW,MAAM,SAAS,QACzB,IAAI,OAAO,MAAM,aAAa,OAAO,KAAK;CAE5C,EAAA,CAAG,CACJ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